Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Bernoulli Distribution | Discrete Distributions
Probability Theory
course content

Contenido del Curso

Probability Theory

Probability Theory

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

bookBernoulli Distribution

Let's move to Bernoulli distribution!

To work with this distribution, we should import the bernoulli object from scipy.stats, and then we can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

  1. Only 1 trial.
  2. Only 2 outcomes.

Example:

Tossing one coin because it has only two outcomes, head or tail.

Here is an example of an unfair coin that results in success with the probability of p = 0.7.

bernoulli

Explanation:

The probability for the first outcome is always p; therefore, the probability for the second outcome is always 1-p. If the chance of receiving a head is 70%, the chance of getting a tail can not be any number except 30%.

Mean and standard deviation:

It is vitally important to understand the necessity of knowing the mean and standard deviation. With the mean, we can describe distribution in general, but with the standard deviation, we can measure the spread of distribution (or how far the random variable is located from the mean). I put the numbers from our example to make everything clear.

Formulas:

Mean and standard deviation can also be calculated with Python, using this syntax bernoulli.mean(p), bernoulli.std(p), where p is the probability of success.

Do you remember .pmf() function? In general, this function helps us to find the probability that the event will happen (if we know the probability of success). Try to use it to define the probability of an event with Python; the syntax is bernoulli.pmf(k, p), where k is the event (0 or 1 in our case), and p is the probability of success.

Tarea

Here, you are going to work with the same distribution that you can see in the theory block to clarify everything. Your task here is to follow the algorithm:

  1. Import library to work with bernoulli object.
  2. Calculate the probability to receive the event 1 with the probability of success 0.7.
  3. Calculate the distribution mean with the probability of success 0.7.
  4. Calculate the distribution standard deviation, with the probability of success 0.7.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 3
toggle bottom row

bookBernoulli Distribution

Let's move to Bernoulli distribution!

To work with this distribution, we should import the bernoulli object from scipy.stats, and then we can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

  1. Only 1 trial.
  2. Only 2 outcomes.

Example:

Tossing one coin because it has only two outcomes, head or tail.

Here is an example of an unfair coin that results in success with the probability of p = 0.7.

bernoulli

Explanation:

The probability for the first outcome is always p; therefore, the probability for the second outcome is always 1-p. If the chance of receiving a head is 70%, the chance of getting a tail can not be any number except 30%.

Mean and standard deviation:

It is vitally important to understand the necessity of knowing the mean and standard deviation. With the mean, we can describe distribution in general, but with the standard deviation, we can measure the spread of distribution (or how far the random variable is located from the mean). I put the numbers from our example to make everything clear.

Formulas:

Mean and standard deviation can also be calculated with Python, using this syntax bernoulli.mean(p), bernoulli.std(p), where p is the probability of success.

Do you remember .pmf() function? In general, this function helps us to find the probability that the event will happen (if we know the probability of success). Try to use it to define the probability of an event with Python; the syntax is bernoulli.pmf(k, p), where k is the event (0 or 1 in our case), and p is the probability of success.

Tarea

Here, you are going to work with the same distribution that you can see in the theory block to clarify everything. Your task here is to follow the algorithm:

  1. Import library to work with bernoulli object.
  2. Calculate the probability to receive the event 1 with the probability of success 0.7.
  3. Calculate the distribution mean with the probability of success 0.7.
  4. Calculate the distribution standard deviation, with the probability of success 0.7.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 3
toggle bottom row

bookBernoulli Distribution

Let's move to Bernoulli distribution!

To work with this distribution, we should import the bernoulli object from scipy.stats, and then we can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

  1. Only 1 trial.
  2. Only 2 outcomes.

Example:

Tossing one coin because it has only two outcomes, head or tail.

Here is an example of an unfair coin that results in success with the probability of p = 0.7.

bernoulli

Explanation:

The probability for the first outcome is always p; therefore, the probability for the second outcome is always 1-p. If the chance of receiving a head is 70%, the chance of getting a tail can not be any number except 30%.

Mean and standard deviation:

It is vitally important to understand the necessity of knowing the mean and standard deviation. With the mean, we can describe distribution in general, but with the standard deviation, we can measure the spread of distribution (or how far the random variable is located from the mean). I put the numbers from our example to make everything clear.

Formulas:

Mean and standard deviation can also be calculated with Python, using this syntax bernoulli.mean(p), bernoulli.std(p), where p is the probability of success.

Do you remember .pmf() function? In general, this function helps us to find the probability that the event will happen (if we know the probability of success). Try to use it to define the probability of an event with Python; the syntax is bernoulli.pmf(k, p), where k is the event (0 or 1 in our case), and p is the probability of success.

Tarea

Here, you are going to work with the same distribution that you can see in the theory block to clarify everything. Your task here is to follow the algorithm:

  1. Import library to work with bernoulli object.
  2. Calculate the probability to receive the event 1 with the probability of success 0.7.
  3. Calculate the distribution mean with the probability of success 0.7.
  4. Calculate the distribution standard deviation, with the probability of success 0.7.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Let's move to Bernoulli distribution!

To work with this distribution, we should import the bernoulli object from scipy.stats, and then we can apply numerous functions to this distribution like pmf, sf, and cdf that were already learned.

Key characteristics:

  1. Only 1 trial.
  2. Only 2 outcomes.

Example:

Tossing one coin because it has only two outcomes, head or tail.

Here is an example of an unfair coin that results in success with the probability of p = 0.7.

bernoulli

Explanation:

The probability for the first outcome is always p; therefore, the probability for the second outcome is always 1-p. If the chance of receiving a head is 70%, the chance of getting a tail can not be any number except 30%.

Mean and standard deviation:

It is vitally important to understand the necessity of knowing the mean and standard deviation. With the mean, we can describe distribution in general, but with the standard deviation, we can measure the spread of distribution (or how far the random variable is located from the mean). I put the numbers from our example to make everything clear.

Formulas:

Mean and standard deviation can also be calculated with Python, using this syntax bernoulli.mean(p), bernoulli.std(p), where p is the probability of success.

Do you remember .pmf() function? In general, this function helps us to find the probability that the event will happen (if we know the probability of success). Try to use it to define the probability of an event with Python; the syntax is bernoulli.pmf(k, p), where k is the event (0 or 1 in our case), and p is the probability of success.

Tarea

Here, you are going to work with the same distribution that you can see in the theory block to clarify everything. Your task here is to follow the algorithm:

  1. Import library to work with bernoulli object.
  2. Calculate the probability to receive the event 1 with the probability of success 0.7.
  3. Calculate the distribution mean with the probability of success 0.7.
  4. Calculate the distribution standard deviation, with the probability of success 0.7.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 4. Capítulo 3
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
some-alt