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

You are not logged in.

#26 2013-03-07 23:57:54

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Yes, I do.

By the way, I finally downloaded Acton's book.

View Image: test.png

“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#27 2013-03-08 00:01:10

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

What took you so long with the book? He has another one too.

That is good work with the histogram. I need to do a chore I will be back in about a half hour.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#28 2013-03-08 00:03:55

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Well, first I couldn't find a site that offers a *free* download. And then I forgot about searching.

Okay, see you then.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#29 2013-03-08 00:18:29

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Hi;

Okay, I got it. Lets start generating random numbers from non - uniform distributions!


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#30 2013-03-08 00:20:51

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

So, we need to transform a non-uniform into uniform ditributions, right?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#31 2013-03-08 00:21:46

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Nope, the other way. We are going to transform a uniform into another distribution.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#32 2013-03-08 00:26:46

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Okay, but how?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#33 2013-03-08 00:36:19

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

We want to generate random numbers that are from the PDF f(x) = 2x from 0 to 1.

Solve the equation

for x. You get 2 solutions:

We take the positive one. Can you get maxima to do everything so far?


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#34 2013-03-08 00:52:55

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Yes. Should I plot a histogram for sqrt(random(1.0))?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#35 2013-03-08 01:05:24

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Hi;

Correct! Get 10000 of them. You should get something like the picture. Notice how neatly our random numbers fit under y = 2x ( the red line ).

View Image: 2013-03-08_045719.gif

In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#36 2013-03-08 01:11:07

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Yup. Got it.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#37 2013-03-08 01:12:39

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

There is only only more trick for the original problem.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#38 2013-03-08 01:16:50

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Which is?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#39 2013-03-08 01:17:52

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

It is not from 0 to 1. So you will have to do a change of variable to get it into that interval.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#40 2013-03-08 01:21:37

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

What is not from 0 to 1?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#41 2013-03-08 01:23:16

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Look at the PDF in post #1. It  is from 1 to 2.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#42 2013-03-08 01:25:30

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Okay, so, what should I do?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#43 2013-03-08 01:28:13

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Make the substitution of x = x + 1. That produces a PDF from 0 to 1. Now do everything the same. You will get a histogram like the one in post #1. The expectation will be 1 less because of the substitution.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#44 2013-03-08 01:32:05

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

I am confused now.

Where and when do I make that substitution?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#45 2013-03-08 01:35:05

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Now just do everything the same.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#46 2013-03-08 01:41:53

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

I get

for the CDF.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#47 2013-03-08 01:48:47

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

Hi;

Yes, that is correct. But we do not need it.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#48 2013-03-08 01:50:11

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

What do we need?

Oh, and I get


for the inverse.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#49 2013-03-08 01:53:06

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,886

Re: Simulations

The integral from 0 to x, repeat post #33

The inverse is in terms of y.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#50 2013-03-08 01:57:12

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,673

Re: Simulations

Well, since the PDF is 0 for x<0, the integral from 0 to x is exactly the CDF.

Yes, it is. But what range should I have for y?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

Board footer

Powered by FluxBB