# Bayesian Stats Help

• Nov 14th 2009, 03:22 AM
macagers
Bayesian Stats Help
Hi wonder if someone could point me in the right direction with this problem.

"A basketball coach wishes to estimate probability of success pi of a player based on observing a game. She has no prior knowledge of the player so allocates a flat non-informative prior p(pi)=1, where pi is between 0 and 1. The player scores 6 goals from 6 attempts in the game, derive an expression for the players posterior probability p(pi|y) and find the normalising constant."

Thanks in advance, any help would be appreciated.
• Nov 14th 2009, 06:26 AM
CaptainBlack
Quote:

Originally Posted by macagers
Hi wonder if someone could point me in the right direction with this problem.

"A basketball coach wishes to estimate probability of success pi of a player based on observing a game. She has no prior knowledge of the player so allocates a flat non-informative prior p(pi)=1, where pi is between 0 and 1. The player scores 6 goals from 6 attempts in the game, derive an expression for the players posterior probability p(pi|y) and find the normalising constant."

Thanks in advance, any help would be appreciated.

Bog-standard Bayes:

$p(\pi|\text{6in6})=\frac{p(\text{6in6}|\pi)p(\pi)} {p(\text{6in6})}$

$p(\text{6in6}|\pi)=\pi^6$ (because the number of success in $6$ trials $\sim B(6,\pi)$)

$p(\pi)=\begin{cases}1,&\pi\in(0,1) \\ 0, &\text{otherwise} \end{cases}$

$p(\text{6in6})=\int_{\pi=-\infty}^{\infty} p(\text{6in6}|\pi)p(\pi) \;d\pi=\int_0^1 \pi^6 \; d\pi$

CB
• Nov 14th 2009, 07:47 AM
macagers
Quote:

Originally Posted by CaptainBlack
Bog-standard Bayes:

$p(\pi|\text{6in6})=\frac{p(\text{6in6}|\pi)p(\pi)} {p(\text{6in6})}$

$p(\text{6in6}|\pi)=\pi^6$ (because the number of success in $6$ trials $\sim B(6,\pi)$)

$p(\pi)=\begin{cases}1,&\pi\in(0,1) \\ 0, &\text{otherwise} \end{cases}$

$p(\text{6in6})=\int_{\pi=-\infty}^{\infty} p(\text{6in6}|\pi)p(\pi) \;d\pi=\int_0^1 \pi^6 \; d\pi$

CB

Hi

Thanks for that, Apparently there should be a normalising constant which i need to round to 2 DP, i do not understand this at all! any chance you could explain it.

Cheers
• Nov 14th 2009, 08:39 AM
CaptainBlack
Quote:

Originally Posted by macagers
Hi

Thanks for that, Apparently there should be a normalising constant which i need to round to 2 DP, i do not understand this at all! any chance you could explain it.

Cheers

If you put all the abouve together you get:

$p(\pi|\text{6in6})=\begin{cases}7\pi^6,&\pi \in (0,1)\\0,&\text{otherwise}\end{cases}$

That is all there is to it, I don't know what your teacher has called a normalising constant, but the above is the solution with no need to round to any number of decimal places - it is exact, with:

$\widehat{\pi}=\frac{7}{8}$

CB
• Nov 14th 2009, 08:54 AM
macagers
Quote:

Originally Posted by CaptainBlack
If you put all the abouve together you get:

$p(\pi|\text{6in6})=\begin{cases}7\pi^6,&\pi \in (0,1)\\0,&\text{otherwise}\end{cases}$

That is all there is to it, I don't know what your teacher has called a normalising constant, but the above is the solution with no need to round to any number of decimal places - it is exact, with:

$\widehat{\pi}=\frac{7}{8}$

CB

Hi

the normalising constant is apparently the denominator of the equation, so i think that would be p(6in6) . So would that be equal to (7/8)^6 ?

Thanks

Stewart
• Nov 14th 2009, 09:16 AM
CaptainBlack
Quote:

Originally Posted by macagers
Hi

the normalising constant is apparently the denominator of the equation, so i think that would be p(6in6) . So would that be equal to (7/8)^6 ?

Thanks

Stewart

No! look at what I said $p(\text{6in6})$ was.

CB
• Nov 14th 2009, 10:41 AM
macagers
Quote:

Originally Posted by CaptainBlack
No! look at what I said $p(\text{6in6})$ was.

CB

I still dont understand it, im useless at this!

p(6in6) is the integral between 1 and 0 of pi^6, but i cant get a value for that! surely that would just be pi^6 which isnt an actual value.

Thanks again for helping me!

Stewart
• Nov 14th 2009, 11:06 AM
CaptainBlack
Quote:

Originally Posted by macagers
I still dont understand it, im useless at this!

p(6in6) is the integral between 1 and 0 of pi^6, but i cant get a value for that! surely that would just be pi^6 which isnt an actual value.

Thanks again for helping me!

Stewart

WolframAlpha will do that for you.

But you should be able to do definite integrals of powers of the variable of integration as a prerequisite to doing this stuff.

CB
• Nov 14th 2009, 11:16 AM
macagers
Quote:

Originally Posted by CaptainBlack
WolframAlpha will do that for you.

But you should be able to do definite integrals of powers of the variable of integration as a prerequisite to doing this stuff.

CB

I get it to be 1/7*pi^7, so is the answer 1/7? I really am confused by all of this!
• Nov 14th 2009, 11:36 AM
mr fantastic
Quote:

Originally Posted by macagers
I get it to be 1/7*pi^7, so is the answer 1/7? I really am confused by all of this!

Answer to what? And without showing your working how are we to know what you're trying to do and what mistakes you're making?

Posts #2 and #4 give you the complete solution to the question you originally posted. There's nothing more can be done. Your trouble is not with this question but with the basic prerequisite concepts and skills this question depends on you knowing.

You are therefore strongly advised to go back and thoroughly review those concepts and skills. Without an understanding of the necessary building blocks, the probability of you understanding how to do other questions like this one are slim.