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 : 
     probability of heads  PH  
     not equal to .5  (this can take on infinite   # of values) 
     PH = (probability of head) 

* 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            
Binomial - Two admissible outcomes

Let the rat run   n =12 trials
                         x = # of right turns = 8
 PR (Probability of right turn)= .5  
 ho: there is no preference for food or sex
 PR not equal to .5
h1  there is a preference for food or sex.

Common mistakes on the Quiz #2) Zy = rZx This is the Standard Score equation don' t confuse it with SDy y' = r ----- x This is the Deviation score equation SDx * Just because the Standard Deviation is given, it doesn' t mean you have to use it. * Don' t get fooled by excess information
I. Binomial Equation n! x n-x ----------- p (1-p) x! ( n-x)! This equation gives you the probability of obtaining exactly x " event" in n trials. Ex. n= 10 coin tosses x = 8 heads PH ( probability of heads) = .5 ( will always be .5 unless otherwise specified) - expect heads to come up 1/2 of the time. So you want to determine the probability of obtaining exactly 8 heads in ten coin tosses the notation to use is: P( x = 8)= 10! 8 10-8 (10x9x8x7x6x5x4x3x2x1) 8 2 (10)(9) 10 ---------- (.5) (.5) = ----------------------- (.5) (.5) = -------- (.5) 8!(10-8)! (8x7x6x5x4x3x2x1)(2x1) 2 = 45 ( .0009765) = .0439 What this means is that you can expect to obtain 8 heads in 10 tosses 4.39% of the time. Practice Quiz #l) In a binomial experiment, a coin is tossed 26 times. The coin is biased in favor of tails in that 62% of the time it will come up tails. If x is the number of tails, Find P( x=12). n= 26 Pr= .62 ( Probability of tails) x = 12 tails What is the probability of getting exactly 12 tails? P( x= 12) 26! 12 26-12 ----------- (.62) (1-.62) = .3125 12!(26-12)! #2) In research disciplines outside the behavioral sciences, the maximum tolerable probability of a type I error in a hypothesis test is a) .05 b) .01 c) either .05 or .01 d) both .05 and .01 e) not necessarily .05 or .0l Answer: E, not necessarily .05 because .05 is only used in Behavioral Sciences · #3) In determining whether a coin is fair or unfair, an experimenter tosses it twenty times. The results of this experiment was 11 tails. The experimenter concludes that the coin is fair. The experimenter could be making a) a type I error b) a type II error c) both a) and b) d) a) or b) e) none of the above. Answer: b a type II error because n= 20, x=11, " it's fair!"

Go Home Sign