exercise:4ccdd1ee65: 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> A large number of waiting time problems have an ''exponential distribution'' of outcomes. We shall see (in Section \ref{sec 5.2}) that such outcomes are simulated by computing <math>(-1/\lambda)\log(\mbox{rnd})</math>, where <math>\lambda > 0<...")
 
No edit summary
 
Line 1: Line 1:
<div class="d-none"><math>
A large number of waiting time problems have an ''exponential distribution''
\newcommand{\NA}{{\rm NA}}
of outcomes.  We shall see (in [[guide:D26a5cb8f7|Important Densities]])  that such outcomes are simulated by computing
\newcommand{\mat}[1]{{\bf#1}}
\newcommand{\exref}[1]{\ref{##1}}
\newcommand{\secstoprocess}{\all}
\newcommand{\NA}{{\rm NA}}
\newcommand{\mathds}{\mathbb}</math></div> A large number of waiting time problems have an
''exponential distribution''
of outcomes.  We shall see (in Section \ref{sec 5.2})  that such outcomes are simulated by
computing
<math>(-1/\lambda)\log(\mbox{rnd})</math>, where <math>\lambda  >  0</math>.  For waiting times produced
<math>(-1/\lambda)\log(\mbox{rnd})</math>, where <math>\lambda  >  0</math>.  For waiting times produced
in this way, the average waiting time is <math>1/\lambda</math>.  For example, the times
in this way, the average waiting time is <math>1/\lambda</math>.  For example, the times

Latest revision as of 22:31, 12 June 2024

A large number of waiting time problems have an exponential distribution of outcomes. We shall see (in Important Densities) that such outcomes are simulated by computing [math](-1/\lambda)\log(\mbox{rnd})[/math], where [math]\lambda \gt 0[/math]. For waiting times produced in this way, the average waiting time is [math]1/\lambda[/math]. For example, the times spent waiting for a car to pass on a highway, or the times between emissions of particles from a radioactive source, are simulated by a sequence of random numbers, each of which is chosen by computing [math](-1/\lambda)\log(\mbox{rnd})[/math], where [math]1/\lambda[/math] is the average time between cars or emissions. Write a program to simulate the times between cars when the average time between cars is 30 seconds. Have your program compute an area bar graph for these times by breaking the time interval from 0 to 120 into 24 subintervals. On the same pair of axes, plot the function [math]f(x) = (1/30)e^{-(1/30)x}[/math]. Does the function fit the bar graph well?