Two%types%of%random%variables% - Purdue Universityxuanyaoh/stat350/xyFeb6Lec9.pdf · • A...
Transcript of Two%types%of%random%variables% - Purdue Universityxuanyaoh/stat350/xyFeb6Lec9.pdf · • A...
2/7/12 Lecture 8 1
Two types of random variables • A discrete random variable has a finite number of possible
values or an infinite sequence of countable real numbers. – X: number of hits when trying 20 free throws. – X: number of customers who arrive at the bank from 8:30 – 9:30AM Mon-‐Fri.
– E.g. Binomial, Poisson …
• A con*nuous random variable takes all values in an interval
of real numbers. – X: the Qme it takes for a bulb to burn out. – The values are not countable.
2/7/12 Lecture 8 3
Example 1: Flip a coin 4 Qmes • Find the probability distribuQon of the random variable
describing the number of heads that turn up when a coin is flipped four Qmes.
• Solu*on
1/16 4/16 6/16 4/16 1/16
Example 2: randomly sampling and tesQng 10 items from a shipment
• Suppose it’s known that 5% of all items do not conform to quality standards.
• A = at most one of the sampled items fails the test B = none of the sampled items passes the test C = exactly one item fails to meet standards D = at least one fails to meet standards
• Define r.v. X = # of items that fail the test, so • A -‐> X ≤ 1 B -‐> (1) X = 0 or (2) X = 10? C -‐> X = 1 D -‐> X ≥ 1
2/7/12 Lecture 8 5
Answers
• X ~ Binomial(10, .05), therefore • P(A) = P(0) + P(1) = .914 • P(B) = P(10) = .000 • P(C) = P(1) = .315 • P(D) = 1 – P(0) = 1 -‐ .599 = .401
2/7/12 Lecture 8 6
2/7/12 Lecture 8 7
ConQnuous Random Variable
• A conQnuous random variable X takes all values in an interval of numbers. e.g. life Qme of a regular bulb. – Not countable
• The probability distribuQon of a conQnuous r.v. X is described by a density curve. – What is a density curve?
2/7/12 Lecture 8 8
ConQnuous DistribuQon • The probability of any event is the area under the density
curve and above the values of X that make up the event.
2/7/12 Lecture 8 9
ConQnuous DistribuQon • The probability model for a conQnuous random variable
assigns probabiliQes to intervals of outcomes rather than to individual outcomes.
• In fact, all conQnuous probability distribuQons assign
probability 0 to every individual outcome. – The spinner
• Examples: Normal distribuQons, ExponenQal DistribuQons, Uniform DistribuQons, etc.
• Self-‐Reading: example 5.10 on Pg 216-‐217.
2/7/12 Lecture 8 10
Women Height • The height of American women aged 18 – 24 is approximately
normally distributed with mean 64.3 inches and s.d. 2.4 inches. Two women in the age group are randomly selected. Suppose their heights are independent.
• What is the probability that both of them are taller than 66
inches? Define X = an American woman’s height, X ~N(64.3, 2.4). For only one woman, P(X > 66inches) =? P(both are taller than 66 in.) = P(X1> 66 in.)*P(X2>66 in.) =?
2/7/12 Lecture 9 11
Women Height • The height of American women aged 18 – 24 is approximately
normally distributed with mean 64.3 inches and s.d. 2.4 inches. Two women in the age group are randomly selected. Suppose their heights are independent.
• What is the probability that both of them are taller than 66
inches? Define X = an American woman’s height, X ~N(64.3, 2.4). For only one woman, P(X > 66inches) =? P(both are taller than 66 in.) = P(X1> 66 in.)*P(X2>66 in.) =?
Review: Mean (Expected Value) of a r.v.
• Mean of a conQnuous r.v. – Let f(x) be the density funcQon for a conQnuous random variable X, then the mean of X is:
• Mean of a discrete r.v. – Let p(x) be the mass funcQon for a conQnuous random variable X, then the mean of X is:
∫∞
∞−⋅= dxxfxX )(µ
∑ ⋅= )(xpxXµ2/7/12 12 Lecture 9
Examples—Means of some r.v.s
• ConQnuous distribuQons – Normal (µ,σ) — µ – ExponenQal (λ) — 1/ λ – Uniform (a, b) — (a+b)/2
• Discrete distribuQons – Binomial (n, π) — nπ – Poisson (λ) — λ
2/7/12 13 Lecture 9
2/7/12 Lecture 9 14
Free-‐throws
• A BoilerMaker basketball player is a 80% free-‐throw shooter.
• Suppose he will shoot 5 free-‐throws during each pracQce.
• X: number of hits he makes during the pracQce. • Find the mean of X. µ = n*π = 5 * 80% = 4
Review: Variance of a r.v.
• Variance for conQnuous r.v.s – Let f(x) be the density funcQon for a conQnuous random variable X, then the variance of X is:
• Variance for discrete r.v.s – Let p(x) be the mass funcQon for a conQnuous random variable X, then the variance of X is:
• -‐ Standard deviaQon of X, is square root of the variance
( )∫∞
∞−⋅−= dxxfx XX )(22 µσ
( )∑ ⋅−= )(22 xpx XX µσ
2Xσ
Xσ
2/7/12 15 Lecture 9
Examples—Variances of certain r.v.s
• ConQnuous distribuQons – Normal (µ,σ) — σ2 – ExponenQal (λ) — 1/ λ2 – Uniform (a, b) — (b–a)2/12
• Discrete distribuQons – Binomial (n, π) — nπ(1–π) – Poisson (λ) — λ
2/7/12 16 Lecture 9
2/7/12 Lecture 9 17
• The total number of cars to be sold next week is described by the following probability distribuQon
• Determine the expected value and standard deviaQon of X, the number of cars sold.
x 0 1 2 3 4 p(x) .05 .15 .35 .25 .20
Car Sales
11.124.1
24.1)20(.)4.24()25(.)4.23()35(.)4.22(
)15(.)4.21()05(.)4.20()()4.2(
40.2)20.0(4)25.0(3)35.0(2)15.0(1)05.0(0)(
222
225
1
22
5
1
==
=−+−+−+
−+−=−=
=++++==
∑
∑
=
=
X
iiiX
iiiX
xpx
xpx
σ
σ
µ
Independent r.v.s • X and Y are said to be independent if the events X < a and Y < b are independent for
all possible combinaQons of real numbers a and b, i.e. P(X< a and Y < b) = P(X< a)P(Y< b).
• For Discrete r.v. ONLY: We can use “=“ to replace “<“. • Ex.41 (Pg 223), Part(c) Are X and Y independent? • y • 10 15 20 • 5 .20 .15 .05 • x 6 .10 .15 .10 • 7 .10 .10 .05 • • Answer: No, because for X=5 and Y = 10, P(X=5 and Y=10) = 0.20, while P(X=5)P(Y=10) = .4*0.4 = 0.16, i.e. P(X=5 and Y=10)≠P(X=5)P(Y=10).
2/7/12 Lecture 9 18