Biostatistics, statistical software IV

Slides:



Advertisements
Similar presentations
“Students” t-test.
Advertisements

Hypothesis Testing. To define a statistical Test we 1.Choose a statistic (called the test statistic) 2.Divide the range of possible values for the test.
Chapter 8 Hypothesis Testing
Hypothesis: It is an assumption of population parameter ( mean, proportion, variance) There are two types of hypothesis : 1) Simple hypothesis :A statistical.
Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and Alternative Hypotheses Type I and Type II Errors Type I and Type II Errors.
1 1 Slide STATISTICS FOR BUSINESS AND ECONOMICS Seventh Edition AndersonSweeneyWilliams Slides Prepared by John Loucks © 1999 ITP/South-Western College.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
EPIDEMIOLOGY AND BIOSTATISTICS DEPT Esimating Population Value with Hypothesis Testing.
PSY 307 – Statistics for the Behavioral Sciences
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Lecture 9: One Way ANOVA Between Subjects
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Basic Business Statistics.
T-Tests Lecture: Nov. 6, 2002.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Inferences About Process Quality
Chapter 9 Hypothesis Testing.
Statistics for Managers Using Microsoft® Excel 5th Edition
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Statistical Inference Dr. Mona Hassan Ahmed Prof. of Biostatistics HIPH, Alexandria University.
AM Recitation 2/10/11.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Hypothesis Testing:.
Experimental Statistics - week 2
Overview Definition Hypothesis
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Business Statistics,
Fundamentals of Hypothesis Testing: One-Sample Tests
Hypothesis testing – mean differences between populations
Education 793 Class Notes T-tests 29 October 2003.
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
More About Significance Tests
Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Comparing Two Population Means
Jan 17,  Hypothesis, Null hypothesis Research question Null is the hypothesis of “no relationship”  Normal Distribution Bell curve Standard normal.
1 CSI5388: Functional Elements of Statistics for Machine Learning Part I.
Two Sample Tests Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Week 111 Power of the t-test - Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 7 representative gardens.
Hypothesis tests III. Statistical errors, one-and two sided tests. One-way analysis of variance. 1.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
Statistical Inference
Statistical estimation, confidence intervals
Biostatistics, statistical software III. Population, statistical sample. Probability, probability variables. Important distributions. Properties of the.
Biostatistics, statistical software VII. Non-parametric tests: Wilcoxon’s signed rank test, Mann-Whitney U-test, Kruskal- Wallis test, Spearman’ rank correlation.
Confidence intervals and hypothesis testing Petter Mostad
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
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.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Welcome to MM570 Psychological Statistics
Chapter 10 The t Test for Two Independent Samples
Statistical Analysis II Lan Kong Associate Professor Division of Biostatistics and Bioinformatics Department of Public Health Sciences December 15, 2015.
© Copyright McGraw-Hill 2004
The t-distribution William Gosset lived from 1876 to 1937 Gosset invented the t -test to handle small samples for quality control in brewing. He wrote.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Understanding Basic Statistics Fourth Edition By Brase and Brase Prepared by: Lynn Smith Gloucester County College Chapter Nine Hypothesis Testing.
Chapter 7 Inference Concerning Populations (Numeric Responses)
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 8 th Edition Chapter 9 Hypothesis Testing: Single.
Chapter 10: The t Test For Two Independent Samples.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Hypothesis Testing: Hypotheses
Chapter 9 Hypothesis Testing.
Chapter 9 Hypothesis Testing.
Comparing Populations
Presentation transcript:

Biostatistics, statistical software IV Biostatistics, statistical software IV. Statistical estimation, confidence intervals. Hypothesis tests. One-and two sample t-tests. Krisztina Boda PhD Department of Medical Informatics, University of Szeged

Statistical estimation A parameter is a number that describes the population (its value is not known). For example:  and  are parameters of the normal distribution N(,) n, p are parameters of the binomial distribution  is parameter of the Poisson distribution Estimation: based on sample data, we can calculate a number that is an approximation of the corresponding parameter of the population. A point estimate is a single numerical value used to approximate the corresponding population parameter. For example, the sample mean is an estimation of the population’s mean, . approximates  approximates  INTERREG

Interval estimate, confidence interval Interval estimate: a range of values that we think includes the true value of the population parameter (with a given level of certainty) . Confidence interval: an interval which contains the value of the (unknown) population parameter with high probability. The higher the probability assigned, the more confident we are that the interval does, in fact, include the true value. The probability assigned is the confidence level (generally: 0.90, 0.95, 0.99 ) INTERREG

Interval estimate, confidence interval (cont.) „high” probability: the probability assigned is the confidence level (generally: 0.90, 0.95, 0.99 ). „small” probability: the „error” of the estimation (denoted by ) according to the confidence level is 1-0.90=0.1, 1-0.95=0.05, 1-0.99=0.01 The most often used confidence level is 95% (0.95), so the most often used value for  is =0.05 INTERREG

The confidence interval is based on the concept of repetition of the study under consideration http://www.kuleuven.ac.be/ucs/java/index.htm If the study were to be repeated 100 times, of the 100 resulting 95% confidence intervals, we would expect 95 of these to include the population parameter. INTERREG

is a (1-)100% confidence interval for . Formula of the confidence interval for the population’s mean  when  is known It can be shown that is a (1-)100% confidence interval for . u/2 is the /2 critical value of the standard normal distribution, it can be found in standard normal distribution table for =0.05 u/2 =1.96 for =0.01 u/2 =2.58 95%CI for the population’s mean INTERREG

The standard error of mean (SE or SEM) is called the standard error of mean Meaning: the dispersion of the sample means around the (unknown) population’s mean. When  is unknown, the standard error of mean can be estimated from the sample by: A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2). INTERREG

Formula of the confidence interval for the population’s mean when  is unknown When  is unknown, it can be estimated by the sample SD (standard deviation). But, if we place the sample SD in the place of , u/2 is no longer valid, it also must be replace by t/2 . So is a (1-)100 confidence interval for . t/2 is the /2 critical value of the Student's t statistic with n-1 degrees of freedom with n-1 degrees of freedom (see next slide) INTERREG

t-distributions (Student’s t-distributions) df=19 df=200 INTERREG

The Student’s t-distribution For =0.05 and df=12, the critical value is t/2 =2.179 INTERREG

Student’s t-distribution Degrees of freedom: 8 INTERREG

Student’s t-distribution Degrees of freedom: 10 INTERREG

Student’s t-distribution Degrees of freedom: 20 INTERREG

Student’s t-distribution Degrees of freedom: 100 INTERREG

Student’s t-distribution table Two sided alfa Degrees of freedom 0.2 0.1 0.05 0.02 0.01 1 3.077683537 6.313752 12.7062 31.82052 63.65674 2 1.885618083 2.919986 4.302653 6.964557 9.924843 3 1.637744352 2.353363 3.182446 4.540703 5.840909 4 1.533206273 2.131847 2.776445 3.746947 4.604095 5 1.475884037 2.015048 2.570582 3.36493 4.032143 6 1.439755747 1.94318 2.446912 3.142668 3.707428 7 1.414923928 1.894579 2.364624 2.997952 3.499483 8 1.39681531 1.859548 2.306004 2.896459 3.355387 9 1.383028739 1.833113 2.262157 2.821438 3.249836 10 1.372183641 1.812461 2.228139 2.763769 3.169273 11 1.363430318 1.795885 2.200985 2.718079 3.105807 INTERREG

Student’s t-distribution table two sided alfa degrees of freedom 0.2 0.1 0.05 0.02 0.01 0.001 1 3.077683537 6.313752 12.7062 31.82052 63.65674 636.6192 2 1.885618083 2.919986 4.302653 6.964557 9.924843 31.59905 3 1.637744352 2.353363 3.182446 4.540703 5.840909 12.92398 4 1.533206273 2.131847 2.776445 3.746947 4.604095 8.610302 5 1.475884037 2.015048 2.570582 3.36493 4.032143 6.868827 6 1.439755747 1.94318 2.446912 3.142668 3.707428 5.958816 7 1.414923928 1.894579 2.364624 2.997952 3.499483 5.407883 ... … 100 1.290074761 1.660234 1.983971 2.364217 2.625891 3.390491 500 1.283247021 1.647907 1.96472 2.333829 2.585698 3.310091 1000000 1.281552411 1.644855 1.959966 2.326352 2.575834 3.290536 INTERREG

Example 1. We wish to estimate the average number of heartbeats per minute for a certain population. The mean for a sample of 13 subjects was found to be 90, the standard deviation of the sample was SD=15.5. Supposed that the population is normally distributed the 95 % confidence interval for : =0.05, SD=15.5 Degrees of freedom: df=n-1=13 -1=12 t/2 =2.179 The lower limit is 90 – 2.179·15.5/√13=90-2.179 ·4.299=90-9.367=80.6326 The upper limit is 90 + 2.179·15.5/√13=90+2.179 ·4.299=90+9.367=99.367 The 95% confidence interval for the population mean is (80.63, 99.36) It means that the true (but unknown) population means lies it the interval (80.63, 99.36) with 0.95 probability. We are 95% confident the true mean lies in that interval. INTERREG

Example 2. We wish to estimate the average number of heartbeats per minute for a certain population. The mean for a sample of 36 subjects was found to be 90, the standard deviation of the sample was SD=15.5. Supposed that the population is normally distributed the 95 % confidence interval for : =0.05, SD=15.5 Degrees of freedom: df=n-1=36-1=35 t /2=2.0301 The lower limit is 90 – 2.0301·15.5/√36=90-2.0301 ·2.5833=90-5.2444=84.755 The upper limit is 90 + 2.0301·15.5/√36=90+2.0301 ·2.5833=90+5.2444=95.24 The 95% confidence interval for the population mean is (84.76, 95.24) It means that the true (but unknown) population means lies it the interval (84.76, 95.24) with 0.95 probability. We are 95% confident the true mean lies in that interval. INTERREG

Example INTERREG

Presentation of results INTERREG

Hypothesis testing Hypothesis: a statement about the population Based on our data (sample) we conclude to the whole phenomenon (population) We examine whether our result (difference in samples) is greater then the difference caused only by chance. INTERREG

Hypothesis Hypothesis: a statement about the population Examples H1: =16 (the population mean is 16) H2:  ≠16 (the population mean is not 16) H3: B=G (boys and girls score the same on mathematics exams) H4: B≠G (boys and girls score differently on mathematics exams) Statisticians usually test the hypothesis which tells them what to expect by giving a specific value to work with. They refer to this hypothesis as the null hypothesis and symbolize it as H0. The null hypothesis is often the one that assumes fairness, honesty or equality. The opposite hypothesis is called alternative hypothesis and is symbolized by Ha. This hypothesis, however, is often the one that is of interest. INTERREG

Steps of hypothesis-testing Step 1. State the motivated (alternative) hypothesis Ha. Step 2. State the null hypothesis H0. Step 3. You select the probability of „error”, or the α significance level. α =0.05 or α =0.01. Step 4. You choose the size n of the random sample Step 5. Select a random sample from the appropriate population and obtain your data. Step 6. Calculate the decision rule. Step 7. Decision. a) Reject the null hypothesis and claim that your alternative hypothesis was correct the difference is significant at α100% level. b) Fail to reject the null hypothesis correct the difference is not significant at α 100% level . INTERREG

Testing the mean  of a sample drawn from a normal population: one sample t-test Problem, data. The normal value of the systolic blood pressure is 120 mm Hg. The following are the systolic blood pressures (mm Hg) of n=9 patients undergoing drug therapy for hypertension. 182.00 152.00 178.00 157.00 194.00 163.00 144.00 114.00 174.00 Summary statistics The mean=162 mmHg, the standard deviation SD=23.92 . Question Can we conclude with 95% confidence on the basis of these data that the population mean is =120? HO: the population mean is 120, =120 Ha: the population mean is not 120 , 120 Assumption: the sample is drawn from a normally distributed population INTERREG

Decision rule based on confidence interval Find the 95% CI for the above data! α=0.05 mean=162 SD=23.92 The standard error, SE=SD/ n=7.97 t8,0.05=2.306) The confidence interval: (mean - t*SE, mean + t * SE )=(162-2.306*23.92/9, 162+2.306*7.97)=(143.61,180.386) Can we conclude with 95% confidence on the basis of these data that the population mean is =120? No, because the confidence interval does not contain 120. Decision rule based on confidence interval: is the given number (the number in the null hypothesis) in the confidence interval? If yes: the difference is not significant at α level If not: the difference is significant at α level In our case 120 is not in the 95%Ci, the difference is significant at 5% level. INTERREG

Decision rule based on t-value Calculate t= (mean - c)/SE=(162-120)/7.97=5.26. Degrees of freedom: n-1=9-1=8 Compare the absolute value of the calculated t to the critical t-value in the table: t8,0.05=2.306 5.26>2.306 Decision rule: if |t|>ttable, the difference is significant at α level if |t|<ttable, the difference is not significant at α level The acceptance (non-rejection) region is the set of values for which we accept the null hypothesis (- ttable, ttable) The critical region (rejection region) is the set of values for which the null hypothesis is rejected. Acceptance region t=5.26 INTERREG

Decision rule based on p-value The probability, computed assuming that H0 is true, that the test statistic would take a value as extreme or more extreme than that actually observed. Decision: If p<, then the difference is significant at  level If p>, then the difference is not significant at  level In our case the difference is significant at 5% level, because p=0.001<0.05 INTERREG

One-sample t-test, example A company produces a 16 ml bottle of some drug (solution). The bottles are filled by an automated bottle-filling process. If this process is substantially overfilling or under filling bottles, then this process must be shut down and readjusted. Overfilling results in lost profits for the company, while under filling is unfair to consumers. For a given adjustment of the bottles consider the infinite population of all the bottle fills that could potentially be produced. We let denote the mean of the infinite population of all the bottle fills. The company has decided that it will shut down and readjust the process if it can be very certain that the mean fill is above or below the desired 16 ml. Now suppose that the company observes the following sample of n=6 bottle fills: 15.68, 16.00, 15.61, 15.93, 15.86, 15.72 It can be verified that this sample has mean=15.8 and standard deviation s=0.156. Question: Is it true that the mean bottle fill in the population is 16? INTERREG

INTERREG

INTERREG

A one-sample t test for paired differences (paired t-test) INTERREG

Comparison of the means of two related samples: paired t-test Self-control experiment (measure the data before and after the treatment on the same patient) or Related data: Before treatment – after treatment Left side – right side Matched pairs Null hypothesis: the two sample means are approximations of the same population mean (there is no treatment-effect, the difference is only by chance) HO: before= after or difference= 0 Alternative hypothesis: there is a treatment effect HA: before≠ after or difference≠ 0 INTERREG

Comparison of the means of two related samples: paired t-test (cont.) Calculation: take the difference of the two samples, calculate the mean and SE of the differences Fix  The paired t-test is a one-sample t-test for the differences. The decision rule is based on: Confidence interval for the mean difference Calculation of t-value and comparison its absolute value with the ttable p-value (software) INTERREG

Paired t-test, example A study was conducted to determine weight loss, body composition, etc. in obese women before and after 12 weeks of treatment with a very-low-calorie diet . We wish to know if these data provide sufficient evidence to allow us to conclude that the treatment is effective in causing weight reduction in obese women. The mean difference is actually 4. Is it a real difference? Big or small? If the study were to be repeated, would we get the same result or less, even 0? Before After Difference 85 86 -1 95 90 5 75 72 3 110 100 10 81 75 6 92 88 4 83 83 0 94 93 1 88 82 6 105 99 6 Mean 90.8 86.8 4. SD 10.79 9.25 3.333 INTERREG

Paired t-test, example (cont). Idea: if the treatment is not effective, the mean sample difference is small (close to O), if it is effective, the mean difference is big. HO: before= after or difference= 0 HA: before≠ after or difference≠ 0 Let =0. Degrees of freedom=10-1=9, t0.05,9=2.262 Mean=4, SD=3.333 SE=3.333/10=1.054 INTERREG

Paired t-test, example (cont.) Decision based on confidence interval: 95%CI:(4-2.262*1.054, 4+2.262*1.054)=(1.615, 6.384) If H0 were true, 0 were inside the confidence interval Now 0 is outside the confidence interval, the difference is significant at 5% level, the treatment was effective. The mean loss of body weight was 4 kg, which could be even 6.36 but minimum 1.615, with 95% probability. INTERREG

tcomputed, test statistic Decision based on test statistic (t-value): t= (mean - 0)/SE=mean/SE=4/1.054=3.795. This t has to be compared to the critical t-value in the table. |t|=3.795>2.262(=t0.05,9), the difference is significant at 5% level Decision based on p-value: p=0.004, p<0.05, the difference is significant at 5% level Acceptance region tcomputed, test statistic ttable, critical value INTERREG

Testing the mean of two independent samples from normal populations: two-sample t-test Control group, treatment group Male, female Ill, healthy Young, old etc. Assumptions: Independent samples : x1, x2, …, xn and y1, y2, …, ym the xi-s are distributed as N(µ1, 1) and the yi-s are distributed as N µ2, 2 ). H0: 1=2, Ha: 12 INTERREG

The case when the standard deviations are equal Assumptions: 1. Both populations are approximately normal. 2. The variances of the two populations are equal ( 1=  1 =  ). That is the xi-s are distributed as N(µ1,) and the yi-s are distributed as N(µ2,) H0: 1=2, Ha: 12 If H0 is true, then has Student’s t distribution with n+m-2 degrees of freedom. Decision: If |t|>tα,n+m-2, the difference is significant at α level, we reject H0 If |t|<tα,n+m-2, the difference is not significant at α level, we do not reject H0 . INTERREG

The case when the standard deviations are not equal Both populations are approximately normal. 2. The variances of the two populations are not equal ( 1  1 ). That is the xi-s are distributed as N(µ1, 1) and the yi-s are distributed as N(µ2, 2) H0: 1=2, Ha: 12 : If H0 is true, then has Student t distribution with df degrees of freedom. Decision: If |t|>tα,n+m-2, the difference is significant at α level, we reject H0 If |t|<tα,n+m-2, the difference is not significant at α level, we do not reject H0 . INTERREG

Comparison of the variances of two normal populations: F-test Ha:1 > 2 (one sided test) F: the higher variance divided by the smaller variance: Degrees of freedom: 1. Sample size of the nominator-1 2. Sample size of the denominator-1 Decision based on F-table If F>Fα,table, the twp variances are significantly different at α level INTERREG

Table of the F-distribution α=0.05 Nominator-> Denominator| INTERREG

Example INTERREG

Result of SPSS INTERREG

Two sample t-test, example. A study was conducted to determine weight loss, body composition, etc. in obese women before and after 12 weeks in two groups: Group I. treatment with a very-low-calorie diet . Group II. no diet Volunteers were randomly assigned to one of these groups. We wish to know if these data provide sufficient evidence to allow us to conclude that the treatment is effective in causing weight reduction in obese women compared to no treatment. INTERREG

Two sample t-test, cont. Data INTERREG

Two sample t-test, example, cont. HO: diet=control, (the mean change in body weights are the same in populations) Ha: diet control (the mean change in body weights are different in the populations) Assumptions: normality (now it cannot be checked because of small sample size) Equality of variances (check: visually compare the two standard deviations) INTERREG

Two sample t-test, example, cont. Assuming equal variances, compute the t test- statistic: t==2.477 Degrees of freedom: 10+11-2=19 Critical t-value: t0.05,19=2.093 Comparison and decision: |t|=2.477>2.093(=t0.05,19), the difference is significant at 5% level p=0.023<0.05 the difference is significant at 5% level INTERREG

Example from the literature Circulation,2004;109:1212-1214. INTERREG

INTERREG

Step1. H0, HA Basic Question is: Are these two groups different? Formalized as H0: p1 = p2 (null, no difference) HA: p1 ≠ p2 (alternative, it is what we want to prove) or H0: 1 = 2 (null, no difference) HA: 1 ≠ 2 (alternative, it is what we want to prove) The formalization of H0 and HA depends on the data type and on the measure of the endpoint. INTERREG

Step 2. Fix   is generally chosen to be 0.05 It represents the mistake of our later decision when reject H0. INTERREG

Step 3. Decide the sample size n The sample size depends on… The objective(s) of the research (estimation, hypothesis test, …) Main outcome: categorical or continuous; one or more, primary or secondary, and the estimation of the distribution of the outcome – based on earlier trials. Probability of type I. error, - see later The power of the test (1-) (1- probability of type II. error) –see later The research design effect size of clinical importance … INTERREG

Step 4. Collect data (perform the experiment) INTERREG

Step 5. Decision rule Test statistic: the summary statistics (signal/noise) of the data used in decision making between H0 and Ha. Compute the t-statistic. When the null hypothesis is true, the probability distribution of the test statistic (null distribution) is known . Based on the null distribution, the critical values can be found according to the given . . the p-value can be computed (probability of the observed test statistic as is or more extreme in either direction when the null hypothesis is true). INTERREG

Step 4. Decision. Decision based on p-value If p<α: statistical significance at α level. H0 is rejected in favour of Ha. If p≥ α : non-significance at α level. H0 cannot be rejected. Decision based on test statistic compare the computed t-value to the critical t-value. The difference is significant, if the absolute value of the test statistics > critical t-value Decision based on confidence interval the confidence interval does not contain 0 INTERREG

Compare the mean age in the two groups! The sample means are „similar”. Is this small difference really caused by chance? INTERREG

Step 1. Step 2. Step 3. Step 4. Decision. H0: the means in the two populations are equal: 1=2 HA: the means in the two populations are not equal: 1≠2 Step 2. Let α=0.05 Step 3. Decision rule: two-sample t-test. Step 4. Decision. Decision based on test statistic: Compute the test statistics: t=-1.059, the degrees of freedom is 14+13-2=25 ttable=2.059 |t|=1.059<2.059, the difference is not significant at 5% level. p=0.28, p>0.05, the difference is not significant at 5% level. INTERREG

How to get the p-value? If H0 is true, the computed test statistic has a t-distribution with 25 degrees of freedom. Then with 95% probability, the t-value lies in the „acceptance region” Check it: now t=-1.059 0.025 0.95 0.025 ttable, critical value INTERREG

tcomputed, test statistic How to get the p-value? If H0 is true, the computed test statistic has a t-distribution with 25 degrees of freedom Then with 95% probability, the t-value lies in the „acceptance region” Check it: now t=-1.059 The p-value is the shaded area, p=0.28. The probability of the observed test statistic as is or more extreme in either direction when the null hypothesis is true. 0.025 0.95 0.025 tcomputed, test statistic ttable, critical value INTERREG

Review questions and exercises Problems to be solved by hand-calculations ..\Handouts\Problems hand IV.DOC, ..\Handouts\Practice_t-test.doc Solutions ..\Handouts\Problems hand IV solutions.DOC, ..\Handouts\Practice_t-test, solutions.doc Problems to be solved using computer ..\Handouts\PRACT4M.DOC INTERREG

Main tests to compare two groups Comparing means, normality supposed (t-tests) Paired samples (before-after treatment, left side-right side, etc.): paired t-test Independent samples (control-treatment, treatment 1 – treatment 2, etc): two-sample t-test Comparing means medians, normality not supposed : nonparametric tests, e.g. tests based on ranks Paired samples : Wilcoxon test Independent samples Mann-Whitney U-test Comparing „percentages” (frequencies): Paired samples : chi-squared test Independent samples: McNemar test INTERREG