Proportion - because it deals with the precentege of a population exhibiting a certain characteristic.
Mean - because it deals with changes in average revenue.
Proportion - because it deals with percentage of people.
Proportion - because it deals with percentage of people.
Mean - because it deals with average number of times user used service.
Exercise 2
Null Hypothesis: There is no difference between when calories were displayed and when they were not displayed. \(H_0: \mu = 1100\) Alternative Hypothesis: There is a difference between when calories were displayed and when they were not displayed. \(H_1: \mu \neq 1100\)
Null Hypothesis: There is no change in the average GRE Verbal Reasoning score from 2004-2021. \(H_0: \mu = 462\) Alternative Hypothesis: There is a change in the average GRE Verbal Reasoning score from 2004-2007 to 2021. \(H_1: \mu \neq 462\)
We can say that Paul the Octopus is a good predictor because the p-value is less than 0.05, which means that we can reject the null hypothesis. So he is predictiing the outcome with more then 50% accuracy.
Exercise 3
library(tibble)library(ggplot2)n <-14k <-12alpha <-0.05critical_value <-qbinom(1- alpha, n, 0.5)x <-0:nprob <-dbinom(x, n, 0.5)crit_reg <- x >= critical_valuedata <-tibble(x = x, prob = prob, crit_reg = crit_reg)ggplot(data, aes(x = x, y = prob)) +geom_bar(stat ="identity", aes(fill =as.factor(crit_reg)), alpha =0.6) +scale_fill_manual(values =c("TRUE"="red", "FALSE"="blue")) +labs(title ="Critical Region of the Paul the Octopus Test",x ="Number of Correct Predictions",y ="Probability") +theme_minimal()