Distributions Marc H. Mehlman marcmehlman@yahoo.com University of New Haven Marc Mehlman Marc Mehlman (University of New Haven) Distributions 1 / 49
Table of Contents Distributions 1 Discrete Random Variables 2 Common Discrete Distributions 3 Discrete Uniform, X ∼ DU ( n ) Binomial, X ∼ BIN ( n , p ) Geometric, X ∼ GEO ( p ) Continuous Distributions 4 Common Continuous Distributions 5 Uniform Distribution, UNIF ( a , b ) Normal Distribution, X ∼ N ( µ, σ ) Sampling Distributions 6 Central Limit Theorem, CLT 7 Is it Normal? 8 Chapter #4 and #5 R Assignment 9 Marc Mehlman Marc Mehlman (University of New Haven) Distributions 2 / 49
Distributions Distributions Distributions Marc Mehlman Marc Mehlman (University of New Haven) Distributions 3 / 49
Distributions Definition Random Variable, r.v. X is a hypothetical outcome of an occurrence that occurs by chance. Example: X = # of heads after flipping a fair coin 10 times. Probability Distribution is a graph, table or formula that gives the probability of each value of x coming from X . Discrete Random Variable a random variable with its values associated with a counting process. Continuous Random Variable a random variable with its values being associated with an interval. Marc Mehlman Marc Mehlman (University of New Haven) Distributions 4 / 49
Distributions Example X = Number of gas fill ups in July 2010 by CT car owners – discrete random variable. Example X = Number of kittens a house cat gives birth to – discrete random variable. Example X = High temp in Hartford on a July 16’s – continuous random variable. Example X = Time spent in line at DMV – continuous random variable. Marc Mehlman Marc Mehlman (University of New Haven) Distributions 5 / 49
Discrete Random Variables Discrete Random Variables Discrete Random Variables Marc Mehlman Marc Mehlman (University of New Haven) Distributions 6 / 49
Discrete Random Variables Definition Define def P ( x ) = P ( X = x ) = probability of X = x . P ( x ) is called the density function . A probability histogram is a relative frequency histogram where the vertical scale shows probabilities instead of relative frequences. Note: that 0 ≤ P ( x ) ≤ 1 and � P ( x ) = 1. Example Marc Mehlman Marc Mehlman (University of New Haven) Distributions 7 / 49
Discrete Random Variables Expectations Theorem (Expectation) Given a discrete random variable, X, � µ = xP ( x ) , √ �� � � σ 2 = ( x − µ ) 2 P ( x ) = x 2 P ( x ) − µ 2 and σ = σ 2 . Notice: If all outcomes of X are equally likely, then summing over all outcomes, 1 = 1 � � � µ = xP ( X ) = x x . N N ���� P ( x ) Definition Unusual values of X lie within 2 σ of µ c is an unusually high value of X ⇔ c ≥ µ X + 2 σ X . c is an unusually low value of X ⇔ c ≤ µ X − 2 σ X . Marc Mehlman Marc Mehlman (University of New Haven) Distributions 8 / 49
Discrete Random Variables Example Getting 9 or more heads when flipping a fair coin 10 times is unusual. We � will soon see µ = 5 and σ = 10(0 . 25)0 . 25 = 1 . 581. Since 5 + 2(1 . 581) < 9, one concludes that 9 is an unusually high value for flipping a fair coin ten times and counting how many heads one has. Note: If after making an assumption about the probability distribution of a random variable, one observes an unusual event, one should question original assumption. “The statistician says that “rare events do happen – but not to me!”” – Stuart Hunter Marc Mehlman Marc Mehlman (University of New Haven) Distributions 9 / 49
Common Discrete Distributions Common Discrete Distributions Common Discrete Distributions Marc Mehlman Marc Mehlman (University of New Haven) Distributions 10 / 49
Common Discrete Distributions Discrete Uniform, X ∼ DU ( n ) Discrete Uniform, X ∼ DU ( n ) Discrete Uniform, X ∼ DU ( n ) X = outcome of rolling a fair n –sided die. Theorem If X ∼ DU ( n ) and if j is a nonnegative integer between 1 and n inclusive � 1 for j = 1 , 2 , · · · , n n P ( j ) = . 0 otherwise Furthermore � σ 2 = n 2 − 1 n 2 − 1 µ = n + 1 , and σ = . n 12 12 Marc Mehlman Marc Mehlman (University of New Haven) Distributions 11 / 49
Common Discrete Distributions Binomial, X ∼ BIN ( n , p ) Binomial, X ∼ BIN ( n , p ) Bernoulli Distribution, X ∼ BIN (1 , p ) Model: X = # heads after tossing a coin once, that has a probability of heads on each toss equal to p . Binomial Distribution, X ∼ BIN ( n , p ) Model: X = # heads after tossing a coin n times, that has a probability of heads on each toss equal to p . Theorem If X ∼ BIN ( n , p ) and j is a nonnegative integer between 0 and n inclusive � � n p j (1 − p ) n − j . P ( j ) = P ( X = j ) = j Furthermore � σ 2 µ X = np , X = np (1 − p ) and σ X = np (1 − p ) . Marc Mehlman Marc Mehlman (University of New Haven) Distributions 12 / 49
Common Discrete Distributions Binomial, X ∼ BIN ( n , p ) Rational for P ( j ) 1 probability of getting H · · · H is p j (1 − p ) n − j . T · · · T � �� � � �� � j n − j � n � 2 # ways to get j heads is . j So P ( X = j ) = P (1st way of getting j heads) = + P (2nd way of getting j heads) � n � = + P ( st way of getting j heads) j = p j (1 − p ) n − j + p j (1 − p ) n − j + · · · + p j (1 − p ) n − j � �� � ( n j ) p j (1 − p ) n − j Marc Mehlman Marc Mehlman (University of New Haven) Distributions 13 / 49
Common Discrete Distributions Binomial, X ∼ BIN ( n , p ) Example The probability of 3 heads when a coin with a probability of heads is 1/7 is flipped 10 times is � 1 � 3 � 6 � 4 P (3) = 10! = 0 . 1888425 . 3!7! 7 7 One can also obtain P (3) by using a table (A-1 in book though 1/7 is not in book table) or using a computer (R-command is dbinom( j , n , p )). Furthermore, √ � � 1 � � 1 � � 6 � = 60 60 60 σ 2 = 10 µ = 10 , 49 , σ = 49 = 7 . 7 7 7 Marc Mehlman Marc Mehlman (University of New Haven) Distributions 14 / 49
Common Discrete Distributions Geometric, X ∼ GEO ( p ) Geometric, X ∼ GEO ( p ) Geometric, X ∼ GEO ( p ) X = # flips of a coin with probability of heads = p before getting a head. Theorem If X ∼ GEO ( p ) and j is a positive integer P ( j ) = p (1 − p ) j − 1 j = 1 , 2 , 3 , · · · . Furthermore � µ = 1 σ 2 = 1 − p 1 − p p , and σ = p 2 . p 2 Marc Mehlman Marc Mehlman (University of New Haven) Distributions 15 / 49
Common Discrete Distributions Geometric, X ∼ GEO ( p ) Poisson, X ∼ POI ( µ ) Poisson, X ∼ POI ( µ ) X = # defects in a unit length of freshly made wire, where average # of defects per unit length is µ . Define the constant e def = 2 . 71828182845904523536028747135266249775724709369995 ... . Theorem If X ∼ POI ( µ ) and j is a nonnegative integer P ( j ) = µ j e − µ for j = 0 , 1 , 2 , 3 , · · · . j ! Furthermore σ = √ µ. σ 2 = µ µ = µ and Marc Mehlman Marc Mehlman (University of New Haven) Distributions 16 / 49
Common Discrete Distributions Geometric, X ∼ GEO ( p ) Example Let X = # times a year a light bulb needs to be replaced. Assume that on average, the number of times a light bulb has to be replaced is 2. Then X ∼ POI (2). Then √ σ 2 = 2 , µ = 2 , σ = 2 . Furthermore, P (3) = 2 3 e − 2 = 0 . 1804470 (calculated using R–command, 3! dpoi(3,2)). Marc Mehlman Marc Mehlman (University of New Haven) Distributions 17 / 49
Continuous Distributions Continuous Distributions Continuous Distributions Marc Mehlman Marc Mehlman (University of New Haven) Distributions 18 / 49
Continuous Distributions Density Curves A density curve is a curve that: A density curve is a curve that: • is always on or above the horizontal axis • is always on or above the horizontal axis • has an area of exactly 1 underneath it • has an area of exactly 1 underneath it A density curve describes the overall pattern of a A density curve describes the overall pattern of a distribution. The area under the curve and above any distribution. The area under the curve and above any range of values on the horizontal axis is the proportion range of values on the horizontal axis is the proportion of all observations that fall in that range. of all observations that fall in that range. Marc Mehlman Marc Mehlman (University of New Haven) Distributions 19 / 49 40
Common Continuous Distributions Common Continuous Distributions Common Continuous Distributions Marc Mehlman Marc Mehlman (University of New Haven) Distributions 20 / 49
Common Continuous Distributions Uniform Distribution, UNIF ( a , b ) Uniform Distribution, UNIF ( a , b ) Uniform Distribution, UNIF ( a , b ) X = a value chosen randomly from [ a , b ]. Theorem If X ∼ UNIF ( a , b ) � 1 if a ≤ x ≤ b f X ( x ) = b − a . 0 otherwise Furthermore � σ 2 = ( b − a ) 2 ( b − a ) 2 µ = b − a and σ = . 2 12 12 Marc Mehlman Marc Mehlman (University of New Haven) Distributions 21 / 49
Common Continuous Distributions Uniform Distribution, UNIF ( a , b ) Example A ship runs aground somewhere between NYC and New Haven. The probability it ran aground at any point of the 100 mile coast is equal to another point. What is the probability it ran aground in Milford (17 miles of coast)? 17 100 . Answer: Marc Mehlman Marc Mehlman (University of New Haven) Distributions 22 / 49
Recommend
More recommend