Read shapes and compare bins
4A–4D
Mean, median and skewness are clues; the four plots show what they miss. Changing bins changes the picture, not the data.
Week 2: shape, bins and normal approximation, PDF pp. 33–43
Your task
Describe each distribution, compare mean and median, try the supplied bin settings and evaluate the normality claim.
Evidence to include
Use plot features such as tails, peaks and gaps, plus the actual centre values from your case.
Notebook questions and code
Read here; run in your downloaded notebook. Start with its setup cells and run in order. Use your own ID and outputs where requested.
Download Lab 2 notebook4 · Look before summarising (15 min)
The next cell plots four numeric columns: entry score, weekly minutes, assessment score, and satisfaction. For the discrete ordinal satisfaction scale, each histogram bin represents one response category. Missing responses are excluded and the valid n is shown.
Read centre, spread, tail direction, peaks/gaps, and unusual values. skew() gives a sample skewness statistic; its sign is useful evidence, not a complete description of shape.
Python · cell 16 — read here, run in your notebook
columns = ['entry_score','weekly_minutes','assessment_score','satisfaction']
units = ['points','minutes per week','points','response category']
fig, axes = plt.subplots(2,2,figsize=(12,8))
for ax,col,unit in zip(axes.flat,columns,units):
x=students[col].dropna()
ax.hist(x,bins=np.arange(.5,6,1) if col=='satisfaction' else 18,
color='#347c99',edgecolor='white')
ax.set(title=f'{col} (valid n={len(x)})',xlabel=unit,ylabel='Student count')
plt.tight_layout(); plt.show()
display(students[columns[:3]].agg(['count','mean','median','std','skew']).T)
fig, axes = plt.subplots(1,3,figsize=(12,3.5))
for ax,b in zip(axes,[coarse_bins,12,fine_bins]):
ax.hist(students.assessment_score,bins=b,color='#347c99',edgecolor='white')
ax.set(title=f'{b} bins',xlabel='Assessment score (points)',ylabel='Student count',xlim=(0,100))
plt.tight_layout(); plt.show()Your reasoning
4A. Write one shape sentence for each of the four columns. Include plot evidence; do not merely list a skewness number.
4B. Find a column where mean and median disagree. Give both values and explain the mechanism. Which centre and spread would you report for a typical observation?
4C. Compare the three histogram bin settings. What is concealed or exaggerated? Choose one and justify it. Does changing bins change the underlying mean?
4D. Does a nearly zero skewness or similar mean/median establish a normal distribution? Use the assessment-score plot to explain.
Answer: Replace this text with your explanation.
Saved only in this browser. This note doesn’t fill in the downloaded notebook; “reviewed” is a personal checklist, not a grade.