Probability of Sum of 2 Random Ints Being Prime

Click For Summary

Discussion Overview

The discussion revolves around the probability of the sum of two randomly selected integers being prime, specifically when the integers are chosen from a range of 1 to 1,000. It includes considerations of different methods for calculating this probability and clarifications regarding the problem's parameters.

Discussion Character

  • Exploratory
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants inquire about the clarity of the original question, particularly whether the integers can be the same and the exact range of selection.
  • One participant suggests that the problem may involve a non-uniform distribution when considering the sum of two dice, rather than a uniform distribution from 1 to 1,000.
  • Another participant proposes a method involving creating a spreadsheet to calculate the probability based on prime numbers between 1 and 2000.
  • There is a suggestion that the problem may be too simplistic or resemble a homework question, prompting a call for the original poster to demonstrate effort before receiving assistance.

Areas of Agreement / Disagreement

Participants express differing views on the clarity of the question and the appropriate method for calculating the probability. There is no consensus on how to approach the problem or what assumptions should be made.

Contextual Notes

Participants note ambiguities in the problem statement, such as the range of integers and whether they can be the same. There is also a mention of the need to consider the distribution of sums when selecting integers.

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
3K
  • · 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