Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Схема Бернуллі 2/2 | Ознайомемося з основними правилами
Теорія ймовірностей
course content

Зміст курсу

Теорія ймовірностей

Теорія ймовірностей

1. Ознайомемося з основними правилами
2. Ймовірності декількох подій
3. Проводимо захоплюючі експерименти
4. Дискретні розподіли
5. Нормальний розподіл

Схема Бернуллі 2/2

It is time to connect your math knowledge with your programming skills. Look to this example:

You can treat this function as an actual experiment; whenever you click the run button, the output is different.

Explanation of the code above:

  1. You need to import bernoulli object from scipy.stats. With this object, we will conduct a probability experiment on a computer.
  2. bernoulli.rvs(p = 0.5, size = 5) means that the probability of getting head is 50 %, p = 0.5, the sample size in experiment is 5, size = 5.
  3. The output shows an array with five results for each coin 1 means success and 0 means failure.
  4. [1 1 1 1 0] we had a successful result for 4 coins and failed for the last one.

Note

In this chapter and many other chapters, we will use the np.random.seed() function, do not be petrified it should be written to make your and my outputs equal. Do not change it.

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

Схема Бернуллі 2/2

It is time to connect your math knowledge with your programming skills. Look to this example:

You can treat this function as an actual experiment; whenever you click the run button, the output is different.

Explanation of the code above:

  1. You need to import bernoulli object from scipy.stats. With this object, we will conduct a probability experiment on a computer.
  2. bernoulli.rvs(p = 0.5, size = 5) means that the probability of getting head is 50 %, p = 0.5, the sample size in experiment is 5, size = 5.
  3. The output shows an array with five results for each coin 1 means success and 0 means failure.
  4. [1 1 1 1 0] we had a successful result for 4 coins and failed for the last one.

Note

In this chapter and many other chapters, we will use the np.random.seed() function, do not be petrified it should be written to make your and my outputs equal. Do not change it.

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

Схема Бернуллі 2/2

It is time to connect your math knowledge with your programming skills. Look to this example:

You can treat this function as an actual experiment; whenever you click the run button, the output is different.

Explanation of the code above:

  1. You need to import bernoulli object from scipy.stats. With this object, we will conduct a probability experiment on a computer.
  2. bernoulli.rvs(p = 0.5, size = 5) means that the probability of getting head is 50 %, p = 0.5, the sample size in experiment is 5, size = 5.
  3. The output shows an array with five results for each coin 1 means success and 0 means failure.
  4. [1 1 1 1 0] we had a successful result for 4 coins and failed for the last one.

Note

In this chapter and many other chapters, we will use the np.random.seed() function, do not be petrified it should be written to make your and my outputs equal. Do not change it.

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Все було зрозуміло?

It is time to connect your math knowledge with your programming skills. Look to this example:

You can treat this function as an actual experiment; whenever you click the run button, the output is different.

Explanation of the code above:

  1. You need to import bernoulli object from scipy.stats. With this object, we will conduct a probability experiment on a computer.
  2. bernoulli.rvs(p = 0.5, size = 5) means that the probability of getting head is 50 %, p = 0.5, the sample size in experiment is 5, size = 5.
  3. The output shows an array with five results for each coin 1 means success and 0 means failure.
  4. [1 1 1 1 0] we had a successful result for 4 coins and failed for the last one.

Note

In this chapter and many other chapters, we will use the np.random.seed() function, do not be petrified it should be written to make your and my outputs equal. Do not change it.

Завдання

Your task is to play a little bit with the function. Imagine that you have an unbelievable successful coin and in 90% of cases tossing a coin you receive a head. Follow the algorithm to experiment:

  1. Import the bernoulli object from scipy.stats.
  2. Conduct the experiment with bernoulli object using .rvs() method.
    • Set p parameter equal to 0.9.
    • Set size parameter equal to 1.

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

Секція 1. Розділ 3
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt