{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Differential Equations Solutions 88

Differential Equations Solutions 88 - CHALLENGE 16.5 In...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
98 Chapter 16. Solutions: Monte Carlo Principles CHALLENGE 16.4. function y = strange_random() % We subtract 2 from the average sample value for randmy, to make the mean 0. % Then we divide by the standard deviation, to make the resulting variance 1. y = sqrt(1000)*(sum(randmy(1000))/1000 - 2)/sqrt(5);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CHALLENGE 16.5. In this program, z is a sample from a uniform distribution on [0,1] and y is a sample from the desired distribution. z = rand(1); if (z < .6) then y = 0; else y = 1; end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online