BaşlayınÜcretsiz Başlayın

Multinomial sampling

Imagine a small town in Colorado, USA, which has on average 300 sunny days, 35 cloudy days, and 30 rainy days each year. As a scientist studying climate change, you are interested in the distributions of sunny, cloudy, and rainy days in a random span of 50 years if these averages are assumed to remain the same.

The following packages have been imported for you: seaborn as sns, pandas as pd, matplotlib.pyplot as plt, and scipy.stats as st.

Bu egzersiz

Monte Carlo Simulations in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Define the probabilities of sunny, cloudy, and rainy days
p_sunny = ____/365
p_cloudy = ____/365
p_rainy = ____/365
num_of_days_in_a_year = 365
number_of_years = 50
Kodu Düzenle ve Çalıştır