• Exercise 1
  • Exercise 2
  • Exercise 3
  • Exercise 4
  • Exercise 5
  • Exercise 6
  • Exercise 7
  • Exercise 8
  • Exercise 9
  • Exercise 10
library(tidyverse)
library(openintro)
library(infer)
library(dplyr)
library(ggplot2)

Exercise 1

Describe the distribution of responses in this sample. How does it compare to the distribution of responses in the population. Hint: Although the sample_n function takes a random sample of observations (i.e. rows) from the dataset, you can still refer to the variables in the dataset with the same names. Code you presented earlier for visualizing and summarizing the population data will still be useful for the sample, however be careful to not label your proportion p since you’re now calculating a sample statistic, not a population parameters. You can customize the label of the statistics to indicate that it comes from the sample.

set.seed(500) # make sure reproducibility in random sampling
global_monitor <- tibble(
  scientist_work = c(rep("Benefits", 80000), rep("Doesn't benefit", 20000))
)
#Take a random sample  
samp1 <- global_monitor %>%
  sample_n(50000)

# The sample proportion of "Benefits" and "Doesn't benefit" response from samp1 
samp <- samp1 %>%
  count(scientist_work) %>%
  mutate(p1 = n / sum(n))
samp
## # A tibble: 2 Ă— 3
##   scientist_work      n    p1
##   <chr>           <int> <dbl>
## 1 Benefits        40028 0.801
## 2 Doesn't benefit  9972 0.199
# Summary  population
prop <- global_monitor %>%
  count(scientist_work) %>%
  mutate(p = n / sum(n))

# Build a comparison chart
comparison <- rbind(
  c("Sample", "Benefits", prop$p[1]),
  c("Sample", "Doesn't benefit", prop$p[2]),
  c("Population", "Benefits", samp$p1[1]),
  c("Population", "Doesn't benefit", samp$p1[2])
) %>%
  as.data.frame() %>%
  rename(Group = V1, Response = V2, Proportion = V3)
 
# Create a bar plot
ggplot(comparison, aes(x = Response, y = Proportion, fill = Group)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(
    x = "Response",
    y = "Proportion",
    title = "Comparison of Sample and Population Distributions"
  )

At the initial sample of 50 observations,thre is a sample distribution of 80% “Benefits” and 20% “Doesn’t benefit” responses and the population distribution of 86% “Benefits” and 14% “Doesn’t benefit” responses. If the sample sized is increased to 50,000, that of proportion of sample distributions and population distribution are almost the same at 80% “Benefits” and 20% “Doesn’t benefit” responses because of random sampling.

Exercise 2

Would you expect the sample proportion to match the sample proportion of another student’s sample? Why, or why not? If the answer is no, would you expect the proportions to be somewhat different or very different? Ask a student team to confirm your answer.

The sample proportion of one student’s sample may have somewhat different if the samples are independently random, have very different if the samples are small, but have closely identical if samples are large withe another student’s sample.

Exercise 3

Take a second sample, also of size 50, and call it samp2. How does the sample proportion of samp2 compare with that of samp1? Suppose we took two more samples, one of size 100 and one of size 1000. Which would you think would provide a more accurate estimate of the population proportion?

The larger the sample size, the smaller the sampling error and estimating accuracy becomes more precise.

samp2 <- global_monitor %>%
  sample_n(1000)

# Calculate the sample proportion of "Benefits" and "Doesn't benefit" responses
samp_two <- samp2 %>%
  count(scientist_work) %>%
  mutate(p1 = n / sum(n))
samp_two
## # A tibble: 2 Ă— 3
##   scientist_work      n    p1
##   <chr>           <int> <dbl>
## 1 Benefits          809 0.809
## 2 Doesn't benefit   191 0.191

Exercise 4

How many elements are there in sample_props50? Describe the sampling distribution, and be sure to specifically note its center. Make sure to include a plot of the distribution in your answer.

There are 15,000 elements in sample_props50. The sampling distribution is the sample proportion of “Doesn’t benefit” responses based on repeated random sampling. It shows how the sample proportions vary when estimating the population proportion. The center of the sampling distribution corresponds to the expected (mean) or average proportion of “Doesn’t benefit” responses across the 15,000 simulated samples.

#sample proportion of "Doesn't benefit" responses 
sample_props50 <- global_monitor %>%
                    rep_sample_n(size = 50, reps = 15000, replace = TRUE) %>%
                    count(scientist_work) %>%
                    mutate(p_hat = n /sum(n)) %>%
                    filter(scientist_work == "Doesn't benefit")
sample_props50
## # A tibble: 14,999 Ă— 4
## # Groups:   replicate [14,999]
##    replicate scientist_work      n p_hat
##        <int> <chr>           <int> <dbl>
##  1         1 Doesn't benefit     9  0.18
##  2         2 Doesn't benefit     9  0.18
##  3         3 Doesn't benefit     9  0.18
##  4         4 Doesn't benefit    11  0.22
##  5         5 Doesn't benefit     8  0.16
##  6         6 Doesn't benefit    12  0.24
##  7         7 Doesn't benefit     7  0.14
##  8         8 Doesn't benefit     6  0.12
##  9         9 Doesn't benefit     9  0.18
## 10        10 Doesn't benefit    13  0.26
## # ℹ 14,989 more rows
# Count the number of elements in sample_props50
num_elements <- nrow(sample_props50)
num_elements
## [1] 14999
#Visualize the distribution of these proportions with a histogram
ggplot(data = sample_props50, aes(x = p_hat)) +
  geom_histogram(binwidth = 0.02, fill = "pink", color = "grey") +
  labs(
    x = "p_hat (Doesn't benefit)",
    title = "Sampling distribution of p_hat",
    subtitle = "Sample size = 50, Number of samples = 15000"
  )

Exercise 5

To make sure you understand how sampling distributions are built, and exactly what the rep_sample_n function does, try modifying the code to create a sampling distribution of 25 sample proportions from samples of size 10, and put them in a data frame named sample_props_small. Print the output. How many observations are there in this object called sample_props_small? What does each observation represent?

# A sampling distribution of 25 sample proportions from samples of size 10
sample_props_small <- global_monitor %>%
  rep_sample_n(size = 10, reps = 25, replace = TRUE) %>%
  count(scientist_work) %>%
  mutate(p_hat = n / sum(n)) %>%
  filter(scientist_work == "Doesn't benefit")
print(sample_props_small)
## # A tibble: 19 Ă— 4
## # Groups:   replicate [19]
##    replicate scientist_work      n p_hat
##        <int> <chr>           <int> <dbl>
##  1         3 Doesn't benefit     3   0.3
##  2         4 Doesn't benefit     3   0.3
##  3         5 Doesn't benefit     4   0.4
##  4         6 Doesn't benefit     3   0.3
##  5         8 Doesn't benefit     1   0.1
##  6         9 Doesn't benefit     3   0.3
##  7        10 Doesn't benefit     5   0.5
##  8        11 Doesn't benefit     2   0.2
##  9        12 Doesn't benefit     3   0.3
## 10        13 Doesn't benefit     3   0.3
## 11        14 Doesn't benefit     3   0.3
## 12        16 Doesn't benefit     1   0.1
## 13        18 Doesn't benefit     1   0.1
## 14        19 Doesn't benefit     3   0.3
## 15        21 Doesn't benefit     1   0.1
## 16        22 Doesn't benefit     3   0.3
## 17        23 Doesn't benefit     3   0.3
## 18        24 Doesn't benefit     2   0.2
## 19        25 Doesn't benefit     4   0.4
# The number of  observations in sample_props_small
num_obs <- nrow(sample_props_small)
num_obs
## [1] 19

Exercise 6

Use the app below to create sampling distributions of proportions of Doesn’t benefit from samples of size 10, 50, and 100. Use 5,000 simulations. What does each observation in the sampling distribution represent? How does the mean, standard error, and shape of the sampling distribution change as the sample size increases? How (if at all) do these values change if you increase the number of simulations? (You do not need to include plots in your answer.)

set.seed(123)
num_simulations <- 5000
# Sample sizes
sample_sizes <- c(10, 50, 100)
# Create a data frame to store results
results <- data.frame(
  Sample_Size = integer(),
  Simulation = integer(),
  Mean_Proportion = numeric(),
  Standard_Error = numeric()
)

# Perform simulations for each sample size
for (size in sample_sizes) {
  for (sim in 1:num_simulations) {
    # Generate a random sample of the specified size
    sample_data <- global_monitor %>%
      sample_n(size = size, replace = TRUE)
    
    # Calculate the proportion of "Doesn't benefit" responses
    proportion <- mean(sample_data$scientist_work == "Doesn't benefit")
    
    # Calculate the standard error
    se <- sqrt(proportion * (1 - proportion) / size)
    
    # Store the results
    results <- rbind(results, data.frame(Sample_Size = size, Simulation = sim, 
                                         Mean_Proportion = proportion, 
                                         Standard_Error = se))
  }
}

# Create a summary plot
ggplot(results, aes(x = Sample_Size, y = Mean_Proportion)) +
  geom_point() +
  geom_errorbar(aes(ymin = Mean_Proportion - Standard_Error, ymax = Mean_Proportion + Standard_Error), 
                width = 0.2) +
  labs(
    x = "Sample Size",
    y = "Mean Proportion of 'Doesn't benefit'",
    title = "Effect of Sample Size on Mean Proportion (with Standard Error)"
  )

As sample is larger, the mean proportion becomes more precise, the standard error decreases and tends to the true population proportion.

Exercise 7

Take a sample of size 15 from the population and calculate the proportion of people in this sample who think the work scientists do enhances their lives. Using this sample, what is your best point estimate of the population proportion of people who think the work scientists do enchances their lives?

The value of p_hat = 0.73 best point estimate of the population proportion of people who think the work scientists do enhances their lives based on this specific sample of 15 individuals.

# A sampling distribution of 25 sample proportions from samples of size 10
proportion_of_people <- global_monitor %>%
  sample_n(size = 15) %>%
  count(scientist_work) %>%
  mutate(p_hat = n / sum(n)) %>%
  filter(scientist_work == "Benefits")
print(proportion_of_people)
## # A tibble: 1 Ă— 3
##   scientist_work     n p_hat
##   <chr>          <int> <dbl>
## 1 Benefits          14 0.933

Exercise 8

Since you have access to the population, simulate the sampling distribution of proportion of those who think the work scientists do enhances their lives for samples of size 15 by taking 2000 samples from the population of size 15 and computing 2000 sample proportions. Store these proportions in as sample_props15. Plot the data, then describe the shape of this sampling distribution. Based on this sampling distribution, what would you guess the true proportion of those who think the work scientists do enhances their lives to be? Finally, calculate and report the population proportion.

set.seed(123)
# Number of simulations
num_simulations <- 2000

# Create a data frame to store results
Report <- data.frame(
  Simulation = integer(),
  Mean_Proportion = numeric()
)

# Perform simulations for each sample size
  for (sim in 1:num_simulations) {
    # Generate a random sample of the specified size
    sample_data <- global_monitor %>%
      sample_n(size = 15, replace = TRUE)
    
    # Calculate the proportion of "Benefits" responses
    sample_props15 <- mean(sample_data$scientist_work == "Benefits")
    # Store the results
    Report <- rbind(Report, data.frame(Simulation = sim, 
                                         Mean_Proportion = sample_props15))
  }

head(Report)
##   Simulation Mean_Proportion
## 1          1       0.8666667
## 2          2       0.7333333
## 3          3       0.8666667
## 4          4       0.8000000
## 5          5       0.7333333
## 6          6       0.6000000
# Create a histogram to visualize the sampling distribution
hist(Report$Mean_Proportion, breaks = 20, main = "Sampling Distribution (Sample Size 15)",
     xlab = "Sample Proportion of 'Benefits'", ylab = "Frequency")

Exercise 9

Change your sample size from 15 to 150, then compute the sampling distribution using the same method as above, and store these proportions in a new object called sample_props150. Describe the shape of this sampling distribution and compare it to the sampling distribution for a sample size of 15. Based on this sampling distribution, what would you guess to be the true proportion of those who think the work scientists do enchances their lives?

num_simulations <- 2000

# Create a data frame to store sample proportions
sample_props150 <- data.frame(
  Simulation = integer(),
  Mean_Proportion = numeric()
)

# Perform simulations
for (sim in 1:num_simulations) {
  # Generate a random sample of size 150 from the population
  sample_data <- global_monitor %>%
    sample_n(size = 150, replace = TRUE)
  
  # Calculate the proportion of "Benefits" responses in the sample
  sample_proportion <- mean(sample_data$scientist_work == "Benefits")
  
  # Store the results
  sample_props150 <- rbind(sample_props150, data.frame(Simulation = sim, Sample_Proportion = sample_proportion))
}

# Create a histogram to visualize the sampling distribution
hist(sample_props150$Sample_Proportion, breaks = 20, main = "Sampling Distribution (Sample Size 150)",
     xlab = "Sample Proportion of 'Benefits'", ylab = "Frequency")

As the sample is larger, the true proportion of those who think the work scientists do enhances their lives to be more accurately estimated and closer to the center of the distribution.

Exercise 10

Of the sampling distributions from 2 and 3, which has a smaller spread? If you’re concerned with making estimates that are more often close to the true value, would you prefer a sampling distribution with a large or small spread?

I do prefer to a smaller spread of sampling distribution because the estimates (sample proportions) are more closer to the true population parameter, and there is less variability or uncertainty in the estimates, but higher level of precision with larger sample sizes.

LS0tCnRpdGxlOiAiU2FtcGxpbmcgRGlzdHJpYnV0aW9ucyIKYXV0aG9yOiAiTHdpbiBTaHdlIgpkYXRlOiAiYHIgU3lzLkRhdGUoKWAiCm91dHB1dDogb3BlbmludHJvOjpsYWJfcmVwb3J0Ci0tLQoKYGBge3IgbG9hZC1wYWNrYWdlcywgbWVzc2FnZT1GQUxTRX0KbGlicmFyeSh0aWR5dmVyc2UpCmxpYnJhcnkob3BlbmludHJvKQpsaWJyYXJ5KGluZmVyKQpsaWJyYXJ5KGRwbHlyKQpsaWJyYXJ5KGdncGxvdDIpCmBgYAoKIyMjIEV4ZXJjaXNlIDEKRGVzY3JpYmUgdGhlIGRpc3RyaWJ1dGlvbiBvZiByZXNwb25zZXMgaW4gdGhpcyBzYW1wbGUuIEhvdyBkb2VzIGl0IGNvbXBhcmUgdG8gdGhlIGRpc3RyaWJ1dGlvbiBvZiByZXNwb25zZXMgaW4gdGhlIHBvcHVsYXRpb24uIEhpbnQ6IEFsdGhvdWdoIHRoZSBzYW1wbGVfbiBmdW5jdGlvbiB0YWtlcyBhIHJhbmRvbSBzYW1wbGUgb2Ygb2JzZXJ2YXRpb25zIChpLmUuIHJvd3MpIGZyb20gdGhlIGRh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