Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comparing Two Means t-tests: Rationale for the tests t-tests as a GLM

Similar presentations


Presentation on theme: "Comparing Two Means t-tests: Rationale for the tests t-tests as a GLM"— Presentation transcript:

1 Comparing Two Means t-tests: Rationale for the tests t-tests as a GLM
Independent Dependent (aka paired, matched) Rationale for the tests Assumptions t-tests as a GLM Interpretation Calculating an effect size Reporting results Robust methods

2 Comparing Two Means Two-sample hypotheses
A common situation is the comparison of the means of two populations Two sample t-test for the two tailed hypothesis: Data are the times (in minutes) that it takes blood to clot in experimental samples given two different drugs The question is: is the population of mean blood clotting times administered with drug B the same as the population mean for blood-clotting times of specimens given drug G.

3 Experiments The simplest form of experiment that can be done is an experiment with only one independent variable that is manipulated. More often than not, the manipulation of the independent variable involves having an experimental condition and a control. In this example we compare outcome under two different drugs. E.g., Is the movie Scream 2 scarier than the original Scream? Measure the level of anxiety of two groups of randomly selected theatre goers and compare them. These are the situations can be analysed with a t-test

4 t-test If the two samples came from two normally distributed populations and the variances of the populations are equal we can use a two sample t-test. Independent t-test Null hypothesis: mu1 = mu2. Also useful in significance testing using confidence intervals… Testing the significance of Pearson’s correlation coefficient Testing the significance of b in regression.

5 Testing the significance of b in regression

6 Rationale for the t-test 1
Two samples of data are collected and the sample means calculated. These means might differ by either a little or a lot. If the samples come from the same population, then we expect their means to be roughly equal. Although it is possible (even likely) for their means to differ by chance alone, we would expect large differences between sample means to occur very infrequently.

7 Rationale for the t-test 2
We compare: the difference between the sample means that we collected the difference between the sample means that we would expect to obtain if there were no effect (i.e. if the null hypothesis were true). We use the standard error as a gauge of the variability between sample means.

8 Rationale for the t-test 3
If the difference between the samples we have collected is larger than what we would expect based on the standard error then we can infer one of two things: There is no effect and sample means in our population fluctuate a lot (sampling error). By chance, collected two samples that are atypical of the population from which they came. The two samples come from different populations but are typical of their respective parent population. In this scenario, the difference between samples represents a genuine difference between the samples (and so the null hypothesis is incorrect). We are trying to infer – did the samples come from the same population!

9 Rationale for the t-test 4
If the observed difference between the sample means is large: The more confident we become that the second explanation is correct (i.e. that the null hypothesis should be rejected).

10 Rationale for the t-test 5
= observed difference between sample means expected difference between population means (if null hypothesis is true) estimate of the standard error of the difference between two sample means

11 Example Is arachnophobia (fear of spiders) specific to real spiders or is a picture enough? Participants 24 arachnophobic individuals Manipulation 12 participants were exposed to a real spider 12 were exposed to a picture of the same spider Outcome Anxiety

12 The t-test as a GLM “All statistical procedures are basically the same”
Outcomei = (model) + errori Consider an experiment where Groups were exposed to a “Picture of a Spider” and an “Actual Spider” The response variable is the level of Anxiety

13 Outcomei = (model) + errori
The independent variable has only two values “group 1” and “group 2” ie. The “real” and “picture” groups

14

15 Picture Group We can code the “dummy” variable The group variable = 0
Intercept = mean of baseline group

16 Real Spider Group The group variable = 1 b1 = Difference between means

17 Output from a Regression

18 The Independent t-test 1

19 The Independent t-test 2
The numerator is the difference between sample means Denominator is the standard error of the difference between the sample means a measure of the variability of the data within the two samples.

20 The Independent t-test 3
Where v1 and v2 are the degrees of freedom, v1 = n1 – 1 and v2 = n2 - 1

21 The Independent t-test 3
The test value is compared to the critical value at a given α Need to set Alpha value One or two- Tailed test? v1 = n1 – 1 and v2 = n2 - 1

22 Zar Example

23 Zar Example

24 Zar Example

25

26 Zar Example Determine test value
Determine critical value

27 One-tailed test Let us say a plant height-at-maturity is an important characteristic to us We do an experiment – subjecting plants to different types of fertilizer. Test: is mean height at maturity greater using the new fertilizer? mu1 and mu2 are the population means: mu 1 is the population with new fertilizer mu 2 is the population with the old fertilizer:

28 One-tailed test

29 One-tailed test

30 One-tailed test

31 Confidence Limits for Population Means These are based on the t-distribution
Lets take some of the example data that we have already seen: The 95% CI for mu2 would be:

32 Confidence Limits for Population Means
The 95% CI for mu2 would be: So we can declare with 95% Confidence that the population of blood clotting times after treatment with drug G, the population mean is in this interval.

33 Confidence Limits for Population Means
The 95% CI for mu2 would be: So we can declare with 95% Confidence that the population of blood clotting times after treatment with drug G, the population mean is in this interval.

34 When Assumptions are Broken
t-test Mann–Whitney test Robust tests Bootstrapping Trimmed means

35 Mann-Whitney “U” test Do not require estimation of mu and sigma.
No assumptions about distributions. RANKS of data. Two sample rank test Rank from highest to lowest, the greatest value in either group is given a one, second given a two….

36 Mann-Whitney “U” test n1

37 Mann-Whitney “U” test

38 Mann-Whitney “U” test

39 Mann-Whitney “U” test

40 Mann-Whitney “U” test


Download ppt "Comparing Two Means t-tests: Rationale for the tests t-tests as a GLM"

Similar presentations


Ads by Google