Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Binomial probability 2/2 | Learn Basic Rules
Probability Theory
course content

Conteúdo do Curso

Probability Theory

Probability Theory

1. Learn Basic Rules
2. Probabilities of Several Events
3. Conducting Fascinating Experiments
4. Discrete Distributions
5. Normal Distribution

Binomial probability 2/2

Look at the code example of the binomial probability

12345
# Import relevant library from scipy.stats import binom # Here, we simulate an experiment of tossing 5 coins three times experiment = binom.rvs(p = 0.5, size = 5, n = 3) print(experiment)
copy

Explanation of the code above:

  1. We need to import binom object from scipy.stats.
  2. binom.rvs(p = 0.5, size = 5, n = 3) means that the probability of getting head is 50 %, p = 0.5; the size of sample in experiment is 5, size = 5; the number of trial is 3, n = 3.
  3. In the output we can see an array with five results for each coin with the number of successful trials for each coin.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Note

Explanation of the output : We were tossing one coin five times, and it only led to success in three cases.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 5
toggle bottom row

Binomial probability 2/2

Look at the code example of the binomial probability

12345
# Import relevant library from scipy.stats import binom # Here, we simulate an experiment of tossing 5 coins three times experiment = binom.rvs(p = 0.5, size = 5, n = 3) print(experiment)
copy

Explanation of the code above:

  1. We need to import binom object from scipy.stats.
  2. binom.rvs(p = 0.5, size = 5, n = 3) means that the probability of getting head is 50 %, p = 0.5; the size of sample in experiment is 5, size = 5; the number of trial is 3, n = 3.
  3. In the output we can see an array with five results for each coin with the number of successful trials for each coin.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Note

Explanation of the output : We were tossing one coin five times, and it only led to success in three cases.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 5
toggle bottom row

Binomial probability 2/2

Look at the code example of the binomial probability

12345
# Import relevant library from scipy.stats import binom # Here, we simulate an experiment of tossing 5 coins three times experiment = binom.rvs(p = 0.5, size = 5, n = 3) print(experiment)
copy

Explanation of the code above:

  1. We need to import binom object from scipy.stats.
  2. binom.rvs(p = 0.5, size = 5, n = 3) means that the probability of getting head is 50 %, p = 0.5; the size of sample in experiment is 5, size = 5; the number of trial is 3, n = 3.
  3. In the output we can see an array with five results for each coin with the number of successful trials for each coin.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Note

Explanation of the output : We were tossing one coin five times, and it only led to success in three cases.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Look at the code example of the binomial probability

12345
# Import relevant library from scipy.stats import binom # Here, we simulate an experiment of tossing 5 coins three times experiment = binom.rvs(p = 0.5, size = 5, n = 3) print(experiment)
copy

Explanation of the code above:

  1. We need to import binom object from scipy.stats.
  2. binom.rvs(p = 0.5, size = 5, n = 3) means that the probability of getting head is 50 %, p = 0.5; the size of sample in experiment is 5, size = 5; the number of trial is 3, n = 3.
  3. In the output we can see an array with five results for each coin with the number of successful trials for each coin.

Tarefa

Your task here is almost the same as in the previous chapter, play with one coin!

Imagine that here you have a coin with a general probability of 50%. Follow this algorithm:

  1. Import the binom object from scipy.stats.
  2. Conduct the experiment with binom object using rvs() function:
    • Set p parameter equal to 0.5.
    • Set size parameter equal to 1.
    • Set n parameter equal to 5.

Please note, you can comment on the line where np.random.seed() was defined and "play with the coin" to receive various outputs.

Note

Explanation of the output : We were tossing one coin five times, and it only led to success in three cases.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 1. Capítulo 5
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt