Contenido del Curso
Probability Theory
Probability Theory
Bernoulli 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:
- Only 1 trial.
- 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.
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:
- Import library to work with
bernoulli
object. - Calculate the probability to receive the event
1
with the probability of success0.7
. - Calculate the distribution mean with the probability of success
0.7
. - Calculate the distribution standard deviation, with the probability of success
0.7
.
¡Gracias por tus comentarios!
Bernoulli 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:
- Only 1 trial.
- 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.
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:
- Import library to work with
bernoulli
object. - Calculate the probability to receive the event
1
with the probability of success0.7
. - Calculate the distribution mean with the probability of success
0.7
. - Calculate the distribution standard deviation, with the probability of success
0.7
.
¡Gracias por tus comentarios!
Bernoulli 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:
- Only 1 trial.
- 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.
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:
- Import library to work with
bernoulli
object. - Calculate the probability to receive the event
1
with the probability of success0.7
. - Calculate the distribution mean with the probability of success
0.7
. - Calculate the distribution standard deviation, with the probability of success
0.7
.
¡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:
- Only 1 trial.
- 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.
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:
- Import library to work with
bernoulli
object. - Calculate the probability to receive the event
1
with the probability of success0.7
. - Calculate the distribution mean with the probability of success
0.7
. - Calculate the distribution standard deviation, with the probability of success
0.7
.