Universit´e Joseph Fourier L2/STA230
Lab 10: Statistical testing with two samples
Objectives: Compute statistical testing for two independent or paired samples.
1 Statistical testing of two paired samples
Exercise 1
The spreadsheet secretin.txt contains data from a glucose response experiment. Secretin is a hormone of the duodenal mucous membrane. An extract was administered to patients with arterial hypertension. Double registrations of blood glucose were quantified for each patient with two different determination tools.
1. Upload the data set. Assign the two data series toBlood1andBlood2.
2. Perform the standard descriptive analysis of both vectors of data. Propose some plots to compare the two samples.
3. Define the null and alternative hypothesis of a test of the difference between the two registrations.
Is it a two-tailed or one-tailed test ? Construct the decision rule to rejectH0, for a givenα.
4. Decide ifH0 is rejected or not for the two different determination tools using t.test(Blood1, Blood2, paired=TRUE)
2 Statistical testing of two independent samples
Exercise 2
1. The spreadsheet HER.txtcontains health data from 80 patients. Upload the dataset. Assign BMI (body mass index) to the vector B.
2. We want to compare the BMI between girls and boys.
(a) Perform the standard descriptive analysis of both vectors of data. Propose some plots to compare the two samples.
(b) Test if the distributions are normal withshapiro.test.
(c) Introduce random variables to describe the variable BMIand the two samples. What are the unknown parameters ?
(d) First, we test if the two variances are equal in the two populations
i. Define the null and alternative hypotheses. Give the statistic of the test and its distribution under H0. Describe the decision rule.
ii. Decide if H0 is rejected or not with your data withvar.test.
(e) Second, we test if the BMI means are the same for girls and boys.
i. Define the null and alternative hypotheses. Give the statistic of the test and its distribution under H0. Describe the decision rule.
ii. Decide if H0 is rejected or not with your data witht.test.
3. We want to compare the arm circumference (arm) between treated and non treated patients. Apply the previous methodology to decide if the circumference is significantly different between treated and non treated patients.
2