Get startedGet started for free

Atheism in Spain

The question of atheism was asked by WIN-Gallup International in a similar survey that was conducted in 2005. Table 4 on page 13 of the report summarizes survey results from 2005 and 2012 for 39 countries.

Use the inference() function to answer the following question. As always, write out the hypotheses for any tests you conduct and outline the status of the conditions for inference. The atheism data set is already loaded in the workspace.

This exercise is part of the course

Data Analysis and Statistical Inference

View Course

Exercise instructions

  • Take a subset spain of atheism with only the respondents from Spain.
  • Calculate the proportion of atheists within this subset.
  • Use the inference() function on this subset, grouping them by year.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# The atheism data frame and inference() function are already loaded into the workspace.

# Take the spain subset:
spain <- 

# Calculate the proportion of atheists from the spain subset:
proportion <- 

# Use the inference() function:
Edit and Run Code