IniziaInizia gratis

Generating from H0

Imagine that when reading the newspaper, you come across someone who makes the following claim: "3/4 of all Americans believe in life after death". This can be interpreted as a point null hypothesis that the population proportion has a value of 0.75.

Use this hypothesis to generate a single dataset to explore.

Questo esercizio fa parte del corso

Inference for Categorical Data in R

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Generate one dataset under H0
sim1 <- gss2016 %>%
  # Specify the response and success
  ___(response = ___, success = ___) %>%
  # Hypothesize the null value of p
  ___(null = ___, p = ___) %>%
  # Generate a single simulated dataset
  ___(reps = ___, type = ___)

# See the result
sim1
Modifica ed esegui il codice