





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















Why random samples?Why random samples?^ ^ We would like to have probability informationfor our random variable
X ^ Often we don’t know the distribution of
X^ or even its expected value To estimate the expected value,
For^ fweX^ X^ ^ To estimate the expected value,
For^ fweX^ X^ use^ random sampling
. ◦^ We may approximate the distribution if we can takea large enough sample of
n^ independent observations of^ X ◦ We call these^ n^ independent observations of
X, {x, x, x, …, x}, a random sample of size n^123 n
.
ApproximatingApproximating
p.m.f.p.m.f.ss ^ To approximate a probability mass function:^ ◦^ Group the data according to values of
X ◦^ Create a histogram for these groupings ◦^ Calculate the relative frequencies
Sample Data 0.2000.1800.1600.1400.1200.1000.0800.060 Relative Frequency 0.0400.020 0.000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14^ Stoppages
Discrete Random VariableDiscrete Random Variable^ ^ Example:^ Let^ X
be the denomination of a chipselected at random from a box that has 4 $1chips, 3 $5 chips, 2 $25 chips, and 1 $100chip. There are twenty observations of
X given below. Use the sample to plot an approximation of the
p.m.f.^ of^ X^ and to approximation of the
p.m.f.^ of^ X^ and to estimate^ E(X).^ (note: changed data from in class to match next slide)^ $25^ $^
ApproximatingApproximating
p.d.f.p.d.f.ss ^ To approximate a probability densityfunction:^ ◦^ Group the data according to the range ofvalues of^ X^ ◦^ Create a histogram for these groupings◦^ Create a histogram for these groupings^ ◦^ Calculate the relative frequencies^ ◦^ Divide the relative frequencies by the bin widthto calculate the
p.d.f.^ heights ◦ Create a line plot connecting the midpoints ofeach of the columns
ApproximatingApproximating
p.d.f.p.d.f.ss^ 0. Rel.Freq^ 0.
(bins are labeled by their midpoint)^ 0. (^1 3 5 7 9 11 13) In a plot of relative frequencies,the probability is given by theheight of the rectangle. But thatshould not be true for a^ p.d.f.^ – itmust be the area that is equal tothe probability.
(^1 3 5 7 9 11 13) By dividing the relativefrequency by the bin width, weare ensuring that the area ofeach rectangle (length timeswidth) is equal to the relativefrequency.
Continuous Random VariablesContinuous Random Variables^ Example:^ A bus arrives every 10 minutes.
Let^ W be the waiting time (in minutes) until the nextbus.^ Fifty observations of
W^ are given below. Use the sample to plot an approximation of the p.d.f.^ of^ W^ and to estimate
E(X). p.d.f.^ of^ W^ and to estimate
E(X). 9.7^ 0.8^ 6.5^ 5.5^ 9.
Continuous Random VariablesContinuous Random Variables^ Example (cont’d.):^ Bin^ Frequency
BinRelativeMidpointFrequency^ (frequencydivided by^ total)
Height^ (relativefrequencydivided by binwidth) total) 2 9
Sum^50
BootstrappingBootstrapping^ ^ Def: Bootstrapping
is sampling with replacement fromone sample to generate new samples, typically forthe purpose of estimating probabilities andparameters. ^ Why?^ Why?^ ◦^ We are not very likely to have a large enoughsample set, due to costs and time.^ ◦^ We can simulate a larger data set by sampling fromour original data, this is bootstrapping
. ^ We will use the
Excel^ functions, VLOOKUPand RANDBETWEEN to help bootstrapping.
VLOOKUPVLOOKUP^ ^ VLOOKUP is found under the “Formulas” Tab, “Lookup &Reference”
RANDBETWEENRANDBETWEEN^ ^ RANDBETWEEN returns a random integer between the twonumbers you input^ ^ RANDBETWEEN is found under the “Formulas” Tab, “Math &Trig”
RANDBETWEENRANDBETWEEN
^ Bottom:^ thelower integer inyour intervalwhich you are^ searchingsearching ^ Top:^ the upperinteger in yourinterval whichyou are searching
ExampleExample^ ^ The times at which 270 calls arrived at a company’sswitchboard are shown in the sheet
Log^ of^ Phone Log.xls. Let^ T^ be the random variable that gives the time (inminutes) until the arrival of the first call andbetween the arrivals of successive calls. The 270 times in the sheet
Log^ determine 270 time intervals, which may be assumed to represent independent^ observations of
T. ^ Let^ L^ be the random variable that gives the arrivaltime of the last call in a run of 15 calls, starting at9 a.m.
Example (cont’d.)Example (cont’d.)^ ^ Use^ VLOOKUP
and^ RANDBETWEEN
to generate 20 observations of
L. ^ In the sheet^ Random
of^ My Phone Log.xls
, RANDBETWEEN^
is used to randomly select an integer between 1 and 270. In the sheet^ Times
of^ My Phone Log.xls
, VLOOKUP^ is used to find the correspondingtime between calls. In the sheet^ Start Times
, the time between calls is added to the beginning of the hour (orthe arrival time of the previous call).