Tabellab

Effect Sizes: Mean Difference, Cohen's d and the Log Odds Ratio

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 — CHF 9.90
Loading the spreadsheet…

When eight studies disagree

One study says a programme works, another says it does not, a third finds a small effect that might be noise. Anyone who reads research for a living, or has to decide whether to fund a programme, has faced this pile of conflicting results. A meta-analysis is the standard way to combine them: it turns every study into the same kind of number, weights each by how precise it is, and produces one overall estimate with an honest margin of uncertainty.

This course is for students writing a systematic review or thesis, researchers in education, psychology, health and the social sciences, evidence analysts in government and NGOs, and data-minded professionals who want to understand what a forest plot really shows. You will build a complete meta-analysis in Excel: effect sizes, fixed-effect and random-effects pooling, heterogeneity, a forest plot, a funnel plot with Egger's test and a leave-one-out sensitivity analysis. Every formula is visible in a cell, which is the best way to understand what dedicated software does behind the scenes.

This free first lesson does the step everything else depends on: turning the reported results of each study into a comparable effect size with its variance. The lab uses eight synthetic studies of a fictional peer-tutoring programme for maths. They were made up for learning, so do not cite them as research results.

The core concept: effect sizes and their variances

Studies report their results in different ways. One gives means and standard deviations on a test out of 100, another on a test out of 50, a third reports how many pupils passed. To combine them you need a common currency. An effect size is that currency, and three kinds cover most situations:

  • Mean difference (MD) = mean of the treatment group − mean of the control group. It is easy to interpret, but only comparable when every study uses the same scale. Its variance is SD_T² ÷ n_T + SD_C² ÷ n_C.
  • Standardised mean difference, Cohen's d = MD ÷ pooled SD. Dividing by the spread of scores removes the scale: d = 0.5 means the tutored group scored half a standard deviation higher, whatever the test. The pooled SD is √(((n_T − 1)SD_T² + (n_C − 1)SD_C²) ÷ (n_T + n_C − 2)).
  • Log odds ratio (log OR) for yes/no outcomes such as passing an exam. The odds ratio compares the odds of passing in the two groups, and the logarithm makes the scale symmetric around 0.

Every effect size comes with a variance, a measure of how precisely the study estimated it. For d the usual large-sample formula is Var(d) = (n_T + n_C) ÷ (n_T × n_C) + d² ÷ (2(n_T + n_C)). For the log odds ratio it is 1/a + 1/b + 1/c + 1/d, the sum of the reciprocals of the four cell counts (passed and failed in each group). Big studies have small variances, small studies large ones. In the next lesson the variance becomes the weight: each study counts with 1 ÷ variance, so precise studies dominate the pooled result.

A short note on names. Some texts call the standardised mean difference Hedges' g when it includes a small-sample correction: g = d × J, with J ≈ 1 − 3 ÷ (4(n_T + n_C) − 9). For a study with 42 pupils J is about 0.98, so the difference is small. The lab keeps d, which makes every formula easier to follow, and the course shows where the correction would go.

Worked example: eight peer-tutoring studies

Here are the eight studies with the default numbers from the lab. Notice that Birch, Elm and Garrow used a test scored out of 50 (means around 28 to 35), the others a test out of 100. A raw mean difference of 6.5 points in Elm is therefore a much bigger effect than 8.1 points in Cedar, and d makes that visible.

Eight synthetic peer-tutoring studies from the lab (default numbers), rounded for display
StudyMean T − Mean CPooled SDdVar(d)SE = √Var95% CI
Alder 201410.113.000.7770.10260.3200.15 to 1.40
Birch 20150.86.550.1220.01860.137−0.15 to 0.39
Cedar 20168.114.050.5770.05080.2250.13 to 1.02
Dunmore 20170.511.800.0420.01260.112−0.18 to 0.26
Elm 20186.56.850.9490.12730.3570.25 to 1.65
Fenwick 20195.515.240.3610.02630.1620.04 to 0.68
Garrow 20201.26.100.1970.03760.194−0.18 to 0.58
Holt 20218.513.650.6230.06880.2620.11 to 1.14

Cedar 2016 is the cell the lab checks: means 65.1 and 57.0, SDs 14.1 and 14.0, groups of 40 and 42. The pooled SD is √((39 × 14.1² + 41 × 14.0²) ÷ 80) = 14.05, so d = 8.1 ÷ 14.05 = 0.577. In Excel: =(B6-E6)/SQRT(((D6-1)*C6^2+(G6-1)*F6^2)/(D6+G6-2)). Its variance is 82 ÷ 1,680 + 0.577² ÷ 164 = 0.0508.

The table shows the pattern that makes meta-analysis necessary. The two largest studies, Birch (215 pupils) and Dunmore (318 pupils), found small effects close to zero. Several small studies, such as Elm with 35 pupils, found large effects, but with wide confidence intervals. Looking at the studies one by one, you could argue for almost any conclusion. Pooling them with the right weights, which you will do in the next lessons, gives one defensible answer.

Cohen's d with 95% confidence interval, 8 studiesd [95% CI]n T + n CAlder 2014420.78 [0.15, 1.40]Birch 20152150.12 [−0.15, 0.39]Cedar 2016820.58 [0.13, 1.02]Dunmore 20173180.04 [−0.18, 0.26]Elm 2018350.95 [0.25, 1.65]Fenwick 20191550.36 [0.04, 0.68]Garrow 20201070.20 [−0.18, 0.58]Holt 2021610.62 [0.11, 1.14]−0.500.511.5← favours controlfavours tutoring → (Cohen's d)
Each study's d (square) with its 95% confidence interval d ± 1.96 × √Var(d). The dashed line marks no effect. This is a first look at the forest plot you will build properly in lesson 6.

The second outcome, passing the end-of-year exam, was reported by five studies as counts. For Cedar 2016, 30 of 40 tutored pupils passed (odds 30 ÷ 10 = 3.0) and 24 of 42 control pupils passed (odds 24 ÷ 18 = 1.33). The odds ratio is 3.0 ÷ 1.33 = 2.25 and the log odds ratio is LN(2.25) = 0.811. In Excel: =LN((B27/(C27-B27))/(D27/(E27-D27))).

Second outcome: passing the end-of-year exam (5 studies)
StudyPassed T / n TPassed C / n COdds ratiolog ORVar(log OR)
Alder 201417 / 2211 / 202.781.0230.4608
Birch 201574 / 11063 / 1051.370.3150.0810
Cedar 201630 / 4024 / 422.250.8110.2306
Dunmore 2017101 / 16096 / 1581.110.1000.0534
Fenwick 201953 / 7547 / 801.690.5260.1159

Why the logarithm? On the odds ratio scale, "no effect" is 1, every harmful effect is squeezed between 0 and 1, and every beneficial effect spreads from 1 to infinity. Halving the odds (OR 0.5) and doubling them (OR 2) are equally strong effects in opposite directions, yet they lie at different distances from 1. After taking the log they sit at −0.69 and +0.69, exactly symmetric around 0, and the sampling distribution is much closer to normal. That is why meta-analyses pool log odds ratios and convert the result back with EXP only for reporting.

Why we pool the log odds ratio, not the odds ratioOdds ratio (OR): 1 = no effect00.51234−1.39−0.6900.691.39log odds ratio = LN(OR): 0 = no effectOR scale: 0.5 is 0.5 below 1,2 is 1.0 above itlog scale: both 0.69 from 0the five lab studies (log OR 0.10 to 1.02)odds halvedodds doubled
The same three effects on two scales. On the odds ratio scale halving and doubling sit at different distances from 1, on the log scale they are symmetric around 0. Mint dots show the five lab studies.

Step by step in Excel

These steps follow the lab above. They work in every Excel version from 2010 onwards.

  1. Mean differences. In B14 type =B4-E4. Select B14:B21 and press Ctrl+D. Always subtract control from treatment, so a benefit of tutoring is positive. Dunmore 2017 (B17) shows 0.5.
  2. Pooled SD. In C14 type =SQRT(((D4-1)*C4^2+(G4-1)*F4^2)/(D4+G4-2)) and fill down to C21. Check the brackets: the whole weighted sum of variances is divided by n_T + n_C − 2 before the square root.
  3. Cohen's d. In D14 type =B14/C14 and fill down. Cedar 2016 (D16) should be about 0.577. Format with three decimals (Home → Increase Decimal).
  4. Variance of d. In E14 type =(D4+G4)/(D4*G4)+D14^2/(2*(D4+G4)) and fill down. Note the brackets around 2*(D4+G4). Fenwick 2019 (E19) is about 0.0263.
  5. Log odds ratios. In F25 type =LN((B25/(C25-B25))/(D25/(E25-D25))) and fill down to F29. C25 − B25 is the number of tutored pupils who failed, E25 − D25 the control pupils who failed.
  6. Variance of the log odds ratio. In G25 type =1/B25+1/(C25-B25)+1/D25+1/(E25-D25) and fill down. Dunmore 2017 (G28) is about 0.0534.
  7. Optional: confidence intervals. In two spare columns, type =D14-1.96*SQRT(E14) and =D14+1.96*SQRT(E14). If you prefer not to hard-code 1.96, use NORM.S.INV(0.975).
  8. Check your work. Press Ctrl+` to show all formulas and confirm that every row refers to its own study. A pooled SD should lie between the two group SDs, and the variance should shrink as the groups grow.
If a study reports a zero in one of the four cells (for example, every pupil passed), the odds ratio and its variance cannot be computed. A common workaround is to add 0.5 to all four cells of that study. Document it whenever you do.

Common mistakes and how to spot them

Effect sizes are where most errors in a meta-analysis start, and one wrong sign or variance quietly distorts the pooled result.

  • Inconsistent direction. Subtracting treatment from control in some studies and control from treatment in others mixes positive and negative effects. How to spot it: decide that "positive = favours tutoring" and check each study's sign against what its authors concluded.
  • Pooling raw mean differences across different scales. 8 points on a test out of 100 are not 8 points on a test out of 50. How to spot it: if the means of the studies differ a lot in size, use d, not MD.
  • Using a standard error as an SD. Papers sometimes report SE instead of SD. Since SE = SD ÷ √n, the d you calculate would be several times too large. How to spot it: an SD that is tiny compared with the mean, or a d above 2, deserves a second look at the source table.
  • Bracket errors in the variance. =d^2/2*(nT+nC) multiplies instead of divides. How to spot it: Var(d) for a study of about 80 pupils should be around 0.05, not 30.
  • Forgetting to log the odds ratio. Averaging raw odds ratios is biased because the scale is asymmetric. How to spot it: no effect must show as 0 in your effect column, not as 1.
  • Counting the same pupils twice. If one study reports two outcomes, it enters each analysis once, not two rows in the same analysis. How to spot it: count the studies and the independent samples, which should be the same for each analysis.

Meta-analysis in Excel: effect sizes, inverse-variance weights, fixed and random effects and a forest plot
A meta-analysis turns many studies into one estimate. It starts with an effect size and a variance for every study.

Quick reference: formulas and shortcuts

All formulas from this lesson, using the lab layout:

Function / formulaWhat it does hereExample (row 4 or 25)
Mean differenceTreatment mean − control mean=B4-E4
SQRT, ^Pooled SD from both groups=SQRT(((D4-1)*C4^2+(G4-1)*F4^2)/(D4+G4-2))
Cohen's dMean difference ÷ pooled SD=B14/C14
Var(d)Sampling variance of d=(D4+G4)/(D4*G4)+D14^2/(2*(D4+G4))
LNLog odds ratio=LN((B25/(C25-B25))/(D25/(E25-D25)))
Var(log OR)Sum of reciprocal cell counts=1/B25+1/(C25-B25)+1/D25+1/(E25-D25)
EXPBack from log OR to OR=EXP(F25)
NORM.S.INVz value for a 95% interval (1.96)=NORM.S.INV(0.975)
95% CIEffect ± z × standard error=D14-1.96*SQRT(E14)
Fill downCopy row 14 to all eight studiesCtrl+D
Show formulasCheck every reference at onceCtrl+`

Real-world uses

Effect sizes and their variances are used far beyond academic reviews:

  • Systematic reviews and theses. Every quantitative review starts with a data-extraction sheet like the one in the lab, which turns each paper's reported means, SDs and counts into d or log OR with a variance.
  • Education and policy evaluation. Ministries and foundations compare programmes evaluated with different tests. Expressing each result in standard deviation units makes them comparable.
  • Combining A/B tests. A product team that ran the same experiment in several markets or quarters can treat each run as a study and pool the effects with inverse-variance weights.
  • Clinical and health research. Binary outcomes such as recovery or readmission are summarised as odds ratios or risk ratios and pooled on the log scale.
  • Reading research critically. Knowing how d and its variance are computed lets you check a published forest plot and spot a study whose interval is suspiciously narrow.

What you will build in the rest of this course

The free lesson gives you an effect size and a variance for every study. The remaining 19 lessons turn them into a complete meta-analysis, step by step, on the same eight studies. They are part of the paid course, a one-time purchase of $9.90.

Inverse-Variance Weights & the Fixed-Effect Estimate. You will weight each study by 1 ÷ Var(d), compute the fixed-effect pooled d with SUMPRODUCT, and see which study carries the most weight and which the least. The answer is often surprising when a large study disagrees with several small ones.

Confidence Interval & z-Test of the Pooled Effect. You will calculate the standard error of the pooled estimate, its 95% confidence interval, the z statistic and the p-value with NORM.S.DIST, so you can say whether the pooled effect is distinguishable from zero.

Heterogeneity: Cochran's Q, I² and τ² (DerSimonian–Laird). Do the eight studies really share one true effect? You will compute Cochran's Q and its p-value, the I² statistic that says how much of the variation is real, and the between-study variance τ² with the DerSimonian–Laird method.

The Random-Effects Model and the Prediction Interval. When studies differ for real, the random-effects model is the honest choice. You will add τ² to every study's variance, recompute the weights and the pooled d, its standard error, and the 95% prediction interval for the effect in a new setting.

The Forest Plot: Every Study and the Pooled Effect in One Chart. You will compute each study's 95% confidence interval and build a proper forest plot as an XY scatter chart in Excel, with horizontal CI lines, the point estimates, the pooled effect and a vertical line at no effect.

Publication Bias: Funnel Plot & Egger's Regression Test. Small studies with big effects can be a warning sign. You will draw a funnel plot of effect against precision and run Egger's regression test with INTERCEPT and LINEST to check for small-study effects.

Sensitivity Analysis: Leave-One-Out. Finally, you will rerun the fixed-effect analysis eight times, each time without one study, find the most influential study and check whether the conclusion survives without it.

Summary

A meta-analysis needs every study on the same scale. Use the mean difference when all studies share one scale, Cohen's d (mean difference ÷ pooled SD) when they do not, and the log odds ratio for yes/no outcomes. Each effect size needs its variance, because the variance decides the weight later. In the lab data, the two largest studies found small effects and several small studies found large ones, a pattern you will investigate in the rest of the course.

Scroll up to the lab and compute the mean differences, pooled SDs, d values, variances and log odds ratios yourself. The Coach checks each step as you go, and it takes about 20 minutes.

Frequently asked questions

How do you calculate Cohen's d in Excel?

Divide the mean difference by the pooled standard deviation: =(B4-E4)/SQRT(((D4-1)*C4^2+(G4-1)*F4^2)/(D4+G4-2)), where B, C, D hold mean, SD and n of the treatment group and E, F, G those of the control group.

What is the variance of Cohen's d?

A widely used approximation is (n_T + n_C) / (n_T × n_C) + d² / (2(n_T + n_C)). Its square root is the standard error used for confidence intervals and weights.

Why is the log odds ratio used in meta-analysis?

The odds ratio scale is asymmetric around 1, while the log odds ratio is symmetric around 0 and its sampling distribution is closer to normal. Results are pooled on the log scale and converted back with EXP.

What is the difference between Cohen's d and Hedges' g?

Hedges' g is d multiplied by a small-sample correction factor slightly below 1, approximately 1 − 3/(4(n_T + n_C) − 9). For studies with more than a few dozen participants the two are very close.

Can you do a meta-analysis in Excel?

Yes. Effect sizes, inverse-variance weights, fixed- and random-effects estimates, heterogeneity statistics and forest plots can all be built with ordinary formulas and charts. Dedicated software adds convenience and extra methods.

When should I use the mean difference instead of the standardised mean difference?

Use the raw mean difference when every study measured the outcome on the same scale, because it is easier to interpret. Use the standardised mean difference when the scales differ.

Keep going: Meta-Analysis in Excel: Effect Sizes, Fixed vs Random Effects & Forest Plots

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 CHF 9.90.

  1. Inverse-Variance Weights & the Fixed-Effect Estimate
  2. Confidence Interval & z-Test of the Pooled Effect
  3. Heterogeneity: Cochran's Q, I² and τ² (DerSimonian–Laird)
  4. The Random-Effects Model and the Prediction Interval
  5. The Forest Plot: Every Study and the Pooled Effect in One Chart
  6. Publication Bias: Funnel Plot & Egger's Regression Test
  7. Sensitivity Analysis: Leave-One-Out
  8. Hedges' g: The Small-Sample Correction
  9. Data Extraction: d from t-Values, Standard Errors and Confidence Intervals
  10. Mixing Outcomes: Converting Log Odds Ratios to d
  11. Pooling a Binary Outcome: Odds Ratio and Risk Ratio
  12. Rare Events: Zero Cells, the 0.5 Correction and Mantel–Haenszel
  13. Subgroup Analysis: Cross-Age vs Same-Age Tutoring
  14. Meta-Regression: Does the Effect Grow with Programme Length?
  15. Cumulative Meta-Analysis: How the Evidence Built Up Year by Year
  16. Random Effects with Few Studies: The Knapp–Hartung Adjustment
  17. How Many Missing Studies? Rosenthal's and Orwin's Fail-Safe N
  18. Dependent Effect Sizes: Multi-Arm Studies and Two Outcomes per Study
  19. Final Project: A Complete Meta-Analysis Dashboard for a Second Programme

Buy course — CHF 9.90 See the full course