# Probability of choosing a constant polynomial [closed]

Suppose we have a polynomial $$f(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_0$$ where all the coefficients are whole numbers which includes Zero.

Suppose we now randomly choose the values of these coefficients then:

(A) What is the probability that the polynomial becomes a constant polynomial?

(B) How would the probability change if we extend the set from which we choose coefficient to integers, rational numbers and finally real numbers?

Context :
There is nothing specific that led me to this thought.
It is relevant to me because I am curious about this.
My genuine question was with the intention to learn more.

• I don’t know much about probability theory at all, but I feel like the probability of this for all mentioned sets of numbers is nearly zero as these sets are not finite. Would love to know why I’m wrong, though. Apr 17 at 5:44
• Wouldn't the probability of picking any particular choice of $n+1$ integer coefficients technically be undefined? You can't assign each choice from an infinite set of equally-likely choices a probability without violating the axiom of countable additivity. Apr 17 at 5:53
• @AarushSaharan: FYI, this is equivalent to working over $\mathbb{R}^{n+1}$ (or $\mathbb{Z}^{n+1}$ or wherever the support of the coefficients that you assume). You need to endow the underlying space with a probability measure $\mathbb{P}$ -- e.g., Uniform over some compact domain, or Gaussian, etc. Then, your question is reduced to $\mathbb{P}(\mathbf{a}\in \mathcal{S})$, where $\mathbf{a}:=(a_0, a_1,\ldots,a_{n})$ and $\mathcal{S}$ is the line spanned by $(1,0,\ldots,0)$. In other words, you have probability mass distributed across the space and you ask how much is concentrated on the line. Apr 17 at 7:42
• @Prem: When you extend from the discrete to the real line (or from a discrete dense subset to its closure) you have to be a bit careful. This can be done, e.g., via defining a "sample-mean" of diracs centered at the rationals and showing that the discrete measure converges weakly (or in distribution) to the integral. Further, just showing that "$P\rightarrow 0$" is not enough. But, I believe the spirit of your answer is what the OP was expecting. Apr 17 at 20:17
• I do not understand why this question is closed? It was genuine and did attract some nice answers. As for additional context, there is nothing specific that led me to this thought. It is relevant to me because I am curious about this. Apr 18 at 12:49

Let us use only whole numbers between $$0$$ & $$(m-1)$$ : Each Co-efficient has $$m$$ choices.

Total number of Polynomials : $$m^n$$
Total number of Constant Polynomials : $$m$$
Probability : $$P=1/m^{n-1}$$

When we consider $$m \to \infty$$ , then $$P \to 0$$

Same Case when we consider Integers or rational numbers or real numbers.

Extending to Integers :
Consider the range of Integers between $$-m$$ to $$+m$$
Probability : $$P=1/(2m+1)^{n-1}$$
$$P \to 0$$

Extending to rational numbers :
Consider the range of rational numbers with "height" between $$1$$ to $$m$$
Probability : $$P=1/h(m)^{n-1}$$ , where $$h(m)$$ is the number of rational numbers with "height" between $$1$$ to $$m$$
$$P \to 0$$

Extending to real numbers :
It requires Integration & such to cover continuous variables , though End-Conclusion will be Same.
$$P \to 0$$

• How do we make a similar argument for rational or real numbers? Apr 17 at 15:20
• I updated the answer , @AarushSaharan , to cover 3 more cases.
– Prem
Apr 17 at 15:34
• I have no idea why there is a downvote , I can only guess that the downvoter is not aware of the concept of "height" of rational numbers !
– Prem
Apr 17 at 19:06
• Could you please explain the height concept in more detail? Apr 18 at 15:11
• Check out [[ en.wikipedia.org/wiki/Height_function ]] which will give Introduction to that. It is a way to count the rational numbers with finite subsets which we can make larger & larger towards infinity. Discussing in Detail will require more space than Comment Boxes !
– Prem
May 6 at 11:19