exercise:620c13285d: Difference between revisions

From Stochiki
(Created page with "<div class="d-none"><math> \newcommand{\NA}{{\rm NA}} \newcommand{\mat}[1]{{\bf#1}} \newcommand{\exref}[1]{\ref{##1}} \newcommand{\secstoprocess}{\all} \newcommand{\NA}{{\rm NA}} \newcommand{\mathds}{\mathbb}</math></div> Write a program to carry out the following experiment. A coin is tossed 100 times and the number of heads that turn up is recorded. This experiment is then repeated 1000 times. Have your program plot a bar graph for the proportion of the 1000 e...")
 
No edit summary
 
Line 1: Line 1:
<div class="d-none"><math>
Write a program to carry out the following experiment.  A coin is tossed 100 times and the number of heads that turn up is recorded.  This experiment is then repeated 1000 times.  Have your program plot a bar graph for the
\newcommand{\NA}{{\rm NA}}
\newcommand{\mat}[1]{{\bf#1}}
\newcommand{\exref}[1]{\ref{##1}}
\newcommand{\secstoprocess}{\all}
\newcommand{\NA}{{\rm NA}}
\newcommand{\mathds}{\mathbb}</math></div> Write a program to carry out the following experiment.  A coin is tossed
100 times and the number of heads that turn up is recorded.  This experiment is
then repeated 1000 times.  Have your program plot a bar graph for the
proportion of the 1000 experiments in which the number of heads is <math>n</math>, for
proportion of the 1000 experiments in which the number of heads is <math>n</math>, for
each <math>n</math> in the interval <math>[35,65]</math>.  Does the bar graph look as though it can be fit with a
each <math>n</math> in the interval <math>[35,65]</math>.  Does the bar graph look as though it can be fit with a
normal  curve?
normal  curve?
\item Write a program that picks a random number between 0 and 1 and computes
the negative of its logarithm.  Repeat this process a large number of times and
plot a bar graph to give the number of times that the outcome falls in each
interval of length 0.1 in <math>[0,10]</math>.  On this bar graph plot a graph of the
density <math>f(x) = e^{-x}</math>.  How well does this density fit your graph?

Latest revision as of 23:37, 12 June 2024

Write a program to carry out the following experiment. A coin is tossed 100 times and the number of heads that turn up is recorded. This experiment is then repeated 1000 times. Have your program plot a bar graph for the proportion of the 1000 experiments in which the number of heads is [math]n[/math], for each [math]n[/math] in the interval [math][35,65][/math]. Does the bar graph look as though it can be fit with a normal curve?