LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Inference for Categorical Data in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# 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
Code bearbeiten und ausführen