STAT0006 Week 2 practical exercise

A researcher has tested two treatments, A and B, each on 10 rats. The treatments were assigned randomly to each rat. After treating the rats she makes measurements of some physiological index that she expects to be affected by the treatments. Neither the treatment or the measurements made are invasive: the rats are perfectly safe and happy!
The measurements are given in the table below, and are available in a separate .csv file for you to load into R for your convenience.
Treatment A Treatment B
11.9 12.4
14.6 15.7
11.4 13.1
9.7 11.8
4.2 7.4
9.2 9.7
8.5 8.9
11.2 12.2
11.5 13.8
14.3 13.5

Complete the following tasks.
You should write your answers directly in this file.
If you wish, you can delete the actual questions once answered so that you have a ‘clean’ file with
only your analysis and commentary. It’s up to you.
Your computer practical on Friday will extend this analysis here, so it is important to complete this
before Friday.
Conducting a hypothesis test 

Research hypothesis and appropriate statistical test
The research hypothesis is whether the mean physiological index differs between treatment A (denoted ) and treatment B (denoted ).
Write down an appropriate hypothesis.
Explain why a two-sample t-test would be appropriate.
What assumptions must we make in order to carry out a two-sample t-test on the above data?
How would you check if these assumptions were reasonable?
The two-sample t-test
Carry out the two-sample t-test procedure and find the associated p-value. You can use the following
function to do so t.test(treatA, treatB, paired = FALSE, var.equal = TRUE)
What does paired = FALSE do, and what does paired = TRUE do? Would the latter be suitable
here, and why?
What does var.equal = TRUE do? What if you selected var.equal = FALSE ? If you can
change the status of var.equal , what does this tell you about the assumptions you wrote above?
Assuming from now on that var.equal = TRUE , what is the test statistic?
What is the resulting p-value?
Conclusion for the two-sample t-test
Make a conclusion in context about the hypothesis that was tested.
What is the p-value?
How do you interpret the p-value?
What does this tell you about treatments A and B in the context of the mean physiological index?
Confidence interval for the difference between two means
Note that the function t.test above automatically gives the relevant 95% confidence interval for the
difference between the two means in question. You can change the level of confidence by adding e.g. the argument conf.level=0.99 to the function t.test (this would, of course, give a 99% confidence
Write down the 95% confidence interval for the difference in means between treatment A and B.
Interpret this 95% confidence interval in context. That is, what does it tell you about the effects of
treatments A and B?
Using the confidence interval alone (i.e. not the result of the t-test above), is there any evidence of a
difference between treatments A and B?
Connecting confidence intervals with t- tests 

Is there a connection between confidence intervals for the difference between means and the result
of a two-sample t-test?
Why is checking for zero in the confidence interval of interest here?
Do the following confidence intervals contain zero? Don’t calculate them just yet, but you can
afterwards to check your answers.
90% confidence interval;
99% confidence interval;
60% confidence interval;
The alternative hypothesis
The original alternative hypothesis
You should have carried out a two-sided two-sample t-test above. The p-value was calculated by
considering the following area under the density:

Leave a Comment

Your email address will not be published. Required fields are marked *