TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is this a theory/rule in Mathematics?

2 点作者 apollopower将近 4 年前
Hi all, I recently was daydreaming and had this silly thought experiment about adding two random integers chosen from an infinite set. I tried searching online for something similar to my thinking but came up short on explanations.<p>I have no real background in mathematics outside of undergraduate calculus, so was wondering if the more math-curious people here could point out some rule&#x2F;theory this may be related to, or find some illogical gap in my daydream :) So here goes...<p>If you pick out two random integers from an infinite set and add them, there would be a 66.66% chance of that sum turning out to an even number. This is based off two conclusions: 1. There is 50&#x2F;50 chance of picking out an even or odd integer from infinity 2. 2 of the 3 possible sums would lead to an even sum (odd+odd=even, even+even=even, odd+even=odd)<p>So if you were to keep taking two random integers from this infinite set (which would be for... infinity), you&#x27;d come up with an infinite set of integers which now 66.66% are made up of EVEN numbers.<p>If you were to keep repeating this process of pulling two numbers from your freshly created infinite set of summed integers, each new iteration of that set would be an infinity made up of more and more even numbers over time. So each set would get closer to a 100% collection of even numbers, but never quite getting there as it approaches infinity (the percentile of even numbers in your sets over time could be plotted out as an asymptote). You end up with an infinity of sets, all approaching a complete infinity of even numbers.<p>...<p>Very, VERY, useless(?) and random daydream, but it got me curious to see if one of my basic assumptions about working with infinity is wrong, or find others who have done similar though experiments (I&#x27;m confident I&#x27;m not the only one).<p>Thanks in advance to anyone for their input.<p>Sincerely, A Math Noob

4 条评论

susam将近 4 年前
It is not possible to randomly select an integer from the set of integers (a countably infinite set) with uniform distribution. The reason is that there is no uniform probability distribution on the set of integers. So how do we correctly express what you have intuitively arrived at? (By the way, the note that the result you have arrived at is incorrect but we will get to that later.)<p>Define set A = {x : x ∈ ℤ and -n &lt;= x &lt; n}. Now it is possible to define a uniform probability distribution over this set A. Let the probability of any integer chosen from this set be 1&#x2F;(2n). The set A has n even integers and n odd integers. Let a and b two integers chosen randomly from this set. The probability of a being even is 0.5, i.e., P(a is even) = 0.5. Likewise for b, i.e., P(b is even) = 0.5.<p>Now a + b is even if and only if either a and b are both even or a and b are both odd. The probability that a and b are both even is P(a is even) * P(b is even) = 0.5 * 0.5 = 0.25. Similarly, the probability that a and b are both odd is P(a is odd) * P(b is odd) = 0.5 * 0.5 = 0.25. Thus, the probability that a + b is even is P((a + b) is even) = 0.25 + 0.25 = 0.5.<p>Since the result does not depend on the value of n, we can now claim that lim n→∞ P((a + b) is even) = 0.5.
评论 #27323612 未加载
drdeca将近 4 年前
you left out the even + odd case.<p>The &quot;natural density&quot; ( <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Natural_density" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Natural_density</a> ) (the density in the set of natural numbers) of the even numbers, is 1&#x2F;2 .
moasda将近 4 年前
&gt; 2 of the 3 possible sums would lead to an even sum (odd+odd=even, even+even=even, odd+even=odd)<p>I think the conclusion is wrong, there are 4 cases:<p>odd+odd=even, even+even=even, odd+even=odd, even+odd=odd
gigatexal将近 4 年前
<a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;</a> Might be a better place to ask.<p>- another math noob