I need your help please to answer question C ANSWER TO b) IN MATLAB >> [h,p,ci,s
ID: 3065754 • Letter: I
Question
I need your help please to answer question C
ANSWER TO b) IN MATLAB
>> [h,p,ci,stats]=ttest(diff1)
h =
1
p =
1.3084e-08
ci =
-16.8340
-8.7248
stats =
struct with fields:
tstat: -6.2626
df: 89
sd: 19.3587
Question 1 7 marks In an experiment concerned with methods of measuring blood pressure, systolic blood pres- sure in mmHg was measured for each of 90 randomly selected people, once using a machine that automatically measures blood pressure and once using conventional equipment with a human operator. The data are available in the file systolic.scsv. The purpose of the following analysis is to determine whether machine measurements are systematically different from the human measurements 1 (a) Explain briefly why the data should be treated as paired rather than two independent samples 3 (b) Use MATLAB to perform a matched pairs t-test. Ptate the value of the test statistic, the reference distribution with appropriate degrees of freedom, and the P-value. Do you reject or retain the null hypothesis at the 5% level of significance? Make sure to include the code you used in MATLAB to run the test, along with the output (do NOT include any code used to import/write out data) 3 (c) Determine if the assumptions of the test are metExplanation / Answer
The assumption in a matched pair t-test is that the pairwise differences must constitute a random sample from a normal distribution.
There are many methods to test whether a sample comes from a normal distribution. Some of them are
- Kolmogorov-Smirnov test
- Lilliefors test
- Anderson-Darling test