Presentation on theme: "Sampling distributions"— Presentation transcript:
1Sampling distributions Lecture 10Sampling distributionsDr. Richard Bußmann
2Distribution of sample proportions QTM1310/ SharpeDistribution of sample proportionsTo learn more about the variability within a sample / population, we have to be somewhat creative and imagine.We probably will never know the value of the true proportion of an event in the population.However, the true proportion is important to us, so we’ll give it a label, 𝑝 for “true proportion.”
3How to imagine (in statistics)… Most statisticians would be delusional to suppose they could ever truly know about true characteristics of a population.You are in a similar situation. Unless you can perform a complete census of all available data, you still need statistics to help you create a picture that is reasonable close to reality.Recall our 毛泽东 from class 1. Unless you have all necessary data, you won’t be able to paint a “true” picture of 毛主席, but with some data you can probably come up with the blue 毛泽东.
4How to imagine (in statistics)… Once you have the blue 毛泽东, you can add some assumptions to your data.Most people’s skin colour is not blue.Most Chinese skin colour is fairly white.You then state these findings and manipulate the data to give 毛主席 a more reasonable skin colour.Note, that this makes you the JUDGE of what is reasonable or not.This is one great power that statisticians wield!
5How to imagine (in statistics)… Suppose you unearth a couple of bones of a dinosaur.Quite frankly, you are given a sample of information, while some information is missing from the sample.How to “imagine” these results?You can simulate them?I.e. once you know the thickness of the dinosaurs legs, you can calculate its weight, from which in turn you can make assumptions with respect to the size of other bones, etc.Once you have (imagined) sufficient data, you can use it to come up with a model and learn more.
6QTM1310/ SharpesimulationA simulation is to use a computer to pretend to draw random samples from some (sample) population of values over and over.A simulation can help us understand how sample proportions vary due to random sampling.
7QTM1310/ SharpesimulationWhen we have only two possible outcomes for an event, label one of them “success” and the other “failure.”In a simulation, we set the true proportion of successes to a known value, draw random samples, and then recordthe sample proportion of successes, which we denote by 𝑝 , for each sample.Even though 𝑝 varies / changes from sample to sample, 𝑝 does so in a way that we can model and understand.
8simulation Below is the distribution of 2000 sample values of 𝑝 . QTM1310/ SharpesimulationBelow is the distribution of 2000 sample values of 𝑝 .The 𝑝 come from simulated samples (of size 1000) drawn from a population in which the true population proportion, 𝑝, is 0.21.Variability from one sample to another is expected, but the way in which the proportions vary shows us how the proportions of real samples would vary.
9Proportion’s Sampling distributions QTM1310/ SharpeProportion’s Sampling distributionsThe distribution of proportions over many independent samples from the same population is called the sampling distribution of the proportions.For distributions that are bell-shaped and centred at the true proportion, 𝑝, we can use the sample size n to find the standard deviation of the sampling distribution:𝑆𝐷 𝑝 = 𝑝(1−𝑝) 𝑛 = 𝑝𝑞 𝑛
10Proportion’s Sampling distributions QTM1310/ SharpeProportion’s Sampling distributionsRemember that the difference between sample proportions, referred to as sampling error is not really an error.The sample error is just the variability you’d expect to see from one sample to another. A better term might be sampling variability.Hence, to discover how variable a sample proportion is, we need to know the proportion and the size of the sample (, only).
11Proportion’s Sampling distributions QTM1310/ SharpeProportion’s Sampling distributionsThe particular Normal model, 𝑁(𝑝 , 𝑝𝑞 𝑛 2 ), is a sampling distribution model for the sample proportion.It won’t work for all situations, but it works for most situations that you’ll encounter in practice.
12𝑁(𝑝, 𝑝𝑞 𝑛 2 ) Let’s consider 𝑁(𝑝, 𝑝𝑞 𝑛 2 ) 𝑆𝐷 𝑝 = 𝑝(1−𝑝) 𝑛 = 𝑝𝑞 𝑛 𝑁(𝑝, 𝑝𝑞 𝑛 2 )Let’s consider𝑁(𝑝, 𝑝𝑞 𝑛 2 )𝑆𝐷 𝑝 = 𝑝(1−𝑝) 𝑛 = 𝑝𝑞 𝑛𝑛 is the denominator of the 𝑆𝐷 𝑝 , hence the larger 𝑛, the better / smaller 𝑆𝐷 𝑝 .The smaller 𝑆𝐷 𝑝 , the better / more accurate are the conclusions we can draw from 𝑁(𝑝, 𝑝𝑞 𝑛 2 ).
13Proportion’s Sampling distributions QTM1310/ SharpeProportion’s Sampling distributionsIn the above equation, n is the sample size and q is the proportion of failures (q = 1 – p). (We use 𝑞 for its observed value in a sample.)Note that 𝑛 comes at a price. The bigger your sample size, the more costs are involved in its collection. Nonetheless, you need a sample size that is big enough, so as to make valid inferences from it.
14Proportion’s Sampling distributions QTM1310/ SharpeProportion’s Sampling distributionsThe sampling distribution model for 𝑝 is valuable because…we don’t need to actually draw many samples and accumulate all those sample proportions, or even to simulate them and because…we can calculate what fraction of the distribution will be found in any region of the distribution
15Quality of the normal model QTM1310/ SharpeQuality of the normal modelSamples of size 1 or 2 just aren’t going to work very well, but the distributions of proportions of many larger samples have histograms that are remarkably close to a Normal model.The model becomes a better and better representation of the distribution of the sample proportions, as the sample size gets bigger.Given𝑁(𝑝, 𝑝𝑞 𝑛 2 )This shouldn’t be surprising any more.
16assumptions Independence Assumption QTM1310/ SharpeassumptionsIndependence AssumptionThe sampled values must be independent of each other.Sample Size AssumptionThe sample size, n, must be large enough.
17conditions Randomization Condition QTM1310/ SharpeconditionsRandomization ConditionIf you have a survey, your sample should be a simple random sample of the population.If some other sampling design was used, be sure the sampling method was not biased and that the data are representative of the population.I.e. if your data come from a (medical) experiment, subjects should have been randomly assigned to treatments.I.e. if you want to survey Chinese people’s preference for meat, don’t just survey people in 新疆省.
18conditions 10% Condition QTM1310/ Sharpeconditions10% ConditionIf sampling has not been made with replacement, then the sample size, 𝑛, must be no larger than 10% of the population.Success/Failure ConditionThe sample size must be big enough so that both the number of “successes,” 𝑛∗𝑝, and the number of “failures,” 𝑛∗𝑞, are expected to be at least 10.So what if 𝑛∗𝑝=8?That’s your decision. How about you state that 8 is the new 10?8=10 is open to interpretation. Make sure though that your data is still sufficiently representative of the population.
19QTM1310/ SharpeexampleInformation on a box of seeds states that the germination (发芽) rate is 92%. Are conditions met to answer the question, “What is the probability that more than 95% of the 160 seeds in the box will germinate?”Independence:It is reasonable to assume the seeds will germinate independently from each other.Randomization:The sample of seeds can be considered a random sample from all seeds from this producer.
20example 10% Condition: Success/Failure Condition: The packet is less than 10% of all seeds manufactured.Success/Failure Condition:𝑛𝑝 = (0.92×160) = > 10𝑛𝑞 = (0.05×160) = > 10
21QTM1310/ SharpeexampleInformation on a packet of seeds claims that the germination rate is 92%. What is the probability that more than 95% of the 160 seeds in the packet will germinate?𝑁 0.92, ∗ =𝑁(0.92, )𝑧= 𝑝 −𝑝 𝑆𝐷( 𝑝) = 0.95− =1.428Look up the z-value.
22Simulating the sampling distribution of a mean QTM1310/ SharpeSimulating the sampling distribution of a meanHere are the results of a simulated 10,000 tosses of one fair die:This is is a uniform distribution.
23Simulating the sampling distribution of a mean QTM1310/ SharpeSimulating the sampling distribution of a meanHere are the results of a simulated 10,000 tosses of two fair dice, averaging the numbers:This is a triangular distribution.
24Simulating the sampling distribution of a mean QTM1310/ SharpeSimulating the sampling distribution of a meanHere’s a histogram of the averages for 10,000 tosses of five dice:As the sample size (number of dice) gets larger, each sample average tends to become closer to the population mean.The shape of the distribution is becoming bell-shaped. In fact, it’s approaching the Normal model.
25The central limit theorem QTM1310/ SharpeThe central limit theoremCentral Limit Theorem (CLT): The sampling distribution of any mean becomes Normal as the sample size grows.This is true regardless of the shape of the population distribution!However, if the population distribution is very skewed, it may take a sample size of dozens or even hundreds of observations for the Normal model to work well.
26The central limit theorem QTM1310/ SharpeThe central limit theoremNow we have two distributions to deal with: the real- world distribution of the sample, and the math-world sampling distribution of the statistic. Don’t confuse the two.The Central Limit Theorem doesn’t talk about the distribution of the data from the sample. It talks about the sample means and sample proportions of many different random samples drawn from the same population:The mean of a random sample has a sampling distribution whose shape can be approximated by a Normal model. The larger the sample, the better the approximation.
27Sampling distribution of the mean QTM1310/ SharpeSampling distribution of the meanWhich would be more surprising, having one person in your Statistics class who is over 2 meters tall or having the mean of 100 students taking the course be over 2 meters?The first event is fairly rare, but finding a class of 100 whose mean height is over 6′9″ tall will only happen in a basketball academy (where students study statistics).Means have smaller standard deviations than individuals.
28Sampling distribution of the mean QTM1310/ SharpeSampling distribution of the meanThe Normal model for the sampling distribution of the mean has a standard deviation equal to𝑆𝐷 𝑦 = 𝜎 √𝑛Where 𝜎 is the standard deviation of the population.To emphasize that this is a standard deviation parameter of the sampling distribution model for the sample mean, 𝑦 , we writeSD( 𝑦 )) or 𝜎( 𝑦 )
29Sampling distribution of the mean QTM1310/ SharpeSampling distribution of the meanWhen a random sample is drawn from any population with mean=𝜇 and SD=𝜎, its sample mean, 𝑦 , has a sampling distribution with the same mean 𝜇, but whose SD is 𝜎 √𝑛 .We write this as 𝜎 𝑦 =𝑆𝐷 𝑦 = 𝜎 √𝑛 .No matter what population the random sample comes from, the shape of the sampling distribution is approximately Normal as long as the sample size is large enough.The larger the sample size used, the more closely is the sampling distribution model for the mean approximated by the Normal distribution.
30sampling distribution models QTM1310/ Sharpesampling distribution modelsWe now have two closely related sampling distribution models. Which one we use depends on which kind of data we have.For categorical data, we calculate a sample proportion, 𝑝 . Its sampling distribution ~𝑁 with a mean at the population proportion, 𝑝, and a standard deviation𝑆𝐷 𝑝 = 𝑝(1−𝑝) 𝑛 𝑝𝑞 𝑛
31sampling distribution models When we have quantitative data, we calculate a sample mean, 𝑦 .Its sampling distribution ~𝑁 with a mean at the population mean, 𝜇, and a standard deviation𝑆𝐷 𝑦 = 𝜎 √𝑛
32assumptions Independence Assumption QTM1310/ SharpeassumptionsIndependence AssumptionThe sampled values must be independent of each other.Sample Size AssumptionThe sample size, n, must be large enough.
33conditions 10% Condition QTM1310/ Sharpeconditions10% ConditionIf sampling has not been made with replacement, then the sample size, 𝑛, must be no larger than 10% of the population.Randomization ConditionData must be sampled randomly or sampling distributions make no sense.
34QTM1310/ SharpeexampleAccording to recent studies, cholesterol levels in healthy U.S. adults average about 215 mg/dL with a standard deviation of about 30 mg/dL and are roughly symmetric and unimodal. If the cholesterol levels of a random sample of 42 healthy U.S. adults is taken, are conditions met to use the normal model?Randomization:10% Condition:Large Enough Sample Condition:
35QTM1310/ SharpeexampleCholesterol levels in adults average about 215 mg/dL, with SD of 30 mg/dL. Levels are symmetric and unimodal. A random sample of 42 adults is taken. Are conditions met to use the normal model?Randomization:The sample is random10% Condition:These 42 healthy U.S. adults are less than 10% of the population of healthy U.S. adults.Large Enough Sample Condition:Cholesterol levels are roughly symmetric and unimodal so a sample size of 42 is sufficient. (Had the distribution been skewed, a larger sample size might have been needed).
36exampleCholesterol levels in adults average about 215 mg/dL, with SD of 30 mg/dL. Levels are symmetric and unimodal. A random sample of 42 adults is taken. Are conditions met to use the normal model?What would the mean of the sampling distribution be?What would the standard deviation of the sampling distribution be?
37exampleCholesterol levels in adults average about 215 mg/dL, with SD of 30 mg/dL. Levels are symmetric and unimodal. A random sample of 42 adults is taken. Are conditions met to use the normal model?What would the mean of the sampling distribution be?𝜇 𝑦 =𝜇=215What would the standard deviation of the sampling distribution be?𝑆𝐸 𝑦 = 𝑠 √𝑛 = 30 √42 =4.629
38exampleCholesterol levels in adults average about 215 mg/dL, with SD of 30 mg/dL. Levels are symmetric and unimodal. A random sample of 42 adults is taken. Are conditions met to use the normal model?What is the probability that the average cholesterol level will be greater than 220?𝑧= 𝑦 −𝜇 𝑆𝐷( 𝑦 ) = 220− =1.08Find the probability using the tables!
39Diminishing returns w.r.t sample size QTM1310/ SharpeDiminishing returns w.r.t sample sizeThe standard deviation of the sampling distribution declines only with the square root of the sample size.𝑆𝐸 𝑦 = 𝑠 √𝑛The square root limits how much we can make a sample tell about the population. This is an example of the Law of Diminishing Returns.Apart from this course, this is a nice concept to know something about…
40QTM1310/ SharpeExampleThe mean weight of boxes shipped by a company is 12 lbs, with a standard deviation of 4 lbs. Boxes are shipped in palettes of 10 boxes. The shipper has a limit of 150 lbs for such shipments.What’s the probability that a palette will exceed that limit?Asking the probability that the total weight of a sample of 10 boxes exceeds 150 lbs is the same as asking the probability that the mean weight exceeds 15 lbs.
41Example First we’ll check the conditions. We will assume that QTM1310/ SharpeExampleFirst we’ll check the conditions.We will assume thatthe 10 boxes on the palette are a random sample from the population of boxes andthat their weights are mutually independent.Also, 10 boxes are surely less than 10% of the population of boxes shipped by the company.
42QTM1310/ SharpeexampleUnder these conditions, the CLT says that the sampling distribution of 𝑦 follows a Normal distribution with mean 12 and standard deviation𝑆𝐷 𝑦 = 𝜎 √𝑛 = 4 √10 =1.26𝑧= 𝑦 −𝜇 𝑆𝐷( 𝑦 ) = 15− =2.38𝑃 𝑦 >150 =𝑃 𝑧>2.38 =0.0087So the chance that the shipper will reject a palette is only —less than 1%.
43Sampling distribution models QTM1310/ SharpeSampling distribution modelsWhenever we estimate the standard deviation of a sampling distribution, we call it a standard error (SE).For a sample proportion, 𝑝 , the standard error is:𝑆𝐸 𝑝 = 𝑝 𝑞 𝑛For the sample mean, 𝑦 , the standard error is:𝑆𝐸 𝑦 = 𝑠 √𝑛
44Random quantities and their facts QTM1310/ SharpeRandom quantities and their factsThe proportion and the mean are random quantities.We can’t know what our statistic will be, because it comes from a random sample.The two basic truths about sampling distributions are:Sampling distributions arise because samples vary.Although we can always simulate a sampling distribution, the Central Limit Theorem saves us the trouble for means and proportions.
45QTM1310/ SharpeA Graphic summaryTo keep track of how the concepts we’ve seen, we can draw a diagram relating them.We start with a population model, and label the mean of this model 𝜇 and its standard deviation, 𝜎.We draw one real sample 𝒔 𝟏 of size n and show its histogram and summary statistics. We imagine many other samples (dotted lines).
46A graphic summary We imagine gathering all the 𝑚𝑒𝑎𝑛𝑠 into a histogram. QTM1310/ SharpeA graphic summaryWe imagine gathering all the 𝑚𝑒𝑎𝑛𝑠 into a histogram.The CLT tells us we can model the shape of this histogram with a Normal model. The mean of this Normal is 𝜇, and the standard deviation is𝑆𝐷 𝑦 = 𝜎 √𝑛 ≈ 𝑠 1 √𝑛
47QTM1310/ SharpeA graphic summaryWhen we don’t know 𝜎, we estimate it with the standard deviation of the one real sample, 𝑠 1 . That gives us the standard error.𝑆𝐷 𝑦 = 𝜎 √𝑛 ≈ 𝑠 1 √𝑛
48QTM1310/ SharpesummaryDon’t confuse the sampling distribution with the distribution of the sample.Beware of observations that are not independent.Watch out for small samples from skewed populations.
49QTM1310/ SharpesummaryModel the variation in statistics from sample to sample with a sampling distribution.The Central Limit Theorem tells us that the sampling distribution of both the sample proportion and the sample mean are Normal.Understand that, usually, the mean of a sampling distribution is the value of the parameter estimated.For the sampling distribution of 𝑝 , the mean is 𝑝.For the sampling distribution of 𝑦 , the mean is μ.
50summary Interpret the standard deviation of a sampling distribution. QTM1310/ SharpesummaryInterpret the standard deviation of a sampling distribution.The standard deviation of a sampling model is the most important information about it.The standard deviation of the sampling distribution of a proportion is𝑝𝑞 𝑛 𝑤𝑖𝑡ℎ 𝑞=1−𝑝The standard deviation of the sampling distribution of a mean is𝜎 √𝑛 𝑤𝑖𝑡ℎ 𝜎=𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑆𝐷
51summary Understand that the Central Limit Theorem is a limit theorem. QTM1310/ SharpesummaryUnderstand that the Central Limit Theorem is a limit theorem.The sampling distribution of the mean is Normal, no matter what the underlying distribution of the data is.The CLT says that this happens in the limit, as the sample size grows (and grows, all the way to ∞, if necessary).The Normal model applies sooner when sampling from a uni-modal, symmetric population and more gradually when the population is very non-Normal.