aNet.ai
Data Science/Learning path
0day streak0XP · Lv 1
← 6. Data Visualisation
Lesson 8.14 7 min · 271 words

Optional: uncertainty, log scales and plotting code

Error bars can show very different things, so each must be named. On a log axis, equal distances mean equal multiplication factors.

These W6 pages (pp. 34-36) are optional extensions that preview later weeks.

Every interval needs a name (p. 34). For n=25, sample mean 70 and sample SD s=10:

Quantity Calculation Meaning
Sample SD s = 10 grade points Spread among individual grades
Standard error SE = s/√n = 10/√25 = 2 Estimated uncertainty of the mean
Approx. 95% interval 70 ± 2.064×2 = [65.87, 74.13] t interval for the population mean (24 degrees of freedom)

An error bar of ±1 SD and a 95% confidence interval answer different questions and have very different widths, so the caption must say which is drawn.

Logarithmic position (p. 36). Base-10 log position: 1→0, 10→1, 100→2, 1,000→3. From 10 to 100 and from 100 to 1,000 the ratio is 10 each time and the log distance is 1 each time: equal log distances represent equal multiplication factors. Zero and negative values have no finite log position, so a log axis cannot show them.

From counts to a chart in Python (p. 35). Every plotted number comes from the table and the denominators stay in the labels:

import matplotlib.pyplot as plt
passed = [60, 18]
total = [100, 20]
rates = [100 * a / b for a, b in zip(passed, total)]   # [60.0, 90.0]
fig, ax = plt.subplots()
ax.bar(['Full-time (60/100)', 'Part-time (18/20)'], rates)
ax.set_ylim(0, 100)                     # bars start at zero
ax.set_ylabel('Observed pass rate (%)')
ax.set_title('Illustrative pass rates by study mode')

First bar: 100×60/100 = 60. Second bar: 100×18/20 = 90.

Source: W6 PDF pp. 1-37. Most numbers in the lecture are illustrative or constructed for teaching; pp. 26-27 reuse the Week 5 synthetic registration counts. The Week 6 lab manual (L6) practises Week 5 EDA reasoning and is worked through section by section in Lab work.

Practice problems

Supplementary study questions on the lecture concepts — not verbatim exam questions. Each answer counts toward spaced review.

1. Conceptual understanding

Definitions and distinctions.

Question 1 of 6 · +5 XP

n=25 and s=10. What is the standard error of the mean?

Question 2 of 6 · +5 XP

On a base-10 log axis, what do the equal distances 10→100 and 100→1,000 represent?

2. Application

Apply the concept to a case or calculation.

Question 3 of 6 · SD versus CI · +5 XP

An error bar shows ±1 SD. What does it describe?

Question 4 of 6 · Interval · +5 XP

n=25, mean 70, SE 2 and t=2.064. What is the approximate 95% interval?

3. Interpretation and limitations

Evaluate assumptions and justify conclusions.

Question 5 of 6 · Log zero · +5 XP

Why can a log axis not show a value of 0?

Question 6 of 6 · Code · +5 XP

In the lecture's matplotlib code, what does ax.set_ylim(0, 100) ensure?

Explain it in writing

Self-checked, not marked. Write a few sentences, then compare with the example answer. Your writing is saved as you type.

Show an example answer

SE = 10/√25 = 2 grade points. The SD (10) describes how individual grades vary; the SE describes how uncertain the estimated mean is.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Show an example answer

Both steps multiply by 10, and the log10 positions are 1, 2 and 3. Equal log distances mean equal multiplication factors.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Practice this topic
Saved in this browser as you type.
aNet.ai · Data Science Fundamentals · Weeks 1–6 · practice material, not an official examProgress saved in this browser