Chapter page 20 / 3813 Inference with mathematical models
English

13  Inference with mathematical models

In Chapter 11 and Chapter 12 questions about population parameters were addressed using computational techniques. With randomization tests, the data were permuted assuming the null hypothesis. With bootstrapping, the data were resampled in order to measure the variability. In many cases (indeed, with sample proportions), the variability of the statistic can be described by the computational method (as in previous chapters) or by a mathematical formula (as in this chapter).

The normal distribution is presented here to describe the variability associated with sample proportions which are taken from either repeated samples or repeated experiments. The normal distribution is quite powerful in that it describes the variability of many different statistics, and we will encounter the normal distribution throughout the remainder of the book.

For now, however, focus is on the parallels between how data can provide insight about a research question either through computational methods or through mathematical models.

13.1 Central Limit Theorem

In recent chapters, we have encountered four case studies. While they differ in the settings, in their outcomes, and in the technique we have used to analyze the data, they all have something in common: the general shape of the distribution of the statistics (called the sampling distribution). You may have noticed that the distributions were symmetric and bell-shaped.

Sampling distribution.

A sampling distribution is the distribution of all possible values of a sample statistic from samples of a given sample size from a given population. We can think about the sample distribution as describing how sample statistics (e.g., the sample proportion \(\hat{p}\) or the sample mean \(\bar{x}\)) varies from one study to another. A sampling distribution is contrasted with a data distribution which shows the variability of the observed data values. The data distribution can be visualized from the observations themselves. However, because a sampling distribution describes sample statistics computed from many studies, it cannot be visualized directly from a single dataset. Instead, we use either computational or mathematical structures to estimate the sampling distribution and hence to describe the expected variability of the sample statistic in repeated studies.

Figure 13.1 shows the null distributions in each of the four case studies where we ran 10,000 simulations. Note that the null distribution is the sampling distribution of the statistic created under the setting where the null hypothesis is true. Therefore, the null distribution will always be centered at the value of the parameter given by the null hypothesis. In the case of the opportunity cost study, which originally had just 1,000 simulations, we have included an additional 9,000 simulations.

Four null hypothesis histograms for examples in the book including  opportunity cost, sex discrimination, medical consultant, and tappers  and listeners. Each histogram is centered at the null value of the  proportion which is 0, 0, 0.1, and 0.5, respectively.
Figure 13.1: The null distribution for each of the four case studies presented previously. Note that the center of each distribution is given by the value of the parameter set in the null hypothesis.

Describe the shape of the distributions and note anything that you find interesting.1

The case study for the medical consultant is the only distribution with any evident skew. As we observed in Chapter 1, it’s common for distributions to be skewed or contain outliers. However, the null distributions we have so far encountered have all looked somewhat similar and, for the most part, symmetric. They all resemble a bell-shaped curve. The bell-shaped curve similarity is not a coincidence, but rather, is guaranteed by mathematical theory.

Central Limit Theorem for proportions.

If we look at a proportion (or difference in proportions) and the scenario satisfies certain conditions, then the sample proportion (or difference in proportions) will appear to follow a bell-shaped curve called the normal distribution.

An example of a perfect normal distribution is shown in Figure 13.2. Imagine laying a normal curve over each of the four null distributions in Figure 13.1. While the mean (center) and standard deviation (width or spread) may change for each plot, the general shape remains roughly intact.

A normal curve centered at 0 with a standard deviation of one.
Figure 13.2: A normal curve.

Mathematical theory guarantees that if repeated samples are taken a sample proportion or a difference in sample proportions will follow something that resembles a normal distribution when certain conditions are met. (Note: we typically only take one sample, but the mathematical model lets us know what to expect if we had taken repeated samples.) These conditions fall into two general categories describing the independence between observations and the need to take a sufficiently large sample size.

  1. Observations in the sample are independent. Independence is guaranteed when we take a random sample from a population. Independence can also be guaranteed if we randomly divide individuals into treatment and control groups.

  2. The sample is large enough. The sample size cannot be too small. What qualifies as “small” differs from one context to the next, and we’ll provide suitable guidelines for proportions in Chapter 16.

So far we have had no need for the normal distribution. We’ve been able to answer our questions somewhat easily using simulation techniques. However, soon this will change. Simulating data can be non-trivial. For example, some of the scenarios encountered in Chapter 8 where we introduced regression models with multiple predictors would require complex simulations in order to make inferential conclusions. Instead, the normal distribution and other distributions like it offer a general framework for statistical inference that applies to a very large number of settings.

Technical Conditions.

In order for the normal approximation to describe the sampling distribution of the sample proportion as it varies from sample to sample, two conditions must hold. If these conditions do not hold, it is unwise to use the normal distribution (and related concepts like Z scores, probabilities from the normal curve, etc.) for inferential analyses.

  1. Independent observations
  2. Large enough sample: For proportions, at least 10 expected successes and 10 expected failures in the sample.

13.2 Normal Distribution

Among all the distributions we see in statistics, one is overwhelmingly the most common. The symmetric, unimodal, bell curve is ubiquitous throughout statistics. It is so common that people know it as a variety of names including the normal curve, normal model, or normal distribution.2 Under certain conditions, sample proportions, sample means, and sample differences can be modeled using the normal distribution. Additionally, some variables such as SAT scores and heights of US adult males closely follow the normal distribution.

Normal distribution facts.

Distributions of many variables are nearly normal, but none are exactly normal. Thus, the normal distribution, while not perfect for any single problem, is very useful for a variety of problems.

In this section, we will discuss the normal distribution in the context of data to become familiar with normal distribution techniques. In the following sections and beyond, we’ll move our discussion to focus on applying the normal distribution and other related distributions to model point estimates for hypothesis tests and for constructing confidence intervals.

13.2.1 Normal distribution model

The normal distribution always describes a symmetric, unimodal, bell-shaped curve. However, normal curves can look different depending on the details of the model. Specifically, the normal model can be adjusted using two parameters: mean and standard deviation. As you can probably guess, changing the mean shifts the bell curve to the left or right, while changing the standard deviation stretches or constricts the curve. Figure 13.3 (a) shows the normal distribution with mean \(0\) and standard deviation \(1\) (which is commonly referred to as the standard normal distribution). A normal distribution with mean \(19\) and standard deviation \(4\) is shown on the right. Figure 13.4 shows the same two normal distributions on the same axis.

Two normal curves. The first one has a mean at zero with a standard deviation of one and is called the standard normal distribution. The  second one has a mean at 19 with a standard deviation of four.
(a) Mean = 0, SD = 1
Two normal curves. The first one has a mean at zero with a standard deviation of one and is called the standard normal distribution. The  second one has a mean at 19 with a standard deviation of four.
(b) Mean = 19, SD = 4
Figure 13.3: Two normal distributions with different centers and spreads.
Two normal curves plotted on the same axis. One is a standard normal curve with a mean at zero and a standard deviation of one. The other has a mean of 19 with a standard deviation of four.
Figure 13.4: The two normal models shown in Figure 13.3 but plotted together on the same scale.

If a normal distribution has mean \(\mu\) and standard deviation \(\sigma,\) we may write the distribution as \(N(\mu, \sigma).\) The two distributions in Figure 13.4 can be written as

\[ N(\mu = 0, \sigma = 1)\quad\text{and}\quad N(\mu = 19, \sigma = 4) \]

Because the mean and standard deviation describe a normal distribution exactly, they are called the distribution’s parameters.

Write down the short-hand for a normal distribution with the following parameters.

  1. mean 5 and standard deviation 3
  2. mean -100 and standard deviation 10
  3. mean 2 and standard deviation 9

  1. \(N(\mu = 5,\sigma = 3)\)
  2. \(N(\mu = -100, \sigma = 10)\)
  3. \(N(\mu = 2, \sigma = 9)\)

13.2.2 Standardizing with Z scores

SAT scores follow a nearly normal distribution with a mean of 1500 points and a standard deviation of 300 points. ACT scores also follow a nearly normal distribution with mean of 21 points and a standard deviation of 5 points. Suppose Nel scored 1800 points on their SAT and Sian scored 24 points on their ACT. Who performed better?3

Nel's SAT score is plotted on a normal curve with a mean of 1500 and a standard deviation of 300. Sian's ACT score is plotted on a normal curve with a mean of 21 and a standard deviation of 5. Nel's score is relatively higher than Sian's score.
Figure 13.5: Nel’s and Sian’s scores shown with the distributions of SAT and ACT scores.

The solution to the previous example relies on a standardization technique called a Z score, a method most commonly employed for nearly normal observations (but that may be used with any distribution). The Z score of an observation is defined as the number of standard deviations it falls above or below the mean. If the observation is one standard deviation above the mean, its Z score is 1. If it is 1.5 standard deviations below the mean, then its Z score is -1.5. If \(x\) is an observation from a distribution \(N(\mu, \sigma),\) we define the Z score mathematically as

\[ Z = \frac{x-\mu}{\sigma} \]

Using \(\mu_{SAT}=1500,\) \(\sigma_{SAT}=300,\) and \(x_{Nel}=1800,\) we find Nel’s Z score:

\[ Z_{Nel} = \frac{x_{Nel} - \mu_{SAT}}{\sigma_{SAT}} = \frac{1800-1500}{300} = 1 \]

The Z score.

The Z score of an observation is the number of standard deviations it falls above or below the mean. We compute the Z score for an observation \(x\) that follows a distribution with mean \(\mu\) and standard deviation \(\sigma\) using

\[Z = \frac{x-\mu}{\sigma}\]

If the observation \(x\) comes from a normal distribution centered at \(\mu\) with standard deviation of \(\sigma\), then the Z score will be distributed according to a normal distribution with a center of 0 and a standard deviation of 1. That is, the normality remains when transforming from \(x\) to \(Z\) with a shift in both the center as well as the spread.

Use Sian’s ACT score, 24, along with the ACT mean and standard deviation to compute their Z score.4

Observations above the mean always have positive Z scores while those below the mean have negative Z scores. If an observation is equal to the mean (e.g., SAT score of 1500), then the Z score is \(0.\)

Let \(X\) represent a random variable from \(N(\mu=3, \sigma=2),\) and suppose we observe \(x=5.19.\) Find the Z score of \(x.\) Then, use the Z score to determine how many standard deviations above or below the mean \(x\) falls.


Its Z score is given by \(Z = \frac{x-\mu}{\sigma} = \frac{5.19 - 3}{2} = 2.19/2 = 1.095.\) The observation \(x\) is 1.095 standard deviations above the mean. We know it must be above the mean since \(Z\) is positive.

Head lengths of brushtail possums follow a nearly normal distribution with mean 92.6 mm and standard deviation 3.6 mm. Compute the Z scores for possums with head lengths of 95.4 mm and 85.8 mm.5

We can use Z scores to roughly identify which observations are more unusual than others. One observation \(x_1\) is said to be more unusual than another observation \(x_2\) if the absolute value of its Z score is larger than the absolute value of the other observation’s Z score: \(|Z_1| > |Z_2|.\) This technique is especially insightful when a distribution is symmetric.

Which of the two brushtail possum observations in the previous guided practice is more unusual?6

13.2.3 Normal probability calculations

Nel from the SAT Guided Practice earned a score of 1800 on their SAT with a corresponding \(Z=1.\) They would like to know what percentile they fall in among all SAT test-takers.


Nel’s percentile is the percentage of people who earned a lower SAT score than Nel. We shade the area representing those individuals in Figure 13.6. The total area under the normal curve is always equal to 1, and the proportion of people who scored below Nel on the SAT is equal to the area shaded in Figure 13.6: 0.8413. In other words, Nel is in the \(84^{th}\) percentile of SAT takers.

Nel's SAT score of 1800 is plotted on a normal curve with mean of 1500 and standard deviation of 300. The scores lower than Nel's are shaded in blue and represent roughly 84% of the distribution.
Figure 13.6: The normal model for SAT scores, shading the area of those individuals who scored below Nel.

We can use the normal model to find percentiles or probabilities. A normal probability table, which lists Z scores and corresponding percentiles, can be used to identify a percentile based on the Z score (and vice versa). Statistical software can also be used.

Normal probabilities are most commonly found using statistical software which we will show here using R. We use the software to identify the percentile corresponding to any particular Z score. For instance, the percentile of \(Z=0.43\) is 0.6664, or the \(66.64^{th}\) percentile. The pnorm() function is available in default R and will provide the percentile associated with any cutoff on a normal curve. The normTail() function is available in the openintro R package and will draw the associated normal distribution curve.

pnorm(0.43, mean = 0, sd = 1)
[1] 0.666
openintro::normTail(m = 0, s = 1, L = 0.43)

We can also find the Z score associated with a percentile. For example, to identify Z for the \(80^{th}\) percentile, we use qnorm() which identifies the quantile for a given percentage. The quantile represents the cutoff value. (To remember the function qnorm() as providing a cutoff, notice that both qnorm() and “cutoff” start with the sound “kuh”. To remember the pnorm() function as providing a probability from a given cutoff, notice that both pnorm() and probability start with the sound “puh”.) We determine the Z score for the \(80^{th}\) percentile using qnorm(): 0.84.

qnorm(0.80, mean = 0, sd = 1)
[1] 0.842
openintro::normTail(m = 0, s = 1, L = 0.842)

Determine the proportion of SAT test takers who scored better than Nel on the SAT.7

13.2.4 Normal probability examples

Cumulative SAT scores are approximated well by a normal model, \(N(\mu=1500, \sigma=300).\)

Shannon is a randomly selected SAT taker, and nothing is known about Shannon’s SAT aptitude. What is the probability that Shannon scores at least 1630 on their SATs?


First, always draw and label a picture of the normal distribution. (Drawings need not be exact to be useful.) We are interested in the chance they score above 1630, so we shade the upper tail. See the normal curve below.

The \(x\)-axis identifies the mean and the values at 2 standard deviations above and below the mean. The simplest way to find the shaded area under the curve makes use of the Z score of the cutoff value. With \(\mu=1500,\) \(\sigma=300,\) and the cutoff value \(x=1630,\) the Z score is computed as

\[ Z = \frac{x - \mu}{\sigma} = \frac{1630 - 1500}{300} = \frac{130}{300} = 0.43 \]

We use software to find the percentile of \(Z=0.43,\) which yields 0.6664. However, the percentile describes those who had a Z score lower than 0.43. To find the area above \(Z=0.43,\) we compute one minus the area of the lower tail, as seen below.

The probability Shannon scores at least 1630 on the SAT is 0.3336. This calculation is visualized in Figure 13.7.

Three normal curves visualizing that probabilities can be calculated using arithmetic on areas. The area above 1630 can be calculated by taking the total area of one and subtracting the area below 1630 (which is 0.6664). The resulting value is 0.3336.
Figure 13.7: Visual calculation of the probability that Shannon scores at least 1630 on the SAT.

Always draw a picture first, and find the Z score second.

For any normal probability situation, always always always draw and label the normal curve and shade the area of interest first. The picture will provide an estimate of the probability.

After drawing a figure to represent the situation, identify the Z score for the observation of interest.

If the probability of Shannon scoring at least 1630 is 0.3336, then what is the probability they score less than 1630? Draw the normal curve representing this exercise, shading the lower region instead of the upper one.8

Edward earned a 1400 on their SAT. What is their percentile?


First, a picture is needed. Edward’s percentile is the proportion of people who do not get as high as a 1400. These are the scores to the left of 1400, as shown below.

A normal curve with a mean of 1500 and a standard deviation of 300. Values less than 1400 are shaded blue in the lower part of the curve. The shaded part is roughly 37 percent of the graph.

The mean \(\mu=1500,\) the standard deviation \(\sigma=300,\) and the cutoff for the tail area \(x=1400\) are used to compute the Z score:

\[ Z = \frac{x - \mu}{\sigma} = \frac{1400 - 1500}{300} = -0.33\]

Statistical software can be used to find the proportion of the \(N(0,1)\) curve to the left of \(-0.33\) which is 0.3707. Edward is at the \(37^{th}\) percentile.

Use the results of the previous example to compute the proportion of SAT takers who did better than Edward. Also draw a new picture.


If Edward did better than 37% of SAT takers, then about 63% must have done better than them, as shown below.

A normal curve with a mean of 1500 and a standard deviation of 300. Values greater than 1400 are shaded blue in the upper part of the curve. The shaded part is roughly 63 percent of the graph.

Areas to the right.

Most statistical software, as well as normal probability tables in most books, give the area to the left. If you would like the area to the right, first find the area to the left and then subtract the amount from one.

Stuart earned an SAT score of 2100. Draw a picture for each part. (a) What is their percentile? (b) What percent of SAT takers did better than Stuart?9

Based on a sample of 100 men,10 the heights of adults who identify as male, between the ages 20 and 62 in the US is nearly normal with mean 70.0” and standard deviation 3.3”.

Kamron is 5’7” (67 inches) and Adrian is 6’4” (76 inches). (a) What is Kamron’s height percentile? (b) What is Adrian’s height percentile? Also draw one picture for each part.


Numerical answers, calculated using statistical software (e.g., pnorm() in R): (a) 18.17th percentile. (b) 96.55th percentile.

The last several problems have focused on finding the probability or percentile for a particular observation. What if you would like to know the observation corresponding to a particular percentile?

Yousef’s height is at the \(40^{th}\) percentile. How tall are they?


As always, first draw the picture.

In this case, the lower tail probability is known (0.40), which can be shaded on the diagram. We want to find the observation that corresponds to the known probability of 0.4. We can find the observation in two different ways: using the height curve seen above or using the Z score associated with the standard normal curve centered at zero with a standard deviation of one.

If you have access to software (like R, code seen below) that allows you to specify the mean and standard deviation of the normal curve, you can calculate the observed value on the curve (i.e., Yousef’s height) directly.

[1] 69.2

Yousef is 69.2 inches tall. That is, Yousef is about 5’9” (this is notation for 5-feet, 9-inches).

Without access to flexible software, you will need the information given by a standard normal curve (a normal curve centered at zero with a standard deviation of one). First, determine the Z score associated with the \(40^{th}\) percentile.

Because the percentile is below 50%, we know \(Z\) will be negative. Statistical software provides the \(Z\) value to be \(-0.25.\)

qnorm(0.4, mean = 0, sd = 1)
[1] -0.253

Knowing \(Z_{Yousef}=-0.25\) and the population parameters \(\mu=70\) and \(\sigma=3.3\) inches, the Z score formula can be set up to determine Yousef’s unknown height, labeled \(x_{Yousef}\):

\[ -0.253 = Z_{Yousef} = \frac{x_{Yousef} - \mu}{\sigma} = \frac{x_{Yousef} - 70}{3.3} \]

Solving for \(x_{Yousef}\) yields the height 69.2 inches. Again, Yousef is about 5’9”.

What is the adult male height at the \(82^{nd}\) percentile?


In order to practice using Z scores, we will use the standard normal curve to solve the problem.

Again, we draw the figure first.

And calculate the Z value associated with the \(82^{nd}\) percentile:

qnorm(0.82, mean = 0, sd = 1)
[1] 0.915

Next, we want to find the Z score at the \(82^{nd}\) percentile, which will be a positive value (because the percentile is bigger than 50%). Using qnorm(), the \(82^{nd}\) percentile corresponds to \(Z=0.92.\) Finally, the height \(x\) is found using the Z score formula with the known mean \(\mu,\) standard deviation \(\sigma,\) and Z score \(Z=0.92\):

\[ 0.92 = Z = \frac{x-\mu}{\sigma} = \frac{x - 70}{3.3} \]

This yields 73.04 inches or about 6’1” as the height at the \(82^{nd}\) percentile.

Using Z scores, answer the following questions.

  1. What is the \(95^{th}\) percentile for SAT scores?
  2. What is the \(97.5^{th}\) percentile of the male heights? As always with normal probability problems, first draw a picture.11

Using Z scores, answer the following questions.

  1. What is the probability that a randomly selected male adult is at least 6’2” (74 inches)?
  2. What is the probability that a male adult is shorter than 5’9” (69 inches)?12

What is the probability that a randomly selected adult male is between 5’9” and 6’2”?


These heights correspond to 69 inches and 74 inches. First, draw the figure. The area of interest is no longer an upper or lower tail.

The total area under the curve is 1. If we find the area of the two tails that are not shaded (from the previous Guided Practice, these areas are \(0.3821\) and \(0.1131\)), then we can find the middle area:

That is, the probability of being between 5’9” and 6’2” is 0.5048.

Find the percent of SAT takers who earn between 1500 and 2000.13

What percent of adult males are between 5’5” and 5’7”?14

13.3 Quantifying the variability of a statistic

As seen in later chapters, it turns out that many of the statistics used to summarize data (e.g., the sample proportion, the sample mean, differences in two sample proportions, differences in two sample means, the sample slope from a linear model, etc.) vary according to the normal distribution seen above. The mathematical models are derived from the normal theory, but even the computational methods (and the intuitive thinking behind both approaches) use the general bell-shaped variability seen in most of the distributions constructed so far.

13.3.1 68-95-99.7 rule

Here, we present a useful general rule for the probability of falling within 1, 2, and 3 standard deviations of the mean in the normal distribution. The rule will be useful in a wide range of practical settings, especially when trying to make a quick estimate without a calculator or Z table.

A normal curve showing the area within one standard deviation of the mean (which is 0.68), the area within two standard deviations of the mean (which is 0.95), and the are within three standard deviations of the mean (which is 0.997).
Figure 13.8: Probabilities for falling within 1, 2, and 3 standard deviations of the mean in a normal distribution.

Use pnorm() (or a Z table) to confirm that about 68%, 95%, and 99.7% of observations fall within 1, 2, and 3, standard deviations of the mean in the normal distribution, respectively. For instance, first find the area that falls between \(Z=-1\) and \(Z=1,\) which should have an area of about 0.68. Similarly there should be an area of about 0.95 between \(Z=-2\) and \(Z=2.\)15

It is possible for a normal random variable to fall 4, 5, or even more standard deviations from the mean. However, these occurrences are very rare if the data are nearly normal. The probability of being further than 4 standard deviations from the mean is about 1-in-30,000. For 5 and 6 standard deviations, it is about 1-in-3.5 million and 1-in-1 billion, respectively.

SAT scores closely follow the normal model with mean \(\mu = 1500\) and standard deviation \(\sigma = 300.\) About what percent of test takers score 900 to 2100? What percent score between 1500 and 2100 ?16

13.3.2 Standard error

Point estimates vary from sample to sample, and we quantify this variability with what is called the standard error (SE). The standard error is equal to the standard deviation associated with the statistic. So, for example, to quantify the variability of a point estimate from one sample to the next, the variability is called the standard error of the point estimate. Almost always, the standard error is itself an estimate, calculated from the sample of data.

The way we determine the standard error varies from one situation to the next. However, typically it is determined using a formula based on the Central Limit Theorem.

13.3.3 Margin of error

Very related to the standard error is the margin of error. The margin of error describes how far away observations are from their mean.
For example, to describe where most (i.e., 95%) observations lie, we say that the margin of error is approximately \(2 \times SE\). That is, 95% of the observations are within two margins of error of the mean.

Margin of error for sample proportions.

The distance given by \(z^\star \times SE\) is called the margin of error.

\(z^\star\) is the cutoff value found on the normal distribution. The most common value of \(z^\star\) is 1.96 (often approximated to be 2) indicating that the margin of error describes the variability associated with 95% of the sampled statistics.

Notice that if the spread of the observations goes from some lower bound to some upper bound, a rough approximation of the SE is to divide the range by 4. That is, if you notice the sample proportions go from 0.1 to 0.4, the SE can be approximated to be 0.075.

13.4 Case Study (test): Opportunity cost

The approach for using the normal model in the context of inference is very similar to the practice of applying the model to individual observations that are nearly normal. We will replace null distributions we previously obtained using the randomization or simulation techniques and verify the results once again using the normal model. When the sample size is sufficiently large, the normal approximation generally provides us with the same conclusions as the simulation model.

13.4.1 Observed data

In Section 11.2 we were introduced to the opportunity cost study, which found that students became thriftier when they were reminded that not spending money now means the money can be spent on other things in the future. Let’s re-analyze the data in the context of the normal distribution and compare the results.

The opportunity_cost data can be found in the openintro R package.

13.4.2 Variability of the statistic

Figure 13.9 summarizes the null distribution as determined using the randomization method. The best fitting normal distribution for the null distribution has a mean of 0. We can calculate the standard error of this distribution by borrowing a formula that we will become familiar with in Chapter 17, but for now let’s just take the value \(SE = 0.078\) as a given. Recall that the point estimate of the difference was 0.20, as shown in Figure 13.9. Next, we’ll use the normal distribution approach to compute the p-value.

Normal curve overlaid on the histogram of the simulated differences in sample proportions in the opportunity cost study. The theoretical normal distribution fits the histogram quite well. The observed difference in sample proportions of 0.2 is in the tail of both the normal curve and the histogram.
Figure 13.9: Null distribution of differences with an overlaid normal curve for the opportunity cost study. 10,000 simulations were run for this figure.

13.4.3 Observed statistic vs. null statistics

As we learned in Section 13.2, it is helpful to draw and shade a picture of the normal distribution so we know precisely what we want to calculate. Here we want to find the area of the tail beyond 0.2, representing the p-value.

Next, we can calculate the Z score using the observed difference, 0.20, and the two model parameters. The standard error, \(SE = 0.078,\) is the equivalent of the model’s standard deviation.

\[Z = \frac{\text{observed difference} - 0}{SE} = \frac{0.20 - 0}{0.078} = 2.56\]

We can either use statistical software or look up \(Z = 2.56\) in the normal probability table to determine the right tail area: 0.0052, which is about the same as what we got for the right tail using the randomization approach (0.006). Using this area as the p-value, we see that the p-value is less than 0.05, we conclude that the treatment did indeed impact students’ spending.

Z score in a hypothesis test.

In the context of a hypothesis test, the Z score for a point estimate is

\[Z = \frac{\text{point estimate} - \text{null value}}{SE}\]

The standard error in this case is the equivalent of the standard deviation of the point estimate, and the null value comes from the claim made in the null hypothesis.

We have confirmed that the randomization approach we used earlier and the normal distribution approach provide almost identical p-values and conclusions in the opportunity cost case study. Next, let’s turn our attention to the medical consultant case study.

13.5 Case study (test): Medical consultant

13.5.1 Observed data

In Section 12.1 we learned about a medical consultant who reported that only 3 of their 62 clients who underwent a liver transplant had complications, which is less than the more common complication rate of 0.10. In that work, we did not model a null scenario, but we will discuss a simulation method for a one proportion null distribution in Section 16.1, such a distribution is provided in Figure 13.10. We have added the best-fitting normal curve to the figure, which has a mean of 0.10. Borrowing a formula that we’ll encounter in Chapter 16, the standard error of this distribution was also computed: \(SE = 0.038.\)

13.5.2 Variability of the statistic

Before we begin, we want to point out a simple detail that is easy to overlook: the null distribution we generated from the simulation is slightly skewed, and the histogram is not particularly smooth. In fact, the normal distribution only sort-of fits this model.

Normal curve overlaid on the histogram of the simulated sample proportions in the medical consultant study. The theoretical normal distribution does not fit the histogram as well as in @fig-OpportunityCostDiffs-w-normal due to the skewness of the distribution of the sample proportions. The observed sample proportion of 0.0484 is towards the tail in both the normal curve and the histogram, but it is not an extreme value.
Figure 13.10: The null distribution for the sample proportion, created from 10,000 simulated studies from the medical consultant, along with the best-fitting normal model.

13.5.3 Observed statistic vs. null statistics

As always, we’ll draw a picture before finding the normal probabilities. Below is a normal distribution centered at 0.10 with a standard error of 0.038.

Next, we can calculate the Z score using the observed complication rate, \(\hat{p} = 0.048\) along with the mean and standard deviation of the normal model. Here again, we use the standard error for the standard deviation.

\[Z = \frac{\hat{p} - p_0}{SE_{\hat{p}}} = \frac{0.048 - 0.10}{0.038} = -1.37\]

Identifying \(Z = -1.37\) using statistical software or in the normal probability table, we can determine that the left tail area is 0.0853 which is the estimated p-value for the hypothesis test. There is a small problem: the p-value of 0.0853 is almost 30% smaller than the simulation p-value of 0.1222 which will be calculated in Section 16.1.

The discrepancy is explained by the normal model’s poor representation of the null distribution in Figure 13.10. As noted earlier, the null distribution from the simulations is not very smooth, and the distribution itself is slightly skewed. That’s the bad news. The good news is that we can foresee these problems using some simple checks. We’ll learn more about these checks in the following chapters.

In Section 13.1 we noted that the two common requirements to apply the Central Limit Theorem are (1) the observations in the sample must be independent, and (2) the sample must be sufficiently large. The guidelines for this particular situation – which we will learn in Chapter 16 – would have alerted us that the normal model was a poor approximation.

13.5.4 Conditions for applying the normal model

The success story in this section was the application of the normal model in the context of the opportunity cost data. However, the biggest lesson comes from the less successful attempt to use the normal approximation in the medical consultant case study.

Statistical techniques are like a carpenter’s tools. When used responsibly, they can produce amazing and precise results. However, if the tools are applied irresponsibly or under inappropriate conditions, they will produce unreliable results. For this reason, with every statistical method that we introduce in future chapters, we will carefully outline conditions when the method can reasonably be used. These conditions should be checked in each application of the technique.

After covering the introductory topics in this course, advanced study may lead to working with complex models which, for example, bring together many variables with different variability structure. Working with data that come from normal populations makes higher-order models easier to estimate and interpret. There are times when simulation, randomization, or bootstrapping are unwieldy in either structure or computational demand. Normality can often lead to excellent approximations of the data using straightforward modeling techniques.

13.6 Case study (interval): Stents

A point estimate is our best guess for the value of the parameter, so it makes sense to build the confidence interval around that value. The standard error, which is a measure of the uncertainty associated with the point estimate, provides a guide for how large we should make the confidence interval. The 68-95-99.7 rule tells us that, in general, 95% of observations are within 2 standard errors of the mean. Here, we use the value 1.96 to be slightly more precise.

Constructing a 95% confidence interval.

When the sampling distribution of a point estimate can reasonably be modeled as normal, the point estimate we observe will be within 1.96 standard errors of the true value of interest about 95% of the time. Thus, a 95% confidence interval for such a point estimate can be constructed:

\[\text{point estimate} \pm 1.96 \times SE\]

We can be 95% confident this interval captures the true value.

Compute the area between -1.96 and 1.96 for a normal distribution with mean 0 and standard deviation 1.17

The point estimate in the opportunity cost study was that 20% fewer students would buy a video if they were reminded that money not spent now could be spent later on something else. This point estimate can reasonably be modeled with a normal distribution with a standard error of \(SE = 0.078.\) Construct a 95% confidence interval for the point estimate.


Since we’re told the point estimate can be modeled with a normal distribution:

\[\text{point estimate} \pm 1.96 \times SE = 0.20 \pm 1.96 \times 0.078 = (0.047, 0.353)\]

We are 95% confident that the video purchase rate resulting from the treatment is between 4.7% and 35.3% lower than in the control group. Since this confidence interval does not contain 0, it is consistent with our earlier hypothesis test where we rejected the notion of “no difference”.

Note that we have used SE = 0.078 from the last section. However, it would more generally be appropriate to recompute the SE slightly differently for this confidence interval using sample proportions. Don’t worry about this detail for now since the two resulting standard errors are, in this case, almost identical.

13.6.1 Observed data

Consider an experiment that examined whether implanting a stent in the brain of a patient at risk for a stroke helps reduce the risk of a stroke. The results from the first 30 days of this study, which included 451 patients, are summarized in Table 13.1. These results are surprising! The point estimate suggests that patients who received stents may have a higher risk of stroke: \(p_{trmt} - p_{ctrl} = 0.090.\)

Table 13.1: Descriptive statistics for 30-day results for the stent study.
Group No event Stroke Total
control 214 13 227
treatment 191 33 224
Total 405 46 451

The stent30 data can be found in the openintro R package.

13.6.2 Variability of the statistic

Consider the stent study and results. The conditions necessary to ensure the point estimate \(p_{trmt} - p_{ctrl} = 0.090\) is nearly normal have been verified for you, and the estimate’s standard error is \(SE = 0.028.\) Construct a 95% confidence interval for the change in 30-day stroke rates from usage of the stent.


The conditions for applying the normal model have already been verified, so we can proceed to the construction of the confidence interval:

\[\text{point estimate} \pm 1.96 \times SE = 0.090 \pm 1.96 \times 0.028 = (0.035, 0.145)\]

We are 95% confident that implanting a stent in a stroke patient’s brain increased the risk of stroke within 30 days by a rate of 0.035 to 0.145. This confidence interval can also be used in a way analogous to a hypothesis test: since the interval does not contain 0 (is completely above 0), it means the data provide convincing evidence that the stent used in the study changed the risk of stroke within 30 days.

As with hypothesis tests, confidence intervals are imperfect. About 1-in-20 properly constructed 95% confidence intervals will fail to capture the parameter of interest, simply due to natural variability in the observed data. Figure 13.11 shows 25 confidence intervals for a proportion that were constructed from 25 different datasets that all came from the same population where the true proportion was \(p = 0.3.\) However, 1 of these 25 confidence intervals happened not to include the true value. The interval which does not capture \(p=0.3\) is not due to bad science. Instead, it is due to natural variability, and we should expect some of our intervals to miss the parameter of interest. Indeed, over a lifetime of creating 95% intervals, you should expect 5% of your reported intervals to miss the parameter of interest (unfortunately, you will not ever know which of your reported intervals captured the parameter and which missed the parameter).

A series of 25 horizontal lines are drawn, representing each of 25 different samples. Each vertical line starts at the value of the lower bound of the confidence interval and ends at the value of the upper bound of the confidence interval which was created from that particular sample. In the center of the line is a solid dot at the observed proportion of successes for that particular sample. A dashed vertical line runs through the horizontal lines at p = 0.3 (which is the true value of the population proportion). 24 of the 25 horizontal lines cross the vertical line at 0.3, but one of the horizontal lines is completely lower than 0.3. The line that does not cross 0.3 is colored red because the confidence interval from that particular sample would not have captured the true population proportion.
Figure 13.11: Twenty-five samples of size \(n=300\) were collected from a population with \(p = 0.30.\) For each sample, a confidence interval was created to try to capture the true proportion \(p.\) However, 1 of these 25 intervals did not capture \(p = 0.30.\)

In Figure 13.11, one interval does not contain the true proportion, \(p = 0.3.\) Does this imply that there was a problem with the datasets that were selected?18

13.6.3 Interpreting confidence intervals

A careful eye might have observed the somewhat awkward language used to describe confidence intervals.

Correct confidence interval interpretation.

We are XX% confident that the population parameter is between lower and upper (where lower and upper are both numerical values).

Incorrect language might try to describe the confidence interval as capturing the population parameter with a certain probability.

This is one of the most common errors: while it might be useful to think of it as a probability, the confidence level only quantifies how plausible it is that the parameter is in the interval.

Another especially important consideration of confidence intervals is that they only try to capture the population parameter. Our intervals say nothing about the confidence of capturing individual observations, a proportion of the observations, or about capturing point estimates. Confidence intervals provide an interval estimate for and attempt to capture population parameters.

13.7 Chapter review

13.7.1 Summary

We can summarise the process of using the normal model as follows:

  • Frame the research question. The mathematical model can be applied to both the hypothesis testing and the confidence interval framework. Make sure that your research question is being addressed by the most appropriate inference procedure.
  • Collect data with an observational study or experiment. To address the research question, collect data on the variables of interest. Note that your data may be a random sample from a population or may be part of a randomized experiment.
  • Model the randomness of the statistic. In many cases, the normal distribution will be an excellent model for the randomness associated with the statistic of interest. The Central Limit Theorem tells us that if the sample size is large enough, sample averages (which can be calculated as either a proportion or a sample mean) will be approximately normally distributed when describing how the statistics change from sample to sample.
  • Calculate the variability of the statistic. Using formulas, come up with the standard deviation (or more typically, an estimate of the standard deviation called the standard error) of the statistic. The SE of the statistic will give information on how far the observed statistic is from the null hypothesized value (if performing a hypothesis test) or from the unknown population parameter (if creating a confidence interval).
  • Use the normal distribution to quantify the variability. The normal distribution will provide a probability which measures how likely it is for your observed and hypothesized (or observed and unknown) parameter to differ by the amount measured. The unusualness (or not) of the discrepancy will form the conclusion to the research question.
  • Form a conclusion. Using the p-value or the confidence interval from the analysis, report on the research question of interest. Also, be sure to write the conclusion in plain language so casual readers can understand the results.

Table 13.2 is another look at the mathematical model approach to inference.

Table 13.2: Summary of mathematical models as an inferential statistical method.
Question Answer
What does it do? Uses theory (primarily the Central Limit Theorem) to describe the hypothetical variability resulting from either repeated randomized experiments or random samples
What is the random process described? Randomized experiment or random sampling
What other random processes can be approximated? Can also be used to describe random sampling in an observational model or random allocation in an experiment
What is it best for? Quick analyses through, for example, calculating a Z score
What physical object represents the simulation process? Not applicable

13.7.2 Terms

The terms introduced in this chapter are presented in Table 13.3. If you’re not sure what some of these terms mean, we recommend you go back in the text and review their definitions. You should be able to easily spot them as bolded text.

Table 13.3: Terms introduced in this chapter.
95% confidence interval normal distribution percentile
95% confident normal model sampling distribution
Central Limit Theorem normal probability table standard error
margin of error null distribution standard normal distribution
normal curve parameter Z score

13.8 Exercises

Answers to odd-numbered exercises can be found in Appendix A.13.

  1. Area under the curve, Part I. What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region denoted by a \(Z\) inequality below? Be sure to draw a graph. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. \(Z < -1.35\)

    2. \(Z > 1.48\)

    3. \(-0.4 < Z < 1.5\)

    4. \(|Z| > 2\)

  1. Area under the curve, Part II. What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region denoted by a \(Z\) inequality below? Be sure to draw a graph. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. \(Z > -1.13\)

    2. \(Z < 0.18\)

    3. \(Z > 8\)

    4. \(|Z| < 0.5\)

  1. GRE scores, Z scores. Sophia who took the Graduate Record Examination (GRE) scored 160 on the Verbal Reasoning section and 157 on the Quantitative Reasoning section. The mean score for Verbal Reasoning section for all test takers was 151 with a standard deviation of 7, and the mean score for the Quantitative Reasoning was 153 with a standard deviation of 7.67. Suppose that both distributions are nearly normal. Use the information to compute each of the following. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. Write down the short-hand for each of the two normal distributions.

    2. What is Sophia’s Z score on the Verbal Reasoning section? On the Quantitative Reasoning section? Draw a standard normal distribution curve and mark the two Z scores.

    3. What do the Z scores tell you?

    4. Relative to others, which section did Sophia do better on?

    5. Find her percentile scores for each of the two exams.

    6. What percent of the test takers did better than her on the Verbal Reasoning section? On the Quantitative Reasoning section?

    7. Explain why simply comparing raw scores from the two sections could lead to an incorrect conclusion as to which section a student did better on.

    8. If the distributions of the scores on these exams are not nearly normal, would your answers to parts (b) - (f) change? Explain your reasoning.

  1. Triathlon times, Z scores. In triathlons, it is common for racers to be placed into age and gender groups. Two friends, Leo and Mary, both completed the Hermosa Beach Triathlon, where Leo competed in the “Men, Ages 30 - 34” group and Mary competed in the “Women, Ages 25 - 29” group. Leo completed the race in 1:22:28 (4948 seconds), while Mary completed the race in 1:31:53 (5513 seconds). We can see that Leo finished faster, but they are curious about how they did within their respective groups. Can you help them? Below is some information on the performance of their groups. Use the information to compute each of the following. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    • The finishing times of the “Men, Ages 30 - 34” group has a mean of 4313 seconds with a standard deviation of 583 seconds.

    • The finishing times of the “Women, Ages 25 - 29” group has a mean of 5261 seconds with a standard deviation of 807 seconds.

    • The distributions of finishing times for both groups are approximately Normal.
      Remember: a better performance corresponds to a faster finish.

    1. Write down the short-hand for the two normal distributions.

    2. What are the Z scores for each of Leo’s and Mary’s finishing times? What do the Z scores tell you?

    3. Did Leo or Mary rank better in their respective group? Explain your reasoning.

    4. What percent of the triathletes did Leo finish faster than in his group?

    5. What percent of the triathletes did Mary finish faster than in her group?

    6. If the distributions of finishing times are not nearly normal, would your answers to parts (b) – (e) change? Explain your reasoning.

  1. GRE scores, cutoffs. Consider the previous two distributions for GRE scores: \(N(\mu=151, \sigma=7)\) for the Verbal Reasoning part of the exam and \(N(\mu=153, \sigma=7.67)\) for the Quantitative Reasoning part. Use the information to compute each of the following. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. The score of a student who scored in the \(80^{th}\) percentile on the Quantitative Reasoning section.

    2. The score of a student who scored worse than 70% of test takers in the Verbal Reasoning section.

  1. Triathlon times, cutoffs. Recall the two different distributions for triathlon times: \(N(\mu=4313, \sigma=583)\) for “Men, Ages 30 - 34” and \(N(\mu=5261, \sigma=807)\) for the “Women, Ages 25 - 29” group. Times are listed in seconds. Use this information to compute each of the following. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. The cutoff time for the fastest 5% of athletes in the men’s group, i.e., those who took the shortest 5% of time to finish.

    2. The cutoff time for the slowest 10% of athletes in the women’s group.

  1. LA weather, Fahrenheit. The average daily high temperature in June in LA is 77\(^\circ\) F with a standard deviation of 5\(^\circ\) F. Suppose that the temperatures in June closely follow a normal distribution. Use the information to compute each of the following. In the text above, we used R to calculate normal probabilities. You might choose to use a different source, such as a Shiny App or a normal table.

    1. What is the probability of observing an 83\(^\circ\) F temperature or higher in LA during a randomly chosen day in June?

    2. How cool are the coldest 10% of the days (days with lowest high temperature) during June in LA?

  1. CAPM. The Capital Asset Pricing Model (CAPM) is a financial model that assumes returns on a portfolio are normally distributed. Suppose a portfolio has an average annual return of 14.7% (i.e., an average gain of 14.7%) with a standard deviation of 33%. A return of 0% means the value of the portfolio doesn’t change, a negative return means that the portfolio loses money, and a positive return means that the portfolio gains money.

    1. What percent of years does this portfolio lose money, i.e., have a return less than 0%?

    2. What is the cutoff for the highest 15% of annual returns with this portfolio?

  1. LA weather, Celsius. Recall the set-up that average daily high temperature in June in LA is 77\(^\circ\) F with a standard deviation of 5\(^\circ\) F, and it can be assumed that the high temperatures follow a normal distribution. We use the following equation to convert \(^\circ\)F (Fahrenheit) to \(^\circ\)C (Celsius): \(C = (F - 32) \times \frac{5}{9}.\)

    1. Write the probability model for the distribution of temperature in \(^\circ\)C in June in LA.

    2. What is the probability of observing a 28\(^\circ\) C (which roughly corresponds to 83\(^\circ\) F) temperature or higher in June in LA? Calculate using the \(^\circ\)C model from part (a).

    3. Did you get the same answer or different answers in part (b) of this question and part (a) of the previous question on the LA weather? Are you surprised? Explain.

    4. Estimate the IQR of the temperatures (in \(^\circ\)C) in June in LA.

  1. Find the SD. Find the standard deviation of the distribution in the following situations.

    1. MENSA is an organization whose members have IQs in the top 2% of the population. IQs are normally distributed with mean 100, and the minimum IQ score required for admission to MENSA is 132.

    2. Cholesterol levels for women aged 20 to 34 follow an approximately normal distribution with mean 185 milligrams per deciliter (mg/dl). Women with cholesterol levels above 220 mg/dl are considered to have high cholesterol and about 18.5% of women fall into this category.

  1. Chronic illness. In 2013, the Pew Research Foundation reported that “45% of U.S. adults report that they live with one or more chronic conditions”. However, this value was based on a sample, so it may not be a perfect estimate for the population parameter of interest on its own. The study reported a standard error of about 1.2%, and a normal model may reasonably be used in this setting.

    1. Create a 95% confidence interval for the proportion of U.S. adults who live with one or more chronic conditions. Also interpret the confidence interval in the context of the study. (Pew Research Center 2013)

    2. Identify each of the following statements as true or false. Provide an explanation to justify each of your answers.

      1. We can say with certainty that the confidence interval from part (a) contains the true percentage of U.S. adults who suffer from a chronic illness.

      2. If we repeated this study 1,000 times and constructed a 95% confidence interval for each study, then approximately 950 of those confidence intervals would contain the true fraction of U.S. adults who suffer from chronic illnesses.

      3. The poll provides statistically discernible evidence (at the \(\alpha = 0.05\) level) that the percentage of U.S. adults who suffer from chronic illnesses is below 50%.

      4. Since the standard error is 1.2%, only 1.2% of people in the study communicated uncertainty about their answer.

  1. Social media users and news, mathematical model. A poll conducted in 2022 found that 50% of U.S. adults (i.e., a proportion of 0.5) get news from social media sometimes or often. The standard error for this estimate was 0.5% (i.e., 0.005), and a normal distribution may be used to model the sample proportion. (Pew Research Center 2022)

    1. Construct a 99% confidence interval for the fraction of U.S. adults who get news on social media sometimes or often, and interpret the confidence interval in context.

    2. Identify each of the following statements as true or false. Provide an explanation to justify each of your answers.

      1. The data provide statistically discernible evidence that more than half of U.S. adults users get news through social media sometimes or often. Use a discernibility level of \(\alpha = 0.01\).

      2. Since the standard error is 0.5%, we can conclude that 99.5% of all U.S. adults users were included in the study.

      3. If we want to reduce the standard error of the estimate, we should collect less data.

      4. If we construct a 90% confidence interval for the percentage of U.S. adults who get news through social media sometimes or often, the resulting confidence interval will be wider than a corresponding 99% confidence interval.

  1. Interpreting a Z score from a sample proportion. Suppose that you conduct a hypothesis test about a population proportion and calculate the Z score to be 0.47. Which of the following is the best interpretation of this value? For the problems which are not a good interpretation, indicate the statistical idea being described.19

    1. The probability is 0.47 that the null hypothesis is true.

    2. If the null hypothesis were true, the probability would be 0.47 of obtaining a sample proportion as far as observed from the hypothesized value of the population proportion.

    3. The sample proportion is 0.47 standard errors greater than the hypothesized value of the population proportion.

    4. The sample proportion is equal to 0.47 times the standard error.

    5. The sample proportion is 0.47 away from the hypothesized value of the population.

    6. The sample proportion is 0.47.

  1. Mental health. The General Social Survey asked the question: “For how many days during the past 30 days was your mental health, which includes stress, depression, and problems with emotions, not good?” Based on responses from 1,151 US residents, the survey reported a 95% confidence interval of 3.40 to 4.24 days in 2010.

    1. Interpret this interval in context of the data.

    2. What does “95% confident” mean? Explain in the context of the application.

    3. Suppose the researchers think a 99% confidence level would be more appropriate for this interval. Will this new interval be smaller or wider than the 95% confidence interval?

    4. If a new survey were to be done with 500 Americans, do you think the standard error of the estimate be larger, smaller, or about the same.

  1. Repeated water samples. A nonprofit wants to understand the fraction of households that have elevated levels of lead in their drinking water. They expect at least 5% of homes will have elevated levels of lead, but not more than about 30%. They randomly sample 800 homes and work with the owners to retrieve water samples, and they compute the fraction of these homes with elevated lead levels. They repeat this 1,000 times and build a distribution of sample proportions.

    1. What is this distribution called?

    2. Would you expect the shape of this distribution to be symmetric, right skewed, or left skewed? Explain your reasoning.

    3. What is the name of the variability of this distribution.

    4. Suppose the researchers’ budget is reduced, and they are only able to collect 250 observations per sample, but they can still collect 1,000 samples. They build a new distribution of sample proportions. How will the variability of this new distribution compare to the variability of the distribution when each sample contained 800 observations?

  1. Repeated student samples. Of all freshman at a large college, 16% made the dean’s list in the current year. As part of a class project, students randomly sample 40 students and check if those students made the list. They repeat this 1,000 times and build a distribution of sample proportions.

    1. What is this distribution called?

    2. Would you expect the shape of this distribution to be symmetric, right skewed, or left skewed? Explain your reasoning.

    3. What is the name of the variability of this distribution?

    4. Suppose the students decide to sample again, this time collecting 90 students per sample, and they again collect 1,000 samples. They build a new distribution of sample proportions. How will the variability of this new distribution compare to the variability of the distribution when each sample contained 40 observations?


  1. In general, the distributions are reasonably symmetric. The case study for the medical consultant is the only distribution with any evident skew (the distribution is skewed right).↩︎

  2. It is also introduced as the Gaussian distribution after Frederic Gauss, the first person to formalize its mathematical expression.↩︎

  3. We use the standard deviation as a guide. Nel is 1 standard deviation above average on the SAT: \(1500 + 300 = 1800.\) Sian is 0.6 standard deviations above the mean on the ACT: \(21+0.6 \times 5 = 24.\) In Figure 13.5, we can see that Nel did better compared to other test takers than Sian did, so their score was better.↩︎

  4. \(Z_{Sian} = \frac{x_{Sian} - \mu_{ACT}}{\sigma_{ACT}} = \frac{24 - 21}{5} = 0.6\)↩︎

  5. For \(x_1=95.4\) mm: \(Z_1 = \frac{x_1 - \mu}{\sigma} = \frac{95.4 - 92.6}{3.6} = 0.78.\) For \(x_2=85.8\) mm: \(Z_2 = \frac{85.8 - 92.6}{3.6} = -1.89.\)↩︎

  6. Because the absolute value of Z score for the second observation is larger than that of the first, the second observation has a more unusual head length.↩︎

  7. If 84% had lower scores than Nel, the number of people who had better scores must be 16%. (Generally ties are ignored when the normal model, or any other continuous distribution, is used.)↩︎

  8. We found the probability to be 0.6664. A picture for this exercise is represented by the shaded area below “0.6664”.↩︎

  9. Numerical answers: (a) 0.9772. (b) 0.0228.↩︎

  10. This sample was taken from the USDA Food Commodity Intake Database.↩︎

  11. Remember: draw a picture first, then find the Z score. (We leave the pictures to you.) The Z score can be found by using the percentiles and the normal probability table. (a) We look for 0.95 in the probability portion (middle part) of the normal probability table, which leads us to row 1.6 and (about) column 0.05, i.e., \(Z_{95}=1.65.\) Knowing \(Z_{95}=1.65,\) \(\mu = 1500,\) and \(\sigma = 300,\) we setup the Z score formula: \(1.65 = \frac{x_{95} - 1500}{300}.\) We solve for \(x_{95}\): \(x_{95} = 1995.\) (b) Similarly, we find \(Z_{97.5} = 1.96,\) again setup the Z score formula for the heights, and calculate \(x_{97.5} = 76.5.\)↩︎

  12. Numerical answers: (a) 0.1131. (b) 0.3821.↩︎

  13. This is an abbreviated solution. (Be sure to draw a figure!) First find the percent who get below 1500 and the percent that get above 2000: \(Z_{1500} = 0.00 \to 0.5000\) (area below), \(Z_{2000} = 1.67 \to 0.0475\) (area above). Final answer: \(1.0000-0.5000 - 0.0475 = 0.4525.\)↩︎

  14. 5’5” is 65 inches. 5’7” is 67 inches. Numerical solution: \(1.000 - 0.0649 - 0.8183 = 0.1168,\) i.e., 11.68%.↩︎

  15. First draw the pictures. To find the area between \(Z=-1\) and \(Z=1,\) use pnorm() or the normal probability table to determine the areas below \(Z=-1\) and above \(Z=1.\) Next verify the area between \(Z=-1\) and \(Z=1\) is about 0.68. Repeat this for \(Z=-2\) to \(Z=2\) and for \(Z=-3\) to \(Z=3.\)↩︎

  16. 900 and 2100 represent two standard deviations above and below the mean, which means about 95% of test takers will score between 900 and 2100. Since the normal model is symmetric, then half of the test takers from part (a) (\(\frac{95\%}{2} = 47.5\%\) of all test takers) will score 900 to 1500 while 47.5% score between 1500 and 2100.↩︎

  17. We will leave it to you to draw a picture. The Z scores are \(Z_{left} = -1.96\) and \(Z_{right} = 1.96.\) The area between these two Z scores is \(0.9750 - 0.0250 = 0.9500.\) This is where “1.96” comes from in the 95% confidence interval formula.↩︎

  18. No. Just as some observations occur more than 1.96 standard deviations from the mean, some point estimates will be more than 1.96 standard errors from the parameter. A confidence interval only provides a plausible range of values for a parameter. While we might say other values are implausible based on the data, this does not mean they are impossible.↩︎

  19. This exercise was inspired by discussion on Dr. Allan Rossman’s blog Ask Good Questions.↩︎

中文

13  使用数学模型进行推断

第 11第 12 关于总体参数的问题是通过计算技术来解决的。在随机化检验中,数据在原假设成立的假设下进行置换。在自助法(bootstrapping)中,对数据进行重抽样以测量变异性。在许多情况下(实际上,对于样本比例而言),统计量的变异性既可以通过计算方法(如前几章所述)来描述,也可以通过数学公式(如本章所述)来描述。

这里介绍正态分布,是为了描述来自重复抽样或重复实验的样本比例所具有的变异性。正态分布非常强大,因为它可以描述许多不同统计量的变异性,并且我们将在本书的其余部分中反复遇到正态分布。

不过,现在的重点是数据如何通过计算方法或数学模型为研究问题提供洞见之间的相似之处。

13.1 中心极限定理

在最近的几章中,我们遇到了四个案例研究。虽然它们在背景设置、结果以及我们用于分析数据的技术上各不相同,但它们都有一个共同点:统计量分布(称为 抽样分布)的一般形状。你可能已经注意到,这些分布都是对称的钟形分布。

抽样分布。

抽样分布是来自给定总体的给定样本容量的样本中,某个 样本统计量 的所有可能取值的分布。我们可以把抽样分布看作是描述样本统计量(例如样本比例 \(\hat{p}\) 或样本均值 \(\bar{x}\))在不同研究之间如何变化。抽样分布与数据分布形成对比,数据分布显示的是 观测到的 数据值的变异性。数据分布可以直接从观测值本身进行可视化。然而,由于抽样分布描述的是从许多研究中计算得到的样本统计量,因此无法直接从单个数据集进行可视化。相反,我们使用计算方法或数学结构来估计抽样分布,从而描述在重复研究中样本统计量的预期变异性。

图 13.1 展示了四个案例研究中各自的原假设分布,其中我们运行了 10,000 次模拟。请注意, 原分布 是在原假设为真的设定下创建的统计量的抽样分布。因此,原假设分布总是以原假设给出的参数值为中心。在机会成本研究中,最初只有 1,000 次模拟,我们额外增加了 9,000 次模拟。

Four null hypothesis histograms for examples in the book including  opportunity cost, sex discrimination, medical consultant, and tappers  and listeners. Each histogram is centered at the null value of the  proportion which is 0, 0, 0.1, and 0.5, respectively.
图 13.1:前面介绍的四个案例研究的零分布。请注意,每个分布的中心由零假设中设定的参数值给出。

描述这些分布的形状,并指出任何你觉得有趣的地方。1

医疗顾问的案例研究是唯一呈现明显偏态的分布。正如我们在 第 1中观察到的,分布出现偏态或包含离群值是很常见的。然而,到目前为止我们遇到的零分布看起来都有些相似,并且大体上是对称的。它们都类似于钟形曲线。钟形曲线的相似性并非巧合,而是由数学理论所保证的。

关于比例的中心极限定理。

如果我们考察一个比例(或比例的差异),且该情形满足某些条件,那么样本比例(或比例的差异)将呈现为一条称为 正态分布.

的钟形曲线。一个完美正态分布的例子如 图 13.2所示。想象在 图 13.1中四个零分布的每一个上都覆盖一条正态曲线。虽然每个图的均值(中心)和标准差(宽度或离散程度)可能不同,但总体形状基本保持不变。

A normal curve centered at 0 with a standard deviation of one.
图 13.2:一条正态曲线。

数学理论保证,如果重复抽样,当满足某些条件时,样本比例或样本比例的差异将遵循类似于正态分布的东西。(注意:我们通常只抽取 一个 样本,但数学模型让我们知道如果我们 重复抽样会有什么结果。)这些条件分为两大类,分别描述观测值之间的独立性以及需要足够大的样本量。

  1. 样本中的观测值是 独立。当我们从总体中随机抽取样本时,独立性是有保证的。如果我们把个体随机分配到处理组和对照组,独立性也可以得到保证。

  2. 样本是 足够大的。样本量不能太小。什么算“小”因情境而异,我们将在 第 16.

中为比例提供合适的指导原则。到目前为止,我们还没有用到正态分布。我们能够比较轻松地使用模拟技术来回答问题。然而,这种情况很快就会改变。模拟数据可能并不简单。例如,在 第 8 中介绍含多个预测变量的回归模型时,所遇到的一些情形需要进行复杂的模拟才能得出推断性结论。相反,正态分布及类似的其他分布为统计推断提供了一个通用框架,适用于非常多的情境。

技术条件。

为了使正态近似能够描述样本比例随样本不同而变化的抽样分布,必须满足两个条件。如果不满足这些条件,就不宜使用正态分布(以及相关概念,如 Z 分数、正态曲线下的概率等)进行推断性分析。

  1. 独立观测
  2. 足够大的样本: 对于比例而言,样本中至少要有 10 个预期成功和 10 个预期失败。

13.2 正态分布

在统计学中见到的所有分布中,有一种分布的使用频率遥遥领先。这种对称、单峰的钟形曲线在统计学中无处不在。它非常常见,以至于人们用多种名称来称呼它,包括 正态曲线, 正态模型,或 正态分布.2 在一定条件下,样本比例、样本均值和样本差异可以用正态分布来建模。此外,一些变量(如 SAT 成绩和美国成年男性的身高)也近似服从正态分布。

正态分布的相关事实。

许多变量的分布接近正态,但没有一个是完全正态的。因此,正态分布虽然对任何单个问题都不是完美的,但对各种问题都非常有用。

在本节中,我们将结合数据讨论正态分布,以熟悉正态分布的相关技术。在接下来的章节及之后的内容中,我们将把讨论重点转向应用正态分布及其他相关分布来为假设检验的点估计建模以及构建置信区间。

13.2.1 正态分布模型

正态分布总是描述一条对称、单峰的钟形曲线。然而,正态曲线可能因模型细节的不同而呈现不同的形态。具体来说,正态模型可以通过两个参数进行调整:均值和标准差。你可能已经猜到,改变均值会使钟形曲线向左或向右平移,而改变标准差会使曲线拉伸或收缩。 图 13.3 (a) 展示了均值为 \(0\) ,标准差为 \(1\) 的正态分布(通常称为 标准正态分布)。均值为 \(19\) ,标准差为 \(4\) 的正态分布显示在右侧。 图 13.4 在同一坐标轴上展示了这两个相同的正态分布。

Two normal curves. The first one has a mean at zero with a standard deviation of one and is called the standard normal distribution. The  second one has a mean at 19 with a standard deviation of four.
(a) 均值 = 0,标准差 = 1
Two normal curves. The first one has a mean at zero with a standard deviation of one and is called the standard normal distribution. The  second one has a mean at 19 with a standard deviation of four.
(b) 均值 = 19,标准差 = 4
图 13.3:两个中心和离散程度不同的正态分布。
Two normal curves plotted on the same axis. One is a standard normal curve with a mean at zero and a standard deviation of one. The other has a mean of 19 with a standard deviation of four.
图 13.4: 图 13.3 中所示的两个正态模型,但绘制在同一尺度上。

如果一个正态分布的均值为 \(\mu\),标准差为 \(\sigma,\),可以将该分布写作 \(N(\mu, \sigma).\) 图 13.4 中的两个分布可写为

\[ N(\mu = 0, \sigma = 1)\quad\text{and}\quad N(\mu = 19, \sigma = 4) \]

由于均值和标准差可以完全描述一个正态分布,它们被称为该分布的 参数.

写出具有以下参数的正态分布的简写形式。

  1. 均值 5,标准差 3
  2. 均值 -100,标准差 10
  3. 均值 2,标准差 9

  1. \(N(\mu = 5,\sigma = 3)\)
  2. \(N(\mu = -100, \sigma = 10)\)
  3. \(N(\mu = 2, \sigma = 9)\)

13.2.2 用Z分数进行标准化

SAT成绩近似服从正态分布,均值为1500分,标准差为300分。ACT成绩也近似服从正态分布,均值为21分,标准差为5分。假设Nel的SAT成绩为1800分,Sian的ACT成绩为24分。谁表现得更好?3

Nel's SAT score is plotted on a normal curve with a mean of 1500 and a standard deviation of 300. Sian's ACT score is plotted on a normal curve with a mean of 21 and a standard deviation of 5. Nel's score is relatively higher than Sian's score.
图13.5:Nel和Sian的成绩与SAT和ACT成绩分布的对比。

上一个例子的解答依赖于一种称为Z分数的标准化技术,这种方法最常用于近似正态的观测值(但也可用于任何分布)。观测值的 Z分数 定义为它高于或低于均值的标准差个数。如果观测值高于均值一个标准差,其Z分数为1。如果它低于均值1.5个标准差,则其Z分数为-1.5。如果 是来自分布 的一个观测值,我们用数学方式将Z分数定义为 \(x\) 我们计算Nel的Z分数: \(N(\mu, \sigma),\) Z分数。

\[ Z = \frac{x-\mu}{\sigma} \]

使用 \(\mu_{SAT}=1500,\) \(\sigma_{SAT}=300,\)\(x_{Nel}=1800,\) 观测值的Z分数是它高于或低于均值的标准差个数。我们为服从均值为

\[ Z_{Nel} = \frac{x_{Nel} - \mu_{SAT}}{\sigma_{SAT}} = \frac{1800-1500}{300} = 1 \]

、标准差为

的分布的观测值 \(x\) 计算Z分数,使用公式: \(\mu\) ,标准差为 \(\sigma\) 使用公式:

\[Z = \frac{x-\mu}{\sigma}\]

如果观测值 \(x\) 来自一个中心为 正态\(\mu\) 正态 \(\sigma\)分布,那么 Z 分数将服从中心为 0、标准差为 1 的 正态 分布。也就是说,当从 \(x\)\(Z\) 时,即使中心和离散程度都发生了变化,正态性仍然保持。

使用 Sian 的 ACT 分数 24,以及 ACT 的均值和标准差来计算其 Z 分数。4

高于均值的观测值的 Z 分数总是为正,而低于均值的观测值的 Z 分数为负。如果观测值等于均值(例如 SAT 分数为 1500),则 Z 分数为 \(0.\)

\(X\) 表示来自 \(N(\mu=3, \sigma=2),\) 的随机变量,并假设我们观测到 \(x=5.19.\) 求 Z 分数。 \(x.\) 然后,使用Z分数来确定 \(x\) 高于或低于均值多少个标准差。


其Z分数由下式给出: \(Z = \frac{x-\mu}{\sigma} = \frac{5.19 - 3}{2} = 2.19/2 = 1.095.\) 观测值 \(x\) 比均值高 上方 我们知道它一定高于均值,因为 \(Z\) 为正。

帚尾袋貂的头长近似服从正态分布,均值为 92.6 mm,标准差为 3.6 mm。请计算头长为 95.4 mm 和 85.8 mm 的袋貂的Z分数。5

我们可以用Z分数来大致判断哪些观测值比其他观测值更不寻常。如果一个观测值 \(x_1\) 的Z分数的绝对值大于另一个观测值 \(x_2\) 的Z分数的绝对值,则称该观测值比另一个观测值更不寻常: \(|Z_1| > |Z_2|.\) 当分布对称时,这种技术尤其有用。

在前面的引导练习中,两个帚尾袋貂的观测值中哪一个更 不寻常?6

13.2.3 正态概率计算

来自 SAT Guided Practice 的 Nel 在 SAT 中取得了 1800 分的成绩,对应的 \(Z=1.\) 他们想知道自己在所有 SAT 考生中所处的百分位数。


Nel 的 百分位数 是指取得比 Nel 更低 SAT 分数的人所占的百分比。我们在 图 13.6中用阴影标出代表这些人的区域。正态曲线下的总面积始终等于 1,而在 SAT 中得分低于 Nel 的人的比例等于 area 中阴影部分的 图 13.6:0.8413。换句话说,Nel 处于 SAT 考生的第 \(84^{th}\) 百分位数。

Nel's SAT score of 1800 is plotted on a normal curve with mean of 1500 and standard deviation of 300. The scores lower than Nel's are shaded in blue and represent roughly 84% of the distribution.
图 13.6:SAT 分数的正态模型,阴影标出得分低于 Nel 的人所占的区域。

我们可以使用正态模型来求百分位数或概率。 正态概率表列出了 Z 分数及对应的百分位数,可用于根据 Z 分数确定百分位数(反之亦然)。也可以使用统计软件。

正态概率最常用统计软件来求得,这里我们使用 R 来演示。我们使用该软件来确定任意特定 Z 分数所对应的百分位数。例如, \(Z=0.43\) 的百分位数是 0.6664,即第 \(66.64^{th}\) 百分位数。 pnorm() 函数在默认的 R 环境中可用,可给出正态曲线上任意截断值所对应的百分位数。 normTail() 函数在 openintro R 包中可用,可绘制相应的正态分布曲线。

pnorm(0.43, mean = 0, sd = 1)
[1] 0.666
openintro::normTail(m = 0, s = 1, L = 0.43)

我们也可以求出与某个百分位数相对应的 Z 分数。例如,要确定第 \(80^{th}\) 百分位数对应的 Z,我们使用 qnorm() 函数,它给出给定百分比所对应的 分位数 。分位数代表截断值。(要记住函数 qnorm() 提供的是截断值,可以注意 qnorm() 和英文“cutoff(截断)”都以“kuh”音开头。要记住 pnorm() 函数是根据给定截断值给出概率,可以注意 pnorm() 和英文“probability(概率)”都以“puh”音开头。)我们用 \(80^{th}\) 来求第 qnorm(): 0.84.

qnorm(0.80, mean = 0, sd = 1)
[1] 0.842
openintro::normTail(m = 0, s = 1, L = 0.842)

百分位数对应的 Z 分数:7

13.2.4 求出在 SAT 考试中得分高于 Nel 的考生所占的比例。

正态概率示例累积 SAT 分数可以很好地用正态模型来近似, \(N(\mu=1500, \sigma=300).\)

Shannon 是一名随机抽取的 SAT 考生,且我们对 Shannon 的 SAT 能力一无所知。Shannon 在 SAT 中取得至少 1630 分的概率是多少?


首先,一定要画出正态分布的图并加以标注。(图不必画得精确也有用。)我们关注的是其得分高于 1630 的机会,因此我们将上尾部分涂上阴影。参见下方的正态曲线。

\(x\)轴标出了均值以及均值上下 2 个标准差处的数值。求曲线下阴影面积的最简单方法是利用临界值的 Z 分数。已知 \(\mu=1500,\) \(\sigma=300,\) 且临界值为 \(x=1630,\) ,Z 分数的计算如下

\[ Z = \frac{x - \mu}{\sigma} = \frac{1630 - 1500}{300} = \frac{130}{300} = 0.43 \]

我们使用软件求出 \(Z=0.43,\) 的百分位数,结果为 0.6664。然而,该百分位数描述的是 Z 分数 下限 0.43 的人。为了求 上方 \(Z=0.43,\) 的面积,我们用 1 减去下尾的面积,如下所示。

Shannon 在 SAT 中取得至少 1630 分的概率是 0.3336。该计算过程可视化于 图 13.7.

Three normal curves visualizing that probabilities can be calculated using arithmetic on areas. The area above 1630 can be calculated by taking the total area of one and subtracting the area below 1630 (which is 0.6664). The resulting value is 0.3336.
图 13.7:Shannon 在 SAT 中取得至少 1630 分的概率的可视化计算。

一定要先画图,然后再求 Z 分数。

对于任何涉及正态概率的问题, 永远永远永远 先画出并标注正态曲线,并将所关注的区域涂上阴影。该图将提供概率的估计值。

在画出表示该情况的图形后,确定所关注观测值的 Z 分数。

如果 Shannon 得分至少为 1630 的概率是 0.3336,那么他们得分低于 1630 的概率是多少?画出表示本题的正态曲线,将下方区域(而非上方区域)涂上阴影。8

Edward 在 SAT 中得了 1400 分。他们的百分位数是多少?


首先,需要一张图。Edward 的百分位数是成绩没有达到 1400 分的人所占的比例。这些是 1400 左侧的分数,如下图所示。

A normal curve with a mean of 1500 and a standard deviation of 300. Values less than 1400 are shaded blue in the lower part of the curve. The shaded part is roughly 37 percent of the graph.

均值 \(\mu=1500,\) 标准差 \(\sigma=300,\) 以及尾部区域的分界点 \(x=1400\) 用于计算 Z 分数:

\[ Z = \frac{x - \mu}{\sigma} = \frac{1400 - 1500}{300} = -0.33\]

统计软件可用于求出 \(N(0,1)\) 曲线在 \(-0.33\) 左侧的比例,即 0.3707。Edward 处于第 \(37^{th}\) ,为第

利用上一个例子的结果,计算 SAT 考生中成绩比 Edward 好的比例。同时画一张新图。


如果 Edward 的成绩好于 37% 的 SAT 考生,那么大约有 63% 的考生成绩比他们好,如下图所示。

A normal curve with a mean of 1500 and a standard deviation of 300. Values greater than 1400 are shaded blue in the upper part of the curve. The shaded part is roughly 63 percent of the graph.

右侧的面积。

大多数统计软件以及大多数书籍中的正态概率表给出的都是左侧面积。如果你想要右侧面积,先求出左侧面积,然后用 1 减去该值。

Stuart 的 SAT 成绩为 2100 分。为每一小题画一张图。(a) 他们的百分位数是多少?(b) 有百分之多少的 SAT 考生比 Stuart 考得更好?9

基于 100 名男性的样本,10 美国 20 至 62 岁自我认同为男性的成年人身高近似服从正态分布,均值为 70.0 英寸,标准差为 3.3 英寸。

Kamron 身高 5 英尺 7 英寸(67 英寸),Adrian 身高 6 英尺 4 英寸(76 英寸)。(a) Kamron 的身高百分位数是多少?(b) Adrian 的身高百分位数是多少?并为每一小题各画一张图。


使用统计软件(例如 R 中的 pnorm() 函数)计算的数值答案:(a) 第 18.17 百分位数。(b) 第 96.55 百分位数。

前面几道题的重点是求某个特定观测值的概率或百分位数。如果你想求与某个特定百分位数相对应的观测值,该怎么办呢?

Yousef 的身高处于 \(40^{th}\) 百分位数。他们有多高?


和往常一样,先画出图形。

在本例中,下尾概率已知(0.40),可以在图上将其涂上阴影。我们想求出与已知概率 0.4 相对应的观测值。我们可以用两种不同的方法求出该观测值:使用上文所示的高度曲线,或使用与以零为中心、标准差为一的标准正态曲线相关联的 Z 分数。

如果你可以使用允许指定正态曲线均值和标准差的软件(如 R,代码如下所示),你可以直接计算出该曲线上的观测值(即 Yousef 的身高)。

[1] 69.2

Yousef 的身高为 69.2 英寸。也就是说,Yousef 身高约为 5 英尺 9 英寸(这是 5 英尺 9 英寸的记法)。

在没有灵活软件的情况下,你需要标准正态曲线(以零为中心、标准差为一的正态曲线)所给出的信息。首先,确定与 \(40^{th}\) ,为第

因为百分位数低于50%,我们知道 \(Z\) 将为负值。统计软件给出 \(Z\) 值为 \(-0.25.\)

qnorm(0.4, mean = 0, sd = 1)
[1] -0.253

已知 \(Z_{Yousef}=-0.25\) 和总体参数 \(\mu=70\)\(\sigma=3.3\) 英寸,可以建立Z分数公式来确定Yousef未知的身高,记为 \(x_{Yousef}\):

\[ -0.253 = Z_{Yousef} = \frac{x_{Yousef} - \mu}{\sigma} = \frac{x_{Yousef} - 70}{3.3} \]

求解 \(x_{Yousef}\) 得到身高69.2英寸。同样,Yousef的身高约为5英尺9英寸。

\(82^{nd}\) 百分位数对应的成年男性身高是多少?


为了练习使用Z分数,我们将利用标准正态曲线来解决这个问题。

同样,我们先画出图形。

并计算与第 \(82^{nd}\) 百分位数相关的Z值:

qnorm(0.82, mean = 0, sd = 1)
[1] 0.915

接下来,我们要求第 \(82^{nd}\) 百分位数处的Z分数,它将是一个正值(因为该百分位数大于50%)。使用 qnorm(), 第 \(82^{nd}\) 百分位数对应于 \(Z=0.92.\) 最后,身高 \(x\) 通过 Z 分数公式求得,已知均值 \(\mu,\) 标准差 \(\sigma,\) 和 Z 分数 \(Z=0.92\):

\[ 0.92 = Z = \frac{x-\mu}{\sigma} = \frac{x - 70}{3.3} \]

由此得出 73.04 英寸,即约 6'1 \(82^{nd}\) ,为第

百分位数是多少?与往常处理正态概率问题一样,先画一幅图。

  1. 百分位数是多少? \(95^{th}\) SAT 分数的第
  2. 百分位数是多少? \(97.5^{th}\) 男性身高的第11

百分位数是多少?与往常处理正态概率问题一样,先画一幅图。

  1. 使用 Z 分数回答以下问题。
  2. 随机选取一名男性成年人,其身高至少为 6'212

随机抽取一名成年男性,其身高在5'9"到6'2"之间的概率是多少?


这些身高对应69英寸和74英寸。首先,画出图形。所求面积不再是上尾或下尾。

曲线下的总面积为1。如果我们求出两个未着色尾部的面积(根据之前的引导练习,这些面积是 \(0.3821\)\(0.1131\)),那么我们就可以求出中间的面积:

也就是说,身高在5'9"到6'2"之间的概率是0.5048。

求SAT考生中得分在1500到2000之间的百分比。13

成年男性中身高在5'5"到5'7"之间的百分比是多少?14

13.3 量化统计量的变异性

正如后续章节所示,许多用于汇总数据的统计量(例如样本比例、样本均值、两个样本比例之差、两个样本均值之差、线性模型的样本斜率等)都按照上文所述的正态分布而变化。这些数学模型源自正态理论,但即使是计算方法(以及两种方法背后的直观思维)也使用了迄今为止所构建的大多数分布中普遍出现的钟形变异性。

13.3.1 68-95-99.7法则

在这里,我们介绍一个有用的通用法则,用于计算正态分布中落在均值1、2、3个标准差范围内的概率。该法则在广泛的实际场景中非常有用,尤其是在没有计算器或Z表的情况下进行快速估计时。

A normal curve showing the area within one standard deviation of the mean (which is 0.68), the area within two standard deviations of the mean (which is 0.95), and the are within three standard deviations of the mean (which is 0.997).
图13.8:正态分布中落在均值1、2、3个标准差范围内的概率。

使用 pnorm() (或Z表)验证正态分布中分别约有68%、95%和99.7%的观测值落在均值的1、2、3个标准差范围内。例如,首先求出落在 \(Z=-1\)\(Z=1,\) 之间的面积,其面积应约为0.68。类似地, \(Z=-2\)\(Z=2.\)15

正态随机变量可能偏离均值 4 个、5 个甚至更多标准差。但是,如果数据近似服从正态分布,这类情况极为罕见。偏离均值超过 4 个标准差的概率约为三万分之一;超过 5 个和 6 个标准差的概率分别约为三百五十万分之一和十亿分之一。

SAT 分数近似服从正态模型,均值为 \(\mu = 1500\) ,标准差为 \(\sigma = 300.\) 大约有多大比例的考生得分在 900 到 2100 之间?有多大比例的考生得分在 1500 到 2100 之间?16

13.3.2 标准误

点估计随样本不同而变化,我们用所谓的 标准误(SE)来量化这种变异性。标准误等于与该统计量相关联的标准差。例如,要量化点估计从一个样本到另一个样本的变异性,这种变异性就称为该点估计的标准误。几乎在所有情况下,标准误本身也是一个估计值,由样本数据计算得出。

确定标准误的方法因情形而异。不过,通常它是基于中心极限定理用公式确定的。

13.3.3 误差范围

与标准误密切相关的是 误差幅度。误差范围描述观测值偏离其均值的距离。
例如,要描述大多数(即 95%)观测值所在的范围,我们说误差范围约为 \(2 \times SE\)。也就是说,95% 的观测值位于均值两侧两个误差范围之内。

样本比例的误差范围。

\(z^\star \times SE\) 被称为 误差幅度.

\(z^\star\) 是在正态分布上找到的临界值。 \(z^\star\) 最常见的值是 1.96(通常近似为 2),这表明误差幅度描述了与 95% 的抽样统计量相关的变异性。

注意,如果观测值的分布范围从某个下界到某个上界,标准误 (SE) 的粗略近似值是用极差除以 4。也就是说,如果你注意到样本比例从 0.1 到 0.4,那么 SE 可以近似为 0.075。

13.4 案例研究(检验):机会成本

在推断的情境中使用正态模型的方法,与将该模型应用于近似正态的单个观测值的做法非常相似。我们将替换之前使用随机化或模拟技术得到的零分布,并再次使用正态模型验证结果。当样本量足够大时,正态近似通常会为我们提供与模拟模型相同的结论。

13.4.1 观测数据

第 11.2 节 中我们介绍了机会成本研究,该研究发现,当学生被提醒现在不花钱意味着这笔钱将来可以用于其他事情时,他们会变得更加节俭。让我们在正态分布的背景下重新分析这些数据并比较结果。

opportunity_cost 数据可以在 openintro R 包中找到。

13.4.2 统计量的变异性

图 13.9 使用随机化方法确定的零分布进行了总结。该零分布的最佳拟合正态分布的均值为 0。我们可以借用一个公式来计算该分布的标准误,我们将在 第 17中熟悉这个公式,但现在让我们直接把值 \(SE = 0.078\) 当作给定的。回顾一下,如 图 13.9所示,差异的点估计为 0.20。接下来,我们将使用正态分布方法来计算 p 值。

Normal curve overlaid on the histogram of the simulated differences in sample proportions in the opportunity cost study. The theoretical normal distribution fits the histogram quite well. The observed difference in sample proportions of 0.2 is in the tail of both the normal curve and the histogram.
图 13.9:机会成本研究中差异的零分布,并叠加了正态曲线。此图运行了 10,000 次模拟。

13.4.3 观测统计量与零假设统计量的对比

正如我们在 第 13.2 节,画一幅正态分布的图并涂上阴影会很有帮助,这样我们就能清楚地知道要计算什么。这里我们想求 0.2 之外尾部的面积,即 p 值。

接下来,我们可以使用观测到的差值 0.20 和两个模型参数来计算 Z 分数。标准误 \(SE = 0.078,\) 相当于模型的标准差。

\[Z = \frac{\text{observed difference} - 0}{SE} = \frac{0.20 - 0}{0.078} = 2.56\]

我们可以使用统计软件,也可以在正态概率表中查找 \(Z = 2.56\) 来确定右尾面积:0.0052,这与我们用随机化方法得到的右尾面积(0.006)大致相同。将该面积作为 p 值,我们看到 p 值小于 0.05,因此我们得出结论:该处理确实影响了学生的消费。

假设检验中的 Z 分数。

在假设检验的背景下,点估计的 Z 分数为

\[Z = \frac{\text{point estimate} - \text{null value}}{SE}\]

这里的标准误相当于点估计的标准差,而零值来自零假设中的声明。

我们已经确认,在机会成本案例研究中,之前使用的随机化方法与正态分布方法给出了几乎相同的 p 值和结论。接下来,让我们把注意力转向医疗顾问案例研究。

13.5 案例研究(检验):医疗顾问

13.5.1 观测数据

第 12.1 节 中,我们了解到一位医疗顾问报告说,在他们接受肝移植的 62 位客户中,只有 3 位出现了并发症,这低于更常见的 0.10 的并发症率。在那项工作中,我们没有对零情景建模,但我们将在 第 16.1 节中讨论单比例零分布的模拟方法, 图 13.10中提供了这样的分布。我们在图中添加了最佳拟合的正态曲线,其均值为 0.10。借用我们将在 第 16中遇到的一个公式,该分布的标准误也已计算出来: \(SE = 0.038.\)

13.5.2 统计量的变异性

在开始之前,我们想指出一个容易被忽视的简单细节:我们通过模拟生成的零分布略微偏斜,直方图也不够平滑。事实上,正态分布只能勉强拟合这个模型。

Normal curve overlaid on the histogram of the simulated sample proportions in the medical consultant study. The theoretical normal distribution does not fit the histogram as well as in @fig-OpportunityCostDiffs-w-normal due to the skewness of the distribution of the sample proportions. The observed sample proportion of 0.0484 is towards the tail in both the normal curve and the histogram, but it is not an extreme value.
图 13.10:由医疗顾问的 10,000 次模拟研究创建的样本比例的零分布,以及最佳拟合的正态模型。

13.5.3 观测统计量与零假设统计量的对比

与往常一样,在计算正态概率之前,我们会先画一张图。下面是一个以 0.10 为中心、标准误为 0.038 的正态分布。

接下来,我们可以使用观测到的并发症发生率 \(\hat{p} = 0.048\) 以及正态模型的均值和标准差来计算 Z 分数。这里我们再次使用标准误作为标准差。

\[Z = \frac{\hat{p} - p_0}{SE_{\hat{p}}} = \frac{0.048 - 0.10}{0.038} = -1.37\]

通过统计软件或正态概率表确定 \(Z = -1.37\) 后,我们可以得出左尾面积为 0.0853,这就是该假设检验的估计 p 值。这里有一个小问题:p 值 0.0853 比将在 第 16.1 节.

中计算的模拟 p 值 0.1222 小了将近 30%。 图 13.10这种差异可以用正态模型对

中零分布的糟糕拟合来解释。如前所述,模拟得到的零分布不够平滑,且分布本身略微偏斜。这是坏消息。好消息是,我们可以通过一些简单的检查来预见这些问题。我们将在接下来的章节中进一步了解这些检查。 第 13.1 节 第 16 中我们指出,应用中心极限定理的两个常见条件是:(1) 样本中的观测值必须相互独立,(2) 样本必须足够大。针对这一特定情况的准则——我们将在

13.5.4 中学习——本应提醒我们正态模型是一个糟糕的近似。

应用正态模型的条件

本节的成功之处在于将正态模型应用于机会成本数据。然而,最大的启示来自在医疗顾问案例研究中使用正态近似的不太成功的尝试。统计技术就像木匠的工具。负责任地使用时,它们可以产生惊人而精确的结果。然而,如果不负责任地或在不当条件下使用这些工具,就会产生不可靠的结果。因此,在后续章节中介绍的每一种统计方法,我们都会仔细列出可以合理使用该方法的前提条件。在每次应用该技术时,都应检查这些条件。

在完成本课程的入门主题之后,进一步的学习可能会涉及复杂模型,例如,将许多具有不同变异结构的变量结合在一起。处理来自正态总体的数据会使高阶模型更容易估计和解释。有时,模拟、随机化或自助法在结构或计算需求上会显得笨重。正态性通常可以通过简单直接的建模技术对数据做出极好的近似。

13.6 案例研究(区间):支架

点估计是对参数值的最佳猜测,因此围绕该值构建置信区间是合理的。标准误是与点估计相关的不确定性的一种度量,它为我们应该把置信区间设多大提供了指导。68-95-99.7法则告诉我们,一般而言,95%的观测值落在均值的2个标准误范围内。这里,我们使用1.96这个值以稍微更精确一些。

构建95%置信区间。

当一个点估计的抽样分布可以合理地用正态分布建模时,我们观察到的点估计大约有95%的时间会落在感兴趣的真实值的1.96个标准误范围内。因此,可以为这样的点估计构建一个 95%置信区间

\[\text{point estimate} \pm 1.96 \times SE\]

我们可以有 95%置信 认为该区间捕获了真实值。

计算均值为0、标准差为1的正态分布在-1.96和1.96之间的面积。17

机会成本研究中的点估计是:如果提醒学生现在不花的钱以后可以花在其他东西上,购买视频的学生会减少20%。该点估计可以合理地用标准误为 \(SE = 0.078.\) 的正态分布建模。请为该点估计构建一个95%置信区间。


由于题目告诉我们点估计可以用正态分布建模:

\[\text{point estimate} \pm 1.96 \times SE = 0.20 \pm 1.96 \times 0.078 = (0.047, 0.353)\]

我们有95%的信心认为,处理组导致的视频购买率比对照组低4.7%到35.3%。由于该置信区间不包含0,这与我们之前的假设检验一致,在检验中我们拒绝了“无差异”的说法。

请注意,我们使用了上一节中的SE = 0.078。然而,更一般地,对于这个置信区间,使用样本比例以略有不同的方式重新计算标准误会更合适。目前不必担心这个细节,因为在这种情况下,两个所得的标准误几乎相同。

13.6.1 观测数据

考虑一项实验,该实验检验为有中风风险的患者在脑部植入支架是否有助于降低中风风险。这项研究前30天(共包含451名患者)的结果总结在 表 13.1中。这些结果令人惊讶!点估计表明,接受支架植入的患者中风风险可能 更高\(p_{trmt} - p_{ctrl} = 0.090.\)

表 13.1:支架研究30天结果的描述性统计。
组别 无事件 卒中 总计
控制 214 13 227
治疗 191 33 224
总计 405 46 451

stent30 数据可以在 openintro R 包中找到。

13.6.2 统计量的变异性

考虑支架研究及其结果。确保点估计 \(p_{trmt} - p_{ctrl} = 0.090\) 近似正态所需的条件已为你验证完毕,且该估计的标准误为 \(SE = 0.028.\) 。请为使用支架导致的30天中风率变化构建一个95%置信区间。


应用正态模型的条件已经验证完毕,因此我们可以着手构建置信区间:

\[\text{point estimate} \pm 1.96 \times SE = 0.090 \pm 1.96 \times 0.028 = (0.035, 0.145)\]

我们有95%的把握认为,在中风患者脑部植入支架会使30天内中风风险增加0.035至0.145。该置信区间还可以以类似于假设检验的方式使用:由于该区间不包含0(完全位于0之上),这意味着数据提供了令人信服的证据,表明研究中使用的支架改变了30天内的中风风险。

与假设检验一样,置信区间也并非完美。大约每20个正确构建的95%置信区间中就有1个未能捕获目标参数,这仅仅是由于观测数据的自然变异性所致。 图 13.11 展示了基于25个不同数据集构建的比例置信区间,这些数据集均来自真实比例为 \(p = 0.3.\) 的同一总体。然而,这25个置信区间中有1个恰好未包含真实值。未能捕获 \(p=0.3\) 的区间并非由于糟糕的科学研究,而是由于自然变异性,我们应当 预期 会有一些区间错过目标参数。事实上,在一生中构建95%置信区间的过程中,你应当预期你所报告的区间中有5%会错过目标参数(遗憾的是,你永远无法知道自己报告的区间中哪些捕获了参数,哪些错过了参数)。

A series of 25 horizontal lines are drawn, representing each of 25 different samples. Each vertical line starts at the value of the lower bound of the confidence interval and ends at the value of the upper bound of the confidence interval which was created from that particular sample. In the center of the line is a solid dot at the observed proportion of successes for that particular sample. A dashed vertical line runs through the horizontal lines at p = 0.3 (which is the true value of the population proportion). 24 of the 25 horizontal lines cross the vertical line at 0.3, but one of the horizontal lines is completely lower than 0.3. The line that does not cross 0.3 is colored red because the confidence interval from that particular sample would not have captured the true population proportion.
图 13.11:从总体中收集了 25 个样本量为 \(n=300\) 的样本,该总体 \(p = 0.30.\) 对于每个样本,都构建了一个置信区间以试图捕获真实比例 \(p.\) 然而,这 25 个区间中有 1 个未能捕获 \(p = 0.30.\)

图 13.11,即有一个区间不包含真实比例, \(p = 0.3.\) 这是否意味着所选的数据集存在问题?18

13.6.3 解释置信区间

细心的人可能已经注意到,在描述置信区间时使用了一些略显别扭的措辞。

正确的置信区间解释。

我们有 XX% 的置信度认为总体参数介于 下限上限 之间(其中 下限上限 均为数值)。

错误 的表述可能会将置信区间描述为以某个概率捕获总体参数。

这是最常见的错误之一:虽然把它当作概率来理解可能有用,但置信水平只是量化参数落在区间内的合理程度。

关于置信区间另一个特别重要的考虑是,它们 只试图捕获总体参数。我们的区间并不能说明捕获单个观测值、捕获一定比例的观测值或捕获点估计的置信度。置信区间为总体参数提供区间估计,并试图捕获 总体参数.

13.7 本章复习

13.7.1 小结

我们可以将使用正态模型的过程总结如下:

  • 明确研究问题。 该数学模型既可应用于假设检验框架,也可应用于置信区间框架。请确保你的研究问题由最合适的推断方法来解答。
  • 通过观察性研究或实验收集数据。 为解答研究问题,收集相关变量的数据。注意,你的数据可能是来自某个总体的随机样本,也可能是随机化实验的一部分。
  • 对统计量的随机性建模。 在许多情况下,正态分布将是与目标统计量相关的随机性的极佳模型。中心极限定理告诉我们,如果样本量足够大,样本平均值(可以计算为比例或样本均值)在描述统计量在样本之间的变化时将近似服从正态分布。
  • 计算统计量的变异性。 使用公式,得出统计量的标准差(或更常见的是标准差的估计值,称为标准误)。统计量的标准误将提供关于观测统计量距离零假设值(如果进行假设检验)或距离未知总体参数(如果构建置信区间)有多远的信息。
  • 使用正态分布来量化变异性。 正态分布将给出一个概率,用于衡量你观察到的参数与假设的(或观察到的与未知的)参数之间相差所测得的幅度的可能性大小。这种差异是否异常将构成对研究问题的结论。
  • 形成结论。 利用分析得到的p值或置信区间,针对所关注的研究问题进行报告。另外,务必用通俗的语言撰写结论,以便普通读者能够理解结果。

表 13.2 是从数学模型方法角度对统计推断的另一种审视。

表 13.2:作为推断统计方法的数学模型总结。
问题 答案
它的作用是什么? 利用理论(主要是中心极限定理)来描述由重复的随机化实验或随机样本所产生的假设变异性
所描述的随机过程是什么? 随机化实验或随机抽样
还可以近似哪些其他随机过程? 也可用于描述观察模型中的随机抽样或实验中的随机分配
它最适合用于什么? 快速分析,例如计算 Z 分数
什么实物可以代表这一模拟过程? 不适用

13.7.2 术语

本章中介绍的术语列于 表 13.3。如果您不确定其中一些术语的含义,我们建议您回到正文中复习它们的定义。您应该能够很容易地发现它们是 粗体文本.

表 13.3:本章介绍的术语。
95%置信区间 正态分布 百分位数
95%置信 正态模型 抽样分布
中心极限定理 正态概率表 标准误
误差幅度 原分布 标准正态分布
正态曲线 参数 Z分数

13.8 练习

奇数编号习题的答案见 附录 A.13.

  1. 曲线下面积,第一部分。 标准正态分布中有多大比例 \(N(\mu=0, \sigma=1)\) 位于下面每个由 \(Z\) 不等式所表示的区域内?请务必画出图形。在上文中,我们使用 R 来计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    1. \(Z < -1.35\)

    2. \(Z > 1.48\)

    3. \(-0.4 < Z < 1.5\)

    4. \(|Z| > 2\)

  1. 曲线下面积,第二部分。 标准正态分布中有多大比例 \(N(\mu=0, \sigma=1)\) 位于下面每个由 \(Z\) 不等式所表示的区域内?请务必画出图形。在上文中,我们使用 R 来计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    1. \(Z > -1.13\)

    2. \(Z < 0.18\)

    3. \(Z > 8\)

    4. \(|Z| < 0.5\)

  1. GRE 分数与 Z 分数。 参加研究生入学考试(GRE)的 Sophia 在语文推理部分得了 160 分,在数量推理部分得了 157 分。所有考生的语文推理部分平均分为 151 分,标准差为 7;数量推理部分平均分为 153 分,标准差为 7.67。假设这两个分布都近似正态分布。请利用这些信息计算以下各项。在上文中,我们使用 R 来计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    1. 写出这两个正态分布的简记形式。

    2. Sophia 在言语推理部分的 Z 分数是多少?在数量推理部分呢?画出标准正态分布曲线并标出这两个 Z 分数。

    3. 这些 Z 分数告诉你什么?

    4. 相对于其他人,Sophia 在哪个部分表现更好?

    5. 求她在两次考试中各自的百分位数分数。

    6. 在言语推理部分有多少百分比的考生比她考得好?在数量推理部分呢?

    7. 解释为什么仅仅比较两个部分的原始分数可能会导致关于学生在哪个部分表现更好的错误结论。

    8. 如果这些考试分数的分布不是近似正态的,你对 (b) - (f) 部分的答案会改变吗?解释你的理由。

  1. 铁人三项比赛时间,Z 分数。 在铁人三项比赛中,选手通常按年龄和性别分组。两位朋友 Leo 和 Mary 都完成了 Hermosa Beach 铁人三项比赛,Leo 参加了“男子,30 - 34 岁”组,Mary 参加了“女子,25 - 29 岁”组。Leo 以 1:22:28(4948 秒)完成比赛,而 Mary 以 1:31:53(5513 秒)完成比赛。我们可以看到 Leo 完赛更快,但他们很好奇自己在各自组内的表现如何。你能帮帮他们吗?以下是关于他们所在组表现的一些信息。请利用这些信息计算以下各项。在上文中,我们使用 R 来计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    • “男子,30 - 34 岁”组的完赛时间均值为 4313 秒,标准差为 583 秒。

    • “女子,25 - 29 岁”组的完赛时间均值为 5261 秒,标准差为 807 秒。

    • 两组完赛时间的分布均近似正态。
      记住:更好的表现对应更快的完赛时间。

    1. 写出两个正态分布的简记形式。

    2. Leo 和 Mary 的完成时间各自的 Z 分数是多少?这些 Z 分数说明了什么?

    3. Leo 和 Mary 在各自小组中的排名谁更好?请解释你的理由。

    4. Leo 在他的小组中比百分之多少的铁人三项运动员完成得更快?

    5. Mary 在她的小组中比百分之多少的铁人三项运动员完成得更快?

    6. 如果完成时间的分布不是近似正态的,你对 (b) – (e) 部分的答案会改变吗?请解释你的理由。

  1. GRE 分数,临界值。 考虑前面给出的两个 GRE 分数分布: \(N(\mu=151, \sigma=7)\) 为考试的语言推理(Verbal Reasoning)部分, \(N(\mu=153, \sigma=7.67)\) 为定量推理(Quantitative Reasoning)部分。利用这些信息计算以下各项。在上文中,我们使用 R 来计算正态概率。你也可以选择使用其他工具,例如一个 Shiny 应用 或正态分布表。

    1. 在定量推理部分得分位于第 \(80^{th}\) 百分位数的学生的分数。

    2. 在语言推理部分得分低于 70% 考生的学生的分数。

  1. 铁人三项时间,临界值。 回忆铁人三项比赛时间的两个不同分布: \(N(\mu=4313, \sigma=583)\) (“男性,30 - 34 岁”)和 \(N(\mu=5261, \sigma=807)\) (“女性,25 - 29 岁”组)。时间以秒为单位。使用这些信息计算以下各项。在上文中,我们使用 R 计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    1. 男性组中最快的 5% 运动员(即用时最短的 5%)的截止时间。

    2. 女性组中最慢的 10% 运动员的截止时间。

  1. 洛杉矶天气,华氏度。 洛杉矶六月的平均每日最高气温为 77\(^\circ\) F,标准差为5\(^\circ\) F。假设六月的气温近似服从正态分布。使用这些信息计算以下各项。在上文中,我们使用 R 计算正态概率。你也可以选择使用其他工具,例如 Shiny 应用 或正态分布表。

    1. 在六月随机选择的一天,洛杉矶气温达到 83\(^\circ\) F 或更高的概率是多少?

    2. 洛杉矶六月最冷的 10% 的日子(最高气温最低的日子)有多凉爽?

  1. CAPM。 资本资产定价模型(CAPM)是一个金融模型,它假设投资组合的收益服从正态分布。假设某投资组合的年平均收益率为14.7%(即平均收益为14.7%),标准差为33%。收益率为0%表示投资组合的价值不变,负收益表示投资组合亏损,正收益表示投资组合盈利。

    1. 该投资组合在多大比例的年份会亏损,即收益率低于0%?

    2. 该投资组合年收益率最高的15%的分界点是多少?

  1. 洛杉矶天气,摄氏度。 回顾以下设定:洛杉矶6月的平均每日最高气温为77\(^\circ\) F,标准差为5\(^\circ\) F,且可以假设最高气温服从正态分布。我们使用以下公式将 \(^\circ\)F(华氏度)转换为 \(^\circ\)C(摄氏度): \(C = (F - 32) \times \frac{5}{9}.\)

    1. 写出洛杉矶6月气温(以 \(^\circ\)C 为单位)分布的概率模型。

    2. 在洛杉矶6月观测到28\(^\circ\) C(大致相当于83\(^\circ\) F)或更高气温的概率是多少?请使用 (a) 部分的 \(^\circ\)C 模型进行计算。

    3. 你在本题第 (b) 部分和上一题关于洛杉矶天气的第 (a) 部分得到的答案是相同还是不同?你感到惊讶吗?请解释。

    4. 估计洛杉矶 6 月气温(单位:摄氏 \(^\circ\))的四分位距 (IQR)。

  1. 求标准差 (SD)。 在下列情况下,求该分布的标准差。

    1. MENSA 是一个组织,其成员的 IQ 位于人群前 2%。IQ 服从均值为 100 的正态分布,加入 MENSA 所需的最低 IQ 分数为 132。

    2. 20 至 34 岁女性的胆固醇水平近似服从均值为 185 毫克/分升 (mg/dl) 的正态分布。胆固醇水平高于 220 mg/dl 的女性被认为患有高胆固醇,约 18.5% 的女性属于这一类别。

  1. 慢性疾病。 2013 年,皮尤研究基金会报告称“45% 的美国成年人报告他们患有一种或多种慢性疾病”。然而,该数值基于一个样本,因此就其本身而言,它可能不是所关注总体参数的完美估计。该研究报告的标准误约为 1.2%,并且在该情境下可以合理地使用正态模型。

    1. 为患有一种或多种慢性疾病的美国成年人比例构建一个 95% 置信区间。并在该研究的背景下解释这个置信区间。 (皮尤研究中心 2013)

    2. 判断以下每个陈述是真是假,并给出解释以证明你的每个答案。

      1. 我们可以确定地说,第 (a) 部分的置信区间包含患有慢性疾病的美国成年人真实百分比。

      2. 如果我们重复这项研究 1,000 次,并为每次研究构建一个 95% 置信区间,那么这些置信区间中大约有 950 个会包含患有慢性疾病的美国成年人真实比例。

      3. 该民意调查提供了(在 \(\alpha = 0.05\) 水平上)统计学上可辨识的证据,表明患有慢性疾病的美国成年人百分比低于 50%。

      4. 由于标准误是 1.2%,因此研究中只有 1.2% 的人对其回答表达了不确定性。

  1. 社交媒体用户与新闻,数学模型。 2022年进行的一项民意调查发现,50%的美国成年人(即比例0.5)有时或经常从社交媒体获取新闻。该估计的标准误为0.5%(即0.005),并且可以使用正态分布来对样本比例进行建模。 (皮尤研究中心 2022)

    1. 为有时或经常从社交媒体获取新闻的美国成年人比例构建一个99%置信区间,并结合具体情境解释该置信区间。

    2. 判断以下每个陈述是真是假,并给出解释以证明你的每个答案。

      1. 数据提供了统计学上可辨识的证据,表明超过一半的美国成年用户有时或经常通过社交媒体获取新闻。使用可辨识性水平 \(\alpha = 0.01\).

      2. 由于标准误是0.5%,我们可以得出结论:99.5%的所有美国成年用户被纳入了该研究。

      3. 如果我们想减小该估计的标准误,我们应该收集更少的数据。

      4. 如果我们为有时或经常通过社交媒体获取新闻的美国成年人百分比构建一个90%置信区间,所得的置信区间将比相应的99%置信区间更宽。

  1. 解释来自样本比例的Z分数。 假设你对一个总体比例进行假设检验,并计算出Z分数为0.47。以下哪项是对该值的最佳解释?对于不是良好解释的选项,请指出其所描述的统计概念。19

    1. 零假设为真的概率是0.47。

    2. 如果零假设为真,获得与总体比例假设值相差如观测值那么远的样本比例的概率为0.47。

    3. 样本比例比总体比例的假设值大0.47个标准误。

    4. 样本比例等于0.47乘以标准误。

    5. 样本比例与总体假设值相差0.47。

    6. 样本比例是0.47。

  1. 心理健康。 综合社会调查提出了这样一个问题:“在过去30天中,有多少天您的心理健康状况不佳,包括压力、抑郁和情绪问题?”根据1,151名美国居民的回答,该调查报告了2010年95%置信区间为3.40至4.24天。

    1. 请结合数据背景解释这个区间。

    2. “95%置信”是什么意思?请在本应用的背景下进行解释。

    3. 假设研究人员认为99%的置信水平对这个区间更合适。这个新区间会比95%置信区间更小还是更宽?

    4. 如果进行一项针对500名美国人的新调查,您认为估计值的标准误差会更大、更小,还是大致相同?

  1. 重复抽取水样本。 一家非营利组织想了解饮用水中铅含量超标的家庭比例。他们预计至少有5%的家庭铅含量超标,但不会超过约30%。他们随机抽取800户家庭,并与房主合作获取水样,然后计算这些家庭中铅含量超标的比例。他们重复此过程1,000次,并构建样本比例的分布。

    1. 这个分布叫什么?

    2. 您预计这个分布的形状是对称的、右偏的,还是左偏的?请解释您的理由。

    3. 这个分布的变异性的名称是什么?

    4. 假设研究人员的预算被削减,每个样本只能收集250个观测值,但他们仍然可以收集1,000个样本。他们构建了一个新的样本比例分布。这个新分布的变异性与每个样本包含800个观测值时分布的变异性相比会如何?

  1. 重复抽取学生样本。 在一所大型大学的所有大一新生中,16%在当年登上了院长名单。作为课堂项目的一部分,学生们随机抽取40名学生,并检查这些学生是否登上了名单。他们重复此过程1,000次,并构建样本比例的分布。

    1. 这个分布叫什么?

    2. 您预计这个分布的形状是对称的、右偏的,还是左偏的?请解释您的理由。

    3. 这个分布的变异性的名称是什么?

    4. 假设学生们决定再次抽样,这次每个样本收集90名学生,他们再次收集1,000个样本。他们构建了一个新的样本比例分布。这个新分布的变异性与每个样本包含40个观测值时的分布的变异性相比会如何?


  1. 总体而言,这些分布是相当对称的。医疗顾问的案例研究是唯一一个有明显偏态的分布(该分布右偏)。↩︎

  2. 它也以高斯分布(Gaussian distribution)之名被引入,得名于弗雷德里克·高斯(Frederic Gauss),他是第一个将其数学表达式形式化的人。↩︎

  3. 我们用标准差作为衡量标准。Nel的SAT成绩比平均水平高1个标准差: \(1500 + 300 = 1800.\) Sian的ACT成绩比平均值高0.6个标准差: \(21+0.6 \times 5 = 24.\)图 13.5中,我们可以看到Nel与其他考生相比的表现优于Sian,所以Nel的成绩更好。↩︎

  4. \(Z_{Sian} = \frac{x_{Sian} - \mu_{ACT}}{\sigma_{ACT}} = \frac{24 - 21}{5} = 0.6\)↩︎

  5. 对于 \(x_1=95.4\) 毫米: \(Z_1 = \frac{x_1 - \mu}{\sigma} = \frac{95.4 - 92.6}{3.6} = 0.78.\) 对于 \(x_2=85.8\) 毫米: \(Z_2 = \frac{85.8 - 92.6}{3.6} = -1.89.\)↩︎

  6. 因为第二个观测值的Z分数的 绝对值 大于第一个观测值,所以第二个观测值具有更不寻常的头部长度。↩︎

  7. 如果84%的人分数低于Nel,那么分数更好的人数必定是16%。(通常在使用正态模型或任何其他连续分布时,并列情况会被忽略。)↩︎

  8. 我们求得该概率为0.6664。本练习的图形由下方“0.6664”以下的阴影区域表示。↩︎

  9. 数值答案:(a) 0.9772。(b) 0.0228。↩︎

  10. 该样本取自 USDA Food Commodity Intake Database(美国农业部食品商品摄入数据库)。↩︎

  11. 记住:先画图,再求 Z 分数。(图留给你们自己画。)Z 分数可以通过百分位数和正态概率表求得。(a) 我们在正态概率表的概率部分(中间部分)查找 0.95,这引导我们找到第 1.6 行和(大约)0.05 列,即 \(Z_{95}=1.65.\) 已知 \(Z_{95}=1.65,\) \(\mu = 1500,\)\(\sigma = 300,\) 我们建立 Z 分数公式: \(1.65 = \frac{x_{95} - 1500}{300}.\) 我们求解 \(x_{95}\): \(x_{95} = 1995.\) (b) 类似地,我们求得 \(Z_{97.5} = 1.96,\) 再次为身高建立 Z 分数公式,并计算 \(x_{97.5} = 76.5.\)↩︎

  12. 数值答案:(a) 0.1131。(b) 0.3821。↩︎

  13. 这是一个简略的解答。(一定要画图!)先求低于 1500 分的百分比和高于 2000 分的百分比: \(Z_{1500} = 0.00 \to 0.5000\) (下方面积), \(Z_{2000} = 1.67 \to 0.0475\) (上方面积)。最终答案: \(1.0000-0.5000 - 0.0475 = 0.4525.\)↩︎

  14. 5英尺5英寸即 65 英寸。5英尺7英寸即 67 英寸。数值解: \(1.000 - 0.0649 - 0.8183 = 0.1168,\) 即 11.68%。↩︎

  15. 先画图。要求 \(Z=-1\)\(Z=1,\) 之间的面积,使用 pnorm() 或使用正态概率表确定以下区域:低于 \(Z=-1\) 和高于 \(Z=1.\) 接下来验证 \(Z=-1\)\(Z=1\) 之间的面积约为 0.68。对 \(Z=-2\)\(Z=2\) 以及 \(Z=-3\)\(Z=3.\)↩︎

  16. 900 和 2100 分别代表均值上下两个标准差,这意味着约 95% 的考生得分在 900 到 2100 之间。由于正态模型是对称的,因此 (a) 部分中一半的考生(占所有考生的\(\frac{95\%}{2} = 47.5\%\) )得分在 900 到 1500 之间,而 47.5% 的考生得分在 1500 到 2100 之间。↩︎

  17. 我们留给你来画图。Z 分数为 \(Z_{left} = -1.96\)\(Z_{right} = 1.96.\) 这两个 Z 分数之间的面积为 \(0.9750 - 0.0250 = 0.9500.\) 这就是 95% 置信区间公式中 “1.96” 的由来。↩︎

  18. 不是。正如有些观测值偏离均值超过 1.96 个标准差一样,有些点估计值也会偏离参数超过 1.96 个标准误。置信区间只是为参数提供一个合理的取值范围。虽然我们可能会说基于数据其他取值不合理,但这并不意味着它们是不可能的。↩︎

  19. 本练习的灵感来自 Dr. Allan Rossman 博客上的讨论 Ask Good Questions.↩︎