Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

Login

Username

Password

Not registered yet?

#26 2012-07-30 06:16:11

bobbym
Administrator

Offline

Re: An expectation problem:

Yes, it is quite small.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#27 2012-07-30 06:17:39

anonimnystefy
Real Member

Offline

Re: An expectation problem:

How small?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón

#28 2012-07-30 06:20:33

bobbym
Administrator

Offline

Re: An expectation problem:

I do not know. But looking at the data the values are very close.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#29 2012-07-30 06:24:25

anonimnystefy
Real Member

Offline

Re: An expectation problem:

Oh. Okay.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón

#30 2012-07-30 06:26:22

bobbym
Administrator

Offline

Re: An expectation problem:

To get the sd we would have to run the simulation many times and use the formula. But by inspection you can see the dispersion is going to be small.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#31 2012-07-30 16:56:21

phrontister
Real Member

Offline

Re: An expectation problem:

Hi Bobby and stefy,

I've run several 10,000-cycle simulations in LB and each result was a smidge over 223.0. The result of a 100,000 cycle was 223.03524.

My Excel results varied more, but all were still only just < or > 223. I only tested up to about 1,000 cycles, which would account for the variation difference between the two programs.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

#32 2012-07-30 17:52:40

anonimnystefy
Real Member

Offline

Re: An expectation problem:

Hi phrontister

I started running 10 100000-cycles, but I wasn't at the computer long enough to check.


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón

#33 2012-07-30 21:11:39

bobbym
Administrator

Offline

Re: An expectation problem:

Hi phrontister;

I got a shade over 223 also.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#34 2012-07-30 23:44:11

phrontister
Real Member

Offline

Re: An expectation problem:

Hi Bobby,

Here's my M code. As you'll see, I was thinking LB while coding M...but it works. smile

My initial code was slow because I was testing for '200 ones' from the first pick ( sad ), but changing the test to commence after 199 picks reduced processing time to 1/7th of previous.

My LB code for 100,000 cycles took well over 9 hours c.f. M's 271 seconds.

Code:

In[1]:= Timing[sum = 0; c = 0; s = Table[0, {1000}];
         N[While[c < 100000, t = 199; ss = s;
          Do[ss[[RandomInteger[{1, 1000}]]] = 1, {t}] 
           While[Count[ss, 1] < 200, ss[[RandomInteger[{1, 1000}]]] = 1;t++]; 
          sum = sum + t; c++]; sum/c]]

Out[1]= {270.985, 223.00152}

So, again, just a touch > 223.

Last edited by phrontister (2012-08-04 18:23:22)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

#35 2012-07-31 01:39:48

bobbym
Administrator

Offline

Re: An expectation problem:

Hi phrontister;

That is fine. It is okay to go from one language to another looking for the same type of commands in each language.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#36 2012-07-31 01:48:34

phrontister
Real Member

Offline

Re: An expectation problem:

Hi Bobby,

That's really the only way I'll get anywhere with M for now. Anything that would require more dedicated study effort will have to wait until I get more time to be able to spend at it...but little by little I'm picking a few things up. Thanks for dangling the "extra credit" carrot...it motivated me. smile


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

#37 2012-07-31 01:55:30

bobbym
Administrator

Offline

Re: An expectation problem:

Hi;

Go at your own pace. You did well.


In mathematics, you don't understand things. You just get used to them.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

Board footer

Powered by FluxBB