Point estimate intervals

Improving Your Data Visualizations in Python

Nick Strayer

Instructor

Diagram of white and black points enclosed in a box labeled population

Improving Your Data Visualizations in Python

A small sample of black and white points is drawn from the larger population of dots

Improving Your Data Visualizations in Python

Multiple small samples of black and white dots are drawn from the larger population of dots

Improving Your Data Visualizations in Python

When is uncertainty important?

Needs uncertainty

  • Estimates from sample
    • Average of a subset
    • Linear model coefficients

Doesn't need uncertainty

  • Facts
    • Counts
    • Summaries of an entire population
Improving Your Data Visualizations in Python

Why is uncertainty important?

  • Helps inform confidence in estimate
  • Necessary for decision making
  • Acknowledges limitations of data

Skydiver supported by parachute

Improving Your Data Visualizations in Python

Grid of many small samples of white and black dots

Improving Your Data Visualizations in Python

Confidence interval diagram showing lower and upper boundaries below greyed out sample grid

Improving Your Data Visualizations in Python
plt.hlines(xmin='lower', xmax='upper', y='y', data=data, 
           linewidth=5, color='steelblue', alpha=0.5)

# Point-estimate for reference plt.plot('est', 'y', 'k|', data = data)

Basic confidence interval plot with horizontal blue bars with white center point

Improving Your Data Visualizations in Python

Let's show some uncertainty!

Improving Your Data Visualizations in Python

Preparing Video For Download...