The Student Room Group

Why this is a reasonable approximation?

Scroll to see replies

Original post by gff

Spoiler



I'm pretty sure if you substitute it into the equation Mx=exMx=e^x then LHS=RHS. I didn't check the convergence of it although I think comparison to a standard geometric series guarantees the convergence
Reply 21
Original post by TheMagicMan
I'm pretty sure if you substitute it into the equation Mx=exMx=e^x then LHS=RHS. I didn't check the convergence of it although I think comparison to a standard geometric series guarantees the convergence


I may be a bit ignorant, but to deduce the relationship I let x,Mx,M \to \infty, and these power series don't fit into that.

Spoiler

Reply 22
Original post by hassi94
...



Original post by Slumpy
This is right.



:s-smilie:



Original post by gff
...


Any hints on how to approximate y in w=lnM+y? :s-smilie: I assume y is a random variable.
Reply 23
Original post by Dog4444

:s-smilie:





Any hints on how to approximate y in w=lnM+y? :s-smilie: I assume y is a random variable.


The chance of you having the biased coin is not 1/129. If you just picked a coin at random it would be, but if you picked up a coin, flipped it a thousand times, and got heads every time, the odds would be hugely in favour of you having picked the biased coin. Can you see this makes sense?

(In the case in question there's 2/3 chance the coin you have is the biased one.)
Reply 24
Original post by Slumpy
The chance of you having the biased coin is not 1/129. If you just picked a coin at random it would be, but if you picked up a coin, flipped it a thousand times, and got heads every time, the odds would be hugely in favour of you having picked the biased coin. Can you see this makes sense?

(In the case in question there's 2/3 chance the coin you have is the biased one.)


Nope. :frown:
There are 129 coins. I pick one and flip it over 9000 times. But the chance that it's biased is still 1/129 no matter what?
And when 2/3 comes from?
(edited 11 years ago)
Reply 25
Original post by Dog4444
Nope. :frown:
There are 129 coins. I pick one and flip it over 9000 times. But the chance that it's biased is still 1/129 no matter what?


Ok, try this:

I have 2 coins, one is double headed, one is normal.
If I've flipped a coin 3 times and got heads every time. The odds of this happening are:
P(picked an unbiased coin)*P(heads each time)=1/2*(1/2)^3=1/16
P(picked biased coin)*P(heads every time)=1/2*1^3=1/2

The other 7/16's are situations in which you pick an unbiased coin, and don't get 3 heads.
So, with the 3 heads options, the probability that the coin was biased was (1/2)/(1/2 + 1/16)=8/9
Yes?
Reply 26
Original post by Slumpy

So, with the 3 heads options, the probability that the coin was biased was (1/2)/(1/2 + 1/16)=8/9
Yes?


Can't follow this line. (1/2)/(1/2 + 1/16)=9/32.
And still can't follow the logic. What does other 9/32 mean then (probability the coin is unbaised?) and what (32-2*9)/32 mean then?
(edited 11 years ago)
Reply 27
Original post by Dog4444
Can't follow this line. (1/2)/(1/2 + 1/16)=9/32.


No, what I wrote there is correct.
( http://www.wolframalpha.com/input/?i=+%281%2F2%29%2F%281%2F2+%2B+1%2F16 if you won't take it on faith:p:)
Edit-to check; it's division, not multiplication.

Original post by Dog4444

But still can't follow the logic.


Ok, consider an even simpler(if slightly odder) case. You have 2 coins. One is heads on both sides, the other is tails on both.
You pick a coin and flip it once, getting a heads. Can you see the probability that you picked the double heads coin is 1?

Original post by Dog4444
What does other 9/32 mean then (probability the coin is unbaised?) and what (32-2*9)/32 mean then?


Edit: Don't really know where you're getting this stuff from tbh.
(edited 11 years ago)
Reply 28
Original post by Slumpy
No, what I wrote there is correct.
( http://www.wolframalpha.com/input/?i=+%281%2F2%29%2F%281%2F2+%2B+1%2F16 if you won't take it on faith:p:)
Edit-to check; it's division, not multiplication.



Ok, consider an even simpler(if slightly odder) case. You have 2 coins. One is heads on both sides, the other is tails on both.
You pick a coin and flip it once, getting a heads. Can you see the probability that you picked the double heads coin is 1?



Edit: Don't really know where you're getting this stuff from tbh.


Yeah, now I see how crappy my logic is. :colone:

But still can't follow why you divided instead of multiplying. Can you bring more maths in it like P(A|B) and stuff?
Reply 29
Original post by Dog4444
Yeah, now I see how crappy my logic is. :colone:

But still can't follow why you divided instead of multiplying. Can you bring more maths in it like P(A|B) and stuff?


So, we have the 2 coins, coin X is HH, coin Y is normal.
Event A is the event you pick coin X. Event B is the event you throw three heads in a row.

P(A)=1/2, pretty clearly, but we want P(A|B)
P(A|B)=P(AnB)/P(B)
Now, we know that P(B)=(1/2)*P(B|A)+(1/2)*P(B|A'), yeah? (This is the law of total probability: http://en.wikipedia.org/wiki/Law_of_total_probability )

so you get P(A|B)=2*P(AnB)/(P(B|A)+P(B|A')).

P(B|A)=P(BnA)/P(A)=2P(BnA) and P(B|A')=P(BnA')/P(A')=2P(BnA') -this just comes from the definitions

So we now have P(A|B)=P(AnB)/(P(AnB)+P(A'nB))
Now, P(AnB)=P(A)=1/2, and P(A'nB)=1/2*(1/2)^3=1/16
So we get P(A|B)=(1/2)/(1/2+1/16)
Does this make sense?
Reply 30
Original post by Dog4444

Any hints on how to approximate y in w=lnM+y? :s-smilie: I assume y is a random variable.


Well, have you read my post?

Spoiler

Reply 31
Original post by Slumpy
So, we have the 2 coins, coin X is HH, coin Y is normal.
Event A is the event you pick coin X. Event B is the event you throw three heads in a row.

P(A)=1/2, pretty clearly, but we want P(A|B)
P(A|B)=P(AnB)/P(B)
Now, we know that P(B)=(1/2)*P(B|A)+(1/2)*P(B|A'), yeah? (This is the law of total probability: http://en.wikipedia.org/wiki/Law_of_total_probability )

so you get P(A|B)=2*P(AnB)/(P(B|A)+P(B|A')).

P(B|A)=P(BnA)/P(A)=2P(BnA) and P(B|A')=P(BnA')/P(A')=2P(BnA') -this just comes from the definitions

So we now have P(A|B)=P(AnB)/(P(AnB)+P(A'nB))
Now, P(AnB)=P(A)=1/2, and P(A'nB)=1/2*(1/2)^3=1/16
So we get P(A|B)=(1/2)/(1/2+1/16)
Does this make sense?


Yes, thanks. Now I'm wondering how he managed to do everything in his head. :biggrin:

Original post by gff
Well, have you read my post?

Spoiler



Nice, thanks.
Original post by gff
I may be a bit ignorant, but to deduce the relationship I let x,Mx,M \to \infty, and these power series don't fit into that.

Spoiler



Iw asn't using power series....I was just using log laws
Okay sorry I didn't make the calculations I did clear:

By "So the probability of an unbiased coin doing what has been done is 1/258" I meant the probability of an unbiased coin having got heads 8 times is (128/129)*(1/256) = 1/258


As for the underlined bit:

We have a situation in which we have gotten heads 8 times. The probability of this happening is 1/258 for the unbiased coin (as shown above) and 2/258 for the biased coin. Therefore, it is twice as likely that the coin being talked about in the question is a biased coin. So then we can say the probability that the coin the question is referring to is a biased coin is 2/3, and 1/3 for unbiased.

Sorry I'm not great at explaining - I'm not very good at probability :tongue:
Sounds right, I got this question in interview :smile:

I did it in a pretty round-about way (from now on I'll write number of multiples of x as M(x)):

M(2) = 3000
M(3) = 2000
M(5) = 1200

If we take away all of these from 6000 we are also taking 2 groups of M(6), M(10) and M(15) - so we need to add these back in - however this will add in an extra M(30) so we must take that away.

M(6) = 1000
M(10) = 600
M(15) = 400
M(30) = 200

So the answer is 6000 - M(2) - M(3) - M(5) + M(6) + M(10) + M(15) - M(30)= 6000 - 3000 - 2000 - 1200 + 1000 + 600 + 400 - 200 = 1600

Interview stress made me overcomplicate things I think haha :tongue:
Original post by hassi94
Sounds right, I got this question in interview :smile:

I did it in a pretty round-about way (from now on I'll write number of multiples of x as M(x)):

M(2) = 3000
M(3) = 2000
M(5) = 1200

If we take away all of these from 6000 we are also taking 2 groups of M(6), M(10) and M(15) - so we need to add these back in - however this will add in an extra M(30) so we must take that away.

M(6) = 1000
M(10) = 600
M(15) = 400
M(30) = 200

So the answer is 6000 - M(2) - M(3) - M(5) + M(6) + M(10) + M(15) - M(30)= 6000 - 3000 - 2000 - 1200 + 1000 + 600 + 400 - 200 = 1600

Interview stress made me overcomplicate things I think haha :tongue:


This is basically inclusion exclusion. Anyway a slightly different method is to consider the numbers up to thirty and multiply by 200
Original post by TheMagicMan
This is basically inclusion exclusion. Anyway a slightly different method is to consider the numbers up to thirty and multiply by 200


Never heard of inclusion exclusion :tongue: Yeah I think that is the best way to do it (the way you said).
Original post by hassi94
Never heard of inclusion exclusion :tongue: Yeah I think that is the best way to do it (the way you said).


Inclusion exclusion is exactly what you did there...it's just the fancy name for that method of alternating subtracting and adding when calculating the size of sets
Original post by TheMagicMan
Inclusion exclusion is exactly what you did there...it's just the fancy name for that method of alternating subtracting and adding when calculating the size of sets


Ahh right cool, I've read very little about sets and set theory (and so related techniques) to be honest.

Hmm did you realise a pattern the way ------- did it?

6000 - (1/2)(6000) = 3000 to get rid of multiples of 2
3000 - (1/3)(3000) = 2000 to get rid of multiples of 3
2000 - (1/5)(2000) = 1600 to get rid of multiples of 5

I.e. take a 1/2 to get rid of 2s, 1/3 to get rid of 3s, 1/5 to get rid of 5s, take 1/N to get rid of N (probably only work if all N1, N2 etc are coprime - right?)?

Maybe I'm just tired but I can't figure out why that pattern works.
(edited 2 years ago)
Reply 39
Original post by Dog4444
Yes, thanks. Now I'm wondering how he managed to do everything in his head. :biggrin:




With a bit of practice, you pretty much jump to the last step straight away.(That said, looking at the writing on my nearby paper, I did it a different way anyways:p:)

Original post by hassi94
Ahh right cool, I've read very little about sets and set theory (and so related techniques) to be honest.

Hmm did you realise a pattern the way -------- did it?

6000 - (1/2)(6000) = 3000 to get rid of multiples of 2
3000 - (1/3)(3000) = 2000 to get rid of multiples of 3
2000 - (1/5)(2000) = 1600 to get rid of multiples of 5

I.e. take a 1/2 to get rid of 2s, 1/3 to get rid of 3s, 1/5 to get rid of 5s, take 1/N to get rid of N (probably only work if all N1, N2 etc are coprime - right?)?

Maybe I'm just tired but I can't figure out why that pattern works.


Yeah, one in every N numbers is divisible by N, so you take (1/N)(6000) to get rid of the multiples of N(if you meant something different here, sorry!)
(edited 2 years ago)

Quick Reply