student: David K student_id: 10101010 url: https://stat300.stat.ubc.ca/lab_02_Signed_test/ pubkey: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoeMaWl5GiYNRPd7wgoUV4QgDlRWREf5RGLpEOMTPvs0la6cwA4gUWp2WmVPkHHGy8tWCFyPLKfTiAV98cAd12g== signature: MEQCIH0omwWMdLuI8tpuWuPK7++Mz8fZ4gqt+UhIjDLO2t53AiBsrEmwV3B7po+d5DD8GBrpt5Geufx/THS++y+43A0hwA==
Striking!
# Provide a name and the values for the data frame.
# Replace Name_of_data_set with the name for the data set (given in the question text above).
# Replace ... with the values from the table above.
Name_of_data_set <- data.frame(CaffeineLevel = c(247, 425))
# Access the column `CaffeineLevel`. This gives a numeric vector.
# Don't forget to also change the name of the data frame here.
Name_of_data_set$CaffeineLevel
[1] 247 425
# Enter your R code here!
# Boxplot
boxplot(CaffeineStudy$CaffeineLevel)
# IQR
IQR(CaffeineStudy$CaffeineLevel)
[1] 180
112
Null, Alternative
# Enter your R code here!
pbinom(4, 10, 0.5)
[1] 0.3769531
123
# Enter your R code here!
pbinom(c(2,3,4), 10, .5)
[1] 0.0546875 0.1718750 0.3769531
> 120
# View the entire data set, i.e. a data frame with several columns.
nicotine_level
# Access the column `Pre_exposure_level`. This gives a numeric vector.
nicotine_level$Pre_exposure_level
# Access the column `Pre_exposure_level`. This gives a numeric vector.
nicotine_level$Seven_day_level
Pre_exposure_level Seven_day_level
1 11.15 18.32
2 16.73 11.05
3 12.94 26.00
4 9.12 25.99
5 5.34 14.58
6 12.82 22.01
[1] 11.15 16.73 12.94 9.12 5.34 12.82
[1] 18.32 11.05 26.00 25.99 14.58 22.01
asdf
asdf
# Replace the y with the appropriate column name.
# Make sure to specify the correct alternative hypothesis.
wilcox.test(nicotine_level$Pre_exposure_level, nicotine_level$Seven_day_level, alternative = "g", paired = TRUE)
Wilcoxon signed rank exact test
data: nicotine_level$Pre_exposure_level and nicotine_level$Seven_day_level
V = 1, p-value = 0.9844
alternative hypothesis: true location shift is greater than 0
0.9844
!!!
d
k
d,a,b
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.