Hypothesis Tests: Two Independent Samples Cal State Northridge 320 Andrew Ainsworth PhD
What are independent samples? Major Points Psy 320 - Cal State Northridge What are independent samples? Distribution of differences between means An example Heterogeneity of Variance Effect size Confidence limits
Samples can be considered independent for 2 basic reasons Psy 320 - Cal State Northridge Independent Samples Samples are independent if the participants in each sample are not related in any way Samples can be considered independent for 2 basic reasons First, samples randomly selected from 2 separate populations
Independent Samples Getting Independent Samples Method #1 Psy 320 - Cal State Northridge Getting Independent Samples Method #1
Samples can be considered independent for 2 basic reasons Psy 320 - Cal State Northridge Independent Samples Samples can be considered independent for 2 basic reasons Second, participants are randomly selected from a single population Subjects are then randomly assigned to one of 2 samples
Independent Samples Getting Independent Samples Method #2 Psy 320 - Cal State Northridge Getting Independent Samples Method #2
Sampling Distributions Again Psy 320 - Cal State Northridge If we draw all possible pairs of independent samples of size n1 and n2, respectively, from two populations. Calculate a mean and in each one. Record the difference between these values. What have we created? The Sampling Distribution of the Difference Between Means
Sampling Distribution of the Difference Between Means Psy 320 - Cal State Northridge Sampling Distribution of the Difference Between Means Mean of sampling distribution is 1 Mean of sampling distribution is 2 So, the mean of a sampling distribution is 1- 2
Sampling Distribution of the Difference Between Means Psy 320 - Cal State Northridge Sampling Distribution of the Difference Between Means Shape approximately normal if both populations are approximately normal or N1 and N2 are reasonably large.
Sampling Distribution of the Difference Between Means Psy 320 - Cal State Northridge Sampling Distribution of the Difference Between Means Variability (variance sum rule) The variance of the sum or difference of 2 independent samples is equal to the sum of their variances
Sampling Distribution of the Difference Between Means Psy 320 - Cal State Northridge Sampling Distribution of the Difference Between Means Sampling distribution of 1 - 2
Converting Mean Differences into Z-Scores Psy 320 - Cal State Northridge Converting Mean Differences into Z-Scores In any normal distribution with a known mean and standard deviation, we can calculate z-scores to estimate probabilities. What if we don’t know the ’s? You got it, we guess with s!
Converting Mean Differences into t-scores Psy 320 - Cal State Northridge Converting Mean Differences into t-scores We can use to estimate If, The variances of the samples are roughly equal (homogeneity of variance) We estimate the common variance by pooling (averaging)
Homogeneity of Variance Psy 320 - Cal State Northridge Homogeneity of Variance We assume that the variances are equal because: If they’re from the same population they should be equal (approximately) If they’re from different populations they need to be similar enough for us to justify comparing them (“apples to oranges” and all that)
Psy 320 - Cal State Northridge Pooling Variances So far, we have taken 1 sample estimate (e.g. mean, SD, variance) and used it as our best estimate of the corresponding population parameter Now we have 2 samples, the average of the 2 sample statistics is a better estimate of the parameter than either alone
Psy 320 - Cal State Northridge Pooling Variances Also, if there are 2 groups and one groups is larger than it should “give” more to the average estimate (because it is a better estimate itself) Assuming equal variances and pooling allows us to use an estimate of the population that is smaller than if we did not assume they were equal
Calculating Pooled Variance Psy 320 - Cal State Northridge Calculating Pooled Variance Remembering that sp2 is the pooled estimate: we pool SS and df to get
Calculating Pooled Variance Psy 320 - Cal State Northridge Calculating Pooled Variance
Calculating Pooled Variance Psy 320 - Cal State Northridge Calculating Pooled Variance When sample sizes are equal (n1 = n2) it is simply the average of the 2 When unequal n we need a weighted average
Calculating SE for the Differences Between Means Psy 320 - Cal State Northridge Calculating SE for the Differences Between Means Once we calculate the pooled variance we just substitute it in for the sigmas earlier If n1 = n2 then
Example: Violent Videos Games Psy 320 - Cal State Northridge Example: Violent Videos Games Does playing violent video games increase aggressive behavior Two independent randomly selected/assigned groups Grand Theft Auto: San Andreas (violent: 8 subjects) VS. NBA 2K7 (non-violent: 10 subjects) We want to compare mean number of aggressive behaviors following game play
Hypotheses (Steps 1 and 2) Psy 320 - Cal State Northridge Hypotheses (Steps 1 and 2) 2-tailed h0: 1 - 2 = 0 or Type of video game has no impact on aggressive behaviors h1: 1 - 2 0 or Type of video game has an impact on aggressive behaviors 1-tailed h0: 1 - 2 ≤ 0 or GTA leads to the same or less aggressive behaviors as NBA h1: 1 - 2 > 0 or GTA leads to more aggressive behaviors than NBA
Distribution, Test and Alpha (Steps 3 and 4) Psy 320 - Cal State Northridge Distribution, Test and Alpha (Steps 3 and 4) We don’t know for either group, so we cannot perform a Z-test We have to estimate with s so it is a t-test (t distribution) There are 2 independent groups So, an independent samples t-test Assume alpha = .05
Decision Rule (Step 5) dftotal = (n1 – 1) + (n2 – 1) = n1 + n2 – 2 Psy 320 - Cal State Northridge Decision Rule (Step 5) dftotal = (n1 – 1) + (n2 – 1) = n1 + n2 – 2 Group 1 has 8 subjects – df = 8 – 1= 7 Group 2 has 10 subjects – df = 10 – 1 = 9 dftotal = (n1 – 1) + (n2 – 1) = 7 + 9 = 16 OR dftotal = n1 + n2 – 2 = 8 + 10 – 2 = 16 1-tailed t.05(16) = ____; If to > ____ reject 1-tailed 2-tailed t.05(16) = ____; If to > ____ reject 2-tailed
Psy 320 - Cal State Northridge t Distribution
Psy 320 - Cal State Northridge Calculate to (Step 6) Data
Psy 320 - Cal State Northridge Calculate to (Step 6) We have means of 10.25 (GTA) and 8.4 (NBA), but both of these are sample means. We want to test differences between sample means. Not between a sample and a population mean
Calculate to (Step 6) The t for 2 groups is: Psy 320 - Cal State Northridge Calculate to (Step 6) The t for 2 groups is: But under the null 1 - 2 = 0, so:
Psy 320 - Cal State Northridge Calculate to (Step 6) We need to calculate and to do that we need to first calculate
Calculate to (Step 6) Psy 320 - Cal State Northridge Since is _____ we can insert this into the equation
Make your decision (Step 7) Psy 320 - Cal State Northridge Make your decision (Step 7) Since ____ > ____ we would reject the null hypothesis under a 2-tailed test Since ____ > ____ we would reject the null hypothesis under a 1-tailed test There is evidence that violent video games increase aggressive behaviors
Heterogeneous Variances Psy 320 - Cal State Northridge Heterogeneous Variances Refers to case of unequal population variances We don’t pool the sample variances just add them We adjust df and look t up in tables for adjusted df For adjustment use Minimum df = smaller n - 1
Effect Size for Two Groups Psy 320 - Cal State Northridge Effect Size for Two Groups Extension of what we already know. We can often simply express the effect as the difference between means (e.g. 1.85) We can scale the difference by the size of the standard deviation. Gives d (aka Cohen’s d) Which standard deviation?
Effect Size Use either standard deviation or their pooled average. Psy 320 - Cal State Northridge Effect Size Use either standard deviation or their pooled average. We will pool because neither has any claim to priority. Pooled st. dev. =
Effect Size, cont. Psy 320 - Cal State Northridge This difference is approximately 1.12 standard deviations This is a very large effect
Psy 320 - Cal State Northridge Confidence Limits
Psy 320 - Cal State Northridge Confidence Limits p = .95 that based on the sample values the interval formed in this way includes the true value of 1 - 2 The probability that interval includes 1 - 2 given the value of Does 0 fall in the interval? What does that mean?
Psy 320 - Cal State Northridge Computer Example SPSS reproduces the t value and the confidence limits. All other statistics are the same as well. Note different df depending on homogeneity of variance. Remember: Don’t pool if heterogeneity and modify degrees of freedom
SPSS output Psy 320 - Cal State Northridge