Part 1 2016/11/22 Vincent Guillemot Hypothesis testing Part 1 2016/11/22 Vincent Guillemot
Preliminary reminders / remarks
Central-Limit Theorem The means of a great number of samples follow a Gaussian law, even if those samples follow a different law.
William S. Gosset
Student's t-distribution... ... with 𝑑 degrees of freedom, is the distribution of a random variable 𝑇 such that: 𝑇= 𝑁(0,1) 1 𝑑 𝜒 2 (𝑑) Why is this interesting? Because mean 1 size standard−deviation ∼Student(size−1)
Confidence intervals
What does it represent? If the experiment was repeated a great number of times, most of the estimated parameters (of interest) would belong to this interval.
Significance level 𝛼 Is equivalent of an error risk. Usually, 𝛼=0,05. However, its value depends on the domain of application.
Confidence interval on the mean For a sample of size 𝑛, with mean 𝑚 and standard deviation 𝑠… 𝑚−1,96 𝑠 𝑛 ;𝑚+1,96 𝑠 𝑛
Confidence interval on the mean - 2 More precision if we use Mr Gosset’s distribution: 𝑚− 𝑡 𝑛−1;1− 𝛼 2 𝑠 𝑛 ;𝑚+ 𝑡 𝑛−1;1− 𝛼 2 𝑠 𝑛
Exercise Use the function called t.test to compute the confidence interval of the mean ‘non dominant arm strength difference’ of the ‘CC’ individuals.
Statistical hypothesis testing Vocabulary
Sir Ronald Fisher
Hypotheses Examples: drug > placebo? is the new fertilizer more efficient? Is there a linear relationship between size and weight? Two hypotheses : null hypothesis, noted 𝐻 0 , in general a statu quo! alternative hypothesis, notéd 𝐻 1 or 𝐻 𝐴 .
Statistic Under the null hypothesis, we know the distribution of a ceryain value computed from the data, called the statistic. To each test corresponds a statistic (Student, Z-test, Khi etc.).
Two types of errors 𝛼: reject 𝐻 0 when it’s true. 𝛽: ‘accept’ 𝐻 0 even though it is not true.
p-value Is equal to the probability that the obtained statistic is even more extreme compared to its theoretical distribution under the null hypothesis. To take a decision: the null is rejected as soon as the p-value is inferior to 𝛼.
tests on one or several means
Test that the mean is different from a reference value Null: the mean is equal to 𝜇 0 , Alternative: the mean is different, mean− 𝜇 0 1 𝑛 variance
Exercise When you used the function called t.test to compute the confidence interval of the mean ‘non dominant arm strength difference’ of the ‘CC’ individuals, what was the ‘single mean’ test that was performed and what was its result?
Test that two samples have the same means– 1 Mean of sample 1 : 𝑚 1 , variance of sample 1 : 𝑠 1 2 Mean of sample 2 : 𝑚 2 , variance of sample 2 : 𝑠 2 2 Size of both samples: 𝑛 𝑚 1 − 𝑚 2 1 𝑛 𝑣 1 + 𝑣 2 ∼Student(2𝑛−2)
Test that two samples have the same means– 2 Use the version that does not make the assumption that the variances are the same.
Exercise Compare the mean ‘non dominant arm strength difference’ of the ‘CC’ and the ‘CT’ individuals.
Power analysis Use the function power.t.test to compute the necessary sample size to have a significant result with different effect sizes. What is the shape of the resulting function ? Use plot to have a better look !