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.2
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]
Notation Identify the values of n1,n2 and G that would be used in the runs test for randomness.

1
Step 1: Understand the problem. The runs test for randomness is a non-parametric statistical test used to determine if a sequence of data points is random. In this case, the sequence consists of political party affiliations (R for Republican and D for Democrat). The goal is to identify the values of n1 (number of R's), n2 (number of D's), and G (number of runs).
Step 2: Count the occurrences of R and D in the sequence. To find n1, count the total number of R's in the sequence. Similarly, to find n2, count the total number of D's in the sequence. These values represent the frequency of each category in the sequence.
Step 3: Define a 'run' in the context of the sequence. A run is a consecutive sequence of the same symbol (either R or D). For example, if the sequence is RRRDDRR, there are three runs: one of R's, one of D's, and another of R's.
Step 4: Count the total number of runs (G) in the sequence. To do this, examine the sequence and identify where the symbol changes from R to D or D to R. Each change marks the end of one run and the beginning of another.
Step 5: Summarize the values. After counting n1, n2, and G, these values can be used in the runs test formula to assess randomness. Ensure the counts are accurate and clearly documented for further analysis.

This video solution was recommended by our tutors as helpful for the problem above
Video duration:
3mPlay 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 of data. It analyzes the occurrence of runs, which are sequences of similar items, to assess whether the order of the items is random or exhibits a pattern. In the context of political party affiliations, it helps to evaluate if the sequence of 'R' and 'D' affiliations is random or shows a preference for one party over the other.
Recommended video:
Guided course
Step 2: Calculate Test Statistic
n1 and n2
In the context of the Runs Test, n1 and n2 represent the number of occurrences of each category in the sequence being analyzed. For example, n1 could denote the number of Republicans (R) and n2 the number of Democrats (D) in the given sequence. These values are essential for calculating the expected number of runs and determining the test's significance.
Recommended video:
Guided course
Difference in Proportions: Confidence Intervals
G (Number of Runs)
G, or the number of runs, is a key statistic in the Runs Test that counts the total number of uninterrupted sequences of similar items in the data. A run is defined as a sequence of consecutive identical elements, such as a series of 'R's followed by 'D's. The value of G is compared against expected values to assess whether the observed runs indicate randomness or a systematic pattern in the data.
Recommended video:
Guided course
Find 5-Number Summary - TI-84 Calculator
Watch next
Master Introduction to Statistics Channel with a bite sized video explanation from Patrick
Start learning