Table of contents
- 1. Intro to Stats and Collecting Data55m
- 2. Describing Data with Tables and Graphs1h 55m
- 3. Describing Data Numerically1h 45m
- 4. Probability2h 16m
- 5. Binomial Distribution & Discrete Random Variables2h 33m
- 6. Normal Distribution and Continuous Random Variables1h 38m
- 7. Sampling Distributions & Confidence Intervals: Mean1h 3m
- 8. Sampling Distributions & Confidence Intervals: Proportion1h 12m
- 9. Hypothesis Testing for One Sample1h 1m
- 10. Hypothesis Testing for Two Samples2h 8m
- 11. Correlation48m
- 12. Regression1h 4m
- 13. Chi-Square Tests & Goodness of Fit1h 20m
- 14. ANOVA1h 0m
1. Intro to Stats and Collecting Data
Intro to Stats
Problem 13.7.1
Textbook Question
In Exercises 1–4, use the following sequence of political party affiliations of recent presidents of the United States, where R represents Republican and D represents Democrat.
[Image]
Testing for Bias Can the runs test be used to show the proportion of Republicans is significantly greater than the proportion of Democrats?

1
Identify the sequence of political party affiliations provided in the problem, where R represents Republican and D represents Democrat. Count the total number of R's (Republicans) and D's (Democrats) in the sequence to determine their proportions.
Define a 'run' as a sequence of consecutive identical symbols (e.g., a sequence of R's or D's). Count the total number of runs in the sequence. For example, if the sequence is RRRDDRR, the runs are RRR, DD, and RR, so there are 3 runs.
State the null hypothesis (H₀) and the alternative hypothesis (H₁). H₀: The sequence is random (no bias in the proportion of R's and D's). H₁: The sequence is not random (indicating a potential bias in the proportion of R's and D's).
Use the runs test formula to calculate the expected number of runs and the standard deviation of the number of runs. The expected number of runs (E) is given by: , where n is the total number of observations, n_R is the number of R's, and n_D is the number of D's. The standard deviation (σ) is given by: .
Compare the observed number of runs to the expected number of runs using a z-test. The z-score is calculated as: , where R is the observed number of runs, E is the expected number of runs, and σ is the standard deviation. Use the z-score to determine the p-value and decide whether to reject or fail to reject the null hypothesis based on the significance level (e.g., α = 0.05).

This video solution was recommended by our tutors as helpful for the problem above
Video duration:
4mPlay a video:
Was this helpful?
Key Concepts
Here are the essential concepts you must grasp in order to answer the question correctly.
Runs Test
The runs test is a non-parametric statistical test used to determine the randomness of a sequence. It analyzes the occurrence of runs, which are sequences of similar items, to assess whether the observed arrangement deviates from what would be expected under a random distribution. In this context, it can help identify if there is a significant bias in the political party affiliations of recent presidents.
Recommended video:
Guided course
Step 2: Calculate Test Statistic
Hypothesis Testing
Hypothesis testing is a statistical method used to make inferences about a population based on sample data. It involves formulating a null hypothesis (typically stating no effect or no difference) and an alternative hypothesis (indicating the presence of an effect or difference). In this case, the null hypothesis would assert that the proportions of Republicans and Democrats are equal, while the alternative would claim that the proportion of Republicans is greater.
Recommended video:
Guided course
Step 1: Write Hypotheses
Proportion Comparison
Proportion comparison involves evaluating the relative sizes of two or more groups to determine if there is a significant difference between them. In this scenario, it focuses on comparing the proportions of Republican and Democrat affiliations among U.S. presidents. Understanding how to calculate and interpret these proportions is crucial for assessing whether the runs test can provide evidence of a significant bias.
Recommended video:
Guided course
Difference in Proportions: Hypothesis Tests Example 1
Watch next
Master Introduction to Statistics Channel with a bite sized video explanation from Patrick
Start learning