Probability of Sum of 2 Random Ints Being Prime

In summary, the conversation discussed the probability of selecting two integers at random between 1 and 1,000 and their sum being prime. There was also a discussion about the effort put into finding the answer and the use of a spreadsheet to calculate the probability. The thread was then closed due to it appearing to be a homework question.
  • #1
donglepuss
17
4
Unreasonable Request
TL;DR Summary
if I select two integers at random between 1 and 1,000, what is the probability that their sum will be prime?
if I select two integers at random between 1 and 1,000, what is the probability that their sum will be prime?
 
Physics news on Phys.org
  • #2
If you roll two dice, what are the odds that the sum is prime?
 
  • Like
Likes sysprog
  • #3
donglepuss said:
Summary:: if I select two integers at random between 1 and 1,000, what is the probability that their sum will be prime?

if I select two integers at random between 1 and 1,000, what is the probability that their sum will be prime?
What work have you done so far to come up with an answer? We expect some effort on your part.
 
  • Like
Likes sysprog
  • #4
phinds said:
What work have you done so far to come up with an answer? We expect some effort on your part.
Given the amount of effort the OP put into this similar question (or this unrelated one , or this one) I think we will be disappointed.
 
  • Like
  • Wow
Likes DrClaude, sysprog and phinds
  • #5
The question is not clear. Can you resolve its ambiguities/inclarities? Can the two integers selected at random be the same? Do you mean strictly between, i.e. from 2 too 999 inclusively, or do you instead mean from 1 to 1000 inclusively?

Are you trying to define a method for calculating this, or just trying to find the probability? If the latter, you could do a search and find that there are 168 prime numbers between 1 and 1000 [edit (thanks to @jbriggs444)], and you could do another search and find that there are another 135 primes between 1000 and 2000, and you then could then add 168 to 135, or you could just do one search on primes between 1 and 2000 and find that there are 303[/edit]. If the former, you can reduce part of the problem size by taking into account the fact that the only non-negative even integers that can sum to a prime are 0 and 2 ##-## no pair of even integers greater than zero can sum to a prime.

As other members said, if you show some effort on your part and still are having trouble solving the problem, we'll try to help ##-## I'll add that it's not a very difficult problem ##-## I think that with a modicum of effort, you could solve it.
 
Last edited:
  • Like
Likes Klystron
  • #6
To be clear, it seems that OP is not asking about a uniform distribution between 1 and 1000 (a single 1000 sided die roll) but about the non-uniform distribution between 2 and 2000 (the sum of two dice).

So you make a spreadsheet, populate rows 2 through 2000 with a 1 for every prime number in column A. Fill in the rest of the column A entries with zeroes. Populate column B with the probability for each such dice roll and verify that column B totals to 1.

Populate column C with the product of A and B.

Add up the total for column C and *voila*, the hoped for answer.
 
  • Like
Likes sysprog
  • #7
This looks too much like homework. Please report such posts when you seem them.

Thread closed.
 

1. What is the probability of the sum of two random integers being prime?

The probability of the sum of two random integers being prime is approximately 0.25. This means that out of every 4 pairs of random integers, one pair will have a prime sum.

2. How is the probability of the sum of two random integers being prime calculated?

The probability of the sum of two random integers being prime is calculated by dividing the number of possible prime sums by the total number of possible sums. For example, if we are considering integers between 1 and 10, there are 25 possible sums (1+1, 1+2, 1+3, ..., 10+9, 10+10) and 10 possible prime sums (2, 3, 5, 7, 11, 13, 17, 19, 23, 29). Therefore, the probability would be 10/25 = 0.4.

3. Is there a pattern or formula for determining the probability of the sum of two random integers being prime?

Yes, there is a pattern for determining the probability of the sum of two random integers being prime. It is known as the Goldbach's conjecture, which states that every even integer greater than 2 can be expressed as the sum of two prime numbers. This means that for any even number, the probability of its sum being prime is 1. However, for odd numbers, there is no known formula or pattern.

4. How does the range of integers affect the probability of the sum being prime?

The range of integers does affect the probability of the sum being prime. As the range increases, the probability decreases. For example, if we consider integers between 1 and 100, the probability of the sum being prime is approximately 0.17, which is lower than the probability of integers between 1 and 10. This is because as the range increases, the number of possible sums also increases, making it less likely for a sum to be prime.

5. Can the probability of the sum of two random integers being prime be greater than 0.5?

No, the probability of the sum of two random integers being prime cannot be greater than 0.5. This is because as the range of integers increases, the number of possible sums also increases, making it less likely for a sum to be prime. Therefore, the probability will always be less than 0.5.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
509
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
553
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • General Math
Replies
22
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
489
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
816
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top