Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.7K Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Mean of the result of iterations...

Posted 11 years ago
Table[r = Print[100*Log[(-1)/(RandomReal[] - 1)]], {i, 100}]

OR

Do[r = Print[100*Log[(-1)/(RandomReal[] - 1)]], {i, 100}]

I get 100 iterations of this expression. I need to find the mean/average of these iterations. How can I do this?

POSTED BY: Fat Villager
6 Replies
Posted 11 years ago

Beautiful! Thank you.

POSTED BY: Fat Villager
Posted 11 years ago

But

RandomReal[1, 100]

returns 100 random numbers between 0 and 1.

RandomReal[{1, 100}]

returns a single random number between 1 and 100.

POSTED BY: Jim Baldwin
Posted 11 years ago
POSTED BY: Fat Villager
Posted 11 years ago

If the "100" of "100 iterations" is the same as the "100" in {i,100}, then the following will get you the mean:

Mean[100 Log[-1/(RandomReal[1, 100] - 1)]]

Or are there 100 iterations of the 100 random draws?

POSTED BY: Jim Baldwin
Posted 11 years ago

Picture of what's going on...enter image description here

POSTED BY: Fat Villager
Posted 11 years ago
POSTED BY: Fat Villager
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard