Presentation is loading. Please wait.

Presentation is loading. Please wait.

5.1 - 1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Similar presentations


Presentation on theme: "5.1 - 1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Lecture Slides Elementary Statistics Eleventh Edition and the Triola."— Presentation transcript:

1 5.1 - 1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by Mario F. Triola

2 5.1 - 2 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Chapter 5 Probability Distributions 5-1 Review and Preview 5-2 Random Variables 5-3 Binomial Probability Distributions 5-4 Mean, Variance and Standard Deviation for the Binomial Distribution 5-5 Poisson Probability Distributions

3 5.1 - 3 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 5-1 Review and Preview

4 5.1 - 4 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Review and Preview This chapter combines the methods of descriptive statistics presented in Chapter 2 and 3 and those of probability presented in Chapter 4 to describe and analyze probability distributions. Probability Distributions describe what will probably happen instead of what actually did happen, and they are often given in the format of a graph, table, or formula. In order to fully understand probability distributions, we must first understand the concept of a random variable, and be able to distinguish between discrete and continuous random variables. In this chapter we focus on discrete probability distributions. In particular, we discuss binomial and Poisson probability distributions.

5 5.1 - 5 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Combining Descriptive Methods and Probabilities In this chapter we will construct probability distributions by presenting possible outcomes along with the relative frequencies we expect. probability distribution (die rolled infinitely many times) xbar = (1*8 + 2*10 + 3*9 + 4*12 +5*11 + 6*10 ) / ( 8+10 + 9 + 12 + 11 + 10)

6 5.1 - 6 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 5-2 Random Variables

7 5.1 - 7 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.  Random variable a variable (typically represented by x) that has a single numerical value, determined by chance, for each outcome of a procedure  Probability distribution a description that gives the probability for each value of the random variable; often expressed in the format of a graph, table, or formula

8 5.1 - 8 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example 1 Assume we have random variable x denoting a number of pets in a household. x = 0 1 2 p = 0.6 0.3 0.1 Example 2 Assume a student has partially prepared for exam and probability of him correctly answering each question is, say, ¾ =0.75. Let x = # of correct answers he gets out of 5 question quiz === Just like peas problem x depends on chance => random variable x = 0 1 2 3 4 5 p = 0.00098 0.0146 0.0879 0.2637 0.3955 0.2373

9 5.1 - 9 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Discrete and Continuous Random Variables  Discrete random variable either a finite number of values (1,2,3…n) or countable number of values (1,2,3….infinity) -- whole numbers Ex: number of defective cell phones, number of students present in a class, number of phone calls per hour, number of molecules in a jar…  Continuous random variable infinitely many values, and those values can be associated with measurements on a continuous scale without gaps or interruptions Ex: height, weight, temperature, electric current, voltage…

10 5.1 - 10 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Graphs The probability histogram is very similar to a relative frequency histogram, but the vertical scale shows probabilities. Each rectangle is 1-unit wide => Areas of rectangles are the same as probabilities

11 5.1 - 11 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Requirements for Probability Distribution P ( x ) = 1 where x assumes all possible values. -- sum of all probabilities is 1 – one of the events must occur  0  P ( x )  1 for every individual value of x.

12 5.1 - 12 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example 1 Assume we have random variable x denoting a number of pets in a household. x = 0 1 2 p = 0.6 0.3 0.1 Each probability is between 0 and 1 and they sum to 1 => this is a probability distribution

13 5.1 - 13 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Mean, Variance and Standard Deviation of a Probability Distribution µ =  [ x P(x) ] Mean  2 =  [ (x – µ) 2 P(x )] Variance  2 =  [ x 2 P ( x ) ] – µ 2 Variance (shortcut )  =  [ x 2 P ( x ) ] – µ 2 Standard Deviation – just square root of variance -- same characteristics as for data, but now applied to probability distribution.

14 5.1 - 14 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example 1 – back to the number of pets in a household x = 0 1 2 p = 0.6 0.3 0.1

15 5.1 - 15 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Excel

16 5.1 - 16 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Expected Value E =  [x P(x)] The mean of a discrete random variable is the theoretical mean outcome of infinitely many trials = expected value if trials continued indefinitely. As we said, it is obtained by finding the value of :

17 5.1 - 17 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

18 5.1 - 18 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Identifying Unusual Results Range Rule of Thumb According to the range rule of thumb, most values should lie within 2 standard deviations of the mean. We can therefore identify “unusual” values by determining if they lie outside these limits: Maximum usual value = μ + 2σ Minimum usual value = μ – 2σ Example: Say, heights of men have mean 5.10 with 3 inch standard deviation. Then anybody below 5.4 and above 6.4 is unusual.

19 5.1 - 19 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

20 5.1 - 20 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Identifying Unusual Results Probabilities Rare Event Rule for Inferential Statistics If, under a given assumption (such as the assumption that a coin is fair), the probability of a particular observed event (such as 992 heads in 1000 tosses of a coin) is extremely small, then it is rare. We conclude that the assumption of fair coin is probably not correct. Using Probabilities to Determine When Results Are Unusual  Unusually high: x successes among n trials is an unusually high number of successes if P(x or more) ≤ 0.05.  Unusually low: x successes among n trials is an unusually low number of successes if P(x or fewer) ≤ 0.05.

21 5.1 - 21 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

22 5.1 - 22 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Benford's law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit is distributed in a specific, non- uniform way. According to this law, the first digit is 1 about 30% of the time, and larger digits occur as the leading digit with lower and lower frequency, to the point where 9 as a first digit occurs less than 5% of the time. This distribution of first digits is the same as the widths of gridlines on the logarithmic scale.logarithmic scale This counter-intuitive result has been found to apply to a wide variety of data sets, including electricity bills, street addresses, stock prices, population numbers, death rates, lengths of rivers, physical and mathematical constants, and processes described by power laws (which are very common in nature).physicalmathematical constantspower laws It tends to be most accurate when values are distributed across multiple orders of magnitude (logarithms are uniformly distributed).orders of magnitude -- was successfully used to detect financial fraud, because when humans make up numbers they tend to distribute them uniformly. The distribution of first digits, according to Benford's law. Each bar represents a digit, and the height of the bar is the percentage of numbers that start with that digit. 130.1% 217.6% 312.5% 49.7% 57.9% 66.7% 75.8% 85.1% 94.6%

23 5.1 - 23 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 5-3 Binomial Probability Distributions Motivating example: Flip a fair coin three times and count the number of heads. Let x be this number of heads. The distribution of x is a binomial distribution with n = 3 and p = 1/2.

24 5.1 - 24 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Binomial Probability Distribution A binomial probability distribution results from a procedure that meets all the following requirements: 1. The procedure has a fixed number of trials. 2. The trials must be independent. (The outcome of any individual trial doesn’t affect the probabilities in the other trials.) 3. Each trial must have all outcomes classified into two categories (commonly referred to as success and failure). 4. The probability of a success remains the same in all trials.

25 5.1 - 25 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Notation (continued) n denotes the fixed number of trials. x denotes a specific number of successes in n trials, so x can be any whole number between 0 and n, inclusive. p denotes the probability of success in one of the n trials. q denotes the probability of failure in one of the n trials (q = 1- p). P(x) denotes the probability of getting exactly x successes among the n trials. Flip a coin three times and count the number of heads. The distribution of this random variable is a binomial distribution with n = 3 and p = 1/2, q = 1-p = 1/2.

26 5.1 - 26 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Important Hints  Be sure that x and p both refer to the same category being called a success.  When sampling without replacement, consider events to be independent if n < 0.05N.

27 5.1 - 27 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Examples: 1)Roll a standard die ten times and count the number of 4’s.die The distribution of this random number is a binomial distribution with n = 10 and p = 1/6. 2)Mendel’s pees experiment. Probability of green offspring is 0.75 (yellow 0.25). There are n = 4 (n - fixed) independent trials. Each trial -> Success (p = 0.75 - fixed), Failure (q = 1 – p = 0.25) => Binom(n=4,p=0.75) Question: What is the probability of getting exactly 2 green offspring pods? x = 2

28 5.1 - 28 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Method 1: Using the Binomial Probability Formula where n = number of trials x = number of successes among n trials p = probability of success in any one trial q = probability of failure in any one trial (q = 1 – p) P(x) = p x q n-x n !n ! ( n – x )! x ! = nCx Number of outcomes with exactly x successes among n trials. Number of arrangements of n items with x items identical & (n-x) items identical (combinations) The probability of x successes among n trials for any one particular order. -- uses multiplication rule and independence There are n independent trials. Each trial – S(prob = p) or F(q=1-p). Prob(x successes) = Prob(x successes and n-x failures) Indep => multiplication rule gives p x q n-x Any order => there are nCx of them

29 5.1 - 29 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. TI calculator: 2 nd VARS -> DISTR (distributions) -> binomialpdf(n,p,x) -gives probability of getting n successes among n trials binomialcdf(n,p,x) gives cumulative probabilities -- sum of all probabilities from x=0 to specified x binomialpdf(5,0.75,3) binomialcdf(5,0.75,3) STATDISK Analysis -> Probability Distribution -> Binomial Distribution

30 5.1 - 30 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Excel note absolute reference for B$1 and D$1, or just type in numbers

31 5.1 - 31 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

32 5.1 - 32 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. > # Binomial distribution > # Genetics example > n = 4 > x = 2 > p = 0.75 > choose(n,x)*p^x*(1-p)^(n-x) [1] 0.2109375 > # or using built in functions > dbinom(x, size=n, prob=p) # d stands for distribution [1] 0.2109375 > > # Probability of getting 2 or fewer = P(0 or 1 or 2) = no intersection = > # = P(0) + P(1) + P(2) > choose(n,0)*p^0*(1-p)^(n-0) + choose(n,1)*p^1*(1-p)^(n-1) + choose(n,2)*p^2*(1-p)^(n-2) [1] 0.2617188 > # alternatively using cumulative probability distribution (later) > pbinom(x, size=n, prob=p) [1] 0.2617188 > > # Roll a standard die ten times and count the number of fours. > # The distribution of this random number is a binomial distribution with > # n = 10 and p = 1/6. Find prob of getting exactly 3 fours > n = 10 > x = 3 > p = 1/6 > choose(n,x)*p^x*(1-p)^(n-x) [1] 0.1550454 > # or using built in functions > dbinom(x, size=n, prob=p) [1] 0.1550454 > # Probability of getting 2 or less > choose(n,0)*p^0*(1-p)^(n-0) + choose(n,1)*p^1*(1-p)^(n-1) + choose(n,2)*p^2*(1-p)^(n-2) [1] 0.7752268 > # alternatively: > pbinom(2, size=n, prob=p) [1] 0.7752268 TI calculator: 2 nd VARS -> DISTR (distributions) -> binomialpdf(n,p,x) -gives probability of getting n successes among n trials binomialcdf(n,p,x) gives cumulative probabilities -- sum of all probabilities from x=0 to specified x binomialpdf(4,0.75,2) binomialcdf(4,0.75,2) binomialpdf(10,1/6,3) binomialcdf(10,1/6,2) STATDISK Analysis -> Probability Distribution -> Binomial Distribution Once you set up n and p it gives all the values of x, P(x) as well as all cumulative probabilities. Extra examples, may skip

33 5.1 - 33 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 5-4 Mean, Variance, and Standard Deviation for the Binomial Distribution

34 5.1 - 34 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. For Any Discrete Probability Distribution: Formulas Mean µ =  [ x P ( x )] Variance  2  = [  x 2 P ( x ) ] – µ 2 Std. Dev  = [  x 2 P(x) ] – µ 2

35 5.1 - 35 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Binomial Distribution: Formulas Std. Dev.  = n p q Mean µ = n p Variance  2  = n p q Where n = number of fixed trials p = probability of success in one of the n trials q = probability of failure in one of the n trials

36 5.1 - 36 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Interpretation of Results Maximum usual values = µ + 2  Minimum usual values = µ – 2  It is especially important to interpret results. The range rule of thumb suggests that values are unusual if they lie outside of these limits:

37 5.1 - 37 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

38 5.1 - 38 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Mendel Genetics Experiment Mendel generated 580 offspring peas and according to his theory 75% of them (i.e. 435) should have green pods. In reality he got 428, is this unusual if his theory is true? > n = 580 > p = 0.75 > mu = n*p > mu [1] 435 > sigma = sqrt(n*p*(1-p)) > sigma [1] 10.42833 > c(mu-2*sigma,mu+2*sigma) # range of usual values [1] 414.1433 455.8567 428 is within this range => it is not unusual In reality, we have to take variation into account – we can NOT get exactly 75%. => as long as the results do NOT vary too far from the predicted value, they are NOT unusual.

39 5.1 - 39 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Color blindness The frequency of color blindness (dyschromatopsia) in the Caucasian American male population is estimated to be about 8%. We take a random sample of size 25 from this population. The population is definitely larger than 20 times the sample size (the sample is approximate sampling distribution by B(n = 25, p = 0.08). > n = 25 > p = 0.08 > mu = n*p # p is a proportion of color blind people => it makes sense that there are n*p of them on average among n people > mu [1] 2 > sigma = sqrt(n*p*(1-p)) > sigma [1] 1.356466 > c(mu-2*sigma,mu+2*sigma) # range of usual values [1] -0.712932 4.712932 => It would be unusual to have 0 color blind people (cannot be negative) and more than 4.7 (like 5) would be unusual.

40 5.1 - 40 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 5-5 Poisson Probability Distributions skip

41 5.1 - 41 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Key Concept The Poisson distribution is another discrete probability distribution which is important because it is often used for describing the behavior of rare events (with small probabilities). Examples: probability for a particular radioactive particle to decay, probability of an earthquake in particular area, arrival of patients to an emergency room, arrival of people in line, internet logs to a particular site. Suppose some area in California experiences a mean of 12 earthquakes in a year. We can use Poisson distribution to find probability that for a randomly selected year, exactly 10 earthquakes occurs. skip

42 5.1 - 42 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Poisson Distribution The Poisson distribution is a discrete probability distribution that applies to occurrences of some event over a specified interval. The random variable x is the number of occurrences of the event in an interval. The interval can be time, distance, area, volume, or some similar unit. The probability of the event occurring x times over an interval is: P(x) = where e  2.71828 µ x e –µ x!x! skip

43 5.1 - 43 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Requirements of the Poisson Distribution  The random variable x is the number of occurrences of an event over some interval.  The occurrences must be random.  The occurrences must be independent of each other.  The occurrences must be uniformly distributed over the interval being used. Parameters  The mean is µ.  The standard deviation is  = µ. skip

44 5.1 - 44 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Difference from a Binomial Distribution The Poisson distribution differs from the binomial distribution in these fundamental ways:  The binomial distribution is affected by the sample size n and the probability p, whereas the Poisson distribution is affected only by the mean μ.  In a binomial distribution the possible values of the random variable x are 0, 1,... n, but a Poisson distribution has possible x values of 0, 1, 2,..., with no upper limit. skip

45 5.1 - 45 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example: Earthquakes (book) For a recent period of 100 years there were 93 major earthquakes. The Poisson distribution applies because we are dealing with an occurrence of an event over some interval (a year). The mean number of earthquakes is: mu = # of earthquakes / # of years = 93/100 = 0.93 > numberOfEvents = 93 > numberOfIntervals = 100 > mu = numberOfEvents/numberOfIntervals > mu [1] 0.93 > > # Like calculator > P = rep(0,8) # just to create an array of zeros > P [1] 0 0 0 0 0 0 0 0 > P[1] = mu^0 * exp(-mu) / factorial(0) # Prob of 0 earthquakes in 1 year > P[2] = mu^1 * exp(-mu) / factorial(1) # Prob of 1 earthquakes in 1 year > # etc.... > > # The easiest way is just to use R's built-in function > P = dpois(0:7,lambda = mu) > P [1] 3.945537e-01 3.669350e-01 1.706248e-01 5.289367e-02 1.229778e-02 [6] 2.287387e-03 3.545450e-04 4.710383e-05 > Freq = P*numberOfIntervals > Freq [1] 39.455371037 36.693495065 17.062475205 5.289367314 1.229777900 [6] 0.228738689 0.035454497 0.004710383 > > # Compare to actual frequencies > # number of Earthquakes 0 1 2 3 4 5 6 7 > # number of years 47, 31, 13, 5, 2, 0, 1, 1 > # They are not very far from the ones predicted by Poisson > # => Poisson is a good model > skip

46 5.1 - 46 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Poisson as an Approximation to the Binomial Distribution Rule of Thumb  n  100  np  10 The Poisson distribution is sometimes used to approximate the binomial distribution when n is large and p is small. skip

47 5.1 - 47 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Poisson as an Approximation to the Binomial Distribution - μ Value for μ  = n p  n  100  np  10 If both of the following requirements are met, then use the following formula to calculate µ, skip

48 5.1 - 48 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example (book): In Illinois pick 3 game, you pay 50c to select a sequence of 3 digits. If you play it once every day, find the probability of winning exactly once in a whole year of 365 days. Time interval is 365 days => n = 365 – there are 365 trials There is one winning set of numbers among 000 to 999 – 1000 possible  p = 1/1000 n independent trials, each trial success (p), failure (1-p) -- binomial Can do it directly, but oftentimes this produces very large factorials n >= 100 and n*p = 0.365 can try Poisson approximation. > n = 365 > p = 1/1000 > > # Directly using Binomial > choose(n,1)*p^(1)*(1-p)^(n-1) [1] 0.2535891 > > # Poisson approximation > mu = n*p > mu [1] 0.365 > x = 1 > P = mu^x*exp(-mu)/factorial(x) > P [1] 0.2533818 # very close to exact skip


Download ppt "5.1 - 1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Lecture Slides Elementary Statistics Eleventh Edition and the Triola."

Similar presentations


Ads by Google