## Psychology 320: Psychological Statistics

Professor: Howard B. Lee

Lecture Notes

Week 7 : Chapter 7

Lecture 15

Inferential Statistics

Hypothesis Testing:

There are 2 types of hypothesis:
Null hypothesis ("=") - points directly to something (one value)
Alternative hypothesis - indirect, points to an infinite number
of values
This is the research hypothesis
Research hypothesis is what you want to show is true,
but cannot be done directly
Here are the indirect steps to show that Research Hypothesis
is true
1. Assume null hypothesis is true
2. Build up evidence to demonstrate the null hypothesis  is not true
if there's enough evidence, you can conclude that the
Null Hypothesis is false

Ex. Coin Example
1. Assume null is true    [coin is fair]
- expect 50% heads, 5% tails
2. Evidence
[toss coin 10 times]   - observed 9 heads
we will say null hypothesis is false because the observed result
is too far away from the expected.
What is too far away?
If the probability of observing 9 heads out of 10 tosses occurs
less than 5% of the time. < 0.05
Fair = .05
Unfair < .05
If coin is actually fair, to observe 9 heads in 10 tosses is a small
number. less than .05, then we can conclude that the initial
assumption that the "coin is fair" is false

If have problem understanding this concept: think of this mechanically:

null hypothesis (exact one)
alternative hypothesis (inexact)
research hypothesis

Binomial - translate above to a binomial.
coin is fair = Null hypothesis : probability of heads
PH = .5
coin is unfair = Alternative hypothesis :
not equal to .5  (this can take on infinite   # of values)

* If you can demonstrate PH = .5 is not true,
you know PH not equal to .5 is true.

Here are the steps you should take:
Set up:
Null hypothesis:
Alternative  hypothesis: h1:
ho: PH = .5
h1: PH not equal to  .5
Probability of Type I error = alpha = level of significance = .05
Calculate a test statistic:
Then you need a decision rule
Decision Rule:
test statistic <= .05
reject null hypothesis [reject ho)
Sufficient Evidence to say ho is not true >
test statistic > .05
do not reject ho, there is insufficient evidence
to say ho is not true

Ex. Coin...is it fair?
ho:PH = .5
h1: PH not equal to .5
(Re: PH not equal to .5 has indefinite values
PH < .5. PH > .5)
alpha=.05
test statistic: Calculated using Binomial Formula (Equation. 7.1 text)

n!       x       n-x
-------------  p   (1-p)
x! ( n-x)!
For this Example:
n = # of trials [# coin tosses)                   n= 10
x = # of times came up heads                      x=9
p = probability given in the null hypothesis      p= .5
1-p =1- probability given                         1-p = 1-.5 =.5
n! = n factorial                                  n!=10!
whatever n is, you multiply by next integer       so 10!
lower than that, until you get to 1                = l0x9x8x7x6x5x4x3x2x1
x! = x factorial                                  9! = 9x8x7x6x5x4x3x2x1
(n-x)! = (# trials - # times head)!               (n-x)! = (10-9)! = (1)! =1

If you ever have :
0! = 1		   1! =1

Now  plug into formula 7.1 for test statistic:

10!           9    10-9      (10x9x8x7x6x5x4x3x2x1)       9   1
----------- (.5) (.5)       = ------------------------- (.5) (.5)
9!(10-9)!                       (9x8x7x6x5x4x3x2x1)(1)

you don' t have to multiply each #. It's easier if you can bracket
it off and then cancel like terms (in bold face) .

10x(9!)       9      1            9    1
---------- (.5)  (.5)	  =  10(.5) (.5)
9! (1)

if the base number is the same, you can add up the exponents!
10
=10 (.5)  =10(.00098) = .0098

* If h1 has "not equal to" we must multiply
the results by 2,  then we can use this number in the decision rule
* If h1  has ">" or "<" just use the result
"as-is"  for the decision rule.
·
Notice in Example:
h1: PH
not equal to .5 -> so multiply   .098 by 2
= 2 x .0098
= .0196

* Decision Rule e: Reject null hypothesis (0) if test statistic < .05
otherwise   do not reject ho

REJECT ho,   since test statistic = .0196 is less than .05 ,
i.e., .0196 < .05
Reject ho because we have evidence that the null hypothesis
is not true , we have evidence that coin is not fair.

Why? .0196 = .02  says that there is a 2% chance that a
fair coin would give you 9 heads  in 10 tosses.    so  it's unlikely
the coin will be fair
PH  >.5
PH  <.5  is a  one tailed test - if each of these are by itself
PH  not equal to .5  is a  two tailed test (two directions)

Ex. T - maze

Food                              Sex
Left          Right
|        |
rat