# 02 The Palpatine Poll

# Section 2 Key: The Palpatine Poll

**Question:** In *Star Wars*, nobody tells a pollster whether they support Emperor Palpatine. So each person hears five harmless yes-or-no questions plus *"Do you support Palpatine?"*, and says only how many are yes, not which ones. Here are 1,000 real answers. What fraction of people really support Palpatine?

| Number said | People (out of 1,000) |
| :-: | :-: |
| 0 | 0 |
| 1 | 169 |
| 2 | 295 |
| 3 | 329 |
| 4 | 166 |
| 5 | 36 |
| 6 | 5 |

**Answer:** About **0.1**, roughly 1 person in 10. These answers come from a practice poll made for this class, and its hidden story used 0.09, so an answer near 0.1 is right on target.

---

### Step 1: Warm up with the five harmless questions

Forget Palpatine for a moment. Let $H$ be the number of harmless questions one person says yes to. Each question is a yes with chance $\frac{1}{2}$, independently of the others, so $H$ counts the successes in 5 trials:

$$H \sim \text{Bin}(5, \tfrac{1}{2})$$

All 32 ways to answer five yes-or-no questions are equally likely, and $\binom{5}{k}$ of them have $k$ yeses:

| $k$ | Ways | $\mathbb{P}(H = k)$ |
| :-: | :-: | :-: |
| 0 | 1 | $1/32 \approx 0.03$ |
| 1 | 5 | $5/32 \approx 0.16$ |
| 2 | 10 | $10/32 \approx 0.31$ |
| 3 | 10 | $10/32 \approx 0.31$ |
| 4 | 5 | $5/32 \approx 0.16$ |
| 5 | 1 | $1/32 \approx 0.03$ |

On average a person says yes to $5 \cdot \tfrac{1}{2} = 2.5$ harmless questions. Keep that number: it comes back in Step 4.

---

### Step 2: Tell the story of one answer

One person's answer is made in three steps:

1. **Their secret:** $S \sim \text{Ber}(p)$. $S$ is 1 if they support Palpatine, which happens with chance $p$. That is the number we want.
2. **The harmless questions:** $H \sim \text{Bin}(5, \tfrac{1}{2})$, from Step 1.
3. **The number they say:** The total, $H + S$.

Notice what this protects. A person who says 3 might have three harmless yeses, or two plus Palpatine. One answer cannot tell.

---

### Step 3: Compare with the real answers

Run the story 1,000 times and put its chart beside the real one. One bar is different: the real chart has no 0. Saying 0 would announce *"I do not support Palpatine"*, so nobody does: a 0 becomes a 1. Add that to the story:

$$N = \begin{cases} H + S & \text{if } H + S \geq 1 \\ 1 & \text{if } H + S = 0 \end{cases}$$

---

### Step 4: Read the support off the data

Now turn the knob $p$ until the story's answers look like the real ones. The easiest thing to match is the average, and the real 1,000 answers average 2.62.

In section the room does this by hand: drag $p$, run the story, and compare the two averages. They meet near 0.1. You can also do it with algebra. Every answer is $H + S$, plus 1 more when $H + S = 0$, which happens when $H = 0$ and $S = 0$:

$$\begin{aligned} \mathbb{E}[N] &= \mathbb{E}[H] + \mathbb{E}[S] + \mathbb{P}(H = 0 \text{ and } S = 0) \\ &= 2.5 + p + \tfrac{1}{32}(1 - p) \end{aligned}$$

Set it equal to the real average and solve:

$$2.5 + p + \tfrac{1}{32}(1 - p) = 2.62 \quad \Rightarrow \quad p \approx 0.09$$

About 9 people in 100, roughly 1 in 10, really support Palpatine. Nobody told us their secret; the crowd did.

---

### Is anyone's secret out?

Which answers give a person away? Only a 6: yes to all five harmless questions and to Palpatine. A 1 is safe. It can be one harmless yes, or Palpatine alone, or a 0 that became a 1.

$$\mathbb{P}(\text{says } 6) = \mathbb{P}(S = 1) \cdot \mathbb{P}(H = 5) = 0.09 \cdot (\tfrac{1}{2})^5 = \frac{0.09}{32} \approx 0.003$$

About 3 people in 1,000 give themselves away. In the real 1,000, 5 people said 6: a little more than 3, which is normal wobble for something this rare.

Another way to ask it: a 0 means no to all five harmless questions and no to Palpatine, the dangerous answer. Without the rule that a 0 becomes a 1, about 28 people in 1,000 would give themselves away: (1−p)×(12)5=0.9132≈0.028

How would you protect them? Make a full house rarer. The next question shows why harmless questions near 50/50 matter.

#### What if the harmless questions are too easy?

Suppose 9 in 10 people say yes to each harmless question, so $H \sim \text{Bin}(5, 0.9)$. Most people now say yes to 4 or 5 of them:

$$\mathbb{P}(H = 5) = 0.9^5 \approx 0.59$$

$$\mathbb{P}(\text{says } 6) = 0.09 \cdot 0.59 \approx 0.05$$

About 5 answers in 100 give someone away, against about 3 in 1,000 with 50/50 questions. That is why real list experiments pick harmless questions that few people answer all yes or all no.

#### A common mistake

Forgetting that a 0 becomes a 1. Matching averages with the plain total $H + S$ gives $2.5 + p = 2.62$, so $p = 0.12$, too high by about 0.03. Every 0 that turned into a 1 nudged the real average up, and that nudge got counted as support.

---

### The game: Bernoulli, Binomial, or Neither?

| Story | $X$ | Answer |
| :-- | :-- | :-- |
| Your favorite sports team plays 5 games | How many wins? | **Binomial**, $\text{Bin}(5, p)$. 5 games, each a win with chance $p$, if the games are independent with the same $p$. |
| Weather forecast for tomorrow | Does it rain? | **Bernoulli**, $\text{Ber}(p)$. One day is one trial, and $p$ is the chance of rain in the forecast. $\text{Bin}(1, p)$ is the same thing. |
| You have 30 classmates | How many share your birthday? | **Binomial**, $\text{Bin}(30, \tfrac{1}{365})$. Poisson, $\text{Poi}(\tfrac{30}{365})$, is a great approximation too, since $n$ is large and $p$ is small. Both are right. |
| You ask a chatbot a question | Does its reply start with "Great question!"? | **Bernoulli**, $\text{Ber}(p)$. A fancy chatbot, but one reply is one trial. |
| Roll one die | The number it shows | **Neither**. It has six values: it is not a yes-or-no trial, and not a count of successes. |
| Five harmless questions, each 50/50 | How many yeses? | **Binomial**, $\text{Bin}(5, \tfrac{1}{2})$. This one is the poll's warm-up. |

---

### Extra time

- **Ten harmless questions:** With 10 harmless questions instead of 5, giving yourself away takes all ten plus Palpatine: $0.09 \cdot (\tfrac{1}{2})^{10} \approx 0.00009$, about 1 in 11,000. Safer! But the harmless count now spreads from 0 to 10, so the average of 1,000 answers wobbles more, and so does the guess for $p$.
- **Supporters who still lie:** If some supporters leave the Palpatine question out of their count, the poll only sees the ones who count it. If half of them leave it out, the poll finds about half the real support.
- **Let the computer find p:** Dragging a slider until two charts agree is how a person finds $p$. Getting a computer to find it by itself is learning, and that is exactly where the course is going.

### Example

![](https://cdn.hashnode.com/uploads/covers/64fdda9c818113c4f5ab2447/ea936ccc-3a1e-4199-97e0-a9a4619850c1.png align="center")
