Using Statistics To Make Inferences 4

Slides:



Advertisements
Similar presentations
Independent t -test Features: One Independent Variable Two Groups, or Levels of the Independent Variable Independent Samples (Between-Groups): the two.
Advertisements

Two-Sample Inference Procedures with Means
Analysis of variance (ANOVA)-the General Linear Model (GLM)
5/15/2015Slide 1 SOLVING THE PROBLEM The one sample t-test compares two values for the population mean of a single variable. The two-sample test of a population.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Inference for distributions: - Comparing two means IPS chapter 7.2 © 2006 W.H. Freeman and Company.
PSY 307 – Statistics for the Behavioral Sciences
3.11 Using Statistics To Make Inferences 3 Summary Review the normal distribution Z test Z test for the sample mean t test for the sample mean Thursday,
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Independent t-Test CJ 526 Statistical Analysis in Criminal Justice.
7.11 Using Statistics To Make Inferences 7 Summary Single sample test of variance. Comparison of two variances. Monday, 22 June 20159:52 PM.
Don’t spam class lists!!!. Farshad has prepared a suggested format for you final project. It will be on the web
Linear Regression and Correlation Analysis
Chapter 11: Inference for Distributions
Two-sample problems for population means BPS chapter 19 © 2006 W.H. Freeman and Company.
Hypothesis Testing Using The One-Sample t-Test
CHAPTER 19: Two-Sample Problems
AP Statistics Section 13.1 A. Which of two popular drugs, Lipitor or Pravachol, helps lower bad cholesterol more? 4000 people with heart disease were.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Hypothesis testing – mean differences between populations
Ch 10 Comparing Two Proportions Target Goal: I can determine the significance of a two sample proportion. 10.1b h.w: pg 623: 15, 17, 21, 23.
Lesson Comparing Two Means.
AP STATISTICS LESSON 11 – 2 (DAY 1) Comparing Two Means.
Comparing Two Population Means
Chapter 10: Inferences Involving Two Populations.
Chapter 10 Comparing Two Means Target Goal: I can use two-sample t procedures to compare two means. 10.2a h.w: pg. 626: 29 – 32, pg. 652: 35, 37, 57.
CHAPTER 18: Inference about a Population Mean
Basic Statistics Inferences About Two Population Means.
T-TEST Statistics The t test is used to compare to groups to answer the differential research questions. Its values determines the difference by comparing.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
Two-Sample Inference Procedures with Means. Of the following situations, decide which should be analyzed using one-sample matched pair procedure and which.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
AP Statistics Section 13.1 A. Which of two popular drugs, Lipitor or Pravachol, helps lower bad cholesterol more? 4000 people with heart disease were.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
Two sample problems:  compare the responses in two groups  each group is a sample from a distinct population  responses in each group are independent.
6/4/2016Slide 1 The one sample t-test compares two values for the population mean of a single variable. The two-sample t-test of population means (aka.
3.11 Using Statistics To Make Inferences 3 Summary Review the normal distribution Z test Z test for the sample mean t test for the sample mean Wednesday,
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Independent t-Test CJ 526 Statistical Analysis in Criminal Justice.
© Copyright McGraw-Hill 2000
1 Inference about Two Populations Chapter Introduction Variety of techniques are presented whose objective is to compare two populations. We.
Lesson Comparing Two Means. Knowledge Objectives Describe the three conditions necessary for doing inference involving two population means. Clarify.
AP Statistics Chapter 24 Comparing Means.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Fall 2002Biostat Statistical Inference - Proportions One sample Confidence intervals Hypothesis tests Two Sample Confidence intervals Hypothesis.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 26 Chapter 11 Section 1 Inference about Two Means: Dependent Samples.
1-Sample t-test Amir Hossein Habibi.
Independent Samples T-Test. Outline of Today’s Discussion 1.About T-Tests 2.The One-Sample T-Test 3.Independent Samples T-Tests 4.Two Tails or One? 5.Independent.
Analysis of Variance STAT E-150 Statistical Methods.
+ Unit 6: Comparing Two Populations or Groups Section 10.2 Comparing Two Means.
Learning Objectives After this section, you should be able to: The Practice of Statistics, 5 th Edition1 DESCRIBE the shape, center, and spread of the.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Chapter 7 Inference Concerning Populations (Numeric Responses)
Of the following situations, decide which should be analyzed using one-sample matched pair procedure and which should be analyzed using two-sample procedures?
Objectives (PSLS Chapter 18) Comparing two means (σ unknown)  Two-sample situations  t-distribution for two independent samples  Two-sample t test 
Statistical hypothesis Statistical hypothesis is a method for testing a claim or hypothesis about a parameter in a papulation The statement H 0 is called.
Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks.
Two-Sample Hypothesis Testing
Lecture Slides Elementary Statistics Twelfth Edition
Two-Sample Inference Procedures with Means
Comparing Two Means: Paired Data
Lesson Comparing Two Means.
Comparing Two Means: Paired Data
Hypothesis Testing: The Difference Between Two Population Means
Section 10.2 Comparing Two Means.
Presentation transcript:

Using Statistics To Make Inferences 4 Summary   Two sample t test Paired comparisons Assignment 1 Mike Cox, Newcastle University, me fecit 16/02/2015 1 Sunday, 16 April 2017 10:56 PM

To perform and interpret a two sample t test Practical Summary To perform and interpret a two sample t test   Practical Perform two sample t tests 2

Comparison Of Two Sample Means The null hypothesis is that the two populations are identical. In that case they would have the same means. That is μ1 = μ2 Notation Standard deviation of two samples Size of two samples Mean of two samples Note, assess if s1 and s2 are numerically close. We will test this later in the course. But which is most appropriate, s1 or s2? 3

Key Equations Pooled standard deviation t test statistic degrees of freedom Note the degrees of freedom match the divisor in the pooled standard deviation. This is consistent with the equivalent one sample test. 4

Confidence Interval with ν = (n1–1)+(n2-1) degrees of freedom Sample mean of difference n1 n2 Sample sizes ν Degrees of freedom, (n1–1)+(n2-1) s Pooled standard deviation α Proportion of occasions that the true mean lies outside the range tν Critical value of t from tables Don’t forget to multiply or divide before you add or subtract 4.5

Confidence Interval with ν = (n1–1)+(n2-1) degrees of freedom Sample mean of difference n1 n2 Sample sizes ν Degrees of freedom, (n1–1)+(n2-1) s Pooled standard deviation α Proportion of occasions that the true mean lies outside the range tν Critical value of t from tables 4.6

Example 1 In a clinical test the following scores were obtained for “normal” and “diseased” patients. Normal 10.3 11.8 12.6 8.6 9.2 10.1 10.2 7.4 Diseased 10.1 12.7 14.3 13.6 9.8 15.0 11.2 11.4 H0 is that μ1 = μ2 H1 is that μ1 ≠ μ2 under a two tail test 7

Calculations 1 8

Calculations 1 9

Conclusion 1 ν p=0.05 p=0.025 p=0.005 p=0.0025 14 1.761 2.145 2.977 3.326 3.787 t14(0.025) = 2.145 and t14(0.005) = 2.977 In an attempt to “estimate” p. Since 0.01 < p < 0.05 (two tail test) the result is significant at the 5% level. The null hypothesis is rejected and the mean levels are apparently different. 10

SPSS 1 Analyze > Compare Means > Independent Samples t Test 11

SPSS 1 Analyze > Compare Means > Independent Samples t Test Note the need to define the groups (normal/diseased) 12

SPSS 1 Basic descriptive statistics 13

SPSS 1 The method described here assumes equal variances. More of this later in the course. Note the p value is less than .05 Note the confidence interval excludes 0 14

Excel 1 The same p value as on the previous slide Note the final parameters. 2 – two tailed 2 – type – assuming equal variances 4.15 15

Boxplot of Normal, Diseased 16

Example 2 A study of 22 patients suffering from Parkinsons disease was conducted. An operation was performed on 8 of them, while it improved their general condition it might adversely affect their speech. In the data a higher value indicates a greater difficulty in speaking. Operated 2.6 2.0 1.7 2.7 2.5 2.6 2.5 3.0 Others 1.2 1.8 1.9 2.3 1.3 3.0 2.2 1.3 1.5 1.6 1.3 1.5 2.7 2.0 17

Calculation 2 18

Calculation 2 19

Conclusion 2 ν p=0.05 p=0.025 p=0.005 p=0.0025 20 1.725 2.086 2.845 3.153 3.552 t20(0.025) = 2.086 and t20(0.005) = 2.845 In an attempt to “estimate” p. Since 0.01 < p < 0.05 (two tail test) the result is significant at the 5% level. The null hypothesis is rejected, the operation appears to affect speech. 20

SPSS 2 The method described here assumes equal variances. More of this later in the course. Note the p value is less than .05 Note the confidence interval excludes 0 21

Excel 2 The same p value as on the previous slide. 22 4.22

Boxplot of Operated, Others 23

Practical In most cases we identified a difference, as in the previous two examples. This need not always be the case. Note that in the practical we examine two case studies in one, on waiting times between eruptions of the Old Faithful geyser, the evidence (see the next three slides) suggests the two means are equal. 24

Practical Waiting times between eruptions of Old Faithful geyser for two different periods are given. Is there evidence that the waiting times tend to be longer for one of the periods than for the other? WT1 Minutes between eruptions 1/8 to 5/8/, 1985 WT2 Minutes between eruptions 6/8 to 10/8, 1985 25

SPSS 3 The method described here assumes equal variances. More of this later in the course. Note the p value is greater than .05 Note the confidence interval includes 0 26

Boxplot of WT1, WT2 27

Paired Comparisons - Example 3 Certain mental tasks are performed before and after exercise. The scores for each subject were recorded. Subject 1 2 3 4 5 6 7 8 9 10 Exercise 46 38 62 54 42 37 55 52 41 39 Relaxed 53 60 58 49 34 65 47 43 We want to test the difference, so subtract. Does exercise have an effect? 28

Paired Comparisons - Example 3 Certain mental tasks are performed before and after exercise. The scores for each subject were recorded. Subject 1 2 3 4 5 6 7 8 9 10 Exercise 46 38 62 54 42 37 55 52 41 39 Relaxed 53 60 58 49 34 65 47 43 Difference -2 -3 Perform a one sample t-test on the difference. No effect implies a zero value. 29

Calculation 3 Differences (d) 7 8 -2 4 7 -3 10 1 6 4 n = 10 7 8 -2 4 7 -3 10 1 6 4 n = 10 Σd = 7 + 8 + ... + 6 + 4 = 42 Σd2 = 72 + 82 + ... + 62 + 42 = 344 n = 10 Σd = 42 Σd2 = 344 30

Calculation 3 n = 10 Σd = 42 Σd2 = 344 31

Calculation 3 The population value being tested is zero. Exercise claimed to have no effect. Note the degrees of freedom match the divisor in the standard deviation (see vard on the previous slide). 32

Conclusion 3 ν 9 t9(0.025) = 2.262 and t9(0.005) = 3.250 p=0.05 p=0.025 p=0.005 p=0.0025 9 1.833 2.262 3.250 3.690 4.297 t9(0.025) = 2.262 and t9(0.005) = 3.250 In an attempt to “estimate” p. Since 0.01 < p < 0.05 (two tail test) the result is significant at the 5% level. The null hypothesis is rejected, the mean performance levels appear to differ. 33

SPSS 3 Transform > Compute Variable 34

SPSS 3 Transform > Compute Variable 35

SPSS 3 Analyze > Compare Means > One Sample t Test Note the test value is 0, no difference. 36

SPSS 3 Note the p value is less than .05 Note the confidence interval excludes 0 37

SPSS 3 Or directly as a t test on paired samples Analyze > Compare Means > Paired Samples t Test Some additional output are generated 38

SPSS 3 39

SPSS 3 Note the p value is less than .05 Note the confidence interval excludes 0 Of course the result is unchanged 40

Excel 3 The same p value as on the previous slide. Note the final parameter. 1 – type – paired values 4.41 41

Normal Approximation For greater than 30 degrees of freedom the Students t distribution is well approximated by the standard normal distribution. You will notice that the final row in most Students t tables simply give the normal values. Skip review 4.42 42

SPSS t Tests The software offers three options which will now be reviewed One Sample t Test Independent Samples t Test Paired Samples t Test 43

One-Sample t Test The One-Sample t Test procedure tests whether the mean of a single variable differs from a specified constant. 44

One-Sample t Test Examples A researcher might want to test whether the average IQ score for a group of students differs from 100. A cereal manufacturer can take a sample of boxes from the production line and check whether the mean weight of the samples differs from 1.3 pounds at the 95% confidence level. 45

One-Sample t Test Statistics For each test variable: mean, standard deviation, and standard error of the mean. The average difference between each data value and the hypothesized test value, a t test that tests that this difference is 0, and generates a confidence interval for this difference (you can specify the confidence level). 46

One-Sample t Test Data To test the values of a quantitative variable against a hypothesized test value, choose a quantitative variable and enter a hypothesized test value. 47

One-Sample t Test Assumptions This test assumes that the data are normally distributed; however, this test is fairly robust to departures from normality. 48

One-Sample t Test To Obtain a One-Sample t Test From the menus choose: Analyse Compare Means One-Sample t Test Select one or more variables to be tested against the same hypothesized value. Enter a numeric test value against which each sample mean is compared. Optionally, click Options to control the treatment of missing data and the level of the confidence interval. 49

Independent-Samples t Test The Independent-Samples t Test procedure compares means for two groups of cases. Ideally, for this test, the subjects should be randomly assigned to two groups, so that any difference in response is due to the treatment (or lack of treatment) and not to other factors. 50

Independent-Samples t Test This is not the case if you compare average income for males and females. A person is not randomly assigned to be a male or female. In such situations, you should ensure that differences in other factors are not masking or enhancing a significant difference in means. Differences in average income may be influenced by factors such as education (and not by sex alone). 51

Independent-Samples t Test Example Patients with high blood pressure are randomly assigned to a placebo group and a treatment group. The placebo subjects receive an inactive pill, and the treatment subjects receive a new drug that is expected to lower blood pressure. After the subjects are treated for two months, the two-sample t test is used to compare the average blood pressures for the placebo group and the treatment group. Each patient is measured once and belongs to one group. 52

Independent-Samples t Test Statistics For each variable: sample size, mean, standard deviation, and standard error of the mean. For the difference in means: mean, standard error, and confidence interval (you can specify the confidence level). Tests: Levene's test for equality of variances and both pooled-variances and separate-variances t tests for equality of means. 53

Independent-Samples t Test Data The values of the quantitative variable of interest are in a single column in the data file. The procedure uses a grouping variable with two values to separate the cases into two groups. The grouping variable can be numeric (values such as 1 and 2 or 6.25 and 12.5) or short string (such as yes and no). As an alternative, you can use a quantitative variable, such as age, to split the cases into two groups by specifying a cut point (cut point 21 splits age into an under-21 group and a 21-and-over group). 54

Independent-Samples t Test Assumptions For the equal-variance t test, the observations should be independent, random samples from normal distributions with the same population variance. For the unequal-variance t test, the observations should be independent, random samples from normal distributions. The two-sample t test is fairly robust to departures from normality. When checking distributions graphically, look to see that they are symmetric and have no outliers. 55

Independent-Samples t Test To Obtain an Independent-Samples t Test From the menus choose: Analyse Compare Means Independent-Samples t Test. Select one or more quantitative test variables. A separate t test is computed for each variable. Select single groupings variable, and then click Define Groups to specify two codes for the groups that you want to compare. Optionally, click Options to control the treatment of missing data and the level of the confidence interval. 56

Paired-Samples t Test The Paired-Samples t test procedure compares the means of two variables for a single group. The procedure computes the differences between values of the two variables for each case and tests whether the average differs from 0. 57

Paired-Samples t Test Example In a study on high blood pressure, all patients are measured at the beginning of the study, given a treatment, and measured again. Thus, each subject has two measures, often called before and after measures. 58

Paired-Samples t Test Example An alternative design for which this test is used is a matched-pairs or case-control study, in which each record in the data file contains the response for the patient and also for his or her matched control subject. In a blood pressure study, patients and controls might be matched by age (a 75-year-old patient with a 75-year-old control group member). 59

Paired-Samples t Test Statistics For each variable: mean, sample size, standard deviation, and standard error of the mean. For each pair of variables: correlation, average difference in means, t tests, and confidence interval for mean difference (you can specify the confidence level). Standard deviation and standard error of the mean difference. 60

Paired-Samples t Test Data For each paired test, specify two quantitative variables (interval level of measurement or ratio level of measurement). For a matched-pairs or case-control study, the response for each test subject and its matched control subject must be in the same case in the data file. 61

Paired-Samples t Test Assumptions Observations for each pair should be made under the same conditions. The mean differences should be normally distributed. Variances of each variable can be equal or unequal. 62

Paired-Samples t Test To Obtain a Paired-Samples t Test From the menus choose: Analyse Compare Means Paired-Samples t Test. Select one or more pairs of variables Optionally, click Options to control the treatment of missing data and the level of the confidence interval. 63

Read Read Howitt and Cramer pages 109-133 Read Howitt and Cramer (e-text) pages 189-201 Read Russo (e-text) pages 151-158 Read Davis and Smith pages 237-264 64

Practical 4 This material is available from the module web page. http://www.staff.ncl.ac.uk/mike.cox Module Web Page 65

Instructions for the practical This material for the practical is available. Instructions for the practical Practical 4 Material for the practical Practical 4 66

Assignment See Stage I Handbook Assignments submitted in hard copy only Some modules may involve assignments that are completed on paper only and do not require electronic submission. If the submission is only in paper format you will hand it in at the School Office with a cover sheet attached. 67

Whoops! The Conservatives have been accused of being “totally out of touch” after claiming more than half of girls in the most deprived areas of Britain fell pregnant before their 18th birthday. However, official figures for those areas suggested that the number of under-18 girls who got pregnant was more like 54 per 1,000. 5.4% not 54%!! Telegraph  15 Feb 2010 68

Whoops! Explain yourself! 69