Business Analytics & Data Science

B03 · Introductory

Excel for Business Analytics

10 lessons

B03 · Module 3, lesson 2 · Lesson 8 of 10

Descriptive statistics and regression in Excel

Describe a column of numbers with Excel’s statistics functions and the Analysis ToolPak, see what one large order does to the mean and the standard deviation, build a frequency table, and fit a straight line through catering invoices. Then read every line of the ToolPak’s regression output, and say what it does and doesn’t show.

About 85 minutes

Before you start

You will be able to

  • Calculate the mean, median, mode, standard deviation, variance, quartiles and percentiles of a column with Excel functions, choosing STDEV.S or STDEV.P and the .INC or .EXC quartile deliberately.
  • Read the Analysis ToolPak’s Descriptive Statistics report and explain what its Standard Error, Kurtosis, Skewness and Confidence Level lines measure.
  • Build a frequency table with FREQUENCY or COUNTIFS, and explain which bin Excel puts a value on a bin edge in.
  • Explain how one extreme value moves the mean, the standard deviation and a regression line but not the median.
  • Calculate CORREL, SLOPE, INTERCEPT, RSQ and FORECAST.LINEAR, and add a trendline with its equation and R² to a scatter chart.
  • Interpret the ToolPak’s Regression output for a simple regression (R Square, Standard Error, Significance F, coefficients, p-values and 95% limits) without claiming more than it shows.

Review first

Fictional case A fictional coffee business founded by Ana Lim. It starts as a catering and barista-training service, opens its own cafés and an online shop for beans, and plans a canned cold brew.

The idea

Fictional case

Ana has two questions for the summer. What does a typical spring order look like, now that the 231 orders are clean? And how much does one more guest add to a catering invoice, so that she can quote new clients quickly and check her rule of thumb of “about $9 a head”? Both have answers in Excel, one in a column of statistics and one in a straight line.

Describing a column with functions

Excel has a function for each summary that B01 calculated by hand. With the order totals in J2:J232 of Lantern’s order sheet, the table below gives each formula and its result. Each function ignores text and blank cells in the range, so a header or a gap doesn’t change the answer.

Lantern’s 231 spring order totals (J2:J232) described with Excel functions
StatisticFormulaResult
Count=COUNT(J2:J232)231
Mean=AVERAGE(J2:J232)$39.38
Median=MEDIAN(J2:J232)$19.50
Mode=MODE.SNGL(J2:J232)$14.00
Standard deviation (sample)=STDEV.S(J2:J232)$100.90
First quartile=QUARTILE.INC(J2:J232,1)$15.40
Third quartile=QUARTILE.INC(J2:J232,3)$39.00
90th percentile=PERCENTILE.INC(J2:J232,0.9)$68.00
Minimum and maximum=MIN(J2:J232), =MAX(J2:J232)$12.60, $1,512.00

The figures disagree about what is typical. Half the orders are $19.50 or less, and the middle half run from $15.40 to $39.00, yet the mean is $39.38, as high as the third quartile. The mode, $14.00, is the 15 orders of one full-price House Blend 250g bag: the most common single value, but not a summary of spending. The standard deviation, $100.90, is more than twice the mean.

One order moves the mean

The cause is LC-10144, the genuine office order of 120 bags for $1,512.00, an outlier that B02 kept. Without it the mean of the other 230 orders is $32.97 and their standard deviation is $26.73, while the median stays at $19.50. One order in 231 raises the mean by $6.40 and almost quadruples the standard deviation, because both use every value’s size; the median uses only the order of the values.

This is why B01 paired the median with “typical” and the mean with totals. The mean of $39.38 is still the right number for revenue (mean × orders = $9,096.15), and the office order is real revenue. For “what does a typical customer spend?” the median and the quartiles answer better, and a report should say what the mean includes.

Counting values into bins

A histogram needs a frequency table: how many values fall in each interval, or bin. Put the bins’ upper edges in a column, here 20, 40, 60, 80 and 100 in L2:L6, and type =FREQUENCY(J2:J232,L2:L6) in M2. In Excel for Microsoft 365, Excel 2021 and Excel 2024 the result spills into M2:M7: one count per bin plus one more for values above the last edge. Each bin counts values above the previous edge and up to and including its own.

FREQUENCY’s six counts for the spring orders: 116, 61, 25, 7, 16, 6. Each bin is open at its lower edge and closed at its upper edge, so an order of exactly $20.00 counts in the first bin.

More than half the orders (116 of 231) are $20 or less, and the counts fall away to the right, with a second bump of 16 orders between $80 and $100 (mostly orders of two 1 kg bags): a right-skewed distribution, in B02’s terms. Excel 2016 and later can draw a histogram directly with Insert > Insert Statistic Chart > Histogram. Left to itself it starts the bins at the smallest value, $12.60; to match the table, set Format Axis to a bin width of 20, an underflow bin of 20 and an overflow bin of 100.

A line through the catering invoices

For the second question Ana takes her 75 one-day catering events and plots invoice against guests in a scatter chart. The points rise from lower left to upper right in a narrow band. =CORREL(C2:C76,B2:B76), with guests in B and invoices in C, returns the correlation coefficient r = 0.9349: a strong positive linear relationship.

A regression line summarises the band. Excel’s trendline on the scatter chart shows its equation and R²: y = 6.6692x + 227.88, R² = 0.8739. The functions give the same numbers to full precision: =SLOPE(C2:C76,B2:B76) returns 6.6692, =INTERCEPT(C2:C76,B2:B76) returns 227.88, and =RSQ(C2:C76,B2:B76) returns 0.8739. Read it as: on Ana’s past invoices, each extra guest went with about $6.67 more on the invoice.

The rest of this lesson explains what these numbers mean, how the Analysis ToolPak reports them with their uncertainty, and why the one two-day conference is left out.

In depth

Sample or population: STDEV.S and STDEV.P

Excel has two standard deviations. STDEV.S assumes the data are a sample and divides the sum of squared deviations by n−1n - 1; STDEV.P treats them as the whole population and divides by nn. VAR.S and VAR.P return the corresponding variance, the square of the standard deviation. Microsoft’s rule: if the data represent the entire population, use STDEV.P.

For Lantern’s 231 orders the difference is small: STDEV.S gives $100.90 and STDEV.P $100.68. For the 13 breakfast events it is larger, $326.60 against $313.79, because dividing by 12 instead of 13 matters more. In business analysis the data are nearly always a sample of a process that goes on (this spring’s orders stand for orders in general), so STDEV.S is the usual choice; use STDEV.P when the rows are the whole group and you don’t generalise beyond it, such as the salaries of a shop’s eight staff.

Quartiles and percentiles: .INC and .EXC

QUARTILE.INC and PERCENTILE.INC place the p-th percentile at position 1+(n−1)p1 + (n - 1)p in the sorted values, interpolating between neighbours; B01 and B02 use this method. QUARTILE.EXC and PERCENTILE.EXC use position (n+1)p(n + 1)p. For the 231 orders, Q1 is at position 58.5 by .INC, between $15.30 and $15.50, giving $15.40; by .EXC it is at position 58, exactly $15.30. The 90th percentile is $68.00 by .INC and $76.80 by .EXC.

The .EXC versions exclude the ends: QUARTILE.EXC returns #NUM! for quart 0 or 4, and PERCENTILE.EXC returns #NUM! when k is 0 or 1, or so close to them that it can’t interpolate. QUARTILE.INC with quart 0, 2 and 4 returns the minimum, the median and the maximum. Neither method is wrong; state which one you used, and expect other software to give slightly different quartiles on small data. Excel’s box and whisker chart offers a similar choice, “inclusive median” or “exclusive median”, which Microsoft defines by whether the median is included in the calculation when the number of values is odd.

MODE.SNGL returns the most frequent value and #N/A if no value repeats. That makes it useful for counts and prices, which repeat, and close to useless for measurements such as weights or times, where almost every value is different.

The Analysis ToolPak

The Analysis ToolPak is an Excel add-in that runs a set of statistical tools from one dialog. On Windows, load it once with File > Options > Add-ins, choose Excel Add-ins in the Manage box, select Go, tick Analysis ToolPak and select OK (Microsoft’s page gives separate steps for a Mac). The tools then appear under Data > Data Analysis. Each tool works on one worksheet at a time. The Descriptive Statistics and Regression reports are values, not formulas: when the data change, run the tool again. Excel for the web can’t run the Regression tool.

Descriptive Statistics asks for the input range, whether the data are grouped in columns or rows, whether the first row holds labels, where to put the output, and which parts to include: Summary statistics, Confidence Level for Mean, and the kth largest and smallest values. Microsoft’s page says only that the tool “generates a report of univariate statistics”; the lines below are those the tool prints (as Cameron’s and BetterSolutions’ guides to it list them), with the values for the 231 order totals and the worksheet formula that reproduces each one:

Descriptive Statistics for order_total (Analysis ToolPak), with the worksheet function that reproduces each line
LineValueSame asWhat it measures
Mean39.37727AVERAGECentre, using every value
Standard Error6.63879STDEV.S ÷ √COUNTHow precisely the mean is estimated
Median19.5MEDIANCentre, by position
Mode14MODE.SNGLMost frequent value
Standard Deviation100.9009STDEV.STypical distance from the mean
Sample Variance10180.98VAR.SStandard deviation squared
Kurtosis199.482KURTHeaviness of the tails (excess kurtosis)
Skewness13.6632SKEWAsymmetry: positive means a long right tail
Range1499.4MAX − MINSpread between the extremes
Minimum12.6MIN
Maximum1512MAX
Sum9096.15SUM
Count231COUNT
Confidence Level(95.0%)13.0806CONFIDENCE.THalf-width of a 95% interval for the mean

Three lines need explaining. Standard Error is the standard error of the mean, s÷ns \div \sqrt{n}: how much the mean would vary from one sample of 231 orders to the next. Kurtosis is Excel’s KURT, which is excess kurtosis: about 0 for normally distributed data, positive when the tails are heavier. Its value of 199.5 says one order sits extraordinarily far out. Confidence Level(95.0%) is not a probability but a margin, the same as =CONFIDENCE.T(0.05,STDEV.S(J2:J232),COUNT(J2:J232)): the mean plus or minus 13.08 gives a 95% confidence interval for the mean, which B04 explains.

Skewness is Excel’s SKEW, the adjusted Fisher–Pearson coefficient that B02’s widgets use. It cubes each value’s standardised distance from the mean (kurtosis uses fourth powers), so it is even more sensitive to one extreme value than the standard deviation: 13.66 with the office order, 2.29 without it.

Frequency tables: FREQUENCY and COUNTIFS

FREQUENCY(data_array, bins_array) returns one more count than there are bins; the last counts values above the highest bin. It ignores blank cells and text. In Excel for Microsoft 365, Excel 2021 and Excel 2024 you type it in the top cell and it spills; in Excel 2019 and earlier you select the whole output range first, type the formula and press Ctrl+Shift+Enter (on Windows).

The same counts come from one COUNTIFS per bin, with the lower and upper edges in two columns: =COUNTIFS($J$2:$J$232,">"&K2,$J$2:$J$232,"<="&L2), filled down. The criteria ">" and "<=" reproduce FREQUENCY’s rule (above the lower edge, up to the upper edge); writing ">=" and "<" instead would move every value that sits on an edge into the next bin. The Histogram chart and the ToolPak’s Histogram tool use the same rule, with an underflow bin that includes its edge.

Correlation

CORREL(array1, array2) returns Pearson’s correlation coefficient, between −1 and +1: near +1 when the points lie close to a rising straight line, near −1 for a falling one, near 0 when there is no straight-line pattern. It skips text and blanks, returns #N/A if the two ranges hold different numbers of points, and gives the same answer whichever range comes first. PEARSON is the same calculation.

B01’s warning applies in full: two variables can be correlated without one causing the other, and a confounding variable can drive both. Here a causal story is plausible, because Ana’s quote sheet charges per guest. Hours and pastries change invoices too; in these events they are almost unrelated to the number of guests, so they show up as scatter around the line rather than in its slope. Measuring their effects takes a multiple regression, which the project reads.

The least-squares line

Excel’s linear trendline, SLOPE, INTERCEPT and the ToolPak all fit the least-squares line y^=b0+b1x\hat{y} = b_0 + b_1 x: the line that makes the sum of the squared residuals (actual minus predicted y) as small as possible. Its slope is b1=∑(x−xˉ)(y−yˉ)÷∑(x−xˉ)2b_1 = \sum (x - \bar{x})(y - \bar{y}) \div \sum (x - \bar{x})^2 and its intercept b0=yˉ−b1xˉb_0 = \bar{y} - b_1 \bar{x}, so the line passes through the point of means: 82.03 guests and $774.93.

Watch the argument order. SLOPE, INTERCEPT, RSQ and LINEST take known_y’s first and known_x’s second; FORECAST.LINEAR takes the new x first: =FORECAST.LINEAR(x,known_y's,known_x's). FORECAST.LINEAR replaced FORECAST in Excel 2016; FORECAST still works for compatibility. Swapping y and x gives the regression of guests on invoice, a different line.

LINEST returns the whole fit as an array. =LINEST(C2:C76,B2:B76,TRUE,TRUE) gives five rows and two columns: the slope and intercept; their standard errors; R² and the standard error of the estimate; the F statistic and the residual degrees of freedom; and the regression and residual sums of squares. In Excel for Microsoft 365, Excel 2021 and Excel 2024 it spills from one cell; in Excel 2019 and earlier it must be entered as an array formula with Ctrl+Shift+Enter. A trendline label shows only five digits of each coefficient, so calculate predictions from SLOPE and INTERCEPT, not from numbers copied off the chart.

To add the trendline, select the scatter chart, open Chart Elements and tick Trendline, then in the Format Trendline pane choose Linear and tick Display Equation on chart and Display R-squared value on chart.

Reading the ToolPak’s Regression output

Data > Data Analysis > Regression asks for the Input Y Range (the invoices, C1:C76) and the Input X Range (the guests, B1:B76), with Labels ticked because row 1 holds headings. Its Summary Output has three blocks. The Explore section reproduces it; here it is for the 75 one-day events.

SUMMARY OUTPUT: invoice on guests, 75 one-day events. Regression Statistics
ValueWhat it says
Multiple R0.934851The correlation between actual and predicted invoices; with one X it equals |r|
R Square0.873946The share of the variation in invoices around their mean that the line accounts for
Adjusted R Square0.872219R² adjusted for the number of X variables; for comparing models with different numbers of Xs
Standard Error84.6861The typical size of a residual, in dollars: the standard error of the regression
Observations75Events used
ANOVA
dfSSMSFSignificance F
Regression13629738.023629738.02506.1171.47E-34
Residual73523536.647171.73
Total744153274.67
Coefficients
CoefficientsStandard Errort StatP-valueLower 95%Upper 95%
Intercept227.87726.20938.694516.97E-13175.642280.112
guests6.669250.2964522.4971.47E-346.078427.26007
  • R Square = regression SS ÷ total SS =3,629,738÷4,153,275≈0.874= 3{,}629{,}738 \div 4{,}153{,}275 \approx 0.874. The total SS measures how far invoices vary around their mean; 87.4% of that variation lines up with the number of guests, and 12.6% is left in the residuals. With one X it equals r2r^2.
  • Standard Error =residual SS÷(n−2)=7,171.73≈84.69= \sqrt{\text{residual SS} \div (n - 2)} = \sqrt{7{,}171.73} \approx 84.69 dollars. A typical invoice was about $85 away from the line: a more useful measure of a prediction’s accuracy than R².
  • ANOVA: each MS is SS ÷ df, and F=3,629,738÷7,171.73≈506.1F = 3{,}629{,}738 \div 7{,}171.73 \approx 506.1. Significance F is the p-value of the test that every slope is 0; with one X it equals the slope’s P-value. 1.47E-34 is Excel’s notation for 1.47×10−341.47 \times 10^{-34}: a slope this far from 0 would essentially never arise by chance if guests had no linear relation to invoices.
  • Coefficients: the intercept 227.88 and the slope 6.6692. t Stat = coefficient ÷ its standard error (6.6692÷0.2964≈22.56.6692 \div 0.2964 \approx 22.5). Lower 95% and Upper 95% are the coefficient ± t0.025, 73×t_{0.025,\,73} \times standard error, with t0.025, 73≈1.993t_{0.025,\,73} \approx 1.993: the slope’s 95% confidence interval runs from $6.08 to $7.26 per guest.

What the line says, and what it doesn’t

  • The slope: across these events, one more guest went with $6.67 more on the invoice, on average (95% interval $6.08 to $7.26). That is close to the $6.50 a guest on Ana’s quote sheet, though the line knows nothing about her price list: it only summarises what her invoices did.
  • The intercept, $227.88, is the predicted invoice for 0 guests. No event had fewer than 35 guests, so this is an extrapolation: it anchors the line and is not Ana’s setup charge.
  • Predictions are safest inside the data’s range, 35 to 207 guests: for 100 guests, =FORECAST.LINEAR(100,C2:C76,B2:B76) gives $894.80, and actual invoices at that size have scattered by roughly the standard error, $85, either side.
  • R² is not predictive accuracy. 0.874 doesn’t mean predictions are 87.4% accurate or right 87.4% of the time; it says how much of the past variation the line accounts for. The standard error tells you the size of a typical miss, and only new events show how well the line predicts.
  • Correlation is not causation, and the regression describes how Ana has priced in the past, not what clients would pay. Checking the line’s assumptions with residual plots, and handling several X variables, belong to B06 Regression Analysis; the p-values and intervals rest on assumptions B04 explains.

Why the two-day conference is set aside

EV-001, Meridian Partners’ conference on 12 March, ran for two days with 263 guests and was invoiced $4,200. Ana quotes a two-day event day by day, so its invoice isn’t on the same footing as the others, and its 263 guests lie beyond the largest one-day event (207). Fitted to all 76 events, the line changes a great deal: slope $10.15 a guest, intercept −$36.43, R² 0.746 and standard error $232.54, against $6.67, $227.88, 0.874 and $84.69 without it.

The 75 one-day events (dots) and their least-squares line, solid across the range of the data and dashed beyond it. The two-day conference (square) lies far above and to the right; included, it would pull the line up at the right and down at the left.

One point did that because it is extreme in both directions: far beyond the other events in guests, and far above the line in dollars. Points far from the mean of x have high leverage and can tilt a least-squares line on their own, a diagnostic B06 develops. Setting the conference aside is not hiding data: the analysis says it covers one-day events, and the conference is reported separately. Excluding a point only because it spoils the fit would be.

Formulas

Sample and population standard deviation (STDEV.S, STDEV.P)

s=∑i=1n(xi−xˉ)2n−1,σ=∑i=1n(xi−xˉ)2ns = \sqrt{\dfrac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n - 1}}, \qquad \sigma = \sqrt{\dfrac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n}}
xix_i
The i-th valueunits of x
xˉ\bar{x}
The mean of the valuesunits of x
nn
Number of values
ss
Sample standard deviation (STDEV.S)units of x
σ\sigma
Population standard deviation (STDEV.P)units of x

The variance (VAR.S, VAR.P) is the same expression without the square root.

Standard error of the mean

SE=sn\text{SE} = \dfrac{s}{\sqrt{n}}
ss
Sample standard deviationunits of x
nn
Number of values
SE\text{SE}
Standard error of the meanunits of x

The ToolPak’s Standard Error line. Its Confidence Level line is t × SE, with t from the t distribution with n − 1 degrees of freedom.

Excess kurtosis (Excel’s KURT)

KURT=n(n+1)(n−1)(n−2)(n−3)∑i=1n(xi−xˉs)4−3(n−1)2(n−2)(n−3)\text{KURT} = \dfrac{n(n+1)}{(n-1)(n-2)(n-3)} \sum_{i=1}^{n} \left(\dfrac{x_i - \bar{x}}{s}\right)^{4} - \dfrac{3(n-1)^2}{(n-2)(n-3)}
xix_i
The i-th valueunits of x
xˉ\bar{x}
Meanunits of x
ss
Sample standard deviationunits of x
nn
Number of values (at least 4)

Assumes. Reproduces Microsoft’s example: KURT of 3, 4, 5, 2, 3, 4, 5, 6, 4, 7 is −0.151800.

The subtracted term makes the result close to 0 for normally distributed data, so KURT reports excess kurtosis; the NIST handbook’s kurtosis, without it, is 3 for a normal distribution.

Correlation coefficient (CORREL)

r=∑(x−xˉ)(y−yˉ)∑(x−xˉ)2 ∑(y−yˉ)2r = \dfrac{\sum (x - \bar{x})(y - \bar{y})}{\sqrt{\sum (x - \bar{x})^2 \, \sum (y - \bar{y})^2}}
x,yx, y
Paired values of the two variablestheir units
xˉ,yˉ\bar{x}, \bar{y}
Their meanstheir units
rr
Pearson’s correlation coefficient, from −1 to +1

RSQ returns r². CORREL and PEARSON give the same result.

Least-squares line (SLOPE, INTERCEPT, FORECAST.LINEAR)

y^=b0+b1x,b1=∑(x−xˉ)(y−yˉ)∑(x−xˉ)2,b0=yˉ−b1xˉ\hat{y} = b_0 + b_1 x, \qquad b_1 = \dfrac{\sum (x - \bar{x})(y - \bar{y})}{\sum (x - \bar{x})^2}, \qquad b_0 = \bar{y} - b_1 \bar{x}
xx
The explanatory variable (guests)units of x
y^\hat{y}
The predicted value of y (invoice)units of y
b1b_1
Slope: change in predicted y per unit of xunits of y per unit of x
b0b_0
Intercept: predicted y when x = 0units of y
xˉ,yˉ\bar{x}, \bar{y}
Means of x and ytheir units

Assumes. A straight line describes the relationship over the range of the data.

In Excel: SLOPE(known_y’s, known_x’s), INTERCEPT(known_y’s, known_x’s), FORECAST.LINEAR(x, known_y’s, known_x’s).

R² and the standard error of the regression

R2=SSregSStot=1−SSresSStot,se=SSresn−k−1R^2 = \dfrac{\text{SS}_{\text{reg}}}{\text{SS}_{\text{tot}}} = 1 - \dfrac{\text{SS}_{\text{res}}}{\text{SS}_{\text{tot}}}, \qquad s_e = \sqrt{\dfrac{\text{SS}_{\text{res}}}{n - k - 1}}
R2R^2
Share of the variation in y around its mean that the regression accounts for
SStot\text{SS}_{\text{tot}}
Total sum of squares: Σ(y − ȳ)²units of y squared
SSres\text{SS}_{\text{res}}
Residual sum of squares: Σ(y − ŷ)²units of y squared
SSreg\text{SS}_{\text{reg}}
Regression sum of squares: SS_tot − SS_resunits of y squared
nn
Observations
kk
Number of X variables (1 here)
ses_e
Standard error of the regression (the ToolPak’s Standard Error)units of y

Adjusted R² = 1 − (1 − R²)(n − 1) ÷ (n − k − 1).

t Stat and the 95% limits of a coefficient

t=bSEb,b±t0.025, n−k−1×SEbt = \dfrac{b}{\text{SE}_b}, \qquad b \pm t_{0.025,\,n-k-1} \times \text{SE}_b
bb
A coefficient (slope or intercept)its units
SEb\text{SE}_b
Its standard errorits units
t0.025, n−k−1t_{0.025,\,n-k-1}
The t value with 2.5% in each tail and n − k − 1 degrees of freedom

The ToolPak’s t Stat, Lower 95% and Upper 95% columns. B04 explains the reasoning behind them.

Worked examples

A first example: Describing 13 breakfast events

Fictional figures

Lantern’s 13 breakfast events in 2026 were invoiced (in date order) $600, $1,120, $700, $1,140, $1,060, $1,050, $540, $1,430, $1,520, $480, $810, $870 and $740, in C2:C14. Calculate the mean, median, sample and population standard deviations, and the quartiles by both methods, with formulas.

The invoices sorted, with their positions
Position12345678910111213
Invoice ($)4805406007007408108701,0501,0601,1201,1401,4301,520
  1. Mean: =AVERAGE(C2:C14) = 12,060÷13≈927.6912{,}060 \div 13 \approx 927.69 dollars. Median: =MEDIAN(C2:C14) = the 7th of 13 sorted values, $870.
  2. Standard deviations: =STDEV.S(C2:C14) = $326.60 (divide by 12) and =STDEV.P(C2:C14) = $313.79 (divide by 13). These events stand for Ana’s breakfast catering in general, so STDEV.S is the one to report.
  3. Quartiles by .INC: positions 1+12×0.25=41 + 12 \times 0.25 = 4 and 1+12×0.75=101 + 12 \times 0.75 = 10, so =QUARTILE.INC(C2:C14,1) = $700 and =QUARTILE.INC(C2:C14,3) = $1,120; IQR $420.
  4. Quartiles by .EXC: positions 14×0.25=3.514 \times 0.25 = 3.5 and 14×0.75=10.514 \times 0.75 = 10.5: halfway between $600 and $700, $650, and halfway between $1,120 and $1,140, $1,130; IQR $480.

Answer. Mean $927.69, median $870.00, STDEV.S $326.60, STDEV.P $313.79; quartiles $700 and $1,120 by .INC, $650 and $1,130 by .EXC.

What it means. The mean is above the median because two large breakfasts ($1,430 and $1,520) pull it up. On 13 values the choice of method moves the quartiles by $50 and the IQR by $60, so say which one you used; on Lantern’s 231 orders the two methods differ by at most ten cents at the quartiles.

A harder example: What the office order does to the ToolPak report

Fictional figures

Ana runs Descriptive Statistics on the 231 order totals and again on the 230 without LC-10144. Using the first report’s Sum and Count, check the second report’s mean, then compare the two reports’ centre, spread and shape. What should her spring review say?

  1. Mean without the office order, from the first report: (9,096.15−1,512.00)÷(231−1)=7,584.15÷230≈32.97(9{,}096.15 - 1{,}512.00) \div (231 - 1) = 7{,}584.15 \div 230 \approx 32.97 dollars, as the second report shows. The mean falls by 39.38−32.97=6.4039.38 - 32.97 = 6.40 dollars (from the unrounded means).
  2. Median: $19.50 in both reports. Removing the largest value moves the middle position by half a place, and the values around it are the same.
  3. Spread: the standard deviation falls from $100.90 to $26.73, so the Standard Error falls from 100.90÷231≈6.64100.90 \div \sqrt{231} \approx 6.64 to 26.73÷230≈1.7626.73 \div \sqrt{230} \approx 1.76, and the Confidence Level from $13.08 to $3.47.
  4. Shape: skewness falls from 13.66 to 2.29 and kurtosis from 199.48 to 6.73. The ordinary orders are still right-skewed, with a long tail of gift boxes and 1 kg bags, but nothing like the single order of $1,512.

Answer. Without LC-10144: mean $32.97 (down $6.40), median $19.50 (unchanged), standard deviation $26.73 (down from $100.90), standard error $1.76, skewness 2.29, kurtosis 6.73.

What it means. The office order is real revenue, so the spring total and the mean of $39.38 stay as they are. The review should describe a typical order with the median ($19.50) and the quartiles ($15.40 to $39.00), report the mean both with and without the office order, and say why. Kurtosis and skewness are the lines most changed, a sign that one value dominates them.

Applied: a business decision: Is “about $9 a head” the right rule?

Fictional figures

Ana has been estimating catering invoices at about $9 a head. Using the line fitted to her 75 one-day events (invoice = 227.88 + 6.6692 × guests, standard error $84.69), compare the two rules for events of 40, 80, 150 and 200 guests, and say which kind of event the per-head rule misprices.

Two ways to estimate an invoice for a one-day event
Guests$9 a headRegression lineLine minus $9 a head
40$360.00$494.65$134.65
80$720.00$761.42$41.42
150$1,350.00$1,228.26−$121.74
200$1,800.00$1,561.73−$238.27
  1. Check the range: 40 to 200 guests lies inside the data (35 to 207 guests), so the line is interpolating, not extrapolating.
  2. Predict with the line, for example for 40 guests: 227.88+6.6692×40≈494.65227.88 + 6.6692 \times 40 \approx 494.65, or =FORECAST.LINEAR(40,C2:C76,B2:B76). The per-head rule gives 9×40=3609 \times 40 = 360.
  3. Find where the rules agree: 9g=227.88+6.6692g9g = 227.88 + 6.6692g, so g=227.88÷(9−6.6692)≈97.8g = 227.88 \div (9 - 6.6692) \approx 97.8: about 98 guests.
  4. Compare the gaps with the standard error. At 40 guests the per-head estimate is $134.65 below the line, and at 200 guests $238.27 above it, both well beyond a typical miss of about $85. Near 80 guests the two rules are within $41.42 of each other.

Answer. The per-head rule matches the line near 98 guests. Below that it underestimates (by about $135 at 40 guests); above it, it overestimates (by about $238 at 200 guests).

What it means. Ana’s invoices behave like a fixed amount plus a price per guest, which is how her quote sheet is built, so a flat rate per head undercharges small events and overprices large ones. The line is a check on her quotes, not a price list: it describes past invoices, it ignores hours and pastries, and its typical miss is about $85.

Explore

All 231 order totals as a histogram with the FREQUENCY table’s bins: $20 wide, each including its upper edge, and a last bin for orders above $100. Compare the mean with the median, find the office order in the last bin, and switch to a log scale to see the shape of the ordinary orders.

Loading the interactive…

The order totals with live statistics beside them and a FREQUENCY table. Change B145, LC-10144’s $1,512.00, to 151.2 and watch which statistics move and which don’t, the skewness and kurtosis included. Turn on Show formulas to see how each is calculated.

Loading the interactive…

The ToolPak’s Summary Output for invoice on guests, 75 one-day events, with the scatter chart and the fitted line. Match each number to the explanation in the In depth section.

Loading the interactive…

The same regression with the two-day conference included (76 events). Compare the slope, the intercept, R Square and the Standard Error with the one-day version.

Loading the interactive…

Common mistakes

  • “The mean is what a typical customer spends.”

    Not when one value dominates. Lantern’s mean order is $39.38, but half the orders are $19.50 or less, and one $1,512 order adds $6.40 to the mean. Use the median and quartiles for “typical” and the mean for totals.

  • “STDEV and STDEV.P are interchangeable.”

    STDEV.S (and the older STDEV) divide by n − 1 for a sample; STDEV.P divides by n for a whole population. On 13 breakfasts they differ by about $13. Use STDEV.S unless the rows are the entire group and you don’t generalise.

  • “Kurtosis near 0 means the data are flat.”

    Excel’s KURT is excess kurtosis: about 0 for normally distributed data, positive for heavy tails. The NIST handbook’s kurtosis is 3 for a normal distribution. Check which convention a report uses.

  • “=SLOPE(B2:B76,C2:C76) gives the slope of invoice on guests.”

    SLOPE, INTERCEPT and RSQ take known_y’s first. With guests in B and invoices in C, the slope of invoice on guests is =SLOPE(C2:C76,B2:B76); the swapped version fits guests on invoice.

  • “R² = 0.874, so the predictions are 87.4% accurate.”

    R² is the share of past variation in y that the line accounts for. The size of a typical miss is the Standard Error, about $85 here, and only new data show how well the line predicts.

  • “The intercept is Ana’s setup fee.”

    It is the predicted invoice at 0 guests, an extrapolation far below the smallest event (35 guests), and it absorbs everything the line leaves out. Interpret coefficients only within the data’s range.

Guided practice

Work through these with hints when you need them. Every hint and every worked solution is there to be used.

Loading four questions…

On your own

No hints this time. Answer, check, and read the feedback; the solution appears once you have answered or if you ask for it. Your first answers count toward mastery.

Loading six questions…

In practice

Describe a column before you model it. Many business measures, such as basket values, lengths of stay and call-handling times, tend to be right-skewed like Lantern’s orders, with many small values and a few very large ones, so good reports pair the median with the mean and say how extreme values were treated. The same habit applies to a regression: a scatter chart first, then the line, then the output, and a note of the range it covers.

Fictional case

Ana adds three lines to her spring review. “The typical spring order was $19.50 (median); the middle half ran from $15.40 to $39.00. The mean was $39.38, or $32.97 without one office order of $1,512.” And for catering: “On 75 one-day events, each extra guest added about $6.67 to the invoice (95% interval $6.08 to $7.26); a typical invoice was within about $85 of the line. The two-day conference is reported separately.” The project goes further with a multiple regression that separates guests, hours and pastries.

A regression in Excel takes a minute to run, and its output looks authoritative. What makes it trustworthy is the work around it: a clear statement of which rows were used and why, predictions kept inside the range of the data, the standard error quoted beside every prediction, and no causal language that the data can’t support. B06 adds the diagnostics; the reading skills here are the foundation.

Knowledge check

Six questions, one attempt each, no hints. Score 80% or more to complete the lesson; you can take it again at any time.

Loading six questions…

Summary

  • AVERAGE, MEDIAN, MODE.SNGL, MIN, MAX, STDEV.S and QUARTILE.INC describe a column; they ignore text and blanks in a range.
  • STDEV.S divides by n − 1 (a sample); STDEV.P by n (the whole population). In business analysis STDEV.S is the usual choice.
  • .INC quartiles and percentiles use position 1 + (n − 1)p; .EXC use (n + 1)p and can’t return the minimum or maximum. State the method.
  • One extreme value moves the mean, the standard deviation, skewness, kurtosis and a regression line; the median and quartiles barely move.
  • The ToolPak’s Descriptive Statistics: Standard Error = s ÷ √n, Kurtosis = excess kurtosis (KURT), Confidence Level = t × standard error. Its output is static.
  • FREQUENCY counts values above the previous bin edge and up to the current one, plus a final count above the last edge; COUNTIFS with the criteria ">"&K2 and "<="&L2 reproduces it.
  • CORREL measures linear association; SLOPE, INTERCEPT, RSQ (y first) and FORECAST.LINEAR (x first) give the least-squares line. Keep predictions inside the data’s range.
  • In the Regression output, R Square is the share of variation explained, Standard Error the typical miss, Significance F and P-values test for a zero slope, and the 95% limits bound each coefficient. R² is not predictive accuracy, and correlation is not causation.

Key formulas

Terms introduced

Variance
The average squared distance of values from their mean, dividing by n − 1 for a sample (VAR.S) or by n for a whole population (VAR.P); the square of the standard deviation.
Standard error of the mean
The sample standard deviation divided by the square root of the number of values, s ÷ √n: how much the mean would vary from one sample of that size to another.
Kurtosis
A measure of how heavy a distribution’s tails are. Excel’s KURT reports excess kurtosis, which is about 0 for normally distributed data and positive for heavier tails.
Percentile
The value with a given percentage of the sorted data at or below it, interpolating between values when needed; the 25th, 50th and 75th percentiles are the quartiles.
Bin
One of the intervals a numeric range is divided into for counting. Excel counts a value in a bin when it is above the bin’s lower edge and no more than its upper edge.
Analysis ToolPak
An Excel add-in, loaded from File > Options > Add-ins, that adds statistical tools (Descriptive Statistics, Histogram, Correlation, Regression and others) under Data > Data Analysis. Most tools, including Descriptive Statistics and Regression, write values rather than formulas, so their reports don’t update when the data change.
Correlation coefficient
Pearson’s r: a number from −1 to +1 that measures how closely two numeric variables follow a straight line, positive when they rise together. Excel’s CORREL.
Regression line
A straight line, ŷ = b₀ + b₁x, fitted to paired data to describe how the average of y changes with x.
Least-squares line
The regression line that makes the sum of the squared residuals as small as possible; it passes through the point of means.
Residual
The actual value of y minus the value the regression line predicts for it.
R squared
The share of the variation of y around its mean that a regression accounts for, from 0 to 1; with one X it is the square of the correlation coefficient. Also called the coefficient of determination.
Standard error of the regression
The typical size of a residual, √(residual sum of squares ÷ (n − k − 1)), in the units of y. The Standard Error line in Excel’s regression output.
Extrapolation
Using a fitted relationship to predict outside the range of the data it was fitted to, where there is no evidence that the relationship still holds.
P-value
The probability of a result at least as extreme as the one observed if the null hypothesis (for a regression coefficient, that it is 0) were true. A small p-value is evidence against the null hypothesis, not the probability that it is true.
95% confidence interval
A range calculated from sample data by a method that captures the true value in 95% of samples; in Excel’s regression output, the Lower 95% and Upper 95% of each coefficient.

Sources

  1. Microsoft Support. “QUARTILE.EXC function”, with the pages for STDEV.S, PERCENTILE.EXC, QUARTILE.INC, MODE.SNGL, KURT and SKEW. support.microsoft.com/en-us/excel/functions/quartile-exc-fun…
  2. Microsoft Support. “Load the Analysis ToolPak in Excel” and “Use the Analysis ToolPak to perform complex data analysis”. support.microsoft.com/en-us/excel/use-the-analysis-toolpak-t…
  3. Cameron, A. C. (2009). “Excel 2007: Descriptive Statistics”. University of California, Davis, Department of Economics. cameron.econ.ucdavis.edu/excel/ex21descriptivestatistics.htm…
  4. Microsoft Support. “Perform a regression analysis”, with “LINEST function” and “FORECAST and FORECAST.LINEAR functions”. support.microsoft.com/en-us/excel/perform-a-regression-analy…
  5. BetterSolutions.com. “Analysis ToolPak: Descriptive Statistics”. bettersolutions.com/excel/add-ins/analysis-toolpak-descripti…
  6. NIST/SEMATECH. e-Handbook of Statistical Methods, section 1.3.5.11, “Measures of Skewness and Kurtosis”. itl.nist.gov/div898/handbook/eda/section3/eda35b.htm
  7. Holmes, A., Illowsky, B. & Dean, S. (2017). Introductory Business Statistics, section 13.4, “The Regression Equation”. OpenStax. openstax.org/books/introductory-business-statistics/pages/13…