Download Two types of random variables

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Probability wikipedia , lookup

Randomness wikipedia , lookup

Transcript
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 1 Discrete Random Variable 2/7/12 Lecture 8 2 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 2/7/12 4/16 6/16 Lecture 8 4/16 1/16 3 Probability Histogram 2/7/12 Lecture 8 4 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 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 7 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 8 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 9 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 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 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: ∞
µ X = ∫ x ⋅ f ( x)dx
−∞
•  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: 2/7/12 µ X = ∑ x ⋅ p(x)
Lecture 9 12 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 Lecture 9 13 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 2/7/12 Lecture 9 14 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: 2
X
∞
2
(
x − µX )
−∞
σ =∫
⋅ f ( x)dx
•  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: 2
2
X
σ = ∑ (x − µ X ) ⋅ p ( x )
•  σ
X -­‐ Standard deviaQon of X, is square root of the variance σ X2
2/7/12 Lecture 9 15 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 Lecture 9 16 Car Sales •  The total number of cars to be sold next week is described by the following probability distribuQon x
p(x)
0
1
.05 .15
2
.35
3
.25
4
.20
•  Determine the expected value and standard deviaQon of X, the number of cars sold. 5
µ X = ∑ xi p( xi ) = 0(0.05) + 1(0.15) + 2(0.35) + 3(0.25) + 4(0.20) = 2.40
i =1
2
5
σ X = ∑ ( xi − 2.4) 2 p( xi ) = (0 − 2.4) 2 (.05) + (1 − 2.4) 2 (.15)
i =1
+ (2 − 2.4) 2 (.35) + (3 − 2.4) 2 (.25) + (4 − 2.4) 2 (.20) = 1.24
2/7/12 σ X = 1.24 = 1.11
Lecture 9 17 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 Awer Class… •  Review Sec 5.4 •  Read Sec 5.5 and 5.6 •  Hw#4, due by 5pm next Monday. 2/7/12 Lecture 9 19