# Sampling distributions

## Presentation on theme: "Sampling distributions"— Presentation transcript:

Sampling distributions
Lecture 10 Sampling distributions Dr. Richard Bußmann

Distribution of sample proportions
QTM1310/ Sharpe Distribution of sample proportions To 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.”

How 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 毛泽东.

How 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!

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

QTM1310/ Sharpe simulation A 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.

QTM1310/ Sharpe simulation When 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 record the 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.

simulation Below is the distribution of 2000 sample values of 𝑝 .
QTM1310/ Sharpe simulation Below 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.

Proportion’s Sampling distributions
QTM1310/ Sharpe Proportion’s Sampling distributions The 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−𝑝) 𝑛 = 𝑝𝑞 𝑛

Proportion’s Sampling distributions
QTM1310/ Sharpe Proportion’s Sampling distributions Remember 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).

Proportion’s Sampling distributions
QTM1310/ Sharpe Proportion’s Sampling distributions The 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.

𝑁(𝑝, 𝑝𝑞 𝑛 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 ).

Proportion’s Sampling distributions
QTM1310/ Sharpe Proportion’s Sampling distributions In 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.

Proportion’s Sampling distributions
QTM1310/ Sharpe Proportion’s Sampling distributions The 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

Quality of the normal model
QTM1310/ Sharpe Quality of the normal model Samples 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.

assumptions Independence Assumption
QTM1310/ Sharpe assumptions Independence Assumption The sampled values must be independent of each other. Sample Size Assumption The sample size, n, must be large enough.

conditions Randomization Condition
QTM1310/ Sharpe conditions Randomization Condition If 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 新疆省.

conditions 10% Condition
QTM1310/ Sharpe conditions 10% Condition If sampling has not been made with replacement, then the sample size, 𝑛, must be no larger than 10% of the population. Success/Failure Condition The 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.

QTM1310/ Sharpe example Information 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.

example 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

QTM1310/ Sharpe example Information 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.428 Look up the z-value.

Simulating the sampling distribution of a mean
QTM1310/ Sharpe Simulating the sampling distribution of a mean Here are the results of a simulated 10,000 tosses of one fair die: This is is a uniform distribution.

Simulating the sampling distribution of a mean
QTM1310/ Sharpe Simulating the sampling distribution of a mean Here are the results of a simulated 10,000 tosses of two fair dice, averaging the numbers: This is a triangular distribution.

Simulating the sampling distribution of a mean
QTM1310/ Sharpe Simulating the sampling distribution of a mean Here’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.

The central limit theorem
QTM1310/ Sharpe The central limit theorem Central 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.

The central limit theorem
QTM1310/ Sharpe The central limit theorem Now 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.

Sampling distribution of the mean
QTM1310/ Sharpe Sampling distribution of the mean Which 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.

Sampling distribution of the mean
QTM1310/ Sharpe Sampling distribution of the mean The 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 write SD( 𝑦 )) or 𝜎( 𝑦 )

Sampling distribution of the mean
QTM1310/ Sharpe Sampling distribution of the mean When 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.

sampling distribution models
QTM1310/ Sharpe sampling distribution models We 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−𝑝) 𝑛 𝑝𝑞 𝑛

sampling 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 𝑆𝐷 𝑦 = 𝜎 √𝑛

assumptions Independence Assumption
QTM1310/ Sharpe assumptions Independence Assumption The sampled values must be independent of each other. Sample Size Assumption The sample size, n, must be large enough.

conditions 10% Condition
QTM1310/ Sharpe conditions 10% Condition If sampling has not been made with replacement, then the sample size, 𝑛, must be no larger than 10% of the population. Randomization Condition Data must be sampled randomly or sampling distributions make no sense.

QTM1310/ Sharpe example According 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:

QTM1310/ Sharpe example Cholesterol 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 random 10% 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).

example Cholesterol 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?

example Cholesterol 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? 𝜇 𝑦 =𝜇=215 What would the standard deviation of the sampling distribution be? 𝑆𝐸 𝑦 = 𝑠 √𝑛 = 30 √42 =4.629

example Cholesterol 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.08 Find the probability using the tables!

Diminishing returns w.r.t sample size
QTM1310/ Sharpe Diminishing returns w.r.t sample size The 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…

QTM1310/ Sharpe Example The 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.

Example First we’ll check the conditions. We will assume that
QTM1310/ Sharpe Example First we’ll check the conditions. We will assume that the 10 boxes on the palette are a random sample from the population of boxes and that their weights are mutually independent. Also, 10 boxes are surely less than 10% of the population of boxes shipped by the company.

QTM1310/ Sharpe example Under 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.0087 So the chance that the shipper will reject a palette is only —less than 1%.

Sampling distribution models
QTM1310/ Sharpe Sampling distribution models Whenever 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: 𝑆𝐸 𝑦 = 𝑠 √𝑛

Random quantities and their facts
QTM1310/ Sharpe Random quantities and their facts The 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.

QTM1310/ Sharpe A Graphic summary To 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).

A graphic summary We imagine gathering all the 𝑚𝑒𝑎𝑛𝑠 into a histogram.
QTM1310/ Sharpe A graphic summary We 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 √𝑛

QTM1310/ Sharpe A graphic summary When we don’t know 𝜎, we estimate it with the standard deviation of the one real sample, 𝑠 1 . That gives us the standard error. 𝑆𝐷 𝑦 = 𝜎 √𝑛 ≈ 𝑠 1 √𝑛

QTM1310/ Sharpe summary Don’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.

QTM1310/ Sharpe summary Model 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 μ.

summary Interpret the standard deviation of a sampling distribution.
QTM1310/ Sharpe summary Interpret 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 𝜎 √𝑛 𝑤𝑖𝑡ℎ 𝜎=𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑆𝐷

summary Understand that the Central Limit Theorem is a limit theorem.
QTM1310/ Sharpe summary Understand 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.