Can we find an unbiased estimator of $pi$?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
1












Suppose we want to estimate $pi$. We adopt the following strategy. We generate $n$ iid observations $Z_1,Z_2,...,Z_n$ from the unit disk $D=(x,y):x^2+y^2<1$ and let $R=(x,y):-dfrac1sqrt2leq x,yleq dfrac1sqrt2$ be a square inside $D$. Let $T$ be the number of times a generated observation falls inside $R$. Let $I=max1leq ileq n:Z_iin R$ and define $I=0$ if no observation falls inside $R$.



I am supposed to find an unbiased estimator of $pi$ using $T$ and $I$. I have made certain observations. It is clear that $Tsim Bin(n,dfrac2pi)$. I have also found that $P(I=k)=P(Z_kin R,Z_jnotin R,j>k)=dfrac2pi(1-dfrac2pi)^n-k$ if $1leq kleq n$ and $P(I=0)=(1-dfrac2pi)^n$.



$E(I)$ is turning out to be a pretty nasty thing to compute. How can we use $T$ and $I$ to compute a function $f(T,I)$ with $E(f(T,I))=pi$?










share|cite|improve this question

















  • 1




    Define $f(T,I) = pi$ for all $T, I$.
    – Michael
    Sep 2 at 5:31






  • 1




    A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
    – Did
    Sep 2 at 5:41






  • 1




    You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
    – joriki
    Sep 2 at 6:16











  • You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
    – joriki
    Sep 2 at 6:17










  • Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
    – Landon Carter
    Sep 2 at 6:46














up vote
2
down vote

favorite
1












Suppose we want to estimate $pi$. We adopt the following strategy. We generate $n$ iid observations $Z_1,Z_2,...,Z_n$ from the unit disk $D=(x,y):x^2+y^2<1$ and let $R=(x,y):-dfrac1sqrt2leq x,yleq dfrac1sqrt2$ be a square inside $D$. Let $T$ be the number of times a generated observation falls inside $R$. Let $I=max1leq ileq n:Z_iin R$ and define $I=0$ if no observation falls inside $R$.



I am supposed to find an unbiased estimator of $pi$ using $T$ and $I$. I have made certain observations. It is clear that $Tsim Bin(n,dfrac2pi)$. I have also found that $P(I=k)=P(Z_kin R,Z_jnotin R,j>k)=dfrac2pi(1-dfrac2pi)^n-k$ if $1leq kleq n$ and $P(I=0)=(1-dfrac2pi)^n$.



$E(I)$ is turning out to be a pretty nasty thing to compute. How can we use $T$ and $I$ to compute a function $f(T,I)$ with $E(f(T,I))=pi$?










share|cite|improve this question

















  • 1




    Define $f(T,I) = pi$ for all $T, I$.
    – Michael
    Sep 2 at 5:31






  • 1




    A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
    – Did
    Sep 2 at 5:41






  • 1




    You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
    – joriki
    Sep 2 at 6:16











  • You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
    – joriki
    Sep 2 at 6:17










  • Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
    – Landon Carter
    Sep 2 at 6:46












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





Suppose we want to estimate $pi$. We adopt the following strategy. We generate $n$ iid observations $Z_1,Z_2,...,Z_n$ from the unit disk $D=(x,y):x^2+y^2<1$ and let $R=(x,y):-dfrac1sqrt2leq x,yleq dfrac1sqrt2$ be a square inside $D$. Let $T$ be the number of times a generated observation falls inside $R$. Let $I=max1leq ileq n:Z_iin R$ and define $I=0$ if no observation falls inside $R$.



I am supposed to find an unbiased estimator of $pi$ using $T$ and $I$. I have made certain observations. It is clear that $Tsim Bin(n,dfrac2pi)$. I have also found that $P(I=k)=P(Z_kin R,Z_jnotin R,j>k)=dfrac2pi(1-dfrac2pi)^n-k$ if $1leq kleq n$ and $P(I=0)=(1-dfrac2pi)^n$.



$E(I)$ is turning out to be a pretty nasty thing to compute. How can we use $T$ and $I$ to compute a function $f(T,I)$ with $E(f(T,I))=pi$?










share|cite|improve this question













Suppose we want to estimate $pi$. We adopt the following strategy. We generate $n$ iid observations $Z_1,Z_2,...,Z_n$ from the unit disk $D=(x,y):x^2+y^2<1$ and let $R=(x,y):-dfrac1sqrt2leq x,yleq dfrac1sqrt2$ be a square inside $D$. Let $T$ be the number of times a generated observation falls inside $R$. Let $I=max1leq ileq n:Z_iin R$ and define $I=0$ if no observation falls inside $R$.



I am supposed to find an unbiased estimator of $pi$ using $T$ and $I$. I have made certain observations. It is clear that $Tsim Bin(n,dfrac2pi)$. I have also found that $P(I=k)=P(Z_kin R,Z_jnotin R,j>k)=dfrac2pi(1-dfrac2pi)^n-k$ if $1leq kleq n$ and $P(I=0)=(1-dfrac2pi)^n$.



$E(I)$ is turning out to be a pretty nasty thing to compute. How can we use $T$ and $I$ to compute a function $f(T,I)$ with $E(f(T,I))=pi$?







probability-distributions random-variables simulation






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Sep 2 at 4:53









Landon Carter

7,19311541




7,19311541







  • 1




    Define $f(T,I) = pi$ for all $T, I$.
    – Michael
    Sep 2 at 5:31






  • 1




    A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
    – Did
    Sep 2 at 5:41






  • 1




    You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
    – joriki
    Sep 2 at 6:16











  • You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
    – joriki
    Sep 2 at 6:17










  • Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
    – Landon Carter
    Sep 2 at 6:46












  • 1




    Define $f(T,I) = pi$ for all $T, I$.
    – Michael
    Sep 2 at 5:31






  • 1




    A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
    – Did
    Sep 2 at 5:41






  • 1




    You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
    – joriki
    Sep 2 at 6:16











  • You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
    – joriki
    Sep 2 at 6:17










  • Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
    – Landon Carter
    Sep 2 at 6:46







1




1




Define $f(T,I) = pi$ for all $T, I$.
– Michael
Sep 2 at 5:31




Define $f(T,I) = pi$ for all $T, I$.
– Michael
Sep 2 at 5:31




1




1




A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
– Did
Sep 2 at 5:41




A natural idea is to consider $hatpi=2n/T$... except that $P(T=0)ne0$. Any idea to adapt this?
– Did
Sep 2 at 5:41




1




1




You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
– joriki
Sep 2 at 6:16





You need to define more clearly what we're allowed to use. I take it it's implied that we're not allowed to use $pi$; otherwise @Michael's answer is clearly optimal. Are we allowed to use $n$? If so, you can drop $I$, since $T$ is a sufficient statistic.
– joriki
Sep 2 at 6:16













You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
– joriki
Sep 2 at 6:17




You can get properly sized parentheses, braces etc. that adjust to their content by preceding them with left and right.
– joriki
Sep 2 at 6:17












Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
– Landon Carter
Sep 2 at 6:46




Of course we cannot use $pi$, we are estimating it! We are allowed to use $n$. But I don't see why $T$ is sufficient.
– Landon Carter
Sep 2 at 6:46










1 Answer
1






active

oldest

votes

















up vote
1
down vote













I assume $Z_i_i=1^n$ are i.i.d. vectors uniformly distributed over the unit disc in $mathbbR^2$.



If you are seeking something more than my $f(T,I)=pi$ answer, then I think you are on a wild goose chase. That is because you suggest an answer can be given for any positive integer $n$, which would include $n=1$.



In the case $n=1$ we have $T=Isim mboxBernoulli$ with $P[T=1]=p=2/pi$. If you want a function $f(T)$ such that $E[f(T)]=pi$, you must find $f(0)$ and $f(1)$, such that
$$ (1-2/pi)f(0) + (2/pi)f(1) = pi$$
Thus
$$ (pi-2)f(0) + 2f(1)=pi^2 $$
Now if both $f(0)$ and $f(1)$ are rational numbers, it would contradict the fact that $pi$ is transcendental!



So we are forced to make irrational choices for $f(0)$ and/or $f(1)$, in which case why not just choose $f(0)=f(1)=pi$?




More generally, for any positive integer $n$ we seek a rational-valued function $f(t,i)$ such that
$$ sum_t=0^n sum_i=0^n f(t,i)(2/pi)^t(1-2/pi)^n-t c(t,i)=pi$$
where $c(t,i)$ is the (integer) number of ways to have $t$ successes with the last success at index $i$. Multiplying this equation by $pi^n$ gives
$$ sum_t=0^n sum_i=0^n f(t,i) 2^t(pi-2)^n-tc(t,i) = pi^n+1$$
Hence the equation
$$ sum_t=0^n sum_i=0^n f(t,i)2^t(x-2)^n-tc(t,i)=x^n+1$$
is a polynomial equation with rational coefficients for which $pi$ is a root, again contradicting the fact that $pi$ is transcendental!




On the other hand I observe:



i) With an infinite number of observations $Z_i_i=1^infty$, the expected number of observations until the first one lands in the square is $1/p = pi/2$.



ii) If we define a larger square $(x,y):-1leq x,yleq 1$ that contains the unit disc, and generate a random vector that is uniformly distributed over that square, then the probability this vector lies in the unit disc is $pi/4$.






share|cite|improve this answer






















  • Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
    – Landon Carter
    Sep 2 at 15:56










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2902352%2fcan-we-find-an-unbiased-estimator-of-pi%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













I assume $Z_i_i=1^n$ are i.i.d. vectors uniformly distributed over the unit disc in $mathbbR^2$.



If you are seeking something more than my $f(T,I)=pi$ answer, then I think you are on a wild goose chase. That is because you suggest an answer can be given for any positive integer $n$, which would include $n=1$.



In the case $n=1$ we have $T=Isim mboxBernoulli$ with $P[T=1]=p=2/pi$. If you want a function $f(T)$ such that $E[f(T)]=pi$, you must find $f(0)$ and $f(1)$, such that
$$ (1-2/pi)f(0) + (2/pi)f(1) = pi$$
Thus
$$ (pi-2)f(0) + 2f(1)=pi^2 $$
Now if both $f(0)$ and $f(1)$ are rational numbers, it would contradict the fact that $pi$ is transcendental!



So we are forced to make irrational choices for $f(0)$ and/or $f(1)$, in which case why not just choose $f(0)=f(1)=pi$?




More generally, for any positive integer $n$ we seek a rational-valued function $f(t,i)$ such that
$$ sum_t=0^n sum_i=0^n f(t,i)(2/pi)^t(1-2/pi)^n-t c(t,i)=pi$$
where $c(t,i)$ is the (integer) number of ways to have $t$ successes with the last success at index $i$. Multiplying this equation by $pi^n$ gives
$$ sum_t=0^n sum_i=0^n f(t,i) 2^t(pi-2)^n-tc(t,i) = pi^n+1$$
Hence the equation
$$ sum_t=0^n sum_i=0^n f(t,i)2^t(x-2)^n-tc(t,i)=x^n+1$$
is a polynomial equation with rational coefficients for which $pi$ is a root, again contradicting the fact that $pi$ is transcendental!




On the other hand I observe:



i) With an infinite number of observations $Z_i_i=1^infty$, the expected number of observations until the first one lands in the square is $1/p = pi/2$.



ii) If we define a larger square $(x,y):-1leq x,yleq 1$ that contains the unit disc, and generate a random vector that is uniformly distributed over that square, then the probability this vector lies in the unit disc is $pi/4$.






share|cite|improve this answer






















  • Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
    – Landon Carter
    Sep 2 at 15:56














up vote
1
down vote













I assume $Z_i_i=1^n$ are i.i.d. vectors uniformly distributed over the unit disc in $mathbbR^2$.



If you are seeking something more than my $f(T,I)=pi$ answer, then I think you are on a wild goose chase. That is because you suggest an answer can be given for any positive integer $n$, which would include $n=1$.



In the case $n=1$ we have $T=Isim mboxBernoulli$ with $P[T=1]=p=2/pi$. If you want a function $f(T)$ such that $E[f(T)]=pi$, you must find $f(0)$ and $f(1)$, such that
$$ (1-2/pi)f(0) + (2/pi)f(1) = pi$$
Thus
$$ (pi-2)f(0) + 2f(1)=pi^2 $$
Now if both $f(0)$ and $f(1)$ are rational numbers, it would contradict the fact that $pi$ is transcendental!



So we are forced to make irrational choices for $f(0)$ and/or $f(1)$, in which case why not just choose $f(0)=f(1)=pi$?




More generally, for any positive integer $n$ we seek a rational-valued function $f(t,i)$ such that
$$ sum_t=0^n sum_i=0^n f(t,i)(2/pi)^t(1-2/pi)^n-t c(t,i)=pi$$
where $c(t,i)$ is the (integer) number of ways to have $t$ successes with the last success at index $i$. Multiplying this equation by $pi^n$ gives
$$ sum_t=0^n sum_i=0^n f(t,i) 2^t(pi-2)^n-tc(t,i) = pi^n+1$$
Hence the equation
$$ sum_t=0^n sum_i=0^n f(t,i)2^t(x-2)^n-tc(t,i)=x^n+1$$
is a polynomial equation with rational coefficients for which $pi$ is a root, again contradicting the fact that $pi$ is transcendental!




On the other hand I observe:



i) With an infinite number of observations $Z_i_i=1^infty$, the expected number of observations until the first one lands in the square is $1/p = pi/2$.



ii) If we define a larger square $(x,y):-1leq x,yleq 1$ that contains the unit disc, and generate a random vector that is uniformly distributed over that square, then the probability this vector lies in the unit disc is $pi/4$.






share|cite|improve this answer






















  • Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
    – Landon Carter
    Sep 2 at 15:56












up vote
1
down vote










up vote
1
down vote









I assume $Z_i_i=1^n$ are i.i.d. vectors uniformly distributed over the unit disc in $mathbbR^2$.



If you are seeking something more than my $f(T,I)=pi$ answer, then I think you are on a wild goose chase. That is because you suggest an answer can be given for any positive integer $n$, which would include $n=1$.



In the case $n=1$ we have $T=Isim mboxBernoulli$ with $P[T=1]=p=2/pi$. If you want a function $f(T)$ such that $E[f(T)]=pi$, you must find $f(0)$ and $f(1)$, such that
$$ (1-2/pi)f(0) + (2/pi)f(1) = pi$$
Thus
$$ (pi-2)f(0) + 2f(1)=pi^2 $$
Now if both $f(0)$ and $f(1)$ are rational numbers, it would contradict the fact that $pi$ is transcendental!



So we are forced to make irrational choices for $f(0)$ and/or $f(1)$, in which case why not just choose $f(0)=f(1)=pi$?




More generally, for any positive integer $n$ we seek a rational-valued function $f(t,i)$ such that
$$ sum_t=0^n sum_i=0^n f(t,i)(2/pi)^t(1-2/pi)^n-t c(t,i)=pi$$
where $c(t,i)$ is the (integer) number of ways to have $t$ successes with the last success at index $i$. Multiplying this equation by $pi^n$ gives
$$ sum_t=0^n sum_i=0^n f(t,i) 2^t(pi-2)^n-tc(t,i) = pi^n+1$$
Hence the equation
$$ sum_t=0^n sum_i=0^n f(t,i)2^t(x-2)^n-tc(t,i)=x^n+1$$
is a polynomial equation with rational coefficients for which $pi$ is a root, again contradicting the fact that $pi$ is transcendental!




On the other hand I observe:



i) With an infinite number of observations $Z_i_i=1^infty$, the expected number of observations until the first one lands in the square is $1/p = pi/2$.



ii) If we define a larger square $(x,y):-1leq x,yleq 1$ that contains the unit disc, and generate a random vector that is uniformly distributed over that square, then the probability this vector lies in the unit disc is $pi/4$.






share|cite|improve this answer














I assume $Z_i_i=1^n$ are i.i.d. vectors uniformly distributed over the unit disc in $mathbbR^2$.



If you are seeking something more than my $f(T,I)=pi$ answer, then I think you are on a wild goose chase. That is because you suggest an answer can be given for any positive integer $n$, which would include $n=1$.



In the case $n=1$ we have $T=Isim mboxBernoulli$ with $P[T=1]=p=2/pi$. If you want a function $f(T)$ such that $E[f(T)]=pi$, you must find $f(0)$ and $f(1)$, such that
$$ (1-2/pi)f(0) + (2/pi)f(1) = pi$$
Thus
$$ (pi-2)f(0) + 2f(1)=pi^2 $$
Now if both $f(0)$ and $f(1)$ are rational numbers, it would contradict the fact that $pi$ is transcendental!



So we are forced to make irrational choices for $f(0)$ and/or $f(1)$, in which case why not just choose $f(0)=f(1)=pi$?




More generally, for any positive integer $n$ we seek a rational-valued function $f(t,i)$ such that
$$ sum_t=0^n sum_i=0^n f(t,i)(2/pi)^t(1-2/pi)^n-t c(t,i)=pi$$
where $c(t,i)$ is the (integer) number of ways to have $t$ successes with the last success at index $i$. Multiplying this equation by $pi^n$ gives
$$ sum_t=0^n sum_i=0^n f(t,i) 2^t(pi-2)^n-tc(t,i) = pi^n+1$$
Hence the equation
$$ sum_t=0^n sum_i=0^n f(t,i)2^t(x-2)^n-tc(t,i)=x^n+1$$
is a polynomial equation with rational coefficients for which $pi$ is a root, again contradicting the fact that $pi$ is transcendental!




On the other hand I observe:



i) With an infinite number of observations $Z_i_i=1^infty$, the expected number of observations until the first one lands in the square is $1/p = pi/2$.



ii) If we define a larger square $(x,y):-1leq x,yleq 1$ that contains the unit disc, and generate a random vector that is uniformly distributed over that square, then the probability this vector lies in the unit disc is $pi/4$.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Sep 2 at 14:07

























answered Sep 2 at 13:30









Michael

12.5k11325




12.5k11325











  • Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
    – Landon Carter
    Sep 2 at 15:56
















  • Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
    – Landon Carter
    Sep 2 at 15:56















Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
– Landon Carter
Sep 2 at 15:56




Thank you for the answer. I am aware of the last two alternatives you mentioned. This is actually an exam question.
– Landon Carter
Sep 2 at 15:56

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2902352%2fcan-we-find-an-unbiased-estimator-of-pi%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

tkz-euclide: tkzDrawCircle[R] not working

How to combine Bézier curves to a surface?

1st Magritte Awards