Revision as of 23:38, 12 June 2024 by Admin (Created page with "Write a program that picks a random number between 0 and 1 and computesthe 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?")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
ABy Admin
Jun 13'24

Exercise

Write a program that picks a random number between 0 and 1 and computesthe 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?