# Biased Coin Flip Histogram

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/3723/biased-coin-flip-histogram
Source observed: 2026-11-05T02:27:44.319Z
Last checked: 2026-11-05T02:27:44.319+00:00
Indexed: 2026-11-06T22:34:35.531+00:00

---

# Biased Coin Flip Histogram

**Difficulty:** Easy

We provide this interview practice question for simulating a biased coin and visualizing results in a histogram. Practice it in your preferred `.ipynb` environment; Google Colab is described as a free online `.ipynb` environment.

## Part 1: Write the coin flipping function

Write a function that simulates flipping a biased coin **20 times in each of 1,000 simulations**, with each flip having a **20% chance of landing heads**.

Design the function so these parameters can be changed easily:

1. **Number of simulations:** how many simulation runs to perform.
2. **Number of flips per simulation:** how many flips occur in each run.
3. **Bias of the coin:** the probability that a flip lands heads.

## Part 2: Plot the histogram

Generate a histogram showing the distribution of the number of heads observed across the 1,000 simulations.

No community answers have been contributed yet.

## Related question

- [Convert Biased Coin to Fair Coin](https://www.aced.io/questions/4388/convert-biased-coin-to-fair-coin)

## Your answer

Submitting an answer marks this question complete. Log in or sign up to answer.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3723%2Fbiased-coin-flip-histogram&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%2F3723%2Fbiased-coin-flip-histogram). Opening a form does not execute a tool.