Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Cumulative Distribution Function (CDF) 2/2 | Probability Functions
Probability Theory Update
course content

Conteúdo do Curso

Probability Theory Update

Probability Theory Update

1. Probability Basics
2. Statistical Dependence
3. Learn Crucial Terms
4. Probability Functions
5. Distributions

Cumulative Distribution Function (CDF) 2/2

Probability mass function over a range:

In some cases, we want to know the probability that a random variable is equal to numbers over a range.

Formula:

P(a < X <= b) = Fx(a) - Fx(b)

  • P(a < X <= b) - the probability that a random variable X takes a value within the rage (a; b].
  • Fx(a) - applying CMT to find a probability that a random variable X takes a value less than or a.
  • Fx(b) - applying CMT to find a probability that a random variable X takes a value less than or b.

Example:

Calculate the probability a fair coin will succed in no more than 8 but no less than 4 cases (4; 8] if we have 15 attempts. We assume that success means getting a head.

Python realization:

12345678910111213141516171819
# Import required library import scipy.stats as stats # The probability of getting 8 successes prob_8 = stats.binom.pmf(8, n = 15, p = 0.5) # The probability of getting 4 success prob_4 = stats.binom.pmf(4, n = 15, p = 0.5) # The resulting probability probability = prob_8 - prob_4 print("The probability is", probability * 100, "%")
copy

Explanation

According to the formula, we subtract the probability that a random variable will take a value less than or four from the probability that a random value will take a value less than or 8.

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

Tudo estava claro?

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

Cumulative Distribution Function (CDF) 2/2

Probability mass function over a range:

In some cases, we want to know the probability that a random variable is equal to numbers over a range.

Formula:

P(a < X <= b) = Fx(a) - Fx(b)

  • P(a < X <= b) - the probability that a random variable X takes a value within the rage (a; b].
  • Fx(a) - applying CMT to find a probability that a random variable X takes a value less than or a.
  • Fx(b) - applying CMT to find a probability that a random variable X takes a value less than or b.

Example:

Calculate the probability a fair coin will succed in no more than 8 but no less than 4 cases (4; 8] if we have 15 attempts. We assume that success means getting a head.

Python realization:

12345678910111213141516171819
# Import required library import scipy.stats as stats # The probability of getting 8 successes prob_8 = stats.binom.pmf(8, n = 15, p = 0.5) # The probability of getting 4 success prob_4 = stats.binom.pmf(4, n = 15, p = 0.5) # The resulting probability probability = prob_8 - prob_4 print("The probability is", probability * 100, "%")
copy

Explanation

According to the formula, we subtract the probability that a random variable will take a value less than or four from the probability that a random value will take a value less than or 8.

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

Tudo estava claro?

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

Cumulative Distribution Function (CDF) 2/2

Probability mass function over a range:

In some cases, we want to know the probability that a random variable is equal to numbers over a range.

Formula:

P(a < X <= b) = Fx(a) - Fx(b)

  • P(a < X <= b) - the probability that a random variable X takes a value within the rage (a; b].
  • Fx(a) - applying CMT to find a probability that a random variable X takes a value less than or a.
  • Fx(b) - applying CMT to find a probability that a random variable X takes a value less than or b.

Example:

Calculate the probability a fair coin will succed in no more than 8 but no less than 4 cases (4; 8] if we have 15 attempts. We assume that success means getting a head.

Python realization:

12345678910111213141516171819
# Import required library import scipy.stats as stats # The probability of getting 8 successes prob_8 = stats.binom.pmf(8, n = 15, p = 0.5) # The probability of getting 4 success prob_4 = stats.binom.pmf(4, n = 15, p = 0.5) # The resulting probability probability = prob_8 - prob_4 print("The probability is", probability * 100, "%")
copy

Explanation

According to the formula, we subtract the probability that a random variable will take a value less than or four from the probability that a random value will take a value less than or 8.

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

Tudo estava claro?

Probability mass function over a range:

In some cases, we want to know the probability that a random variable is equal to numbers over a range.

Formula:

P(a < X <= b) = Fx(a) - Fx(b)

  • P(a < X <= b) - the probability that a random variable X takes a value within the rage (a; b].
  • Fx(a) - applying CMT to find a probability that a random variable X takes a value less than or a.
  • Fx(b) - applying CMT to find a probability that a random variable X takes a value less than or b.

Example:

Calculate the probability a fair coin will succed in no more than 8 but no less than 4 cases (4; 8] if we have 15 attempts. We assume that success means getting a head.

Python realization:

12345678910111213141516171819
# Import required library import scipy.stats as stats # The probability of getting 8 successes prob_8 = stats.binom.pmf(8, n = 15, p = 0.5) # The probability of getting 4 success prob_4 = stats.binom.pmf(4, n = 15, p = 0.5) # The resulting probability probability = prob_8 - prob_4 print("The probability is", probability * 100, "%")
copy

Explanation

According to the formula, we subtract the probability that a random variable will take a value less than or four from the probability that a random value will take a value less than or 8.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. 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