시작하기무료로 시작하기

말이 Secretariat의 기록과 같거나 더 빠를 확률은?

Belmont 우승자들의 기록이 정규분포를 따른다고 가정합시다(1970년과 1973년은 제외). 어떤 해의 Belmont Stakes 우승자가 Secretariat만큼 빠르거나 더 빠르게 달릴 확률은 얼마일까요?

이 연습은 강의의 일부입니다

Python으로 하는 Statistical Thinking (파트 1)

강의 보기

연습 안내

  • rng.normal() 함수를 사용해 정규분포에서 표본 1,000,000개를 추출하세요. 평균 mu와 표준편차 sigma는 이미 IPython 인스턴스의 네임스페이스에 로드되어 있습니다.
  • Secretariat의 기록인 144초보다 작거나 같은 표본의 비율을 계산하세요.
  • 결과를 출력하세요.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Take a million samples out of the Normal distribution: samples


# Compute the fraction that are faster than 144 seconds: prob


# Print the result
print('Probability of besting Secretariat:', prob)
코드 편집 및 실행