I. Some Definitions
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

First let us consider what can happen if we toss a coin once (i.e., N=1). The possible outcomes are:

A head (H) or a tail (T).

In summary, the binomial distribution for N=1 is:

Possible outcomes Probability H1T0 H0T1 1/2 1/2

Next let us consider what can happen if we toss a coin twice (i.e., N=2). The possible outcomes are:

2 heads (H2), a head and a tail (HT), and 2 tails (T2).

Note, however, that the head and a tail can occur in 2 ways (HT or TH). Thus, the possible outcomes are:

2 heads (1H2), a head and a tail (2H1T1), and 2 tails (1T2).

The bold numbers are called coefficients and indicate the number of different ways an outcome can occur. Note, that the sum of the coefficients is equal to all possible outcomes (i.e., 1 + 2 + 1 = 4).

In summary, the binomial distribution for N=2 is:

Possible outcomes All possible outcomes Probability H2T0 2H1T1 H0T2 HH HT TH TT 1/4 2/4 1/4

Notes:
1. As with all sampling distributions, all possible values of a statistic and their probabilities of occurrence are given.
2. N+1 = the number of different possible outcomes. In the present case, there are 3 different possible outcomes (i.e., H2T0, H1T1, H0T2).
3. 2N = ∑coefficients = the total number of all possible outcomes. In the present case, there are 4 possible outcomes (i.e., HH, HT, TH, TT).
4. The probabilities for all outcomes sum to 1.

Now consider tossing the coin three times (i.e., N=3):

 Different Possible outcomes All Coefficients possible outcomes (or # all possible outcomes) H3T0 H2T1 H1T2 H0T3 ∑coefficients=8 HHH HHT HTH THH HTT THT TTH TTT 1 3 3 1

Thus, the binomial distribution for N=3 is:

 Possible outcomes Probability H3T0 H2T1 H1T2 H0T3 1/8 3/8 3/8 1/8

As you might guess, constructing a binomial when N>3 gets to be difficult and thus there are more efficient methods.

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

To build the pyramid, start with 1's 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
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
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 P outcomes H10T0 H9T1 H8T2 H7T3 H6T4 H5T5 H4T6 H3T7 H2T8 H1T9 H0T10 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    Copyright © 1997-2017 M. Plonsky, Ph.D.