Top Banner
1 Random Sampling Random Sampling - - Random Samples Random Samples
32

Random Sampling - Random Samples

Feb 01, 2017

Download

Documents

lydung
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Random Sampling - Random Samples

1

Random SamplingRandom Sampling- - Random SamplesRandom Samples

Page 2: Random Sampling - Random Samples

2

Why do we need Random Samples?

• Many business applications-We will have a random variable X such that

the probability distribution & expected value is unknown

-The only way to make use of probability is to estimate E(X) and if possible Fx or fx

-This can be done with random sampling

Page 3: Random Sampling - Random Samples

3

Random Samples

X come from some random process.

x results from a trial of the process (observation of X )

a set {x1, x2, , xn} of n independent observations of the same random variable X is called a random sample of size n.

Page 4: Random Sampling - Random Samples

4

Sample Mean

• What does a random sample tell us about a random variable?

• Consider random sampleset {x1, x2, , xn}

SAMPLE MEAN

n

iix

nx

1

1

Page 5: Random Sampling - Random Samples

5

Example

Shift observed 1 2 3 4 5 6 7 8 9 10Number of stoppages 2 11 6 8 6 5 10 4 8 3

3.6)384105686112(101

11

n

iix

nx

Page 6: Random Sampling - Random Samples

6

Important

• can be used as an estimate of the parameter E(X).

• In general, the larger the sample size n, the better will be the estimate

x

Page 7: Random Sampling - Random Samples

7

APPROXIMATING MASS AND DENSITY FUNCTIONS

If we have a large enough sample, we can group the data and form a histogram that approximates

• the probability mass function

(for a finite random variable)

or

• the probability density function

(for a continuous random variable).

Page 8: Random Sampling - Random Samples

8

Sample Data

0.0000.0200.0400.0600.0800.1000.1200.1400.1600.1800.200

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14Stoppages

Rela

tive

Fre

quen

cy

We have used bins of width 1 and have plotted relative frequencies.

The relative frequency of each value of X in the sample gives an estimate for the probability that X will assume that value. Hence, the relative frequency of a value x in the sample approximates P(X = x) = fX(x) [p.m.f - Discrete random variables]

APPROXIMATING MASS FUNCTIONS-Discrete random variables

Page 9: Random Sampling - Random Samples

9

APPROXIMATING DENSITY FUNCTION-Continuous random variables

• Recall that the p.d.f can be used to find probabilities P(a X b) is equal to the area under the curve of the p.d.f over the interval [a,b]

• If we want to use a histogram approximate the p.d.f then

Relative frequency of a bin= Area of the corresponding rectangle

Page 10: Random Sampling - Random Samples

10

Important• But we know Area of rectangle=width x height

But Relative frequency of a bin= Area of the corresponding rectangle

• Now the area of each rectangle represents the probability• Now we must plot the adjusted relative frequencies against the mid points of

the bins

widthfrequencylativefrequencyrelativeAdjustedHeight Re)(

widthAreafrequencyrelativeAdjustedHeight )(

Page 11: Random Sampling - Random Samples

11

Approximating the p.d.f. (Disney)

Bins FrequencyRelative

FrequencyAdjusted Rel. Freq.(Height) Midpoint

0.76 1 0.00240 0.07994 0.7450.79 0 0.00000 0.00000 0.7750.82 0 0.00000 0.00000 0.8050.85 1 0.00240 0.07994 0.8350.88 1 0.00240 0.07994 0.8650.91 2 0.00480 0.15987 0.8950.94 23 0.05516 1.83853 0.9250.97 56 0.13429 4.39648 0.955

1 126 0.30216 10.07194 0.9851.03 120 0.28777 9.67226 1.0151.06 53 0.12710 4.23661 1.0451.09 20 0.04796 1.59872 1.0751.12 9 0.02158 0.71942 1.1051.15 4 0.00959 0.31974 1.1351.18 1 0.00240 0.07994 1.165

More 0 0.00000 0.00000Sum: 417 1 33.333

Since the width is 0.03

0.0024/0.03

(0.73+0.76)/2

Histogram function is used for normalized ratios( Rnorm)

Page 12: Random Sampling - Random Samples

12

Approximating the p.d.f. (Disney)

Approximation of p.d.f.

0

2

4

6

8

10

12

0.76 0.79 0.82 0.85 0.88 0.91 0.94 0.97 1 1.03 1.06 1.09 1.12 1.15 1.18

Normalized ratios

Height

Page 13: Random Sampling - Random Samples

13

Approximating the p.d.f. (Disney)

Approximation of p.d.f.

0

2

4

6

8

10

12

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Height

Normalized ratios

Page 14: Random Sampling - Random Samples

14

How can random samplinghelp us price a stock option?

Recall that the continuous random variable Rnorm gives the normalized ratio of weekly closing prices on Walt Disney stock. The sheet Sample of the file Option Focus.xls computes 417 values of this normalized ratio from our 417 weekly closing ratios. We will assume that these are independent observations of Rnorm, that constitute a random sample of size 417 for Rnorm.

Random Samples, Focus

on the projectProbability, Mathematics, Tests, Homework, Computers

StockOptionPricing

Option Focus.xls (material continues) IT CClass Project

Page 15: Random Sampling - Random Samples

15

on the projectProbability, Mathematics, Tests, Homework, Computers

StockOptionPricing

Random, Focus

The sample mean, 1.0007695, of these observations is computed in the sheet Sample of Option Focus.xls. This is the same as our estimate for the ratio, Rrf, which corresponds to the weekly risk-free interest rate. Since we constructed the normalized ratios to make this true, we have a check on the correctness of our work.

The HISTOGRAM function is used to group the sample data for Rnorm, and a plot is created with the total area for all of the bars being equal to 1. This produces the bar graph, shown in the sheet Sample, which approximates the p.d.f., fnorm, of Rnorm. Connecting the midpoints at the tops of the bars produces the line graph approximation for fnorm that is shown in Sample.

Our plots, which are also shown on the next page, give a visual indication for the volatility of Disney stock over the past 8 years.

Option Focus.xls (material continues) IT CClass Project

Page 16: Random Sampling - Random Samples

16

WHAT SHOULD YOU DO?

Each team should now plot an approximation of the probability density function for the normalized ratios of weekly closing prices for its particular stock data and should find the sample mean of the normalized ratios.

on the projectProbability, Mathematics, Tests, Homework, Computers

StockOptionPricing

Random, Focus (material ends) Option Focus.xls IT

SAMPLE OF NORMALIZED RATIOS

0.0

2.0

4.0

6.0

8.0

10.0

12.0

0.745 0.805 0.865 0.925 0.985 1.045 1.105 1.165normalized ratio

heig

ht

CClass Project

Page 17: Random Sampling - Random Samples

17

Important• Check class website• Where you should be with the Project

– Normalize the ratios of closing prices– Create a histogram of normalized ratios– Read the Requirements for the Project 2 written report– Write a draft of the Discussion of Options section of written

reportWhat’s ahead?– Incorporate your simulation results for RANDBETWEEN in the

Discussion of Simulation section– Decide which assumption that you will discuss in more detail in

the written report

Page 18: Random Sampling - Random Samples

18

Expected Value

To consider the expected value (or mean) of a continuous random variable, we can use the probability density function(p.d.f) to give us a geometric interpretation. The expected value perfectly “balances” the area to its right with the area to its left.

X

fX

Page 19: Random Sampling - Random Samples

19

Hw11

Estimate the E(X) for the continuous random variable X, whose p.d.f., fX is shown below.

00.10.20.30.40.5

0 1 2 3 4 5 6 7 8 9 10x

f X(x

)

E(X)=4 (balances the area to its right with the area to its left

Page 20: Random Sampling - Random Samples

20

Bootstrapping

• collect a smaller sample of data points, then use a computer to simulate a much larger set.

Page 21: Random Sampling - Random Samples

21

Computer Simulations

• Why do simulations?– Cost benefits– Time constraints– Availability of data

• Which Excel functions will we need?– RANDBETWEEN() – discrete case- VLOOKUP()– IF()

Page 22: Random Sampling - Random Samples

22

Simulation, Integers

Read the description of the function from the Excel menu.

Menus differ slightlyin Excel XP.

RANDBETWEEN

FUNCTION

Page 23: Random Sampling - Random Samples

23

Simulation, Integers

This process uses the function VLOOKUP, which is found in the Lookup & Reference submenu of the Function Wizard.

Read the description of the function from the Excel menu.

VLOOKUP FUNCTION

Page 24: Random Sampling - Random Samples

24

Simulation, Integers

For our purposes, this will usually be left blank.

Value in the leftmost column of table

Location of table

Number of the column where

value is to be found

Phone Log.xls

Simulation. Simulation. Integers: page 6Integers: page 6

(material continues) IT C

Page 25: Random Sampling - Random Samples

25

The IF function is found under the Logical submenu of the Function Wizard.

Menus differ slightlyin Excel XP.

Page 26: Random Sampling - Random Samples

26

If B12 is less than or equal to 0.5, the function returns an H. If B12 is not less than or equal to 0.5, a T is returned. Note that the desired text must be specified in quotation marks. For the stock option project we do not need quotation marks-will show later in excel

Read the description of the function from the Excel menu.

Page 27: Random Sampling - Random Samples

27

More on Project Focus

• r1 -a normalized ratio of the adjusted closing price at the

end of the first week (will be selected randomly)

• initial price - $21.8700

• r1 is a value of Rnorm that might have occurred for the

first week.

Page 28: Random Sampling - Random Samples

28

• Likewise, let r2, r3, , r20 be normalized ratios of

adjusted closing prices for weeks 2, 3, , 20 of the option.

• It is stated in the project description that observations of R are all independent. Thus, the normalized ratios r1, r2, r3 , , and r20 are all independent observations of Rnorm

Page 29: Random Sampling - Random Samples

29

• random observation for the ratio r1r2r3 r20

• cnorm = $21.8700r1r2r3 r20

• cnorm is a observation of normalized closing price, Cnorm.

• We conclude that any set of 20 observations of R determines a set of 20 observations of Rnorm and, therefore, an observation of Cnorm.

Page 30: Random Sampling - Random Samples

30

• FV - the continuous random variable giving the per share value of our Walt Disney call at the end of

twenty weeks, based on the normalized closing price.

• s0 - strike price of $23 • Cnorm takes on a value cnorm,

Page 31: Random Sampling - Random Samples

31

Recall• if closing stock price strike price

• Final value of Call option (Intrinsic Value of a Call)=Maximum of 0 and C – S

• Case 1. FV = cnorm s0 if cnorm s0,

• Case2. FV=0 if cnorm < s0.

Page 32: Random Sampling - Random Samples

32

• 20 observations of Rnorm determine an observation of Cnorm, which, together with the strike price, determines an observation of FV.

• PV - the continuous random variable giving the present value of the Disney option on January 11, 2002.

• The present value for a value of FV is an observation of PV. Our price for the present value of the option is the expected value of PV.