




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An in-depth exploration of probability distributions, focusing on discrete and continuous examples. Topics covered include probability mass functions, cumulative distribution functions, expected values, variances, moment-generating functions, and the memoryless property. The document also includes examples of uniform, exponential, and normal distributions.
What you will learn
Typology: Slides
1 / 28
This page cannot be seen from the preview
Don't miss anything!
Rather than summing probabilities related to discrete random variables, here for continuous random variables, the density curve is integrated to determine probability.
Exercise 3.1 (Introduction) Patient’s number of visits, X, and duration of visit, Y.
0 1 2 3
1
4
probability = value of function, F(3) = P(Y < 3) = 5/
0 1 2 x
1
0 1 2
1
density, pmf f(x)
probability (distribution): cdf F(x)
probability less than 1.5 = sum of probability at specific values P(X < 1.5) = P(X = 0) + P(X = 1) = 0.25 + 0.50 = 0.
P(X = 2) = 0.
0 1 2 3
1/
1/
2/
1
4
density, pdf f(y) = y/6, 2 < y < 4
probability less than 3 = area under curve, P(Y < 3) = 5/
x
probability at 3, P(Y = 3) = 0
probability less than 1.5 = value of function F(1.5 ) = P(X < 1.5) = 0.
_
Figure 3.1: Comparing discrete and continuous distributions
74 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
xf (x) (ii)
xf (x) dx (d) V ar(X) = (i) E(X^2 ) − μ^2 (ii) E(Y 2 ) − μ^2 (e) M (t) = (i) E
etX^
(ii) E
etY^
(f) Examples of discrete densities (distributions) include (choose one or more) (i) uniform (ii) geometric (iii) hypergeometric (iv) binomial (Bernoulli) (v) Poisson
2
x 6 dx^ =^ x^2 12
]x= x=
requires (i) summation (ii) integration and is a value of a (i) probability density function (ii) cumulative distribution func- tion which is a (i) stepwise (ii) smooth increasing function (c) E(Y ) = (i)
yf (y) (ii)
yf (y) dy (d) V ar(Y ) = (i) E(X^2 ) − μ^2 (ii) E(Y 2 ) − μ^2 (e) M (t) = (i) E
etX^
(ii) E
etY^
(f) Examples of continuous densities (distributions) include (choose one or more) (i) uniform (ii) exponential (iii) normal (Gaussian) (iv) Gamma (v) chi-square (vi) student-t (vii) F
76 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
with associated standard deviation, σ =
σ^2. The moment-generating function is
M (t) = E
etX^
−∞
etX^ f (x) dx
for values of t for which this integral exists. Expected value, assuming it exists, of a function u of X is
E[u(X)] =
−∞
u(x)f (x) dx
The (100p)th percentile is a value of X denoted πp where
p =
∫ (^) πp
−∞
f (x) dx = F (πp)
and where πp is also called the quantile of order p. The 25th, 50th, 75th percentiles are also called first, second, third quartiles, denoted p 1 = π 0. 25 , p 2 = π 0. 50 , p 3 = π 0. 75 where also 50th percentile is called the median and denoted m = p 2. The mode is the value x where f is maximum.
Exercise 4.2 (Definitions)
f (x) =
6 x,^2 < x^ ≤^4 , 0 , otherwise.
0 1 2 3
1/
1/
2/
1
4 0 1 2 3
1
4
density, pdf f(x) probability, cdf F(x) probability less than 3 = area under curve, P(X < 3) = 5/
probability = value of function, F(3) = P(X < 3) = 5/
x x
probability at 3, P(X = 3) = 0
Figure 3.3: f(x) and F(x)
Section 2. Definitions (LECTURE NOTES 5) 77
(a) Verify function f (x) satisfies the second property of pdfs, ∫ (^) ∞
−∞
f (x) dx =
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 0. 15 (iii) 0. 5 (iv) 1 (b) P (2 < X ≤ 3) = ∫ (^3)
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 125 (iii) 129 (iv) 1 (c) P (X = 3) = P (3−^ < X ≤ 3) = 3122 − 3122 = 0 6 = f (3) = 16 · 3 = 0. 5 (i) True (ii) False So the pdf f (x) = 16 x determined at some value of x does not determine probability. (d) P (2 < X ≤ 3) = P (2 < X < 3) = P (2 ≤ X ≤ 3) = P (2 ≤ X < 3) (i) True (ii) False because P (X = 3) = 0 and P (X = 2) = 0 (e) P (0 < X ≤ 3) = ∫ (^3)
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 125 (iii) 129 (iv) 1 Why integrate from 2 to 3 and not 0 to 3? (f) P (X ≤ 3) = ∫ (^3)
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 125 (iii) 129 (iv) 1 (g) Determine cdf (not pdf) F (3).
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 125 (iii) 129 (iv) 1 (h) Determine F (3) − F (2).
2
x dx = x^2 12
]x=
x=
(i) 0 (ii) 125 (iii) 129 (iv) 1 because everything left of (below) 3 subtract everything left of 2 equals what is between 2 and 3
Section 2. Definitions (LECTURE NOTES 5) 79
[1] 26/ (q) Variance, method 2. Variance in wait time is
σ^2 = V ar(X) = E[(X − μ)^2 ] =
−∞
(x − μ)^2 f (x) dx
2
x −
x
dx
2
x^3 6
56 x^2 54
784 x 486
dx
x^4 24
56 x^3 162
784 x^2 972
2
(i) 2381 (ii) 2681 (iii) 3181 (iv) 3581. library(MASS) # INSTALL once, RUN once (per session) library MASS sigma2 <- (4^4/24 - 564^3/162 + 7844^2/972) - (2^4/24 - 562^3/162 + 7842^2/972) fractions(sigma2) # turn decimal to fraction [1] 26/ (r) Standard deviation. Standard deviation in time spent on the call is,
σ =
σ^2 =
(i) 0. 57 (ii) 0. 61 (iii) 0. 67 (iv) 0. 73. (s) Moment generating function.
M (t) = E[etX^ ] =
−∞
etxf (x) dx
2
etx
x
dx
2
xetx^ dx
etx
x t
t^2
e^4 t
t
t^2
e^2 t
t
t^2
, t 6 = 0.
(i) True (ii) False use integration by parts for t 6 = 0 case: ∫^ u dv = uv − ∫^ v du where u = x, dv = etxdx.
80 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
(t) Median. Since the distribution function F (x) = x (^2) − 4 12 , then median^ m^ = π 0. 50 occurs when
F (m) = P (X ≤ m) = m^2 − 4 12
so m = π 0. 50 =
(i) 1. 16 (ii) 2. 16 (iii) 3. 16 negative answer m ≈ − 3 .16 is not in 2 < x ≤ 4, so m 6 = − 3. 16
f (x) =
ax^2 , 1 < x ≤ 5 , 0 , otherwise.
0 1 2 3
1
4 5 0 1 2 3
1
4 5
density, pdf f(x) probability, cdf F(x) = P(X < x)
x x
Figure 3.4: f(x) and F(x)
(a) Find constant a. Since the cdf F (5) = 1, and
F (x) =
∫ (^) x
1
at^2 dt = a t^3 3
]t=x
t=
ax^3 3
a 3
a(x^3 − 1) 3
then F (5) = a(5^3 − 1) 3
124 a 3
so a = (i) 1243 (ii) 1242 (iii) 1241 (b) Determine pdf. f (x) = ax^2 = (i) 1243 x^2 (ii) 1242 x^2 (iii) 1241 x^2
82 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
(j) Determine π 0. 01.
F (π 0. 01 ) =
(π^30. 01 − 1) = 0. 01 ,
and so π 0. 01 = 3
(i) 1. 31 (ii) 3. 17 (iii) 4. 17 The π 0. 01 is that value where 1% of probability is at or below (to the left of) this value.
f (x) =
x, 0 < x ≤ 1 , 2 − x, 1 < x ≤ 2 , 0 , elsewhere.
0 1 2
1
0 1 2 3
1
density, pdf f(x) probability, cdf F(x) = P(X < x)
x x
Figure 3.5: f(x) and F(x)
(a) Expected value.
μ = E(X) =
−∞
xf (x) dx
0
x (x) dx +
1
x (2 − x) dx
0
x^2 dx +
1
2 x − x^2
dx
x^3 3
0
2 x^2 2
x^3 3
(i) 1 (ii) 2 (iii) 3 (iv) 4.
Section 2. Definitions (LECTURE NOTES 5) 83
(b) E (X^2 ).
0
x^2 (x) dx +
1
x^2 (2 − x) dx
0
x^3 dx +
1
2 x^2 − x^3
dx
x^4 4
0
2 x^3 3
x^4 4
(i) 46 (ii) 56 (iii) 66 (iv) 76.
(c) Variance. σ^2 = Var(X) = E
− μ^2 =
(i) 13 (ii) 14 (iii) 15 (iv) 16.
(d) Standard deviation. σ =
σ^2 =
(i) 0. 27 (ii) 0. 31 (iii) 0. 41 (iv) 0. 53.
(e) Median. Since the distribution function is
F (x) =
0 x ≤ 0 ∫ (^) x 0 t dt^ =^
t^2 2
]x t= = x 2 2 ,^0 < x^ ≤^1 , ∫ (^) x 1 (2^ −^ t)^ dt^ +^ F^ (1) =^2 t^ −^
t^2 2
]x t=
12 2 ) +^
1 2 ,^1 < x^ ≤^2 , 1 , x > 2.
F (1) = 12 , so add 12 to F (x) for 1 < x ≤ 2 then median m occurs when
F (x) =
m^2 2 =^
1 2 ,^0 < x^ ≤^1 , 2 m − m 22 − 1 = 12 , 1 < x ≤ 2 , 1 , x > 2.
so for both 0 < x ≤ 1 and 1 < x ≤ 2, m = (i) 1 (ii) 1. 5 (iii) 2
Section 3. The Uniform and Exponential Distributions (LECTURE NOTES 5) 85
f (x) =
(a) Since a = 49 and b = 51, the distribution is
F (x) =
0 x < 49 , x− 49 51 − 49 49 ≤^ x^ ≤^51 , 1 x > 52 ,
and so graphs of density and distribution are given in the figure. (i) True (ii) False
0 49 50 51 0 49 50 51
1
1
density, pdf f(x) probability, cdf F(x) = P(X < x)
x x
Figure 3.6: Distribution function: continuous uniform
(b) Determine P (49. 5 < X < 51) by integrating pdf.
dx = x 2
x=49. 5
(i) 0. 25 (ii) 0. 50 (iii) 0. 75 (iv) 1. (c) Determine P (49. 5 < X < 51) using cdf.
P (49. 5 < X < 51) = F (51) − F (49.5) =
(i) 0. 25 (ii) 0. 50 (iii) 0. 75 (iv) 1. 1 - punif(49.5,49,51) # uniform P(49.5 < X < 51) = 1 - P(X < 49.5), 49 < x < 51 [1] 0.
86 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
(d) The chance the bags weight more than 49.
P (X > 49 .5) = 1 − P (X ≤ 49 .5) = 1 − F (49.5) = 1 −
(i) 0. 25 (ii) 0. 50 (iii) 0. 75 (iv) 1. 1 - punif(49.5,49,51) # uniform P(X > 49.5) = 1 - P(X < 49.5), 49 < x < 51 [1] 0. (e) What is the mean weight of a bag of potatoes?
μ = E(X) = a + b 2
(i) 49 (ii) 50 (iii) 51 (iv) 52. (f) What is the standard deviation in the weight of a bag of potatoes?
σ =
(b − a)^2 12
(i) 0. 44 (ii) 0. 51 (iii) 0. 55 (iv) 0. 58. (g) Determine probability within 1 standard deviation of mean.
P (μ − σ < X < μ + σ) ≈ P (50 − 0. 58 < X < 50 + 0.58) = P (49. 42 < X < 50 .58)
=
dx = x 2
x=49. 42
(i) 0. 44 (ii) 0. 51 (iii) 0. 55 (iv) 0. 58. (h) Function of X. If it costs $0.0556 (5.56 cents) per pound of potatoes, then the cost of X pounds of potatoes is Y = 0. 0556 X. Determine the probability a bag of potatoes chosen at random costs at least $2.78.
50
dx = x 2
x=
(i) 0. 25 (ii) 0. 50 (iii) 0. 75 (iv) 1.
f (x) =
3 e−^3 x, x > 0 , 0 , otherwise.
88 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
below mean. Since λ = 3, so μ = σ = 13 , so
P (μ − σ < X < μ) = P
1 − e−(3)^
1 − e−(3)(0)
(i) 0. 33 (ii) 0. 43 (iii) 0. 53 (iv) 0. 63. (e) Check if f (x) is a pdf. ∫ (^) ∞
0
3 e−^3 x^ dx = lim b→∞
∫ (^) b
0
3 e−^3 x^ dx = lim b→∞
−e−^3 x
]x=b x=0 = lim b→∞
−e−^3 b^ − (−ex(0))
or, equivalently, blim→∞ F^ (b) = lim b→∞ 1 −^ e−^3 b^ = 1 (i) True (ii) False (f) Show F ′(x) = f (x).
F ′(x) = d dx F (x) = d dx
1 − e−^3 x
(i) 3 e−^3 x^ (ii) e−^3 x^ + 1 (iii) 1 − e−^3 x (g) Determine μ using mgf. Since M (t) = (^) λλ−t ,
M ′(t) = d dt
λ λ − t
λ (λ − t)^2
so μ = M ′(0) = (i) λ (ii) 1 (iii) 1 − λ (iv) (^1) λ. use quotient rule, since f = uv = (^) λλ−t , f ′^ = vu′ v− 2 uv ′= (λ−t()(0)λ−−t)λ 2 (−1)= (^) (λ−λt) 2 = (^) λ^1 if t = 0 (h) Memoryless property of exponential. Chance atomic decay lasts at least 10 microseconds is P (X > 10) = 1 − F (10) = 1 − (1 − e−3(10)) = (i) e−^10 (ii) e−^20 (iii) e−^30 (iv) e−^40.
and chance atomic decay lasts at least 15 microseconds, given it has already lasted at least 5 microseconds is
P (X > 15 |X > 5) =
1 − (1 − e−3(15)) 1 − (1 − e−3(5))
Section 3. The Uniform and Exponential Distributions (LECTURE NOTES 5) 89
(i) e−^10 (ii) e−^20 (iii) e−^30 (iv) e−^40.
so, in other words,
P (X > 15 |X > 5) =
or P (X > 10 + 5) = P (X > 10) · P (X > 5) This is an example of the “memoryless” property of the exponential, it implies time intervals are independent of one another. Chance of decay after 15 microsecond, given decay after 5 microseconds, same as chance of decay after 10 seconds; it is as though first 5 microseconds “forgotten”.
0.60, 0.07, 0.66, 0.17, 0.06, 0.14, 0.15, 0.19, 0.07, 0. 0.85, 0.44, 0.71, 1.02, 0.07, 0.21, 0.16, 0.16, 0.01, 0.
0
relative frequency
time-to-decay (microseconds), x
0 0.2 0.4 0.6 0.8 1.
exponential density curve, pdf, f(x)
relative frequency histogram approximates density curve
Figure 3.8: Histogram of exponential decay times
Section 4. The Normal Distribution (LECTURE NOTES 5) 91
The continuous normal distribution of random variable X, defined on the interval (−∞, ∞), has pdf with parameters μ and σ, that is, “X is N (μ, σ^2 )”,
f (x) =
σ
2 π
e−(1/2)[(x−μ)/σ]
2 ,
and cdf F (x) = P (X ≤ x) =
∫ (^) x
−∞
σ
2 π
e−(1/2)[(t−μ)/σ] 2 dt,
and its expected value (mean), variance and standard deviation are,
E(X) = μ, V ar(X) = σ^2 , σ =
V ar(X),
and mgf is
M (t) = exp
μt + σ^2 t^2 2
A normal random variable, X, may be transformed to a standard normal, Z,
f (z) =
2 π
e−z (^2) / 2 ,
where “Z is N (0, 1)” and
Φ(z) = P (Z ≤ z) =
∫ (^) z
−∞
2 π
e−t (^2) / 2 dt,
where μ = 0, σ = 1 and M (t) = et (^2) / 2 using the following equation,
Z = X − μ σ
The distribution of this density does not have a closed–form expression and so must be solved using numerical integration methods. We will use both R and the tables to obtain approximate numerical answers.
Exercise 3.4 (The Normal Distribution)
f (x 1 ) =
2 π
e−(1/2)[(y−100)/16] 2 ,
f (x 2 ) =
2 π
e−(1/2)[(y−120)/20] 2 .
A graph of these two densities is given in the figure.
92 Chapter 3. Continuous Random Variables (LECTURE NOTES 5)
f(x)
f(x)
x
20 year old IQs
16 year old IQs
μ = 100 μ = 120
σ = 20
σ = 16
Figure 3.9: Normal distributions: IQ scores
(a) Mean IQ score for 20 year olds is μ = (i) 100 (ii) 120 (iii) 124 (iv) 136. (b) Average (or mean) IQ scores for 16 year olds is μ = (i) 100 (ii) 120 (iii) 124 (iv) 136. (c) Standard deviation in IQ scores for 20 year olds σ = (i) 16 (ii) 20 (iii) 24 (iv) 36. (d) Standard deviation in IQ scores for 16 year olds is σ = (i) 16 (ii) 20 (iii) 24 (iv) 36. (e) Normal density for 20 year old IQ scores is (i) broader than normal density for 16 year old IQ scores. (ii) as wide as normal density for 16 year old IQ scores. (iii) narrower than normal density for 16 year old IQ scores. (f) Normal density for the 20 year old IQ scores is (i) shorter than normal density for 16 year old IQ scores. (ii) as tall as normal density for 16 year old IQ scores. (iii) taller than normal density for 16 year old IQ scores. (g) Total area (probability) under normal density for 20’s IQ scores is (i) smaller than area under normal density for 16’s IQ scores. (ii) the same as area under normal density for 16’s IQ scores. (iii) larger than area under normal density for 16’s IQ scores. (h) Number of different normal densities: (i) one (ii) two (iii) three (iv) infinity.
f (x 1 ) =
2 π
e−(1/2)[(y−100)/16] 2 ,
f (x 2 ) =
2 π
e−(1/2)[(y−120)/20]
2 .