lecture15 notes

# Probability and Statistics for Engineering and the Sciences (with CD-ROM and InfoTrac )

• Notes
• PresidentHackerCaribou10582
• 1

This preview shows page 1. Sign up to view the full content.

Stat 312: Lecture 15 Two-sample t test Moo K. Chung [email protected] March 13, 2003 Concepts 1. Pooled sample variance: S 2 p = ( n - 1) S 2 X + ( m - 1) S 2 Y n + m - 2 . 2. Let X 1 , · · · , X n and Y 1 , · · · , Y m be two indepen- dent samples from normal distributions with the same population variance. The test statis- tic for testing H 0 : μ X = μ Y vs. H 1 : μ X 6 = μ Y T = ¯ X - ¯ Y - ( μ X - μ Y ) S p p 1 /n + 1 /m t n + m - 2 . Reject H 0 if | T | > t α/ 2 ,n + m - 2 . In-class problems Example 1. A study was conducted to compare the weights of cats and dogs. Weights of cats: 20, 21, 35, 13, 21, 10. Weights of dogs: 31, 10, 20, 40. Assume that the population variance to be same for both cats and dogs. Is there any difference between the weights of cats and dogs? > x<-c(20,21,35,13,21,10) > y<-c(31,10,20,40) > sqrt((5*var(x)+3*var(y))/8) [1] 10.52824 > t=(mean(x)-mean(y))/(10.53*sqrt(1/5+1/3)) > t [1] -0.6827026 > qt(0.05,8) [1] -1.859548 If you use R, it is very easy to do two sample hy- pothesis testing. >t.test(x,y,alternative="two.sided", var.equal=TRUE,conf.level=0.9) Two Sample t-test data:x and y t = -0.7725, df = 8, p-value = 0.462 alternative hypothesis: true difference in means is not equal to
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern