Probability of Sum of 2 Random Ints Being Prime

Click For Summary
SUMMARY

The probability of the sum of two randomly selected integers between 1 and 1,000 being prime can be calculated by analyzing the distribution of prime numbers within that range. There are 168 prime numbers between 1 and 1,000, and 303 prime numbers between 1 and 2,000. To determine the probability, one can create a spreadsheet that lists prime numbers, calculates probabilities for each possible sum, and aggregates the results. This method provides a clear approach to solving the problem definitively.

PREREQUISITES
  • Understanding of prime numbers and their distribution
  • Basic spreadsheet skills for data organization and calculations
  • Knowledge of probability concepts and calculations
  • Familiarity with integer selection and random sampling techniques
NEXT STEPS
  • Learn how to implement prime number generation algorithms
  • Explore probability theory related to sums of random variables
  • Investigate statistical methods for analyzing random integer selections
  • Study spreadsheet functions for probability calculations and data analysis
USEFUL FOR

Mathematicians, statisticians, educators, and students interested in probability theory and prime number analysis will benefit from this discussion.

donglepuss
Messages
17
Reaction score
4
Unreasonable Request
TL;DR
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
If you roll two dice, what are the odds that the sum is prime?
 
  • Like
Likes   Reactions: sysprog
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   Reactions: sysprog
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   Reactions: DrClaude, sysprog and phinds
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   Reactions: Klystron
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   Reactions: sysprog
This looks too much like homework. Please report such posts when you seem them.

Thread closed.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K