turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Simulation Question

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-21-2009 01:04 AM

Suppose a one unit line is divided randomly in two pieces. How can I use simulation to find E(the short piece divided by the long piece)?

Thank You!

Thank You!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-21-2009 08:59 AM

You can't find E(the short piece divided by the long piece) via simulation, if I am understanding you properly, that E is Expected value.

You can find the mean of the randomly generated numbers.

You can find the mean of the randomly generated numbers.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-22-2009 07:45 AM

I love "A-ha" moments. I prepared the following, and thought it a neat approach, but then the "A-ha" occurred shortly before posting. I offer the following in quotes, and give the "A-ha" afterwards.

"I'm curious as to why you can't find this. If X is a random value from the univariate distribution on [0,1] and Y is 1-X, then I would think that the formula (via a Taylor's series expansion) could be applied:

E(X/Y) = E(X)/E(Y) * [1 + (V(Y)/(E(Y)^2) - (cov(X,Y)/E(X)*E(Y))]

where E(a) is the expected value of a, V(a) is the variance of a, and cov(a,b) is the covariance between a and b. By using the sample values for each run of the simulation, approximate values of E(X/Y) could be calculated, and then averaged across all runs. It seems like a perfect bootstrap opportunity. I must be missing something here."

Well, I missed a key something. The OP wants the short divided by the long. Consequently, X and Y as I tried to define them do not meet this definition. Sometimes X>Y, sometimes Y>X, so they do NOT define the short and the long pieces. I suppose that if you think about this hard enough, you see that the ratio would follow some kind of Cauchy distribution, implying that the expectation doesn't exist. One could simulate as much as you want, but the thing you end up calculating? I don't know what to call it.

Cool.

Steve Denham

"I'm curious as to why you can't find this. If X is a random value from the univariate distribution on [0,1] and Y is 1-X, then I would think that the formula (via a Taylor's series expansion) could be applied:

E(X/Y) = E(X)/E(Y) * [1 + (V(Y)/(E(Y)^2) - (cov(X,Y)/E(X)*E(Y))]

where E(a) is the expected value of a, V(a) is the variance of a, and cov(a,b) is the covariance between a and b. By using the sample values for each run of the simulation, approximate values of E(X/Y) could be calculated, and then averaged across all runs. It seems like a perfect bootstrap opportunity. I must be missing something here."

Well, I missed a key something. The OP wants the short divided by the long. Consequently, X and Y as I tried to define them do not meet this definition. Sometimes X>Y, sometimes Y>X, so they do NOT define the short and the long pieces. I suppose that if you think about this hard enough, you see that the ratio would follow some kind of Cauchy distribution, implying that the expectation doesn't exist. One could simulate as much as you want, but the thing you end up calculating? I don't know what to call it.

Cool.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-22-2009 08:06 AM

Steve

I agree with your comments.

My point is that E(X), E(Y),*etc*. *etc*. are quantities that cannot be computed via simulation. E(X), E(Y) and the other moments are integrals, and SAS doesn't do integrals. You cannot evaluate integrals via simulation. You can however obtain an ESTIMATE of E(X), or E(Y), or E(the short piece divided by the long piece) via simulation.

I agree with your comments.

My point is that E(X), E(Y),