What is the probability that a Poisson random variable is prime?

496 Views Asked by At

Let $X \sim Poisson(\lambda)$, and let $k \in \mathbb{N}$.

Consider the quantity $Q(\lambda,k) = P\left( X+k \in Primes\right)$. Obviously $0 < Q(\lambda,k) < 1$.

How does $Q(\lambda,k)$ behave with respect to $\lambda$ and $k$?

For example, is there any asymptotic behavior as $\lambda \rightarrow \infty$?

Is $Q(\lambda,k)$ sensitive to the value of $k$ when $\lambda$ is large enough?

3

There are 3 best solutions below

1
On

$$e^{-\lambda} \sum_{j=0}^\infty \dfrac{\lambda^j}{j!} I_{prime}(j+k)$$ where $I_{prime}(n) = 1$ if $n$ is prime, $0$ otherwise. If you're expecting a closed form for this, think again.

2
On

Robert Israel gave a general answer, but you asked for more. Consider the special case $\lambda=1,\ k=0.$ This gives the constant

0.24839162...

which is related to sequence A100124 in the OEIS.

4
On

The probability in question is given by the limit of the partial sum up to the n-th prime by (I have replaced lambda by "a" for the convenience of Mathematica)

p[n_, a_] := Exp[-a] Sum[a^Prime[k]/Prime[k]! , {k, 1, n}]

In order to have a requested accuracy of to some value amax we need a definite number of terms n.

We could write for instance

With[{a = 50}, 
 Table[1 - p[k + 1, a] p[k,a// N, {k, 20, 30}]]

(* {-0.00205371, -0.00016001, -0.0000226721, -8.46669*10^-7, -5.67576*10^-9, \
-3.62011*10^-10, -8.61438*10^-11, -4.34702*10^-12, -9.2317*10^-13, \
-3.73379*10^-14, -1.68778*10^-19} *)

In the following we plot some graphs and adjust n by hand to a value beyond which we don't see any change in the graph.

enter image description here
(* 141208_plot _n12.jpg *)

enter image description here
(* 141208_plot_n21 *)

enter image description here
(* 141208_plot _n50.jpg *)

enter image description here
(* 141208_plot _n100.jpg *)

An interesting nontrivial curve results, and it seems that there is a certain limiting region for a>>1 about p(a>>1) ~= 0.15.

EDIT #1 Asymptotic behaviour

In order to estimate the asymptotiv behaviour of the probabality for large "a" we consider two aspects

(1) the numer of primes below n is approximately given by g(n) = n/log(n)
(2) the Poission Distribution w(a,k) = Exp(-a) a^k/k! for a>>1 is approximately a normal distribution with mean a and deviation roughly +-Sqrt(a)

Hence the main contribution to the sum defining the probability comes from primes between a-Sqrt(a) and a+Sqrt(a). Their number is approximately g(a+Sqrt(a)- g(a-Sqrt(a)). Dividing this by the number of natural numbers in this interval, 2 Sqrt(a) gives the probability estimate as

p(a>>1) ~= 1/(2 Sqrt(a))( (a+Sqrt(a))/Log(a+Sqrt(a)) -(a-Sqrt(a))/Log(a-Sqrt(a)) )

Numerical values are

{h[10], h[50], h[100], h[400]} = {0.245097, 0.190413, 0.170051, 0.139057}

They are in fairly good agreement with the values in the graphs. For very large "a" we find

p(a->oo) = 1/Log(a)

as expected by Michael Lugo without proof today in his comment.

Regards,
Wolfgang