เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Calculating the variance

What is the variance of a binomial distribution where 25 coins are flipped, each having a 30% chance of heads?

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Foundations of Probability in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Calculate this using the exact formula you learned in the lecture: the variance of the binomial is size * p * (1 - p). Print this result to the screen.
  • Confirm with a simulation of 10,000 trials.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Calculate the variance using the exact formula


# Confirm with a simulation using rbinom
แก้ไขและรันโค้ด