Discrete distributions

Introduzione alla statistica

George Boorman

Curriculum Manager, DataCamp

Six-sided die.png

Introduzione alla statistica

Rolling the dice

Each side of a die has 1/6 probability.png

Introduzione alla statistica

Choosing salespeople

 

Names in a box, each with 25% probability.png

Introduzione alla statistica

Probability distribution

Describes the probability of each possible outcome in a scenario

Each side of a die has 1/6 probability.png

 

Expected value: The mean of a probability distribution

Expected value of a fair die roll = $(1 \times \frac{1}{6}) + (2 \times \frac{1}{6}) +(3 \times \frac{1}{6}) +(4 \times \frac{1}{6}) +(5 \times \frac{1}{6}) +(6 \times \frac{1}{6}) = 3.5$

Introduzione alla statistica

Why are probability distributions important?

  • Help us to quantify risk and inform decision making

 

 

  • Used extensively in hypothesis testing
    • Probability that the results occurred by chance

graffiti_on_a_wall_asking_what_now.jpg

1 Image credit: https://unsplash.com/@timmossholder
Introduzione alla statistica

Visualizing a probability distribution

Histogram_with_a_bar_for_each_number_one_through_six_with_height_one_sixth_each.png

Introduzione alla statistica

Probability = area

$$P(\text{die roll}) \le 2 = ~?$$

bars_for_one_and_two_highlighted.png

Introduzione alla statistica

Probability = area

$$P(\text{die roll}) \le 2 = 1/3$$

one_sixth_plus_one_sixth_equals_one_third.png

Introduzione alla statistica

Uneven die

six-sided_die with_two_sides_with_three_dots.png

Expected value of uneven die roll = $(1 \times \frac{1}{6}) +(2 \times 0) +(3 \times \frac{1}{3}) +(4 \times \frac{1}{6}) +(5 \times \frac{1}{6}) +(6 \times \frac{1}{6}) = 3.67$

Introduzione alla statistica

Visualizing uneven probabilities

Probability_distribution_of_uneven_die_with_bars_for_one_four_five_six_are height_one_sixth_bar_for_two_is_height_zero_bar_for_three_is_height_one_third.png

Introduzione alla statistica

Adding areas

$$P(\text{uneven die roll}) \le 2 = ~?$$

probability_distribution_with_one_highlighted.png

Introduzione alla statistica

Adding areas

$$P(\text{uneven die roll}) \le 2 = 1/6$$

probability_distribution_with_text_stating_one_sixth_plus_zero.png

Introduzione alla statistica

Discrete probability distributions

Describe probabilities for discrete outcomes

Fair die

fair_dice_frequency distribution.png

                Discrete uniform distribution

 

Uneven die

uneven_dice_frequency_distribution.png

Introduzione alla statistica

Sampling from a discrete distribution

Roll Result
1 1
2 2
3 3
4 4
5 5
6 6

 

$ {Mean} = 3.5 $

Roll Result
1 3
2 1
3 2
4 4
5 6
6 3
7 2
8 2
9 2
10 5
Introduzione alla statistica

Visualizing a sample

histogram_of_10_die_rolls.png

Introduzione alla statistica

Sample distribution vs theoretical distribution

histogram_of_10_die_rolls.png

                            $ {Mean} = 3.0 $

even_dice_frequency_distribution.png

                            $ {Mean} = 3.5 $

Introduzione alla statistica

A bigger sample

Sample of 100 rolls

histogram_of_100_rolls.png

                                                                  $ {Mean} = 3.33 $

Introduzione alla statistica

An even bigger sample

Sample of 1000 rolls

histogram_of_1000_rolls.png

                                                                  $ {Mean} = 3.52 $

Introduzione alla statistica

Law of large numbers

As the size of your sample increases, the sample mean will approach the expected value.

Sample size Mean
10 3.00
100 3.33
1000 3.52
Introduzione alla statistica

Let's practice!

Introduzione alla statistica

Preparing Video For Download...