Statistics for the social sciences l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 50

Statistics for the Social Sciences PowerPoint PPT Presentation


  • 61 Views
  • Uploaded on
  • Presentation posted in: General

Statistics for the Social Sciences. Psychology 340 Fall 2006. Hypothesis testing. Outline (for week). Review of: Basic probability Normal distribution Hypothesis testing framework Stating hypotheses General test statistic and test statistic distributions

Download Presentation

Statistics for the Social Sciences

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Statistics for the social sciences l.jpg

Statistics for the Social Sciences

Psychology 340

Fall 2006

Hypothesis testing


Outline for week l.jpg

Outline (for week)

  • Review of:

    • Basic probability

    • Normal distribution

    • Hypothesis testing framework

      • Stating hypotheses

      • General test statistic and test statistic distributions

      • When to reject or fail to reject


Hypothesis testing l.jpg

Hypothesis testing

  • Example: Testing the effectiveness of a new memory treatment for patients with memory problems

  • Our pharmaceutical company develops a new drug treatment that is designed to help patients with impaired memories.

  • Before we market the drug we want to see if it works.

  • The drug is designed to work on all memory patients, but we can’t test them all (the population).

  • So we decide to use a sample and conduct the following experiment.

  • Based on the results from the sample we will make conclusions about the population.


Hypothesis testing4 l.jpg

Memory

treatment

Memory

Test

Memory

patients

No Memory

treatment

Memory

Test

5 error diff

Hypothesis testing

  • Example: Testing the effectiveness of a new memory treatment for patients with memory problems

55 errors

60 errors

  • Is the 5 error difference:

    • A “real” difference due to the effect of the treatment

    • Or is it just sampling error?


Testing hypotheses l.jpg

Testing Hypotheses

  • Hypothesis testing

    • Procedure for deciding whether the outcome of a study (results for a sample) support a particular theory (which is thought to apply to a population)

    • Core logic of hypothesis testing

      • Considers the probability that the result of a study could have come about if the experimental procedure had no effect

      • If this probability is low, scenario of no effect is rejected and the theory behind the experimental procedure is supported


Basics of probability l.jpg

Basics of Probability

  • Probability

    • Expected relative frequency of a particular outcome

  • Outcome

    • The result of an experiment


Flipping a coin example l.jpg

One outcome classified as heads

1

=

=

0.5

2

Total of two outcomes

Flipping a coin example

What are the odds of getting a “heads”?

n = 1 flip


Flipping a coin example8 l.jpg

One 2 “heads” outcome

=

0.25

Four total outcomes

Flipping a coin example

What are the odds of getting two “heads”?

n = 2

Number of heads

2

1

1

0

# of outcomes = 2n

This situation is known as the binomial


Flipping a coin example9 l.jpg

Three “at least one heads” outcome

=

0.75

Four total outcomes

Flipping a coin example

What are the odds of getting “at least one heads”?

n = 2

Number of heads

2

1

1

0


Flipping a coin example10 l.jpg

Flipping a coin example

Number of heads

n = 3

HHH

3

HHT

2

HTH

2

HTT

1

2

THH

THT

1

TTH

1

TTT

0

= 23 = 8total outcomes

2n


Flipping a coin example11 l.jpg

.4

.3

probability

.2

.1

.125

.375

.375

.125

0

1

2

3

Number of heads

Flipping a coin example

Number of heads

Distribution of possible outcomes

(n = 3 flips)

3

2

2

1

2

1

1

0


Flipping a coin example12 l.jpg

Flipping a coin example

Can make predictions about likelihood of outcomes based on this distribution.

Distribution of possible outcomes

(n = 3 flips)

.4

What’s the probability of flipping three heads in a row?

.3

probability

.2

.1

p = 0.125

.125

.375

.375

.125

0

1

2

3

Number of heads


Flipping a coin example13 l.jpg

Flipping a coin example

Can make predictions about likelihood of outcomes based on this distribution.

Distribution of possible outcomes

(n = 3 flips)

.4

What’s the probability of flipping at least two heads in three tosses?

.3

probability

.2

.1

p = 0.375 + 0.125 = 0.50

.125

.375

.375

.125

0

1

2

3

Number of heads


Flipping a coin example14 l.jpg

Flipping a coin example

Can make predictions about likelihood of outcomes based on this distribution.

Distribution of possible outcomes

(n = 3 flips)

.4

What’s the probability of flipping all heads or all tails in three tosses?

.3

probability

.2

.1

p = 0.125 + 0.125 = 0.25

.125

.375

.375

.125

0

1

2

3

Number of heads


Hypothesis testing15 l.jpg

Hypothesis testing

Can make predictions about likelihood of outcomes based on this distribution.

Distribution of possible outcomes

(of a particular sample size, n)

  • In hypothesis testing, we compare our observed samples with the distribution of possible samples (transformed into standardized distributions)

  • This distribution of possible outcomes is often Normally Distributed


The normal distribution l.jpg

The Normal Distribution

  • The distribution of days before and after due date (bin width = 4 days).

14

-14

0

Days before and after due date


The normal distribution17 l.jpg

The Normal Distribution

  • Normal distribution


The normal distribution18 l.jpg

-2

-1

0

1

2

The Normal Distribution

  • Normal distribution is a commonly found distribution that is symmetrical and unimodal.

    • Not all unimodal, symmetrical curves are Normal, so be careful with your descriptions

  • It is defined by the following equation:


The unit normal table l.jpg

The Unit Normal Table

  • The normal distribution is often transformed into z-scores.

  • Gives the precise proportion of scores (in z-scores) between the mean (Z score of 0) and any other Z score in a Normal distribution

  • Contains the proportions in the tail to the left of corresponding z-scores of a Normal distribution

    • This means that the table lists only positive Z scores


Using the unit normal table l.jpg

34.13%

2.28%

13.59%

At z = +1:

Using the Unit Normal Table

50%-34%-14% rule

Similar to the 68%-95%-99% rule

-2

-1

0

1

2

15.87% (13.59% and 2.28%) of the scores are to the right of the score

100%-15.87% = 84.13% to the left


Using the unit normal table21 l.jpg

Using the Unit Normal Table

  • Steps for figuring the percentage above of below a particular raw or Z score:

1. Convert raw score to Z score (if necessary)

2. Draw normal curve, where the Z score falls on it, shade in the area for which you are finding the percentage

3. Make rough estimate of shaded area’s percentage (using 50%-34%-14% rule)


Using the unit normal table22 l.jpg

Using the Unit Normal Table

  • Steps for figuring the percentage above of below a particular raw or Z score:

4.Find exact percentage using unit normal table

5. If needed, add or subtract 50% from this percentage

6. Check the exact percentage is within the range of the estimate from Step 3


Sat example problems l.jpg

So 90.32% got your score or worse

That’s 9.68% above this score

SAT Example problems

  • The population parameters for the SAT are:

    m = 500, s = 100, and it is Normally distributed

Suppose that you got a 630 on the SAT. What percent of the people who take the SAT get your score or worse?

  • From the table:

    • z(1.3) =.0968


The normal distribution24 l.jpg

The Normal Distribution

  • You can go in the other direction too

    • Steps for figuring Z scores and raw scores from percentages:

      1. Draw normal curve, shade in approximate area for the percentage (using the 50%-34%-14% rule)

      2. Make rough estimate of the Z score where the shaded area starts

      3. Find the exact Z score using the unit normal table

      4. Check that your Z score is similar to the rough estimate from Step 2

      5. If you want to find a raw score, change it from the Z score


Inferential statistics l.jpg

Inferential statistics

  • Hypothesis testing

    • Core logic of hypothesis testing

      • Considers the probability that the result of a study could have come about if the experimental procedure had no effect

      • If this probability is low, scenario of no effect is rejected and the theory behind the experimental procedure is supported

  • A five step program

  • Step 1: State your hypotheses

  • Step 2: Set your decision criteria

  • Step 3: Collect your data

  • Step 4: Compute your test statistics

  • Step 5: Make a decision about your null hypothesis


Hypothesis testing26 l.jpg

This is the one that you test

Hypothesis testing

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses: as a research hypothesis and a null hypothesis about the populations

    • Null hypothesis (H0)

    • Research hypothesis (HA)

  • There are no differences between conditions (no effect of treatment)

  • Generally, not all groups are equal

  • You aren’t out to prove the alternative hypothesis

    • If you reject the null hypothesis, then you’re left with support for the alternative(s)(NOT proof!)


Testing hypotheses27 l.jpg

In our memory example experiment:

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

One -tailed

  • Our theory is that the treatment should improve memory (fewer errors).

H0:

mTreatment >mNo Treatment

HA:

mTreatment < mNo Treatment


Testing hypotheses28 l.jpg

In our memory example experiment:

no direction

specified

direction

specified

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

One -tailed

Two -tailed

  • Our theory is that the treatment should improve memory (fewer errors).

  • Our theory is that the treatment has an effect on memory.

H0:

H0:

mTreatment >mNo Treatment

mTreatment = mNo Treatment

HA:

mTreatment < mNo Treatment

HA:

mTreatment ≠ mNo Treatment


One tailed and two tailed hypothesis tests l.jpg

One-Tailed and Two-Tailed Hypothesis Tests

  • Directional hypotheses

    • One-tailed test

  • Nondirectional hypotheses

    • Two-tailed test


Testing hypotheses30 l.jpg

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

  • Step 2: Set your decision criteria

  • Your alpha () level will be your guide for when to reject or fail to reject the null hypothesis.

    • Based on the probability of making making an certain type of error


Testing hypotheses31 l.jpg

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

  • Step 2: Set your decision criteria

  • Step 3: Collect your data


Testing hypotheses32 l.jpg

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

  • Step 2: Set your decision criteria

  • Step 3: Collect your data

  • Step 4: Compute your test statistics

  • Descriptive statistics (means, standard deviations, etc.)

  • Inferential statistics (z-test, t-tests, ANOVAs, etc.)


Testing hypotheses33 l.jpg

Testing Hypotheses

  • Hypothesis testing: a five step program

  • Step 1: State your hypotheses

  • Step 2: Set your decision criteria

  • Step 3: Collect your data

  • Step 4: Compute your test statistics

  • Step 5: Make a decision about your null hypothesis

  • Based on the outcomes of the statistical tests researchers will either:

    • Reject the null hypothesis

    • Fail to reject the null hypothesis

  • This could be correct conclusion or the incorrect conclusion


Error types l.jpg

Error types

  • Type I error (): concluding that there is a difference between groups (“an effect”) when there really isn’t.

    • Sometimes called “significance level” or “alpha level”

    • We try to minimize this (keep it low)

  • Type II error (): concluding that there isn’t an effect, when there really is.

    • Related to the Statistical Power of a test (1-)


Error types35 l.jpg

There really isn’t an effect

There really is

an effect

Error types

Real world (‘truth’)

H0 is correct

H0 is wrong

Reject H0

Experimenter’s conclusions

Fail to Reject H0


Error types36 l.jpg

I conclude that there is an effect

I can’t detect an effect

Error types

Real world (‘truth’)

H0 is correct

H0 is wrong

Reject H0

Experimenter’s conclusions

Fail to Reject H0


Error types37 l.jpg

Error types

Real world (‘truth’)

H0 is correct

H0 is wrong

Type I error

Reject H0

Experimenter’s conclusions

Fail to Reject H0

Type II error


Performing your statistical test l.jpg

One population

Two populations

the memory treatment sample are the same as those in the population of memory patients.

they aren’t the same as those in the population of memory patients

XA

XA

Performing your statistical test

  • What are we doing when we test the hypotheses?

Real world (‘truth’)

H0: is true (no treatment effect)

H0: is false (is a treatment effect)


Performing your statistical test39 l.jpg

Could be difference between a sample and a population, or between different samples

Based on standard error or an estimate of the standard error

Performing your statistical test

  • What are we doing when we test the hypotheses?

    • Computing a test statistic: Generic test


Generic statistical test l.jpg

Distribution of the test statistic

“Generic” statistical test

  • The generic test statistic distribution (think of this as the distribution of sample means)

    • To reject the H0, you want a computed test statistics that is large

    • What’s large enough?

      • The alpha level gives us the decision criterion

-level determines where these boundaries go


Generic statistical test41 l.jpg

Distribution of the test statistic

If test statistic is here Reject H0

If test statistic is here Fail to reject H0

“Generic” statistical test

  • The generic test statistic distribution (think of this as the distribution of sample means)

    • To reject the H0, you want a computed test statistics that is large

    • What’s large enough?

      • The alpha level gives us the decision criterion


Generic statistical test42 l.jpg

Reject H0

Reject H0

a = 0.05

0.025

split up

into the

two tails

0.025

Fail to reject H0

Reject H0

Fail to reject H0

Fail to reject H0

“Generic” statistical test

  • The alpha level gives us the decision criterion

Two -tailed

One -tailed


Generic statistical test43 l.jpg

Reject H0

0.05

all of it in one tail

a = 0.05

Fail to reject H0

“Generic” statistical test

  • The alpha level gives us the decision criterion

Two -tailed

One -tailed

Reject H0

Reject H0

Fail to reject H0

Fail to reject H0


Generic statistical test44 l.jpg

Reject H0

a = 0.05

0.05

Fail to reject H0

“Generic” statistical test

  • The alpha level gives us the decision criterion

Two -tailed

One -tailed

all of it in one tail

Reject H0

Reject H0

Fail to reject H0

Fail to reject H0


Generic statistical test45 l.jpg

H0:

the memory treatment sample are the same as those in the population of memory patients.

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

HA:

they aren’t the same as those in the population of memory patients

“Generic” statistical test

An example: One sample z-test

  • Step 1: State your hypotheses

  • We give a n = 16 memory patients a memory improvement treatment.

mTreatment >mpop > 60

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?

mTreatment < mpop < 60


Generic statistical test46 l.jpg

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

One -tailed

“Generic” statistical test

An example: One sample z-test

H0: mTreatment >mpop > 60

HA: mTreatment < mpop < 60

  • We give a n = 16 memory patients a memory improvement treatment.

  • Step 2: Set your decision criteria

a = 0.05

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?


Generic statistical test47 l.jpg

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

“Generic” statistical test

An example: One sample z-test

H0: mTreatment >mpop > 60

HA: mTreatment < mpop < 60

  • We give a n = 16 memory patients a memory improvement treatment.

a = 0.05

One -tailed

  • Step 3: Collect your data

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?


Generic statistical test48 l.jpg

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

“Generic” statistical test

An example: One sample z-test

H0: mTreatment >mpop > 60

HA: mTreatment < mpop < 60

  • We give a n = 16 memory patients a memory improvement treatment.

a = 0.05

One -tailed

  • Step 4: Compute your test statistics

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?

= -2.5


Generic statistical test49 l.jpg

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

5%

“Generic” statistical test

An example: One sample z-test

H0: mTreatment >mpop > 60

HA: mTreatment < mpop < 60

  • We give a n = 16 memory patients a memory improvement treatment.

a = 0.05

One -tailed

  • Step 5: Make a decision about your null hypothesis

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?

Reject H0


Generic statistical test50 l.jpg

Memory example experiment:

  • After the treatment they have an average score of = 55 memory errors.

“Generic” statistical test

An example: One sample z-test

H0: mTreatment >mpop > 60

HA: mTreatment < mpop < 60

  • We give a n = 16 memory patients a memory improvement treatment.

a = 0.05

One -tailed

  • Step 5: Make a decision about your null hypothesis

- Reject H0

  • How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, m = 60, s = 8?

- Support for our HA, the evidence suggests that the treatment decreases the number of memory errors


  • Login