# Predict Results from a Fair Coin

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/4096/predict-results-fair-coin
Source observed: 2026-11-05T02:37:05.465Z
Last checked: 2026-11-05T02:37:05.465+00:00
Indexed: 2026-11-07T00:36:07.865+00:00

---

# Predict Results from a Fair Coin

**Difficulty:** Easy

We use this statistics-based coding lesson to help candidates prepare for technical screens. Interview loops may include coding questions about statistics, data manipulation, machine learning, or software engineering. Practice this question in your preferred `.ipynb` environment.

## Question

A fair coin has a 50% chance of landing on heads and a 50% chance of landing on tails.

### Part 1

You flip a coin 30 times and receive 20 heads and 10 tails. Calculate the probability of obtaining this exact result with a fair coin.

### Part 2

If you evaluate the likelihood of obtaining **at least 20 heads** in 30 flips of a fair coin, similarly to how p-values are calculated, how would you approach it?

### Part 3

Determine the probability of getting this result—**20 heads in 30 flips**—using a simulation approach.

### Part 4

Using simulation, determine the likelihood of obtaining **20 or more heads** in 30 flips of a fair coin, rather than exactly 20, similarly to how p-values are calculated.

## Practice and submission

The page includes **Question**, **Solution**, **Mock Interview**, and **Community** tabs. No community answers have been contributed yet. Sign in or create an account to answer; submitting an answer marks the question complete.

[All Questions](https://www.aced.io/questions)

We also provide interview preparation across Product Management, Forward Deployed Engineering, Engineering Management, Software Engineering, System Design, Data Science, Machine Learning, and Data Engineering, along with coaching, interview experiences, and other preparation resources.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4096%2Fpredict-results-fair-coin&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4096%2Fpredict-results-fair-coin). Opening a form does not execute a tool.