Math Is Fun Forum

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

You are not logged in.

#1 2015-10-11 09:30:46

stichman34
Member
Registered: 2015-10-11
Posts: 3

Hard/longwinded Probability question

A machine fires its first shot and hits the target, but it misses its second shot. All its subsequent shots have a probability of hitting the target equal to the proportion of targets hit beforehand. For example, if it hits 5 out of the first 8 shots, then the 9th shot has a probability of 5/8 to hit the target. What is the probability that it hits exactly 50 out of its first 100 shots. Leave your answer in exact form (e.g. a/b).

If you're not good at word problems, it can be written like this
X~((x+1)/(y+2),98) (x is number of successful trials, y is number of trials at that point)
P(X=49)=A
A=a/b
Find a/b

The work i've done on it is above and i know i can work this problem like a tree diagram, but no one wants to be drawing 2^100 branches come the last trial!
I have worked out that the last trial must be at 49 or 50 successes though, both of which end in 49/99 probability of ending on exactly 50 successes, but i can't reverse engineer beyond that.

I have just started A-levels and came across this problem on a sharing site and I would like a easier/faster method as well as an answer if anybody can think of one. Thank you for your time.

Offline

#2 2015-10-11 21:46:19

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Hard/longwinded Probability question

Offline

#3 2015-10-12 03:18:38

adampjr
Member
Registered: 2014-04-21
Posts: 3

Re: Hard/longwinded Probability question

I'm not good at stuff, but I like to run things through trials. I guess thats Monte Carlo method or something.

Running the following script multiple times reveals an average a little above 1%.

(python)

Offline

#4 2015-10-12 04:36:46

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

Explain please @EVW

Last edited by Agnishom (2015-10-12 05:25:55)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#5 2015-10-12 13:02:55

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Hard/longwinded Probability question

Hello Agnishom!

There are ways to solve problems.

i) ETPI ( patent to bobbym ).

ii) Apply Experimental Math to it.

iii) Ask bobbym when the old guy is in a good mood, like after he watches the Walking Dead.

I'll bet you can figure which I chose.

Last edited by ElainaVW (2015-10-12 13:06:27)

Offline

#6 2015-10-13 00:59:58

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

What is ETPI?

I can only write a MonteCarlo simulation


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#7 2015-10-13 01:09:30

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Hard/longwinded Probability question

How many patents does Bobby M owns?


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#8 2015-10-13 04:49:33

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

Who is Bobby?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#9 2015-10-13 04:50:38

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

bobbym owns nothing.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2015-10-13 05:17:35

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Hard/longwinded Probability question

Agnishom wrote:

What is ETPI?

I can only write a MonteCarlo simulation

ETPI - Exploit The Problem Itself

A simulation is enough for an ansatz smile

Offline

#11 2015-10-13 05:21:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

Hi;

I think we should all wait for some type of confirmation from the OP.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2015-10-13 06:08:21

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

Please help me solve the problem


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#13 2015-10-13 06:53:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

How fast is your simulation and how many can you do?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2015-10-13 07:40:07

stichman34
Member
Registered: 2015-10-11
Posts: 3

Re: Hard/longwinded Probability question

The python script by adampjr looks like it's just running all possible situations and totaling them up, giving the same answer as ElainaVW so it looks more likely, it's also a nice answer, being such an easy fraction to write. But I'm not sure how to ETPI, this is the first i've even seen this acronym so it must be very protected by bobbym tongue Is working out "P(X<50)-P(X<49)" experimental math? Or am i overthinking things? I like computers so the simulation is nice and all, but if it's possible to be done without that, it would be cool to learn smile Thank you all for giving me the solution though!

Offline

#15 2015-10-13 07:50:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

Is it correct?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2015-10-13 08:14:28

stichman34
Member
Registered: 2015-10-11
Posts: 3

Re: Hard/longwinded Probability question

Yes it is correct

Offline

#17 2015-10-13 09:52:50

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

I will tell her!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2015-10-14 01:58:25

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

bobbym wrote:

How fast is your simulation and how many can you do?

I usually would do it in Python or Mathematica, but since you want speed, should I write it in C++?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#19 2015-10-14 04:13:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

It does not matter but mine is very very slow. Once you have written it play spot the pattern.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2015-12-12 00:40:45

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

I think I should rewrite the simulation


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#21 2015-12-12 06:55:50

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

You can do that but it is nicer to play spot the pattern.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#22 2015-12-12 13:04:16

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

Indeed, but I do not have the data here.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#23 2015-12-12 14:12:19

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Hard/longwinded Probability question

Then you will need a simulation.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#24 2015-12-12 14:20:07

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

The simulation will only give me real number approximations


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#25 2015-12-12 14:46:36

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Hard/longwinded Probability question

bobbym wrote:

How fast is your simulation and how many can you do?

One million in 20 seconds.

#include <iostream>
#include <random>

int simulation(){

  int hits = 1, trials = 2;

  std::random_device rd;

  for(; trials<100; trials++)
    if ((rd()%trials)+1 <= hits)
      hits++;

  return hits;
}

int main(){

  int counter=0;

  for(int iii=0; iii<100000; iii++)
    if (simulation() == 50)
      counter++;

  std::cout << counter << std::endl;

  return 0;
}

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

Board footer

Powered by FluxBB