शुरू करेंमुफ़्त में शुरू करें

Simulating adding two binomial variables

In the last multiple choice exercise, you found the expected value of the sum of two binomials. In this problem you'll use a simulation to confirm your answer.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Foundations of Probability in R

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Simulate 100,000 draws from X, a binomial with size 20 and p = .3, and Y, with size 40 and p = .1.
  • Use this simulation to estimate the expected value of X + Y.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Simulate 100,000 draws of X (size 20, p = .3) and Y (size 40, p = .1)
X <-
Y <-

# Estimate the expected value of X + Y
कोड संपादित करें और चलाएँ