Tabellab

Samples, Standard Error & the Normal Curve

Lesson 1 of 20Lab

All lessons

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — €9.90
Read first

Taking a random sample in Excel

  • Add a helper column with =RAND(), sort by it and take the first n rows. Every row has the same chance to be picked.
  • =INDEX(data,RANDBETWEEN(1,ROWS(data))) draws one random row (with replacement).
  • Data > Data Analysis > Sampling (Analysis ToolPak) does the same in one step. Copy the result as values, or it changes on every recalculation.
Loading the spreadsheet…

Why one average is never the whole story

Your web shop sampled 36 orders and the average basket was $84.79. Is the true average of all orders also about $84.79, or could it easily be $75 or $95? And how unusual is a $130 order? These questions come up every day in retail, finance, operations and marketing, and they all have the same answer: you need to know how much a number from a sample wobbles. This free lesson is for business students, analysts and managers who work with sample data in Excel and want to stop treating every average as an exact fact.

The tools are few and they are all built into Excel: AVERAGE, STDEV.S, a square root, and NORM.DIST. With them you will calculate the standard error of a mean, turn an order value into a z-score, and convert z-scores into probabilities using the normal curve. These are the foundations for everything else in business statistics: confidence intervals, survey margins of error, A/B tests and regression all rest on the ideas in this lesson.

The core ideas: sample, spread and standard error

A population is everything you care about, for example every online order in March. A sample is the part you actually look at, for example 36 randomly chosen orders. Because the sample is random, its mean x̄ is only an estimate. A different random draw of 36 orders would give a slightly different mean, perhaps $81 or $89.

  • Standard deviation (s) measures how much single values spread around the mean. In the example s = $27.13, so a typical order is about $27 away from the average. In Excel, =STDEV.S(B2:B37) calculates it for a sample.
  • Standard error (SE) measures how much the mean of a sample would spread if you repeated the sampling many times. It is s / √n. With 36 orders, SE = 27.13 / 6 = $4.52. The mean of 36 orders is much more stable than any single order.
  • z-score says how many standard deviations a value lies from the mean: z = (x - mean) / sd. A z of 0 is exactly average, a z of 2 is far above average.
  • Normal distribution is the bell curve. If values are roughly normal, about 68% lie within 1 sd of the mean and about 95% within 1.96 sd. NORM.DIST(x, mean, sd, TRUE) returns the share below x.
  • Central limit theorem (CLT): means of reasonably large samples (a common rule of thumb is 30 or more) are close to normally distributed even when single values are skewed. That is why you can use the normal curve for sample means with SE as the standard deviation.
The difference between standard deviation and standard error is the single most common confusion in business statistics. Standard deviation describes the data. Standard error describes the uncertainty of an estimate calculated from the data.

The square root in the SE formula has a very practical consequence: precision gets expensive. To halve the standard error you need four times as many observations. To cut it to a third you need nine times as many. When someone asks "how many more orders do we need to sample to be sure?", this is the formula that answers the question.

Worked example: 36 orders from Hollowbrook Home

The lab sheet contains 36 random online orders from March for a fictional home goods shop, Hollowbrook Home. Basket values range from $27.46 to $153.01. Before calculating anything, look at the shape of the data. A histogram (Insert > Chart > Histogram in Excel 2016 and later) shows that most orders sit between $60 and $100, with a few large baskets on the right:

Hollowbrook Home: 36 basket values (March sample)02468101214231212322$20$40$60$80$100$120$140$160mean $84.79ordersBasket value in dollars (bins of $20). Most orders sit between $60 and $100,with a longer tail to the right.
Distribution of the 36 sample orders. The centre is near the mean of $84.79, and the right tail is a little longer than the left.

Now the calculations, in the same cells as in the lab. The sheet already contains n, the mean and s. Your task is to add the standard error, a z-score and two probabilities:

CellWhat it measuresFormulaResult
E2Sample size n=COUNT(B2:B37)36
E3Sample mean x̄=AVERAGE(B2:B37)$84.79
E4Sample standard deviation s=STDEV.S(B2:B37)$27.13
E5Standard error of the mean=E4/SQRT(E2)$4.52
E7Order value to checkinput$130.00
E8z-score of $130=(E7-E3)/E41.67
E9P(one order > $130)=1-NORM.DIST(E7,E3,E4,TRUE)4.8%
E11 / E12Next sample size / basket to beatinputs36 / $90.00
E13P(next sample mean > $90)=1-NORM.DIST(E12,E3,E4/SQRT(E11),TRUE)12.5%

Standard error (E5). =E4/SQRT(E2) gives 27.13 / √36 = 27.13 / 6 = $4.52. In plain words: if Hollowbrook drew many samples of 36 orders, their means would typically differ from the true average by about $4.52. Roughly 95% of such sample means would land within 1.96 x 4.52 = $8.86 of the true mean.

z-score (E8). A customer just placed a $130 order. =(E7-E3)/E4 gives (130 - 84.79) / 27.13 = 1.67. The order is 1.67 standard deviations above the average basket. =STANDARDIZE(E7,E3,E4) returns the same number.

Probability for one order (E9). If single order values are roughly normal, the share of orders above $130 is =1-NORM.DIST(E7,E3,E4,TRUE) = 0.048, or about 4.8%. NORM.DIST with TRUE returns the area to the left of $130, so you subtract it from 1 to get the area to the right. With the z-score you can write =1-NORM.S.DIST(E8,TRUE) and get the same answer.

Probability for a sample mean (E13). Next week the shop will take a new sample of 36 orders. What is the chance that its average is above $90? The answer uses the same function, but with the standard error instead of the standard deviation: =1-NORM.DIST(E12,E3,E4/SQRT(E11),TRUE) = 0.125, or about 12.5%. A single order above $90 is common (roughly 42% of orders, using the same normal model), but an average of 36 orders above $90 is much rarer, because the averaging cancels out most of the random ups and downs.

Single orders vs averages of 36 orders$0$20$40$60$80$100$120$140$160mean of 36 orderssd = SE = $4.52P(mean > $90) = 12.5% (shaded)single orders, sd $27.13P(order > $130)= 4.8% (shaded)
Same centre, very different spread. Single orders follow the flat curve (sd $27.13). Means of 36 orders follow the narrow curve (SE $4.52). The shaded tails are the two probabilities from the lab.

Before you trust a normal-curve probability for single values, compare it with the data. In the sample, 3 of 36 orders (8.3%) are above $130, while the normal model says 4.8%. The right tail is a bit heavier than a bell curve. For sample means the CLT makes the normal model much safer.

How to do it in Excel, step by step

  1. Put the sample in one column with a header (here B1:B37). Do not mix text, blanks or totals into the range, because COUNT and AVERAGE silently skip text and blanks.
  2. In E2, E3 and E4 enter =COUNT(B2:B37), =AVERAGE(B2:B37) and =STDEV.S(B2:B37). Use STDEV.S (sample), not STDEV.P (population), because 36 orders are a sample of all orders.
  3. In E5 enter =E4/SQRT(E2) for the standard error. Format it as currency with Home > Number Format > Currency.
  4. In E8 enter =(E7-E3)/E4 for the z-score. Format it as a number with two decimals.
  5. In E9 enter =1-NORM.DIST(E7,E3,E4,TRUE) and press Ctrl+Shift+% for percent format. The last argument TRUE asks for the cumulative share, which is what you almost always want in business questions.
  6. In E13 enter =1-NORM.DIST(E12,E3,E4/SQRT(E11),TRUE). The only change from E9 is the standard deviation argument: for a mean of E11 orders it is s/√n.
  7. To draw a fresh random sample from a large order list, add a helper column with =RAND(), sort by it (Data > Sort), take the first n rows, and paste them as values (Home > Paste > Paste Values) so they do not change on the next recalculation.
  8. To see the shape of the data, select B2:B37 and choose Insert > Insert Statistic Chart > Histogram, then right-click the horizontal axis > Format Axis and set the bin width to 20.

Business Statistics and Regression in Excel course: sample data, normal curve and regression formulas
Business Statistics & Regression in Excel: from standard errors to confidence intervals, tests and regression.

How sample size changes the standard error

Because SE = s/√n, you can plan a sample before you collect it. With the same spread of $27.13, here is the standard error for different sample sizes. The pattern is the reason survey firms and quality teams rarely use enormous samples: beyond a certain size, each extra observation buys very little extra precision.

Standard error s/√n for s = $27.13$0$2$4$6$8$10$9.04n = 9$6.78n = 16$4.52n = 36$3.39n = 64$2.71n = 100$2.26n = 144Four times the sample (36 to 144) halves the standard error ($4.52 to $2.26).
Standard error for six sample sizes with s = $27.13. Going from 36 to 144 orders halves the SE, going from 9 to 36 also halves it.

In Excel you can build this table yourself: put sample sizes in a column, say G2:G7, and enter =$E$4/SQRT(G2) next to the first one, then fill down. The dollar signs (press F4 on Windows or Cmd+T on a Mac while the cursor is on E4) keep the reference to s fixed while the sample size changes row by row.

You can also turn the formula around and ask how many orders you need for a given precision. Suppose the manager wants the estimate of the average basket to be within plus or minus $3 with about 95% confidence. The margin is 1.96 x s/√n, so n = (1.96 x s / 3)². In Excel, =ROUNDUP((1.96*E4/3)^2,0) returns 315 orders. That is almost nine times the current sample, which is exactly what the square-root rule predicts for a margin about three times smaller than today's $8.86. You will meet the 1.96 factor properly in the next lesson on confidence intervals.

Common mistakes and how to spot them

  • Using the standard deviation for a mean. =1-NORM.DIST(90,E3,E4,TRUE) answers "what share of single orders is above $90?", not "how likely is a sample mean above $90?". If your probability for a mean is as large as the one for a single order, you forgot to divide by √n.
  • Forgetting the 1 minus. NORM.DIST(...,TRUE) gives the share below x. If you get 95.2% for "orders above $130", you need =1- in front.
  • Leaving out TRUE. With FALSE as the last argument, NORM.DIST returns the height of the curve, a small number like 0.004 that is not a probability. Always write TRUE explicitly.
  • STDEV.P instead of STDEV.S. STDEV.P divides by n and slightly understates the spread of a sample. For 36 orders the difference is small, but it grows as samples get smaller.
  • Assuming the bell curve for single skewed values. Order values, incomes and delivery times are often right-skewed. Check the histogram or compare the model with the actual share in the data, as in the tip above.
  • Non-random samples. The formulas assume a random sample. The 36 orders from the first morning of the month, or only the orders that left a review, can be biased, and no formula fixes that.

Quick reference: functions and tools used

Function or toolWhat it does
COUNT(range)Number of numeric values: the sample size n
AVERAGE(range)Sample mean
STDEV.S(range)Sample standard deviation (divides by n-1); use for samples
STDEV.P(range)Population standard deviation (divides by n); only when you have every value
SQRT(n)Square root, used in s/√n
STANDARDIZE(x,mean,sd)z-score, same as (x-mean)/sd
NORM.DIST(x,mean,sd,TRUE)Share of a normal distribution below x
NORM.S.DIST(z,TRUE)Same for the standard normal curve (mean 0, sd 1)
NORM.INV(p,mean,sd)The value below which a share p lies (reverse of NORM.DIST)
RAND(), RANDBETWEEN(a,b)Random numbers for drawing a sample
Data > Data Analysis > Histogram / SamplingAnalysis ToolPak tools (enable via File > Options > Add-ins)
F9Recalculate, which draws new RAND() values

Real-world uses

  • E-commerce reporting. Instead of "the average basket in our sample was $84.79", report the SE as well, so readers know that the true average is probably within a few dollars of it.
  • Quality control. A filling line samples 30 packages per shift. The standard error tells the quality manager how far the shift average can drift by chance before it signals a real problem.
  • Fraud and anomaly checks. A z-score above 3 for a transaction amount, a delivery time or an expense claim is a simple, explainable flag for a manual review.
  • Sample planning. An auditor or market researcher needs a precision of, for example, plus or minus $3. Rearranging SE = s/√n gives the required n before the work starts.
  • Target setting. If a region wants to "beat a $90 average next week", the probability from the normal curve shows how much of that would happen by chance alone.

What you will build in the rest of this course

Lesson 1 is free. The remaining 19 lessons are part of the paid course ($9.90, one-time) and build directly on the standard error you calculated today. Each one has its own lab with a realistic business data set and a Coach that checks your formulas.

Confidence Interval for a Mean: z and t. You give an average handling time as a range instead of a single number, with z when the population standard deviation is known and with t when it is not, and you work out how large the next sample must be.

Survey Results: Confidence Interval for a Proportion. You turn a yes/no survey into a statement like "62% plus or minus 3.3 points" and calculate how many people the next survey needs for a tighter margin.

Hypothesis Test for a Mean: z, t and the p-Value. You test whether a filling line still fills 500 g on average, once with a p-value and once with a critical t value, and learn what each result does and does not tell you.

Comparing Two Groups: Difference of Means (Welch t-Test). You test whether a higher free-shipping threshold really raised the average order, or whether the gap between the two groups could just be noise.

Correlation vs Causation: CORREL and the Hidden Driver. You find out why ad spend and sales move together, and why that alone does not prove that the ads work.

Simple Linear Regression: Prediction, Residuals & Standard Error. You model delivery cost from distance, check the fit route by route and give a cost estimate with a realistic range around it.

Multiple Drivers: Forecasting with Coefficients & Elasticity. You use a fitted multiple regression to forecast next month and read price sensitivity as an elasticity, the kind of result pricing teams ask for.

Summary

A sample mean is an estimate, and the standard error s/√n tells you how precise it is. In the Hollowbrook sample of 36 orders, the mean basket is $84.79, the standard deviation $27.13 and the standard error $4.52. A $130 order has a z-score of 1.67, and under a normal model about 4.8% of single orders are that large. The chance that the average of the next 36 orders exceeds $90 is about 12.5%, because means vary far less than single values. Four functions did all the work: AVERAGE, STDEV.S, SQRT and NORM.DIST.

Scroll up to the lab and calculate E5, E8, E9 and E13 yourself. Then change the sample size in E11 from 36 to 144 and watch the probability in E13 fall. That one experiment shows the central idea of this whole course better than any definition.

Frequently asked questions

What is the difference between standard deviation and standard error?

Standard deviation describes how much single values spread around the mean. Standard error describes how much a sample mean would vary from sample to sample, and equals s divided by the square root of n.

How do I calculate the standard error in Excel?

Use =STDEV.S(range)/SQRT(COUNT(range)). For 36 values with a standard deviation of 27.13, the standard error is 27.13/6 = 4.52.

How do I calculate a z-score in Excel?

Use =(x-mean)/sd or the built-in =STANDARDIZE(x,mean,sd). Both return how many standard deviations x lies above or below the mean.

What does NORM.DIST with TRUE return?

With TRUE as the last argument, NORM.DIST returns the cumulative probability, which is the share of a normal distribution below x. Use 1-NORM.DIST(...) for the share above x.

Should I use STDEV.S or STDEV.P?

Use STDEV.S when your data is a sample from a larger population, which is almost always the case in business. STDEV.P is only correct when you have every value of the population.

How many observations do I need for the central limit theorem?

A common rule of thumb is 30 or more, but strongly skewed data may need more. Check a histogram of your data before you rely on the normal curve.

Keep going: Business Statistics & Regression in Excel

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time €9.90.

  1. Confidence Interval for a Mean: z and t
  2. Survey Results: Confidence Interval for a Proportion
  3. Hypothesis Test for a Mean: z, t and the p-Value
  4. Comparing Two Groups: Difference of Means (Welch t-Test)
  5. Correlation vs Causation: CORREL and the Hidden Driver
  6. Simple Linear Regression: Prediction, Residuals & Standard Error
  7. Multiple Drivers: Forecasting with Coefficients & Elasticity
  8. Before and After: The Paired t-Test
  9. Is the Slope Real? t-Test & Confidence Interval for a Regression Slope
  10. Confidence vs Prediction Intervals for a Regression Forecast
  11. Outliers & Influential Points: Fences, Flags and Fragile Slopes
  12. Fitting a Multiple Regression with LINEST: Coefficients, R² & Adjusted R²
  13. Counting Events: Binomial & Poisson Probabilities
  14. Residual Checks Over Time: Patterns & the Durbin-Watson Test
  15. Overlapping Drivers: Multicollinearity & the Variance Inflation Factor
  16. Curved Relationships: Log Models for Diminishing Returns
  17. Is the Correlation Real? t-Test and Fisher-z Interval for r
  18. Comparing Consistency: The F-Test for Two Variances
  19. Final Project: Delivery Statistics Report for a Second Company

Buy course — €9.90 See the full course