Digital Marketing (Growth and Analytics) · Projects

Project 2: An A/B test reported honestly

Marking guide version 1 · Lessons: DM6 lessons 1, 2 and 5, DM7 lessons 1–5, DM10 lesson 3

The problem and who it's for

MittiMart tested showing a delivery date on product pages (B) against no date (A) for 14 days, from 7 to 20 September 2026. After three days, someone wrote a report saying "B wins! 62% uplift", from raw data, and recommended stopping the test. The raw data contains bot visits, all in A, and visitors who saw both versions, and its split between A and B is far from 50/50. The stats.js file meant to do the sums has mistakes and is missing the split check. The shop's owners want to know whether to show delivery dates, and how sure they can be.

Scope

Not included

Before you start

Starter files

Download everything at once: starter/digital-marketing-starter.zip.

Milestones

  1. Run npm run test:experiment and read what each of the 8 tests expects.
  2. Fix sampleSize, write srm and fix twoProportion (tests 1, 2 and 3).
  3. Clean the data and write the Data cleaning section (test 4).
  4. Count visitors and converted visitors per variant and write the Results table (test 5).
  5. Write the Test, Decision and Limits sections (tests 6 and 7).
  6. Write the next test plan (test 8), then run all 8 tests twice in a row.

Expected outputs

Acceptance tests

# Input Expected result
1 npm run test:experiment 8 of 8 pass, twice in a row
2 sampleSize, srm and twoProportion 13,914 per variant for a 3% baseline and a 0.6-point change; the raw split 12,718 against 11,450 flagged (p below 0.001); the test cases' p-values and intervals (tests 1 to 3)
3 The Data cleaning section Rows 24,168; bot rows removed 1,260; visitors in both variants removed 154; visitors analysed 22,600 (test 4)
4 The Results table A 11,304 visitors, 329 converted, 2.91%; B 11,296 visitors, 365 converted, 3.23% (test 5)
5 The Test section Sample ratio p-value 0.958; difference 0.32 points; 95% interval −0.13 to 0.77; p-value 0.162 (test 6)
6 Decision, Limits and the next test plan "No clear difference", not "B wins"; the limits mention the first three days and practice data; the plan's visitors per variant come from sampleSize and its days are rounded up to whole weeks (tests 7 and 8)

Failure and recovery exercises

  1. Count orders instead of converted visitors for B and run test 5. Explain why a visitor who ordered twice shouldn't count twice in a conversion rate, then restore your counts.
  2. Run twoProportion on the first three days of raw data (A 68 of 2,537, B 100 of 2,299) and then on the full cleaned data. Write two sentences on why the first answer looked so convincing and why it was wrong to stop there.
  3. Skip the cleaning and run srm on the raw counts. Explain what a sample ratio mismatch tells you about a test before you look at any result.

Evidence to submit

Marking guide and self-check

Pass rule: every Safety-critical (S) and Mandatory (M) item must be met. A single unmet safety item means the project is not complete, whatever else is done. Quality items are for your own improvement.

Your answers are saved in this browser on this device. Self-checked means you checked your own work against this guide; it is not a reviewer's approval. Never paste passwords, keys, tokens or real customer data here.

Checklist (marking guide version 1)
Evidence

← PreviousAnalytics behind a real consent choice
ProLearners Assist