Universit´e Joseph Fourier L2/STA230
Lab 9: Statistical testing with one sample
Objectives: Compute statistical testing for one sample.
1 Statistical testing of an expectation
Exercise 1
1. UploadHER.txt, assign toEthe elbow breadth column, toWthe wrist breadth column.
2. Compute the summary of EandWand plot the distributions.
3. Compute a confidence interval of the expectations of EandWat a 90% confidence level. Comment.
4. Is the mean elbow breadth significantly larger than 6.3 in the whole population at a level of 5% ? among boys? among girls?
5. Is the mean wrist breadth significantly less than 5.8 in the whole population at a level of 5% ? among boys? among girls?
2 Statistical testing of a probability
Exercise 2
1. Upload the dataset HER.txt. Create a binary vector lowif wt(weight) is smaller than 70. Give the type of variablelow. Suggest a random variable to modellow. Compute the contingency table.
2. Test if half of the patients have a low weight using prop.test. Give the p-value and comment.
3. Apply this test only to girls.
4. Same question with boys. Comment.
3 Statistical testing of the variance
Exercise 3
1. Simulate a sample X of lengthn= 100 with a normal distribution with meanµ= 0 and standard deviation σ= 1.
2. Compute the p-value of the test at level 5% for comparing the empirical variance of X toσ20= 2, assuming the data are normal.