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. Describe & Compute the Probability of the Observed Outcome
      5. Make a Decision
    3. Other Relevant Issues
      1. Directional vs. Nondirectional Hypotheses
      2. Accepting, Asserting, and Rejecting
      3. Probabilistic Nature of Science
    4. Formal Example- [Minitab]
      1. Research Question
      2. Hypotheses
      3. Assumptions
      4. Decision Rules
      5. Computation
      6. Decision

Practice Problems (Answers)
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.
      (a + b)2 = (a + b)(a + b)
               = 1a2 + 2ab + 1b2
      (a + b)3 = (a + b)(a + b)(a + b)
               = (a + b)(a2 + 2ab + b2)
               = a3 + 2a2b + ab2 + a2b + 2ab2 + b3
               = 1a3 + 3a2b + 3ab2 + 1b3
      
      Note that the exponent equals the number of tosses and the formula gives the coefficients. 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

  2. Testing Hypotheses
    This is basically a more in depth view of significance of differences that we discussed breifly at the beginning of the semester.
    Back to our question. Is the coin funny?

    1. State the Hypotheses
      If we let p equal the probability of a head, and q equal the probability of a tail, then 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 (α) 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 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. Describe & Compute the Probability of the Observed Outcome
      Describe the data (what is the outcome?) using the techniques and concepts you learned during the first part of the semester. Then we need to compute the probability of an event "as rare as" what we observed. Note that we do not simply compute the probability of the specific event we observed, rather we compute the probability of an event as rare as what we observed. This is an essential part of the logic of hypthesis testing. When computing this probability, we use an inferential test. Which test we use depends on several factors. This table summarizes a number of tests and can help you decide which test is appropriate for a given data set. During the remaining portion of the semester, we will learn about a number of these tests.

    5. Make a Decision
      Compare the probability of the observed outcome to the alpha level and make a decision. Look closely at what this decision means for the data involved.

  3. Other Relevant Issues.

    1. Directional vs. Non-directional Hypotheses

      Alternative Hyp. 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 biased 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 "prove" when talking about statistical results.

  4. Formal Example - [Minitab]
    Let us look at an example that will set the stage for the format we will use when testing a hypothesis. We tossed the coin 10 times and got 9 heads.
  1. Research Question
    Is the coin biased?

  2. Hypotheses
  3. Let p equal the probability of a head and q the probability of a tail.
  In Symbols In Words
Ho p=q The coin is fair
HA p≠q The coin is funny

These hypotheses should be specific to what is being tested (in this case, the coin).

    1. Assumptions
      1. The null hypothesis (i.e., Ho).

    2. Decision Rules
      We will use an Alpha of .05 with a two-tailed test.
      If the probability of what we observe ≤ .05, reject Ho.
      If the probability of what we observe > .05, fail to reject Ho.
    3. Computation
      The computations have two goals corresponding to the descriptive and inferential statistics.

      The first step is to describe the data. In this case, we tossed the coin 10 times and got 9 heads. That is, 90% when we would expect 50%. Thus, the appropriate descriptive statistic in this case is a percent.

      The second is to perform an inferential test which in this case, is a binomial test because we are dealing with a dichotomous variable. Thus, so we need Pascal’s triangle for N=10 in order to obtain the relevant sampling distribution. Since we already created one of those above, we can just take the relevant information from there. 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 probabilities of an event as rare as 9 heads are shown in color above and are summed below.

        Event Probability
        10 heads   .001
        9 heads   .010
        9 tails   .010
        10 tails   .001
        Total = .022 (or .011 x 2)

    4. Decision
      The probability of observing an event as rare as 9 heads in 10 tosses of a fair coin is .022. Since this is less than the alpha level of .05, we reject Ho and assert the alternative. In other words, we conclude that the outcome we have observed is improbable due to chance and the coin is biased. Furthermore, we can state that it is biased in the heads direction.

      Notice that we have rejected the null and asserted the alternative which stated that the coin is funny. Then we explained how it is funny. Thus, in this section, we need to make a decision about rejecting or failing to reject the null, and, we must tell what our decision means in terms of the variables involved.

      If our calculations had given a probability of .051 instead of .022, we would have failed to reject the null and concluded that the coin is fair.

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