An open API service indexing awesome lists of open source software.

https://github.com/priyanshgoantiya/confidence-interval-visualization

Confidence Interval Simulation
https://github.com/priyanshgoantiya/confidence-interval-visualization

matplotlib numpy plotly seaborn

Last synced: 3 months ago
JSON representation

Confidence Interval Simulation

Awesome Lists containing this project

README

          

# confidence-interval-viz
Deployed-https://vqpmrhmqzpu6y5twsbinnm.streamlit.app/
## πŸ§ͺ Confidence Interval Simulation

This interactive simulation helps visualize how different types of confidence intervals behave over multiple random samples from a normal distribution.

You can explore:
- **Z-distribution using population standard deviation (Οƒ)** β€” when population standard deviation is known.
- **Z-distribution using sample standard deviation (s)** β€” less common, but for comparison.
- **t-distribution using sample standard deviation (s)** β€” used when population standard deviation is unknown and sample size is small.

### πŸ” How it works:
- We simulate repeated sampling from a normal distribution.
- For each sample, we compute a confidence interval for the mean.
- If the interval captures the **true population mean**, it’s shown in **blue**; otherwise in **orange**.
- The red horizontal line represents the **true population mean**.

This tool demonstrates how often confidence intervals actually capture the population mean depending on:
- **Sample size**
- **Confidence level**
- **Distribution used (Z vs. T)**

Use the sliders in the sidebar to tweak parameters and understand how uncertainty and variability influence confidence intervals.