Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Welcome to . Week 08 Thurs . MAT135 Statistics Estimation We use the sample mean 𝒙 to estimate the unknown population mean µ Estimation Using the sample mean 𝒙 to estimate the unknown population mean µ is called “making inferences” Estimation The sample standard deviation “s” is the best estimate we have for the unknown population standard deviation “σ” Estimation Using s to estimate σ is also an inference Estimation s IS NOT the measure of variability in the new population of 𝒙s Estimation It needs to be decreased to take sample size into account! Estimation We use: s/ n for the measure of variability in the new population of 𝒙s Estimation The standard deviation of the 𝒙s: s/ n is called the “standard error” abbreviated “se” Estimation So our curve is: 𝒙-3se 𝒙-2se 𝒙-se 𝒙 𝒙+se 𝒙+2se 𝒙+3se Binomial Proportions All of these activities can be done when you have measured data (continuous) Binomial Proportions What if you had counts in two categories and wanted to estimate the population proportion? Binomial Proportions Weep? Throw things? Give up? Binomial Proportions Naw… we’ve got an easy solution! http://www.shutterstock.com/s/whew/search.html Binomial Proportions Suppose you have a random sample of size “n” Binomial Proportions Suppose you have a random sample of size “n” Suppose you want the proportion of successes p Binomial Proportions Suppose you have a random sample of size “n” Suppose you know the number of successes in your sample is “x” Binomial Proportions The sample proportion (symbolized: p, called: “p-hat”) is: x p = n BINOMIAL PROPORTIONS IN-CLASS PROBLEM 1 You have a random sample with frequencies: Blue 35 Is it binomial? Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 1 You have a random sample with frequencies: Blue 35 Red 23 Is it binomial? yep BINOMIAL PROPORTIONS IN-CLASS PROBLEM 2 You have a random sample with frequencies: Blue 35 What is n? Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 2 You have a random sample with frequencies: Blue 35 What is n? 58 Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 3 You have a random sample with frequencies: Blue 35 What is xred? Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 3 You have a random sample with frequencies: Blue 35 What is xred? 23 Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 4 You have a random sample with frequencies: Blue 35 What is pred? Red 23 BINOMIAL PROPORTIONS IN-CLASS PROBLEM 4 You have a random sample with frequencies: Blue 35 Red 23 x 23 What is pred? = ≈ 40.0% n 58 Questions? Binomial Estimation Just like the sample mean 𝒙 is the best estimate of the true population mean μ… Binomial Estimation …there is a true population proportion “p” that is best estimated by the sample proportion p Binomial Estimation In symbols: µp = p BINOMIAL ESTIMATION IN-CLASS PROBLEM 5 You have a random sample with frequencies: Blue 35 Red 23 What is the best estimate for pred? BINOMIAL ESTIMATION IN-CLASS PROBLEM 5 You have a random sample with frequencies: Blue 35 Red 23 What is the best estimate for pred? 40.0% BINOMIAL ESTIMATION IN-CLASS PROBLEM 6 You have a random sample with frequencies: Blue 35 Red 23 What is the best estimate for qred? BINOMIAL ESTIMATION IN-CLASS PROBLEM 6 You have a random sample with frequencies: Blue 35 Red 23 What is the best estimate for qred? 60.0% Binomial Estimation Because p-values distributions are often skewed, you need to be sure your sample size is large before assigning probabilities to this estimate using a normal distribution Binomial Estimation You can assume normality if: np ≥ 5or10 and n(1-p) ≥ 5or10 (nq ≥ 5or10) Binomial Estimation This is known as the Rule of Sample Proportions Binomial Estimation Note: your book says the shape of the sampling distribution of p-hat is approximately normal provided np(1-p)≥10 (I think it’s a typo) Binomial Sampling What if your sample size is too small? Binomial Sampling The normal approximation can always be used, but if the conditions are not met, then the approximation may not be that good of an approximation. BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? Is np ≥ 5or10? BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? Is np ≥ 5or10? np ≈ 58 × .400 ≈ 23.2 BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? Is nq ≥ 5or10? BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? Is nq ≥ 5or10? nq ≈ 58 ×.400 ≈ 23.2 BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? BINOMIAL ESTIMATION IN-CLASS PROBLEM 7 You have a random sample with frequencies: Blue 35 Red 23 Is pred likely to be normallydistributed? yep, close enough Questions? Binomial Sampling Just as a gazillion samples each with its own mean gives a new population: the gazillion means Binomial Sampling …a gazillion samples each with its own proportion gives a new population: the gazillion ps Binomial Sampling And, again if you plotted the frequency of the gazillion p values, it would be called a SAMPLING DISTRIBUTION Binomial Sampling And, again, the shape of the plot of the gazillion sample means would have a normal-ish distribution NO MATTER WHAT THE ORIGINAL DATA LOOKED LIKE Binomial Sampling Very nonnormal population Binomial Sampling Very nonnormal population Normal-er Binomial Sampling Very nonnormal population Normal-ish Binomial Sampling And, again, as “n” increases, the variability (spread) decreases Binomial Sampling The standard deviation of the ps is: σp = p(1−p) = n pq n Binomial Sampling The standard deviation of the ps is: σp = p(1−p) = n pq n also called the standard error of p-hat: sep Binomial Sampling So a normal curve would be: p-3 pq n p-2 pq n p- pq n p p+ pq n p+2 pq n p+3 pq n Binomial Sampling So a normal curve would be: p-3 sep p-2 sep p-sep p p+sep p+2 sep p+3 sep BINOMIAL SAMPLING IN-CLASS PROBLEM 8 You have a random sample with frequencies: Blue 35 Red 23 What is the standard error of p-hat? BINOMIAL SAMPLING IN-CLASS PROBLEM 8 You have a random sample with frequencies: Blue 35 Red 23 What is the standard error of p-hat? × sep = pq = n .6×.4 ≈ .064 58 BINOMIAL SAMPLING IN-CLASS PROBLEM 9 You have a random sample with frequencies: Blue 35 Red 23 What would the normal curve look like? BINOMIAL SAMPLING IN-CLASS PROBLEM 9 p-3 sep p-2 sep p-sep p p+sep p+2 sep p+3 sep BINOMIAL SAMPLING IN-CLASS PROBLEM 9 .6-3(.064) .6-2(.064) .6-.064 .6 .6+.064 .6+2(.064) .6+3(.064) BINOMIAL SAMPLING IN-CLASS PROBLEM 9 .408 .472 .536 .6 .664 .728 .792 BINOMIAL SAMPLING IN-CLASS PROBLEM 10 .408 .472 .536 .6 .664 .728 What is P(0.536<p<.664)? .792 BINOMIAL SAMPLING IN-CLASS PROBLEM 10 .408 .472 .536 .6 .664 .728 What is P(0.536<p<.664)? 68% .792 BINOMIAL SAMPLING IN-CLASS PROBLEM 11 .408 .472 .536 .6 .664 .728 .792 What is the range of values for p that would with 95% certainty include the true p? BINOMIAL SAMPLING IN-CLASS PROBLEM 11 .408 .472 .536 .6 .664 .728 .792 What is the range of values for p that would with 95% certainty include the true p? .472<p<.728 BINOMIAL SAMPLING IN-CLASS PROBLEM 12 .408 .472 .536 .6 .664 .728 .792 What is the probability the true p lies between 0.47 and .65? BINOMIAL SAMPLING IN-CLASS PROBLEM 12 .408 .472 .536 .6 .664 .728 .792 What is the probability the true p lies between 0.47 and .65? 76.2% Binomial Sampling A study I did for my science class… Binomial Sampling Some diamonds fluoresce under UV light Binomial Sampling What percentage of diamonds fluoresce? Binomial Sampling I inherited a bunch of jewelry Some of it has diamonds in it Binomial Sampling Is this a binomial variable? Binomial Sampling What is n? Fluoresce 8 Don’t 114 Binomial Sampling What is x? Fluoresce 8 Don’t 114 Binomial Sampling What is your best estimate of p? Fluoresce 8 Don’t 114 Binomial Sampling Is it normal? Fluoresce 8 Don’t 114 Binomial Sampling To find out what sample size you need to: Estimate p Use the min of p and q Algebra magic: n > 5or10/min(p,q) Binomial Sampling Fluoresce 8 Don’t 114 p ≈ .066 so q ≈ .934 so we’ll use p n > 10/.066 or 151.5 Binomial Sampling Fluoresce 8 Don’t 114 p ≈ .066 so q ≈ .934 so we’ll use p n > 10/.066 or 151.5 In other words n > 152 Questions? You survived! Turn in your homework! Don’t forget your homework due next week! Have a great rest of the week! www.playbuzz.com