1. Lighthouse

Level 2 · How deep do visitors browse?

The request

From Ashley Rivera, Web Content Lead

“Our dashboard says visitors view 3.7 pages per visit, so we plan content for a three-to-four page journey. Here's the histogram behind that number. Does the plan fit what visitors actually do?”

Your goal

Read the histogram of pages viewed per session and pick the statement that is true.

Web sessions by pages viewed
Web sessions by pages viewed05k10k15k20k1 to 2: 17,4052 to 3: 4,9323 to 4: 3,6354 to 5: 3,0035 to 6: 2,3686 to 7: 1,8187 to 8: 1,4248 to 9: 1,1469 to 10: 88510 to 11: 70311 to 12: 60712 to 13: 43213 to 14: 34314 to 15: 29815 to 16: 19216 to 17: 17517 to 18: 13918 to 19: 11419 to 20: 8420 to 21: 8421 to 22: 4622 to 23: 2623 to 24: 3424 to 25: 2525 to 26: 1726 to 27: 1627 to 28: 528 to 29: 1329 to 30: 1051015202530Pages viewed in the sessionSessions
Web sessions by pages viewed05k10k15k20k1 to 2: 17,4052 to 3: 4,9323 to 4: 3,6354 to 5: 3,0035 to 6: 2,3686 to 7: 1,8187 to 8: 1,4248 to 9: 1,1469 to 10: 88510 to 11: 70311 to 12: 60712 to 13: 43213 to 14: 34314 to 15: 29815 to 16: 19216 to 17: 17517 to 18: 13918 to 19: 11419 to 20: 8420 to 21: 8421 to 22: 4622 to 23: 2623 to 24: 3424 to 25: 2525 to 26: 1726 to 27: 1627 to 28: 528 to 29: 1329 to 30: 10102030Pages viewed in the sessionSessions

40,000 sessions, 2023 to 2025. Each bar is one page count, starting at 1. 21 sessions with more than 30 pages (up to 58) are not drawn.

Show the numbers
Pages viewed in the sessionSessions
1 to 217,405
2 to 34,932
3 to 43,635
4 to 53,003
5 to 62,368
6 to 71,818
7 to 81,424
8 to 91,146
9 to 10885
10 to 11703
11 to 12607
12 to 13432
13 to 14343
14 to 15298
15 to 16192
16 to 17175
17 to 18139
18 to 19114
19 to 2084
20 to 2184
21 to 2246
22 to 2326
23 to 2434
24 to 2525
25 to 2617
26 to 2716
27 to 285
28 to 2913
29 to 3010
above 30 (not drawn)21
The 40,000 sessions have a mean of 3.66 pages and a median of 2. Which statement fits the histogram?

Pick one answer, then check it.

The lesson

What a histogram shows

A histogram splits a numeric column into equal ranges and draws one bar per range, as tall as the number of values in it. For pages viewed, each range is a single page count, so the first bar is “sessions that viewed 1 page”, the next “2 pages”, and so on. Reading one comes down to three questions: where is the peak, how wide is the spread, and is one side longer than the other?

web_sessions["pages_viewed"].value_counts().sort_index().head()
1    17405
2     4932
3     3635
4     3003
5     2368

Skew and the mean

When the tail stretches to the right, the distribution is right-skewed. The long tail pulls the mean toward it, while the median stays with the bulk of the data:

pages = web_sessions["pages_viewed"]
pages.mean(), pages.median(), pages.skew()   # 3.66, 2.0, 2.35

In a right-skewed column the mean is above the median; in a left-skewed one (rare in business data, an example is days until an expiry date) it is below. The bigger the gap, the less the mean describes a typical value.

Spikes mean a second story

A single bar far taller than its neighbours usually means a different process is mixed in. Here it’s bounces: visitors who land on one page and leave. They are 43.5% of all sessions. Mixing bouncers and browsers in one average describes neither group. Split them and each gets a useful number:

(pages == 1).mean()          # 0.435 bounce rate
pages[pages > 1].median()    # 4.0 pages for visits that go past the first page

The normal curve is not the default

Many statistics lessons start with the bell-shaped normal distribution, where mean and median match and about 95% of values sit within two standard deviations of the mean. Counts, money and durations in business data rarely look like that. A quick test: if the mean minus two standard deviations is impossible (a negative page count, a negative price), the data is not normal, and rules built on that shape don’t apply.

Common mistakes

  • Reporting the mean without looking at the shape. Always plot the histogram first.
  • Ignoring a spike. A tall bar at 0, 1 or a round number is often a separate behaviour (bounces, default values, free orders) worth its own analysis.
  • Calling the tail “errors”. Long tails are normal in business data. Remove a value only when you know it is wrong, not because it is big.

Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.