knitr::opts_chunk$set(echo = TRUE)
library(SDS100)

$\$

Does the AstraZeneca vaccine cause blood clots?

A study found that 79 people experienced clots after receiving a first vaccine dose. More than 20 million AstraZeneca vaccines doses had been administered across the UK by the end of March.

About four people in a million would normally be expected to develop this particular kind of blood clot - though the fact they are so rare makes the usual rate hard to estimate.

$\$

CI for a single proportion

The create a 95% confidence interval for the proportion of people who are expected to get a blood clot if they take the AstraZeneca vaccine. Recall, our formula for calculate the confidence interval is:

$$\hat{p} \pm z^* \cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$$


Is it likely you will get a blood clot?

$\$

Confidence interval for a single proportion using the bootstrap

library(tictoc)


has_clot <- rep(TRUE, 79)
no_clot <- rep(FALSE, (20 * 10^6) - 79)

data_vec <- c(has_clot, no_clot)





# Time how long it takes to create 10 bootstrap statistics... 
tic()








toc()

$\$

Confidence interval for a single mean

How many birds to cats kill?

A study by Loyd et al (20213) in Biological Conservation, used KittyCams to record all activity of n = 55 domestic cats that hunt outdoors.

The video footage showed that the mean number of kills per week for these cats was 2.4 with a standard deviation of 1.51.

Find and interpret a 99% confidence interval for the mean number of kills per week by US household cats that hunt outdoors.


$\$

Hypothesis test for a single mean

It is recommended that adults sleep at least 8 hours a night

A Statistics professor asked 12 undergraduate students how much sleep they were getting and found the average was 6.2 hours with a standard deviation of 1.7 hours.

Assuming this is representative of all students in a Statistics class, does this provide evidence that students in the class are not getting enough sleep on average?




emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.