High School Probability that 2 distinct integers are divisible by the same number

  • Thread starter Thread starter nomadreid
  • Start date Start date
  • Tags Tags
    Primes Probability
Click For Summary
SUMMARY

The probability that two distinct randomly chosen integers are divisible by the same integer n is defined as 1/n², regardless of whether n is prime. This conclusion is supported by the analysis of the ring ℤ/nℤ, where the probability of selecting integers divisible by n is derived from the structure of this mathematical construct. The discussion clarifies that the uniform distribution assumption applies only when integers are selected from a finite set, such as {1, 2, ..., N}, where N is significantly larger than n.

PREREQUISITES
  • Understanding of basic probability theory
  • Familiarity with number theory concepts, particularly divisibility
  • Knowledge of mathematical structures such as rings, specifically ℤ/nℤ
  • Ability to work with limits and infinite sets in probability contexts
NEXT STEPS
  • Explore the properties of the ring ℤ/nℤ in depth
  • Study the implications of uniform distributions on finite versus infinite sets
  • Investigate the concept of coprimality and its probability calculations
  • Learn about advanced probability distributions and their applications in number theory
USEFUL FOR

Mathematicians, statisticians, and students of number theory who are interested in probability distributions and divisibility among integers.

nomadreid
Gold Member
Messages
1,762
Reaction score
248
TL;DR
Does p have to be prime so that the probability that two randomly chosen integers are both divisible by p is 1/p^2?
The probability that a randomly chosen integer is divisible by a given integer p is 1/p, regardless of whether p is prime.
The probability that 2 distinct randomly chosen integers are divisible by the same prime p is
1/p2.
I am not sure however whether the probability that 2 distinct randomly chosen integers are divisible by the same positive integer n is not simply
1/n2.
I feel that if n is not prime there might be some duplication somewhere, but I don't see where.
Any indications would be very much appreciated.
 
Mathematics news on Phys.org
nomadreid said:
TL;DR Summary: Does p have to be prime so that the probability that two randomly chosen integers are both divisible by p is 1/p^2?
How are you going to choose an integer at random? It can only be done uniformly for a finite set of integers. That said, if the integers are selected uniformly from a set ##1## to ##N##, where ##N >> p##, then this holds.
nomadreid said:
The probability that a randomly chosen integer is divisible by a given integer p is 1/p, regardless of whether p is prime.
The probability that 2 distinct randomly chosen integers are divisible by the same prime p is
1/p2.
I am not sure however whether the probability that 2 distinct randomly chosen integers are divisible by the same positive integer n is not simply
1/n2.
I feel that if n is not prime there might be some duplication somewhere, but I don't see where.
Any indications would be very much appreciated.
Every nth integer is divisible by ##n##, so given the above assumption, the probabilityan integer is divisible by ##n## is ##1/n##.
 
  • Like
Likes FactChecker
Consider the ring ##\mathbb{Z}_n=\mathbb{Z}/n\mathbb{Z}## and its projection ##\pi\, : \,\mathbb{Z}\longrightarrow \mathbb{Z}_n.## Then ##n\,|\,a## if and only if ##\pi(a)=0.##

If we have two numbers ##a,b## then we have the situation ##\pi'\, : \,\mathbb{Z}\times \mathbb{Z}\longrightarrow \mathbb{Z}_n\times \mathbb{Z}_n## and ##a\,|\,n ## AND ##b\,|\,n## if and only if ##\pi'(a,b)=(0,0).##

The ring ##\mathbb{Z}_n## has ##n## elements, so we hit ##0## every ##n## integers and ##P(n\,|\,a)=1/n.##

The ring ##\mathbb{Z}_n\times \mathbb{Z}_n## has ##n^2## elements, so we hit ##(0,0)## every ##n^2## integers and ##P(n\,|\,a\wedge n\,|\,b)=1/n^2.##

We don't need to consider primes.
 
Super, fresh_42. Thanks!

The reason I was in doubt was because, in the usual presentation of the probability of two numbers being coprime, one derives it with
(1-1/22)(1-1/32)(1-1/52)(1-1/72)(1-1/112)...
But when does the calculations to figure out whether two arbitrarily chosen integers are both divisible by the same two numbers (not necessarily prime), one ends up discarding repetitions, as in
https://gmatclub.com/forum/two-dist...-random-from-the-list-of-integers-296859.html

Thanks for the answer, PeroK. In answer to your question, see the answer by fresh_42
 
nomadreid said:
Thanks for the answer, PeroK. In answer to your question, see the answer by fresh_42
There is no uniform distribution on the integers. It's not mathematically possible to choose an integer at random unless some integers are more likely than others.
 
  • Like
  • Skeptical
Likes jbriggs444, FactChecker and fresh_42
PeroK said:
There is no uniform distribution on the integers. It's not mathematically possible to choose an integer at random unless some integers are more likely than others.
Picking a certain integer is of probability zero. Picking an even integer is a probability of ##0.5.## We compare two infinite sets ##\mathbb{Z}## and ##n\mathbb{Z},## and the quotient of them is finite. Picking an integer, in our case ##0,## from a finite set is uniformly distributed.
 
  • Like
  • Skeptical
Likes jbriggs444 and nomadreid
fresh_42 said:
Picking a certain integer is of probability zero.
That's not a valid probability distribution, as the total probability is zero:
$$\sum_{n = 1}^{\infty} p(X = n) = \sum_{n = 1}^{\infty} 0 = 0$$
fresh_42 said:
Picking an even integer is a probability of ##0.5.##
That depends on the distribution you use to choose an integer. A uniform distribution is not possible.
 
I think that's not the topic here. We are not choosing one integer from all, we only consider the finite set ##\{0,1,\ldots,n\}.## It is irrelevant how we got the number. The problem statement was/should have been: given two integers, how likely is it that they are both divisible by ##n.## But, yes, the phrase ...
nomadreid said:
The probability that a randomly chosen integer
... was unfortunate. It should have been given two integers. Of course, any automatism to generate an integer is heavily biased towards shorter numbers because it has to come to a halt in a finite time.
 
  • #10
fresh_42 said:
I think that's not the topic here. We are not choosing one integer from all, we only consider the finite set ##\{0,1,\ldots,n\}.## It is irrelevant how we got the number. The problem statement was/should have been: given two integers, how likely is it that they are both divisible by ##n.## But, yes, the phrase ...

... was unfortunate. It should have been given two integers. Of course, any automatism to generate an integer is heavily biased towards shorter numbers because it has to come to a halt.
The best way to patch this up is to assume that the set of integers available is much larger than the possible divisors. For example, if we choose ##X## uniformly from the set ##\{1, 2, \dots N\}##, then:
$$\lim_{N \to \infty}p(X \ \text {is even}) = 0.5$$And that straightens everything out.

That's the nearest we can get to a uniform distribution on the natural numbers.

PS likewise, if we pick two naturals:
$$\lim_{N \to \infty}p(X \ \text {is even} \wedge Y \ \text {is even}) = 0.25$$
 
  • Like
Likes jbriggs444, fresh_42 and nomadreid

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
7
Views
2K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
17
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
27
Views
3K