COGS 14B: INTRODUCTION TO STATISTICAL ANALYSIS

Similar documents
Sampling Distributions: Central Limit Theorem

Hypothesis testing: Steps

Sampling distribution of t. 2. Sampling distribution of t. 3. Example: Gas mileage investigation. II. Inferential Statistics (8) t =

The One-Way Independent-Samples ANOVA. (For Between-Subjects Designs)

Hypothesis testing: Steps

The t-statistic. Student s t Test

Two-Sample Inferential Statistics

AMS7: WEEK 7. CLASS 1. More on Hypothesis Testing Monday May 11th, 2015

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs)

PSYC 331 STATISTICS FOR PSYCHOLOGISTS

POLI 443 Applied Political Research

Multiple t Tests. Introduction to Analysis of Variance. Experiments with More than 2 Conditions

Keppel, G. & Wickens, T.D. Design and Analysis Chapter 2: Sources of Variability and Sums of Squares

Difference between means - t-test /25

1. What does the alternate hypothesis ask for a one-way between-subjects analysis of variance?

Introduction to Business Statistics QM 220 Chapter 12

10/4/2013. Hypothesis Testing & z-test. Hypothesis Testing. Hypothesis Testing

Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs

Lecture 14. Analysis of Variance * Correlation and Regression. The McGraw-Hill Companies, Inc., 2000

Lecture 14. Outline. Outline. Analysis of Variance * Correlation and Regression Analysis of Variance (ANOVA)

This document contains 3 sets of practice problems.

EXAM 3 Math 1342 Elementary Statistics 6-7

The t-test: A z-score for a sample mean tells us where in the distribution the particular mean lies

5 Basic Steps in Any Hypothesis Test

INTRODUCTION TO ANALYSIS OF VARIANCE

CIVL /8904 T R A F F I C F L O W T H E O R Y L E C T U R E - 8

STAT Chapter 9: Two-Sample Problems. Paired Differences (Section 9.3)

COSC 341 Human Computer Interaction. Dr. Bowen Hui University of British Columbia Okanagan

PSY 216. Assignment 9 Answers. Under what circumstances is a t statistic used instead of a z-score for a hypothesis test

An inferential procedure to use sample data to understand a population Procedures

Lab #12: Exam 3 Review Key

Variance Estimates and the F Ratio. ERSH 8310 Lecture 3 September 2, 2009

Review. One-way ANOVA, I. What s coming up. Multiple comparisons

Testing a Claim about the Difference in 2 Population Means Independent Samples. (there is no difference in Population Means µ 1 µ 2 = 0) against

Analysis of Variance (ANOVA)

Notes for Week 13 Analysis of Variance (ANOVA) continued WEEK 13 page 1

HYPOTHESIS TESTING. Hypothesis Testing

Chapter 7 Comparison of two independent samples

POLI 443 Applied Political Research

Inferences for Regression

Statistics Primer. ORC Staff: Jayme Palka Peter Boedeker Marcus Fagan Trey Dejong

1 Descriptive statistics. 2 Scores and probability distributions. 3 Hypothesis testing and one-sample t-test. 4 More on t-tests

Harvard University. Rigorous Research in Engineering Education

Chapter 24. Comparing Means

CHAPTER 9: HYPOTHESIS TESTING

What Does the F-Ratio Tell Us?

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

We need to define some concepts that are used in experiments.

Question. Hypothesis testing. Example. Answer: hypothesis. Test: true or not? Question. Average is not the mean! μ average. Random deviation or not?

Chapter Seven: Multi-Sample Methods 1/52

STAT Chapter 8: Hypothesis Tests

Independent Samples ANOVA

Pooled Variance t Test

TA: Sheng Zhgang (Th 1:20) / 342 (W 1:20) / 343 (W 2:25) / 344 (W 12:05) Haoyang Fan (W 1:20) / 346 (Th 12:05) FINAL EXAM

Stat 529 (Winter 2011) Experimental Design for the Two-Sample Problem. Motivation: Designing a new silver coins experiment

Tests about a population mean

Questions 3.83, 6.11, 6.12, 6.17, 6.25, 6.29, 6.33, 6.35, 6.50, 6.51, 6.53, 6.55, 6.59, 6.60, 6.65, 6.69, 6.70, 6.77, 6.79, 6.89, 6.

Chapter 9 Inferences from Two Samples

16.3 One-Way ANOVA: The Procedure

Much of the material we will be covering for a while has to do with designing an experimental study that concerns some phenomenon of interest.

Chapter 10: Analysis of variance (ANOVA)

Statistical Inference. Why Use Statistical Inference. Point Estimates. Point Estimates. Greg C Elvers

Factorial Analysis of Variance

7.2 One-Sample Correlation ( = a) Introduction. Correlation analysis measures the strength and direction of association between

Acknowledge error Smaller samples, less spread

Analysis of variance (ANOVA) Comparing the means of more than two groups

Hypothesis Testing. Hypothesis: conjecture, proposition or statement based on published literature, data, or a theory that may or may not be true

Lecture 10: Comparing two populations: proportions

Hypothesis Testing and Confidence Intervals (Part 2): Cohen s d, Logic of Testing, and Confidence Intervals

Chapter 12 - Lecture 2 Inferences about regression coefficient

Analysis of Variance (ANOVA)

Estimating a Population Mean

Single Sample Means. SOCY601 Alan Neustadtl

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

The Purpose of Hypothesis Testing

A proportion is the fraction of individuals having a particular attribute. Can range from 0 to 1!

Regression With a Categorical Independent Variable: Mean Comparisons

Chapter. Hypothesis Testing with Two Samples. Copyright 2015, 2012, and 2009 Pearson Education, Inc. 1

CBA4 is live in practice mode this week exam mode from Saturday!

ANOVA - analysis of variance - used to compare the means of several populations.

The t-distribution. Patrick Breheny. October 13. z tests The χ 2 -distribution The t-distribution Summary

What is Experimental Design?

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

Last two weeks: Sample, population and sampling distributions finished with estimation & confidence intervals

Inference About Means and Proportions with Two Populations

The t-test Pivots Summary. Pivots and t-tests. Patrick Breheny. October 15. Patrick Breheny Biostatistical Methods I (BIOS 5710) 1/18

COMPARING SEVERAL MEANS: ANOVA

Inferences About Two Proportions

The independent-means t-test:

Statistical Inference for Means

Note: k = the # of conditions n = # of data points in a condition N = total # of data points

PLSC PRACTICE TEST ONE

Chapter 9. Hypothesis testing. 9.1 Introduction

Hypothesis T e T sting w ith with O ne O One-Way - ANOV ANO A V Statistics Arlo Clark Foos -

t test for independent means

Lecture 7: Hypothesis Testing and ANOVA

CHAPTER 10 ONE-WAY ANALYSIS OF VARIANCE. It would be very unusual for all the research one might conduct to be restricted to

z and t tests for the mean of a normal distribution Confidence intervals for the mean Binomial tests

Last week: Sample, population and sampling distributions finished with estimation & confidence intervals

10/31/2012. One-Way ANOVA F-test

Transcription:

COGS 14B: INTRODUCTION TO STATISTICAL ANALYSIS TA: Sai Chowdary Gullapally scgullap@eng.ucsd.edu Office Hours: Thursday (Mandeville) 3:30PM - 4:30PM (or by appointment) Slides: I am using the amazing slides made by Joey :) for most of the questions. Feel free to mail anytime regarding doubts.

Hypothesis Testing: What are we actually doing? What is the intuition?

A not so different scenario: Let us assume we have a variable x (could be anything like length, heights etc) Further assume that we know x has one of the following probability densities given below, but unfortunately we do not know which one is the correct one. So what is the best thing we can do to guess? TAKE A SAMPLE AND SEE!!!! And then??

Type I Error: Type II Error: Sampling Distributions H 0 is true, but we reject it (probability set by α) H 1 is true, but we retain H 0 (probability given by β!) hypothesized True β Type II error α

Type I Error: Type II Error: Sampling Distributions H 0 is true, but we reject it (probability given by α) H 1 is true, but we retain H 0 (probability given by β more later!) hypothesized True Type II error Power: Probability of detecting a particular effect (i.e., rejecting H 0 when it is false). β α Alternative Hypothesis H 1 POWER

Name some factors that affect the power of a statistical test. Which of these factors does the experimenter have control over?

Hypothesis Testing Summary (so far) Z test t test (one sample) t test (2 independent samples) Use when: Statistical hypotheses (two-tailed) Test statistic You want to compare a sample mean to the mean of a population with a known standard deviation You want to compare one sample mean to the (hypothesized) mean of a population with an unknown standard deviation You want to compare means of two independent samples taken from different populations (with unknown standard deviations) H 0 : μ = μ 0 H 0 : μ = μ 0 H 0 : μ 1 μ 2 = 0 H 1 : μ μ 0 H 1 : μ μ 0 H 1 : μ 1 μ 2 0 z = t = Distribution z distribution (standard normal) t distribution with n-1 degrees of freedom t distribution with n 1 + n 2 2 degrees of freedom

A random sample of college seniors received special training on how to take the GRE. After analyzing their scores, an investigator reported a dramatic gain relative to the national average of 500, as indicated by a 95% confidence interval of 507 to 527. Are the following interpretations true or false? a) About 95% of all subjects scored between 507 and 527. b) The interval from 507 to 527 refers to a set of possible values of the population mean for all students who undergo special training. True False c) The true population mean is definitely between 507 and 527. False d) This particular interval contains the population mean about 95% of the time. False e) In practice, we never really know whether the interval from 507 to 527 is true or false. True (f) We can be reasonably confident that the population mean is between 507 and 527. True

Hypothesis Testing Summary (so far) Use when: Statistical hypotheses (two tailed) Test statistic T-test (repeated measures) You want to compare means between two groups in a repeated measures design (or paired design) H 0 : μ D = 0 H 1 : μ D 0 Distribution t distribution with n 1 degrees of freedom (n is # of pairs)

The following the are the test performances of the same group of 6 people, obtained while using caffeine and without it. Does Caffeine increase test performance?

The following the are the test performances of the same group of 6 people, obtained while using caffeine and without it. Does Caffeine increase test performance? H 0 : μ D = 0 H 1 : μ D > 0 Degrees of Freedom: 6-1=5 t critical =2.015 t=4.110 Reject H 0

Hypothesis Testing Summary (so far) Use when: Statistical hypotheses Test statistic ANOVA (one-way, between subjects) You want to test whether there are any differences between multiple (>2) population means H 0 : μ 0 = μ 1 = μ 2 = = μ n H 1 : H 0 is false Why not multiple T-tests? Distribution F distribution (df between and df within ) Can you use ANOVA to test a directional hypothesis?

What is SS total, what is SS within, what is SS between, how are they related? (a) Group 1 Group 2 Group 3 3 2 1 5 3 4 5 6 7

Textbook 17.6 A psychologist tests whether shy college students initiate more eye contacts with strangers because of training sessions in assertive behavior. Assume the 8 subjects, coded A, B,, G, H are tested repeatedly after zero, one, two, and three training sessions. The results are expressed as the number of eye contacts: Subj. Zero One Two Three A 1 2 4 7 B 0 1 2 6 C 0 2 3 6 D 2 4 6 7 E 3 4 7 9 F 4 6 8 10 G 2 3 5 8 H 1 3 5 7 T subj 14 T group 13 25 40 60 G = 138 9 11 19 23 28 18 16 Given: SS between = 154.12 SS within = 132.75 SS total = 286.87

Source SS df MS F Between 154.12 3 51.37 16.62 Within 132.75 28 - - Subject 67.87 7 - - Error 64.88 21 3.09 Total 286.87 31 - Reject H 0 Trainings have an effect on number of eye contacts initiated

Source SS df MS F Between 154.12 3 51.37 16.62 Within 132.75 28 - - Subject 67.87 7 - - Error 64.88 21 3.09 Total 286.87 31 - Effect size:

Textbook 17.6 A psychologist tests whether shy college students initiate more eye contacts with strangers because of training sessions in assertive behavior. Assume the 8 subjects, coded A, B,, G, H are tested repeatedly after zero, one, two, and three training sessions. The results are expressed as the number of eye contacts: Multiple Comparisons: Subj. Zero One Two Three A 1 2 4 7 B 0 1 2 6 C 0 2 3 6 D 2 4 6 7 E 3 4 7 9 F 4 6 8 10 G 2 3 5 8 X H 1 3 5 7 group 1.625 3.125 5 7.5 So Group 3 is different from Groups 0, 1, 2. Group 2 is different from Group 0.

ANOVA process:

Textbook 17.6 A psychologist tests whether shy college students initiate more eye contacts with strangers because of training sessions in assertive behavior. Assume the 8 subjects, coded A, B,, G, H are tested repeatedly after zero, one, two, and three training sessions. The results are expressed as the number of eye contacts: Subj. Zero One Two Three A 1 2 4 7 B 0 1 2 6 C 0 2 3 6 D 2 4 6 7 E 3 4 7 9 F 4 6 8 10 G 2 3 5 8 H 1 3 5 7 X group 1.625 3.125 5 7.5 Effect size: Example: Size of effect between 0 trainings and 3 trainings. Could also do effect size between 0 and 2 trainings, 1 and 3 trainings, etc

Things to look out for: Alternate hypothesis in Anova Confidence interval is always taken as per two tailed test table Calculating HSD(remember to take the proper degrees of freedom for q)

A few more solved questions:

An investigator wishes to determine whether alcohol consumption causes a deterioration in the performance of automobile drivers. Before the driving test, subjects drink a glass of orange juice, which, in the case of the treatment group, is laced with two ounces of vodka. Performance is measured by the number of errors made on a driving simulator. A total of 120 subjects are randomly assigned, in equal numbers, to the two groups. For subjects in the treatment group, the mean number of errors equals 26.4, and for subjects in the control group, the mean number of errors equals 18.6. The estimated standard error equals 2.4. H 0 : μ T μ C 0 H 1 : μ T μ C > 0 Decision rule: Reject H 0 at the 0.05 level of significance, if t 1.671 with 118 degrees of freedom. Interpretation: t test for two independent samples! (directional or non-directional?) = (26.4 18.6) 0 2.4 = 3.25 Decision: Alcohol consumption causes an increase in mean performance errors in a driving simulator. Reject H 0.

An investigator wishes to determine whether alcohol consumption causes a deterioration in the performance of automobile drivers. Before the driving test, subjects drink a glass of orange juice, which, in the case of the treatment group, is laces with two ounces of vodka. Performance is measured by the number of errors made on a driving simulator. A total of 120 subjects are randomly assigned, in equal numbers, to the two groups. For subjects in the treatment group, the mean number of errors equals 26.4, and for subjects in the control group, the mean number of errors equals 18.6. The estimated standard error equals 2.4. Specify the p-value for this test result. p < 0.001 Calculate a 95% confidence interval for the true population mean difference and interpret this interval. (X T X C ) ± t conf (s x1 x2 ) [3, 12.6] Use Cohen s d to estimate the effect size, given that the pooled standard deviation s p equals 13.15. Is this a large, medium, or small effect? X 1 X 2 26.4 18.6 d = 2 s p = 13.15 = 0.59 Medium effect

Ex. 1 - A psychologist tests whether a series of workshops on assertive training increases eye contacts initiated by shy college students in controlled interactions with strangers. A total of 32 subjects are randomly assigned, 8 to a group, to attend either 0, 1, 2, or 3 workshop sessions. Use the given information to complete the ANOVA summary table below. SOURCE SS df MS F Between 154.12 Within 132.75 3 28 31 51.37 4.74 10.84 Total 286.87 X X X

Ex. 2 - Students were given different drug treatments before studying for their midterm. Some were given a memory drug, some a placebo drug, and some no treatment. The midterm scores (%) are shown below for the three different groups. At the 0.05 level of significance, do any of the treatments have an effect? X = 83.4 X = 50 X = 16.6 Not all the means are the same treatment has some effect.

Ex. 2 - Students were given different drug treatments before studying for their midterm. Some were given a memory drug, some a placebo drug, and some no treatment. The midterm scores (%) are shown below for the three different groups. At the 0.05 level of significance, do any of the treatments have an effect? Group Totals (T) 417 250 83 Grand total (G) = 750 ANOVA Summary Table SOURCE SS df MS F Between Within 11,155.6 1334.4 2 12 5577.8 111.2 50.16 X Total 12,490 14 X X

Ex. 2 - Students were given different drug treatments before studying for their midterm. Some were given a memory drug, some a placebo drug, and some no treatment. The midterm scores (%) are shown below for the three different groups. At the 0.05 level of significance, do any of the treatments have an effect? X = 83.4 X = 50 X = 16.6 - How strong is the effect? - Which means are different?