17  Notebook: A Toy Mean Test

A minimal test-statistic example for a normal sample.

17.1 One toy sample

import numpy as np
import pandas as pd

rng = np.random.default_rng(11)
x = rng.normal(loc=0.35, scale=1.0, size=25)
z = x.mean() / (x.std(ddof=1) / np.sqrt(len(x)))

pd.DataFrame({
    "quantity": ["sample mean", "sample std", "z-like statistic"],
    "value": [x.mean(), x.std(ddof=1), z],
})
quantity value
0 sample mean 0.324736
1 sample std 0.915635
2 z-like statistic 1.773285