Contents     Contents Index APA Style Guide Dr. P's Place

Hypothesis Testing: Dichotomous Variables

  1. Some Definitions
  2. The Coin Problem
    1. Constructing the Binomial
    2. Testing Hypotheses
      1. State the Hypotheses
      2. Choose a Significance Level
      3. Assume the Null Hypothesis
      4. Compute the Probability of the Observed Outcome - [Minitab]
      5. Make a Decision
    3. Other Relevant Issues
      1. Directional vs. Nondirectional Hypotheses
      2. Accepting, Asserting, and Rejecting
      3. Probabilistic Nature of Science

Homework


I. Some Definitions

  1. Probability
    Refers to the liklihood that an event will occur. Ranges from 0 to 1. An event with a probability of zero will not happen and an event with a probability of one will definitely happen.

    For discrete variables:

    For continuous variables:

  2. Dichotomous Variable
    A discrete categorical variable with two possible values. Exs. head/tail, pass/fail, male/female, do or don't do something, have a positive or negative opinion about something.

  3. Sampling Distribution
    A probability distribution of the possible values of some sample statistic which would occur if we were to draw all possible samples of a fixed size from a given population. Note a sampling distribution tells us two things:
    1. All possible values of a statistic.
    2. Their probabilities of occurrence.

  4. Binomial Distribution
    A sampling distribution of a dichotomous variable. Since a dichotomous variable is the simplest type of variable, a binomial distribution is thus the simplest type of sampling distribution.

II. The Coin Problem

This problem will help illustrate the terms defined above as well as the basic logic for all of hypothesis testing. Let’s say you use a coin to help you make decisions. 'Heads' means you study and 'tails' means you socialize. However, you feel that you are getting the raw end of the deal and believe the coin is biased. Thus, the research question asks whether the coin is biased. Let us examine the method for answering this question. Before we are ready to start flipping the coin a bunch of times and test the hypothesis, we need to get a deeper understanding of the concept of a Binomial Distribution that we defined above.

  1. Constructing the Binomial Distribution

    Explanation

    A couple of methods to generate coefficients more quickly:

    1. Expand the Binomial. Exs:
      (a + b)2 = (a + b)(a + b)
               = a2 + 2ab + b2

      (a + b)3 = (a + b)(a + b)(a + b) = (a + b)(a2 + 2ab + b2) = a3 + 2a2b + ab2 + a2b + 2ab2 + b3 = a3 + 3a2b + 3ab2 + b3

      Note that the exponent equals the number of tosses. However, this, too, is a tedious technique.

    2. Pascal’s Triangle

      A trick with numbers that generates the coefficients.
      N Coefficients N+1 2n
      1
      1  1
      2
      2
      2
      1  2  1
      3
      4
      3
      1  3  3  1
      4
      8
      4
      1  4  6  4  1
      5
      16
      5
      1  5  10  10  5  1
      6
      32
      6
      1  6  15  20  15  6  1
      7
      64
      7
      1  7  21  35  35  21  7  1
      8
      128
      8
      1  8  28  56  70  56  28  8  1
      9
      256
      9
      1  9  36  84 126 126  84  36  9  1
      10
      512
      10
        1  10  45 120 210 252 210 120  45  10  1  
      11
      1024

    To build the pyramid, start with 1s on the outside. For the inner numbers of the pyramid, add the above two numbers, that is:

    Thus, this technique works well with small N's.

  2. Testing Hypotheses
    Back to our question. Is the coin funny? We toss the coin 10 times and obtain 9 heads.

    1. State the Hypotheses
      Let:
      • p = the probability of a head, and
      • q = the probability of a tail.

      Thus, we can make two mutually exclusive statements or hypotheses as follows. Note, mutually exclusive means that only one of the statements can be true.

        Hypothesis
        Name

        Meaning
        In
        Symbols

        Comments
        Null
        or HO
        The coin is fair p=q Always an exact statement
        Alternative
        or HA or H1
        The coin is funny p¹q Never an exact statement

    2. Choose a Significance Level
      The alpha level (a) is the arbitrary level of significance that statisticians have chosen to distinguish probable from improbable. The alpha level chosen in Psychology is typically .05, with .01 or even .001 used in some circumstances.
      Improbable
      Due to Chance
        Probable
      Due to Chance
    3. Assume the Null Hypothesis
      We do this because the null is an exact statement and therefore testable. In other words, it allows us to compute the relevant probabilities. In the case of the coin, we assume it is fair and compute the probability that the outcome we observed (9 heads in 10 tosses) is due to chance. If the probability of this event occurring due to chance is small (i.e., less than or equal to the alpha level), we will reject the null hypothesis and assert the alternative (that the coin is funny).

    4. Compute the Probability of the Observed Outcome [Minitab]
      What is the probability of obtaining an event as rare as what we observed? What follows is the binomial distribution for N=10.

      Possible
      outcomes
      H10T0 H9T1 H8T2 H7T3 H6T4 H5T5 H4T6 H3T7 H2T8 H1T9 H0T10
      P
      1/1024
      10
      45
      120
      210
      252
      210
      120
      45
      10
      1
      .001
      .010
      .044
      .117
      .205
      .246
      .205
      .117
      .044
      .010
      .001

      The relevant probabilities are shown in color above and are summed below.

        Event Probability
        9 heads .010
        10 heads .001
        9 tails .010
        10 tails .001
        Total =.022

    5. Make a Decision
      Compare the probability of the observed outcome to the alpha level and make a decision. Since .022 is less than the alpha level of .05, we conclude that the outcome we have observed is improbable due to chance. In other words, the coin is funny.

  3. Other Relevant Issues.

    1. Directional vs. Non-directional Hypotheses

      Alternative
      Hypothesis
      Type Meaning Test to
      be used
      p¹q Non-directional Coin is biased. Two-tailed
      p<q Directional Coin is biased for T. One-tailed
      p>q Directional Coin is biases for H. One-tailed

      Nondirectional tests are most common. Directional hypotheses are sometimes used when we have a theory and/or prior data that leads us to such a specific prediction. To keep things simple, in this class, we will use two-tailed tests exclusively.

    2. Accepting, Asserting, and Rejecting
      We never "accept" the null or alternative hypotheses. We either:
      1. Reject the null and "assert" the alternative
        We don’t accept the alternative because we didn’t test it. We tested the null by assuming its truth.
      2. "Fail to reject" the null.
        We don’t accept the null because maybe our test wasn’t sensitive enough to detect a bias in the coin.

    3. Probabilistic Nature of Science
      Given an alpha level of .05, we can expect to reject the null 1 in 20 times when the coin is actually fair. In other words, a fair coin could give 10 heads in 10 tosses, it is just not very probable. Fortunately though, science progresses when the study is replicated (and extended) by the same and other investigators. The probability of making two mistakes would be .05 x .05 = .0025. We will talk more about these "mistakes" in the next chapter. An important moral of this story is that we never used the word "proved" when talking about statistical results.


Contents Index APA Style Guide Dr. P's Place Copyright © 1997-2006 M. Plonsky, Ph.D.
Comments? mplonsky@uwsp.edu.