Revision as of 22:59, 14 June 2024 by Admin
BBy Bot
Jun 09'24
Exercise
Recall that if [math]X[/math] is a random variable, the cumulative distribution function of [math]X[/math] is the function [math]F(x)[/math] defined by
[[math]]
F(x) = P(X \leq x)\ .
[[/math]]
- Let [math]S_n[/math] be the number of successes in [math]n[/math] Bernoulli trials with probability [math]p[/math] for success. Write a program to plot the cumulative distribution for [math]S_n[/math].
- Modify your program in (a) to plot the
cumulative distribution [math]F_n^*(x)[/math] of the standardized random variable
[[math]] S_n^* = \frac {S_n - np}{\sqrt{npq}}\ . [[/math]]
- Define the normal distribution [math]N(x)[/math] to be the area under the normal curve up to the value [math]x[/math]. Modify your program in (b) to plot the normal distribution as well, and compare it with the cumulative distribution of [math]S_n^*[/math]. Do this for [math]n = 10, 50[/math], and [math]100[/math].