Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 t-Tests. History (from Wikipedia) Introduced in 1908 by William Sealy Gosset, a chemist working for the Guinness brewery in Dublin, Ireland.

Similar presentations


Presentation on theme: "Lecture 4 t-Tests. History (from Wikipedia) Introduced in 1908 by William Sealy Gosset, a chemist working for the Guinness brewery in Dublin, Ireland."— Presentation transcript:

1 Lecture 4 t-Tests

2 History (from Wikipedia) Introduced in 1908 by William Sealy Gosset, a chemist working for the Guinness brewery in Dublin, Ireland ("Student" was his pen name because his employer regarded their use of statistics as a trade secret). Gosset had been hired due to Claude Guinness's innovative policy of recruiting the best graduates from Oxford and Cambridge to apply biochemistry and statistics to Guinness' industrial processes. [2] Gosset devised the t-test as a way to cheaply monitor the quality of stout.William Sealy GossetGuinnessbreweryDublin, Irelandpen nameOxfordCambridgebiochemistrystatistics [2]stout Gosset’s t-test was ignored until placed on firmer mathematical footing by Ronald Fisher.

3 Usage Used to answer these questions: Are two data sets “equivalent”? Is the experiment repeatable? In other words --- allows us to compare TWO MEANS.

4 My First t-Test Is the modulus of the iris different in the axial direction from the circumferential direction? Yes

5 Requirements The t-test, equal variance requires that the errors associated with your data are normally distributed, and the two samples are independent (i.e., “unpaired”). Before-and-after testing (e.g., experimental drug) violates the independence requirement. Need a t-test for “paired” samples. Pairing can also happen through the use of additional variable (e.g., gender) The equal variance that is part of the test name (t-test, equal variance) implies that the variance in the population(s) behind the samples is equal.

6 Example Set 1: SimilarSet 2: Dissimilar 1a1b2a2b 5.1014.0644.0643.243 5.3166.1706.1702.950 5.9205.9485.9483.815 6.5635.8185.8182.738 4.7274.8714.8713.070 4.3345.9005.9002.316 2.7595.9515.9512.903 mean:4.9605.5325.5323.005 std. dev.:1.2200.7700.7700.461

7 Hypothesis: The t-test described here is a statistical test of these competing hypotheses: – H1 (Test Hypothesis): The population means behind the two samples are different. – H0 (Null Hypothesis): The population means behind the two samples are the same. A t-test is any statistical hypothesis test in which the test statistic follows a Student's t distribution if the null hypothesis is true.

8 In Excel… Excel 2007: Data tab / Analysis Group / Data Analysis button Choose t-Test: Two-Sample Assuming Equal Variance

9 Inputting…

10 Output… The important value is the two-tailed P-value.

11 What can we say? P two-tail = 0.315173, i.e., the probability of the null hypothesis is 31.5%. Since this is greater than α = 0.05, we fail to reject the null hypothesis (they are the same) and can say: we cannot conclude that the population means are different (with 95% confidence) we cannot conclude that the samples are not “equivalent” we cannot conclude that the experiment is not repeatable That is as close as we can come to saying the two samples are “equivalent” based on a t-test.

12 N.B. (Note Well!) “we fail to reject the null hypothesis” …is not the same as… “we accept the null hypothesis that they are the same”! Informally, if P > 0.05, we say things like “the means are likely the same”, but this is not precisely correct.

13 Second (dissimilar) data set… P two-tail = 7.79x10 -6. Since this is less than α = 0.05, we reject the null hypothesis and can say: the population means behind the two samples are different (with greater than 95% confidence) the samples are not “equivalent” the experiment is not repeatable

14 Picture Mean does not fall within the tails of the other distribution

15 Picture Mean falls within the tails of the other distribution

16 Informally… We have two different sets of data…e.g., blood pressure for 20 people on a drug and 20 people on sugar pills. If P < 0.05 we say the differences are significant, and If P > 0.05 we say they are insignificant. Alas, we live in a world where no one cares if two means are the same or just slightly different. In other words, informally, “fail to reject” becomes “accept”.

17 Warning If the P value > 0.05, we fail to reject the Null hypothesis, so we can say “we could not conclude that the population means are different”, “we could not conclude that the new data is not consistent with the published value”, or “the experimental mean is not significantly different from the published value” WE SHOULD NOT SAY: “we conclude that the experimental value agrees with the published value”, but many people do say this.

18 Notes Some students perform a t-test and include all three statements (bullet items) in their report. Don’t do that – pick the one statement that fits with your report. The “one-tail” P values are used for “less- than” or “greater-than” t-tests.

19 One-sided t-Test Calculated by the same process in Excel. For a one-sided t-test, the hypotheses being tested are: H 0 (Null Hypothesis) – the population means μ 1 and μ 2 are equal H A (Alternate (or test) Hypothesis) – the population mean μ 1 is less than population mean μ 2 Because of the “less than” comparison, you have to be careful which data set you call group 1 and which you call group 2.

20 One-sided t-Test In general a test is called two-sided or two- tailed if the null hypothesis is rejected for values of the test statistic falling into either tail of its sampling distribution, and it is called one- sided or one-tailed if the null hypothesis is rejected only for values of the test statistic falling into one specified tail of its sampling distributionnull hypothesissampling distributionnull hypothesissampling distribution

21 Question Should the one-tail P-value or the two-tail P- value be smaller?

22 Question Should the one-tail P-value or the two-tail P- value be smaller? One tail because you are only comparing values in one-direction (i.e., one-tail). You’re simply comparing whether two means are equal or one is less than the other --- never consider if one value is greater than the other in the one-tail test.

23 t-Test, unequal variance A t-test can be performed to see if the population means behind two data sets (samples) are similar enough to conclude that they could have come from the same population. One of those data sets might have a mean value with zero standard deviation – that is, it might be a constant.

24 t-Test, unequal variance This t-test is used to answer this question: Is my experimental result “equivalent to” (or “consistent with”) a published value? …informally Requires: the errors associated with your data are normally distributed, and the two samples are independent (unpaired).

25 Hypotheses H1 (Test Hypothesis): The population means behind the two samples are different – implying that the new data is inconsistent with the published value being tested. H0 (Null Hypothesis): The population means behind the two samples are the same – implying that the new data is consistent with the published value being tested.

26 In Excel…

27 Excel results… we could not conclude that the new data is not consistent with the published value of 43% Most engineers would say that the new data supports the published value of 43% efficiency.

28 Different published value… the new data is not consistent with the published value of 49%

29 Notes Saying that the new data is “consistent” with the published result of 43% efficiency does not mean that the new data is inconsistent with every other value. In fact, the new data shown in Table 1 is consistent with efficiencies ranging from 43% to 47%. t-Tests are “simpler” for saying two things are different than for saying two means are the same.

30 Statistically Significant ≠ Significant

31

32

33 References 2 biggest mistakes… – Failing to reference statements/claims that are not common knowledge. Cite anything you (or another student) look up. – Putting references in footnotes (is it 1980?). Put references inline with a complete list at the end. – Example: “… [1]”, numbered reference – Example: “… (Lamport, 1994)”, author-date – Example: “… (Lamport, p. 18)”, author-page

34 Reference List Grose, T. K. and J.A. Doe, “Engineering their Way to the Top,” ASEE Prism 12 (September 2002), p. 20. List all authors with initials (list only first author in the inline citation).

35 Reference List Grose, T. K. and J.A. Doe, “Engineering their Way to the Top,” ASEE Prism 12 (September 2002), p. 20. Article or chapter title in quotes

36 Reference List Grose, T. K. and J.A. Doe, “Engineering their Way to the Top,” ASEE Prism 12 (September 2002), p. 20. Book or journal title in italic

37 Reference List Grose, T. K. and J.A. Doe, “Engineering their Way to the Top,” ASEE Prism, 12(1), 2002, p. 20. Volume, issue (if available), year, pages

38 References Other examples… Grose, T. K. and J.A. Doe, “Engineering their Way to the Top,” ASEE Prism 12(1), 2002, p. 20. Hibbeler, R. C., Engineering Mechanics. Statics & Dynamics, 9 th ed., Prentice-Hall, Inc., Upper Saddle River, New Jersey, 2001, p. 82. Sir Winston Churchill, Quotes and Stories (no date), Retrieved March 30, 2003, from http://www.winstonchurchill.org/index.html. Turabian, K. L., J.B. Smith, and J.A. Doe, A Manual for Writers of Term Papers, Theses, and Dissertations, 5 th ed., The University of Chicago Press, Chicago, Illinois, 1987, pp. 127-144. I often move the (date) after the authors. The INFO pack uses a slight variation Any option is fine, be consistent and complete


Download ppt "Lecture 4 t-Tests. History (from Wikipedia) Introduced in 1908 by William Sealy Gosset, a chemist working for the Guinness brewery in Dublin, Ireland."

Similar presentations


Ads by Google