1 / 48

Lecture Slides

Lecture Slides. Elementary Statistics Eleventh Edition and the Triola Statistics Series by Mario F. Triola. Chapter 5 Probability Distributions. 5-1 Review and Preview 5-2 Random Variables 5-3 Binomial Probability Distributions

Download Presentation

Lecture Slides

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture Slides Elementary StatisticsEleventh Edition and the Triola Statistics Series by Mario F. Triola

  2. Chapter 5Probability 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. Section 5-1 Review and Preview

  4. 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. Review and Preview

  5. Combining Descriptive Methods and Probabilities In this chapter we will construct probability distributions by presenting possible outcomes along with the relative frequencies we expect. xbar = (1*8 + 2*10 + 3*9 + 4*12 +5*11 + 6*10 ) / ( 8+10 + 9 + 12 + 11 + 10) probability distribution (die rolled infinitely many times)

  6. Section 5-2 Random Variables

  7. Random variablea variable (typically represented by x) that has a single numerical value, determined by chance, for each outcome of a procedure Probability distributiona description that gives the probability for each value of the random variable; often expressed in the format of a graph, table, or formula

  8. 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. Discrete random variableeither 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… Discrete and Continuous Random Variables • Continuous random variableinfinitely 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. 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. P(x) = 1 where x assumes all possible values. -- sum of all probabilities is 1 – one of the events must occur Requirements for Probability Distribution • 0 P(x) 1 • for every individual value of x.

  12. 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. µ=[x•P(x)]Mean 2=[(x –µ)2 • P(x)] Variance 2=[x2 • P(x)]–µ2Variance (shortcut) =[x2 • P(x)]–µ2Standard Deviation – just square root of variance Mean, Variance and Standard Deviation of a Probability Distribution -- same characteristics as for data, but now applied to probability distribution.

  14. Example 1 – back to the number of pets in a household x = 0 1 2 p = 0.6 0.3 0.1

  15. Excel

  16. Expected Value 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 : E =  [x• P(x)]

  17. Identifying Unusual Results Range Rule of Thumb According to the range rule of thumb, most values should lie within 2standard 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.

  18. 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.

  19. 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. 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). It tends to be most accurate when values are distributed across multiple orders of magnitude (logarithms are uniformly distributed). -- 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. • 30.1% • 17.6% • 12.5% • 9.7% • 7.9% • 6.7% • 5.8% • 5.1% • 4.6%

  20. 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.

  21. 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 twocategories (commonly referred to as success and failure). 4. The probability of a success remains the same in all trials.

  22. 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.

  23. 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.

  24. Examples: • Roll a standard die ten times and count the number of 4’s. • The distribution of this random number is a binomial distribution with  • n = 10 and p = 1/6. • 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

  25. n! P(x) = •px•qn-x (n – x )!x! The probability of x successes among n trials for any one particular order. -- uses multiplication rule and independence = 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) Method 1: Using the Binomial Probability Formula 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 px•qn-x Any order => there are nCx of them 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)

  26. TI calculator: • 2nd 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

  27. Excel note absolute reference for B$1 and D$1, or just type in numbers

  28. TI calculator: • 2nd 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) Extra examples, may skip > # 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 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.

  29. Section 5-4 Mean, Variance, and Standard Deviation for the Binomial Distribution

  30. For Any Discrete Probability Distribution: Formulas Meanµ = [x•P(x)] Variance2= [x2•P(x) ] – µ2 Std. Dev = [x2•P(x) ] – µ2

  31. Binomial Distribution: Formulas Meanµ = n•p Variance2 = n•p•q Std. Dev. = 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

  32. 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:

  33. 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.

  34. 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 < 5% of population) => 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.

  35. skip Section 5-5 Poisson Probability Distributions

  36. Key Concept skip 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.

  37. Poisson Distribution The Poisson distribution is a discrete probability distribution that applies to occurrences of some event over a specified interval. The random variablex 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: µx• e –µ P(x) = wheree  2.71828 x! skip

  38. Requirements of thePoisson 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

  39. skip 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.

  40. skip 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 > 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 > > > 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

  41. Poisson as an Approximation to the Binomial Distribution Rule of Thumb n 100 np 10 skip The Poisson distribution is sometimes used to approximate the binomial distribution when n is large and p is small.

  42. Poisson as an Approximation to the Binomial Distribution - μ n 100 np 10 skip If both of the following requirements are met, then use the following formula to calculate µ, Value for μ= n • p

  43. skip • 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 <= 10 => 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

More Related