Writing Up a Finding

A number, what it is compared with, and what it does not prove.

Three parts to a claim

The number, the comparison that gives it meaning, and the limit. Without the second it is trivia; without the third it is overstated.

import pandas as pd

df = pd.DataFrame({"team": ["a", "b"], "score": [85.0, 70.0]})
gap = float(df["score"].max() - df["score"].min())
print(f"a leads b by {gap:.1f} points, on one term of data")

Correlation is not the finding

Two things moving together is an observation. Saying one caused the other is a further claim, and usually one this data cannot support.

import pandas as pd

hours = pd.Series([1.0, 2.0, 3.0])
score = pd.Series([60.0, 70.0, 80.0])
print(round(float(hours.corr(score)), 2))

Exercise

Try It Yourself

Write finding(df) returning a sentence of the form "a scores 15.0 above b (n=3)", comparing the highest and lowest team means and reporting how many rows the whole comparison rests on.

Press Run to see output

Check Your Understanding