|
|
||||||
|---|---|---|---|---|---|---|
Hypothesis Testing: Dichotomous Variables
Practice Problems (Answers)
Homework
For discrete variables:
| P(A)= | # outcomes favoring A Total # possible outcomes |
Ex. Probability of drawing an ace from a deck of cards is 4/52.
For continuous variables:
| P= | Area under a portion of the curve Total area under the curve |
Since the total area under the curve is 1, we define P as the proportion of area under the curve. For example, as we saw in the section on relative standing, the probability of choosing a random person with an IQ between 85 and 115 is .6826
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.
Explanation
First let us consider what can happen if we toss a coin once (i.e., N=1). The possible outcomes are:
In summary, the binomial distribution for N=1 is:
| Possible outcomes | H1T0 | H0T1 |
|---|---|---|
| Probability | 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:
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).
In summary, the binomial distribution for N=2 is:
| Possible outcomes | H2T0 | 2H1T1 | H0T2 |
|---|---|---|---|
| All possible outcomes | HH | HT TH |
TT |
| Probability | 1/4 | 2/4 | 1/4 |
Now consider tossing the coin three times (i.e., N=3):
| Different Possible outcomes | H3T0 | H2T1 | H1T2 | H0T3 | åcoefficients=8 |
|---|---|---|---|---|---|
| All possible outcomes | HHH | HHT HTH THH |
HTT THT TTH |
TTT | |
| Coefficients (or # all possible outcomes) |
1 | 3 | 3 | 1 |
Thus, the binomial distribution for N=3 is:
| Possible outcomes | H3T0 | H2T1 | H1T2 | H0T3 |
|---|---|---|---|---|
| Probability | 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:
(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.| N | Coefficients | N+1 | 2n |
|---|---|---|---|
| 1 | 1 1 |
2 |
|
| 2 | 1 2 1 |
4 |
|
| 3 | 1 3 3 1 |
8 |
|
| 4 | 1 4 6 4 1 |
16 |
|
| 5 | 1 5 10 10 5 1 |
32 |
|
| 6 | 1 6 15 20 15 6 1 |
64 |
|
| 7 | 1 7 21 35 35 21 7 1 |
128 |
|
| 8 | 1 8 28 56 70 56 28 8 1 |
256 |
|
| 9 | 1 9 36 84 126 126 84 36 9 1 |
512 |
|
| 10 | 1 10 45 120 210 252 210 120 45 10 1 |
1024 |
Thus, this technique works well with small N's.
| Hypothesis Name | Meaning | 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 |
| Improbable Due to Chance |
Probable Due to Chance |
|
![]() |
||
|---|---|---|
| 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.
- Research Question
Is the coin biased?
- Hypotheses
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).
| Possible outcomes |
H10T0 | H9T1 | H8T2 | H7T3 | H6T4 | H5T5 | H4T6 | H3T7 | H2T8 | H1T9 | H0T10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| P | |||||||||||
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 |