CommencerCommencer gratuitement

SE with different p

You just saw the effect that sample size can have on inference, but that's not the only variable in play here. Let's return now to our full dataset and see what happens to the SE when we consider a category that has a different population proportion, p.

We've displayed here the plot that you made way back in exercise 4 to study the proportion of respondents that have "High" confidence in science. Notice this proportion is very close to .5. In this exercise, you'll be looking at the variable meta_region, which records whether or not the respondent lives in the pacific region of the US. These respondents were fairly rare, which allows you to study how SEs behave in a setting where the proportion is is very far from 0.5.

Cet exercice fait partie du cours

Inference for Categorical Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Using gss2016, plot meta_region
___ +
  # Add bar layer
  ___
Modifier et exécuter le code