Aan de slagGa gratis aan de slag

Testing Iowa

You probably noticed that the bar plot of first digits is alarming: it looks quite different from what Benford's Law prescribes! Before you get ahead of yourself, though, realize that those bars each only contained a handful of counties, so you don't actually have that much data.

This is a prime example of when a hypothesis test is handy. It can tell you if the structure that you see (in this case, the deviation from Benford's Law) could just be due to the random variability of your small sample, or if it's indicative of a systematic difference.

Deze oefening maakt deel uit van de cursus

Inference for Categorical Data in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Compute observed stat
chi_obs_stat <- ___ %>%
  ___
Code bewerken en uitvoeren