1. Home
  2. Explore
  3. Statistics
  4. Normal Distributions and the Empirical Rule

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Normal Distributions and the Empirical Rule

Probability Distributions, the Central Limit Theorem, and Monte Carlo Methods

Normal distributions and the Empirical Rule

A normal distribution, also called a Gaussian distribution, is a symmetric, bell-shaped probability distribution characterized by its mean μ\muμ and standard deviation σ\sigmaσ. The mean determines the center of the distribution, while the standard deviation describes how spread out its values are.

The Empirical Rule describes the approximate share of normally distributed values that fall within particular distances of the mean:

  • About 68%68\%68% fall within 111 standard deviation of the mean.

  • About 95%95\%95% fall within approximately 1.961.961.96 standard deviations.

  • About 99.7%99.7\%99.7% fall within 333 standard deviations.

The value 1.961.961.96 is used for a more precise central 95%95\%95% range. Using 222 standard deviations gives a slightly larger range, containing about 95.45%95.45\%95.45% of values.

When the Empirical Rule is used to describe estimation errors, two assumptions are important:

  • The mean estimation error is zero: estimates do not systematically overshoot or undershoot the true value.

  • The distribution of errors is approximately normal.

Generating and plotting Gaussian values

A programming library can generate random values from a Gaussian distribution. For example, Python’s random.gauss(mu, sigma) function takes a mean μ\muμ and standard deviation σ\sigmaσ, and returns a random draw from that distribution. Repeated calls produce a sample of values; the sample is not a perfectly smooth curve because it contains only a finite number of draws.

A histogram displays how many values fall into each bin. With a finite sample, the histogram of Gaussian draws is typically jagged, even though the underlying distribution is smooth. A larger sample generally makes the histogram’s overall shape more closely resemble the theoretical curve.

A histogram can be weighted so that each observation contributes 1/N1/N1/N, where NNN is the total number of observations. In that case, each bin’s height represents the fraction of observations in the bin rather than the raw count. For example, a bin containing 505050 observations out of 1,0001{,}0001,000 has relative frequency 0.050.050.05. This makes the vertical axis easier to interpret as a share of the sample.

A histogram function may return both the values assigned to the bins and the graphical objects used to draw them. Those returned values can be used to calculate quantities such as the fraction of observations within a specified distance of the mean. For a Gaussian sample with σ=100\sigma=100σ=100, a range of 200200200 units on either side of the mean corresponds to 2σ2\sigma2σ.


Probability density functions

A probability density function (PDF) describes how probability is distributed across the possible values of a continuous random variable. Its horizontal axis contains values the variable can take, while its vertical axis gives the density at each value.

The height of a PDF at a single point is generally not the probability of obtaining that exact point. For a continuous variable, the probability of any one exact value is zero. Instead, probabilities are found from areas:

The probability that a continuous random variable lies between two values is the area under its PDF between those values.

Thus, if XXX is a continuous random variable with density f(x)f(x)f(x), then the probability that it lies between aaa and bbb is

P(a≤X≤b)=∫abf(x) dx.P(a \leq X \leq b)=\int_a^b f(x)\,dx.P(a≤X≤b)=∫ab​f(x)dx.

The total area under a valid PDF across all possible values is 111. A density’s height can nevertheless exceed 111; this does not violate probability rules, because probabilities come from areas, not heights. A distribution that is very concentrated over a narrow range may have a high peak while still having total area 111.

The normal density

The PDF of a normal distribution with mean μ\muμ and standard deviation σ\sigmaσ is

f(x)=1σ2πexp⁡(−(x−μ)22σ2).f(x)=\frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right).f(x)=σ2π​1​exp(−2σ2(x−μ)2​).

This formula gives the density at xxx for fixed values of μ\muμ and σ\sigmaσ. It is a deterministic calculation: it does not generate a random value. Random sampling and PDF evaluation are related but distinct operations.

When μ=0\mu=0μ=0 and σ=1\sigma=1σ=1, the distribution is called the standard normal distribution. Plotting its density over a range such as −4-4−4 to 444 produces the familiar bell-shaped curve. The curve approaches zero in its far tails.

A PDF is also related to the cumulative distribution function (CDF). The CDF gives the probability that a random variable is at or below a value; the PDF is the derivative of the CDF. Conversely, integrating the PDF over a range gives the probability that the variable falls in that range. This relationship connects density curves to probability through calculus.


Numerical integration

Many integrals cannot be evaluated conveniently by a closed-form calculation. Numerical integration approximates an integral using calculations over a finite set of points.

A numerical integration routine such as SciPy’s integrate.quad can be given:

  1. The function to integrate.

  2. The lower limit of integration.

  3. The upper limit of integration.

  4. Optionally, a tuple of fixed arguments for the function other than the integration variable.

For example, the Gaussian density depends on xxx, μ\muμ, and σ\sigmaσ. To integrate over xxx while holding μ\muμ and σ\sigmaσ fixed, the integration routine varies xxx across the specified limits and receives μ\muμ and σ\sigmaσ as fixed additional arguments.

The routine returns an approximate integral and an estimate of the numerical error. Numerical integration generally uses an algorithm to approximate the area; it does not necessarily derive an exact symbolic antiderivative.

Using integration to check the Empirical Rule

The fraction of a normal distribution within a chosen range can be calculated by integrating its PDF over that range. For a normal distribution with mean μ\muμ and standard deviation σ\sigmaσ, the range within kkk standard deviations of the mean is

[μ−kσ, μ+kσ].[\mu-k\sigma,\ \mu+k\sigma].[μ−kσ, μ+kσ].

Integrating the PDF over this interval gives the probability of a value falling in it. Using k=1k=1k=1, k=1.96k=1.96k=1.96, and k=3k=3k=3 checks the proportions described by the Empirical Rule. Because the result is based on the distribution’s shape, these proportions do not depend on the particular values of μ\muμ and σ\sigmaσ.


Why normal distributions matter

Normal distributions occur in many real-world measurements and outcomes. Examples include standardized test scores, changes in oil prices, and measured heights within groups. In such cases, the observed data may resemble a normal distribution, making normal-distribution methods useful for analysis.

However, not every distribution is normal. For example, the outcomes of one spin of a fair roulette wheel are uniformly distributed across the wheel’s pockets: each pocket is equally likely. A histogram of many individual spins would therefore be roughly level across the possible outcomes, rather than bell-shaped.

A crucial distinction is whether the quantity being studied is an individual outcome or an average of many outcomes. The Central Limit Theorem explains why averages can be approximately normal even when the original outcomes are not.


The Central Limit Theorem

A population is the full set of examples or outcomes of interest. A sample is a subset of that population. A sample contains multiple observations, and its mean summarizes those observations.

The Central Limit Theorem (CLT) states that, under suitable conditions, the means of sufficiently large samples are approximately normally distributed. More specifically:

  • The distribution of sample means is approximately normal for sufficiently large sample sizes.

  • The mean of the sample means is close to the population mean.

  • The variance of the sample means is approximately the population variance divided by the sample size.

If the population variance is σ2\sigma^2σ2 and each sample contains nnn observations, the variance of the sample mean is approximately

σ2n.\frac{\sigma^2}{n}.nσ2​.

Consequently, the standard deviation of the sample means—often called the standard error—is approximately

σn.\frac{\sigma}{\sqrt{n}}.n​σ​.

As sample size increases, sample means vary less from sample to sample. The CLT is important because it allows normal-distribution methods, including the Empirical Rule, to be used for reasoning about averages even when the original data are not normally distributed.

A continuous-die illustration

Consider a hypothetical continuous die that returns a uniformly random real number between 000 and 555. A single roll has a uniform distribution, not a normal one. Its expected value is 2.52.52.5, and its standard deviation is approximately 1.441.441.44.

If one observation is drawn per sample, the sample means remain distributed like the original uniform values. But if each sample contains the mean of 505050 independent rolls, the distribution of those means becomes much more concentrated around 2.52.52.5 and begins to resemble a normal curve. The standard deviation of the sample means is much smaller than the standard deviation of individual rolls.

The simulated curve may not be perfectly normal because the number of samples is finite. Even so, the pattern illustrates the CLT: averaging many observations can produce an approximately normal distribution of sample means from a non-normal population.

Roulette and averages of returns

A single roulette bet does not have a normal distribution of returns. For a 111 bet, a spin may result in losing the dollar or receiving a large payout, with few or no outcomes between those possibilities. The distribution of individual returns is therefore highly unlike a bell curve.

The CLT concerns averages across many spins. As the number of spins in each sample increases, the average return across those spins becomes approximately normal in its central region. The distribution is not exactly normal: for example, losses are bounded, while the possible number of unfavorable outcomes can cause a long tail on the other side. Nevertheless, a normal approximation can be useful when most of the sample means lie in the region where the approximation is good.

The CLT therefore helps justify the use of the Empirical Rule and normal-based confidence intervals for averages, even when the individual outcomes being averaged are not normally distributed.


Monte Carlo estimation

A Monte Carlo method uses repeated random sampling to estimate a quantity that may be difficult to calculate directly. Randomness can help estimate values that are not themselves random, including areas, integrals, and constants such as π\piπ.

The general area-estimation method is:

  1. Identify a target region RRR whose area is difficult to calculate.

  2. Choose a larger enclosing region EEE that contains RRR and whose area is easy to determine.

  3. Generate random points uniformly within EEE.

  4. Find the fraction fff of points that fall inside RRR.

  5. Estimate the area of RRR as fff times the area of EEE.

The method works because, for uniformly distributed points, the fraction landing in a region tends toward the fraction of the enclosing area occupied by that region as the number of points grows.

Estimating π\piπ from points in a circle

Inscribing a circle of radius 111 in a square of side length 222 gives:

  • Square area: 444.

  • Circle area: π\piπ.

A point uniformly selected within the square has probability π4\frac{\pi}{4}4π​ of landing inside the circle. If fff is the fraction of sampled points inside the circle, then

f≈π4,π≈4f.f \approx \frac{\pi}{4}, \qquad \pi \approx 4f.f≈4π​,π≈4f.

A simulation can generate random coordinates in the square and use the Pythagorean theorem to determine whether each point is in the circle. A point with coordinates (x,y)(x,y)(x,y) is inside the unit circle when

x2+y2≤1.x^2+y^2\leq 1.x2+y2≤1.

The estimate of π\piπ is then four times the fraction of points inside the circle.

This is one example of a long-standing use of random geometry to estimate π\piπ. Earlier approaches included geometric estimates using polygons, such as Archimedes’ bounds of 22371\frac{223}{71}71223​ and 227\frac{22}{7}722​. Monte Carlo estimation applies the area-ratio idea computationally rather than relying on increasingly detailed geometric constructions.

Repeated trials and confidence

A Monte Carlo estimate can vary from one run to another because each run uses a different random sample. To assess this variation, the simulation can be repeated many times. The resulting estimates can be used to calculate:

  • The mean estimate, which summarizes the repeated results.

  • The standard deviation of the estimates, which describes their variability.

For an approximately normal distribution of estimates, a confidence interval with approximately 95%95\%95% coverage is often formed by taking the estimate plus or minus about 1.961.961.96 standard deviations of the estimator. A simulation can keep increasing its sample size until this interval is narrower than a chosen precision target.

Estimates do not necessarily improve monotonically as more random points are added. One run with more points can be farther from the true value than a previous run. The more dependable trend is that increasing the sample size generally reduces the estimator’s variability, improving confidence in the result.

Statistical reliability versus model correctness

A confidence interval describes uncertainty under the assumptions of the simulation. It can show that repeated runs of a particular procedure tend to produce similar estimates. It cannot, by itself, show that the procedure correctly represents the problem.

For example, if an implementation mistakenly multiplies the fraction of points inside the circle by 222 instead of 444, repeated trials may still produce a narrow, stable confidence interval. The result would be statistically reproducible but systematically wrong. The simulation’s confidence interval does not detect that its formula is incorrect.

A sanity check is therefore essential. The output should be compared with known facts, geometric reasoning, or another independent calculation. Statistical precision measures how consistently a method produces an answer; validation checks whether the method is actually calculating the intended quantity.


Monte Carlo integration

Monte Carlo methods can also estimate integrals. When an integral can be interpreted as an area, random sampling can estimate the area by counting how many sampled points fall in the relevant region.

For a function whose graph stays above the horizontal axis over an interval, a rectangle can enclose the area under the curve. Random points are selected uniformly in the rectangle, and the fraction beneath the curve estimates the fraction of the rectangle occupied by that area. Multiplying the fraction by the rectangle’s area estimates the integral.

This method is useful when a direct mathematical solution is difficult. It illustrates a broader principle: random sampling can approximate a deterministic quantity, provided the sampling procedure matches the geometry and the simulation is checked for correctness.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent