9 ms·
You've answered a different question: How likely are the substrings "11" and "10" to appear in binary strings of length 3? rather than: Is the sequence of '1
by zwischenzug 9y ago
You've answered a different question:
How likely are the substrings "11" and "10" to appear in binary strings of length 3?
rather than:
Is the sequence of '111' as equally likely to appear as '010' given that 1s and 0s are equally likely to appear?
- zwischenzug 9y agoReminds me of a question an old tutor used to ask potential thesis candidates: If I throw two dice, what's the probability I throw at least one six?
- pure-awesome 9y agoAm I being stupid, or is the answer 11/36? I.e., slightly less than 1/3? Out of 36 possible throws of a pair of dice, 10 of them have a single six and 1 more has both sixes.
- tomsmeding 9y agoSeems correct. The probability of at least one 6 is one minus the probability that both aren't a 6, which is 5/6 * 5/6 = 25/36; so the result is (36-25)/36 = 11/36.
- rtkwe 9y agoWhy wouldn't it just be the probability of either rolling at least one 6 which would be 1/6 + 1/6 = 1/3? Genuinely curious, I was never super good at probability calculations. edit: clarification of problem.
- Retric 9y agoPicture two coins and 2 flips and count the H's there (2x2) = 4 options and ((2x2) x 1/2 x 2(flips)) = 4 Heads. HH, HT, TH, TT However, if you count the sequences with at least one H there are (4-1) = 3 with at least 1 H (HH, HT, HT) as the HH eats up 2 H's. Now, Picture 3 sided dice, that's (3x3) = 9 options. You will see ((3x3) x 1/3 x 2(flips)) = 6 2's. 00, 01, 02, 10, 11, 12, 20, 21, 22 However if you count there are (6 - 1) = 5 sequences with at least one 2 you get 02, 12, 20, 21, 22 as the 22 eats up an extra 2. Now, what do you think happens with an N sided dice? What if N is 6. PS: This seems less clear as I added more info...
- rtkwe 9y agoYeah doing a brute force count of the possibilities the (6,6) option is double counted by the 1/6 + 1/6 method as two distinct possibilities. Or that's what it looks like is happening. Been too long since my college combinatorics class.
- oaisdjoaisjdoi 9y agoBecause those are just numbers that work. The only way to roll a 2 (for example) is to roll 2 1's - which is obviously 1/36, not 1/3.
- rtkwe 9y agoSorry the problem was probability of rolling at least one 6 not of rolling a 6. Edited my original to make that clearer without the original post.
- 0x0 9y agoBecause you're not guaranteed to roll a 6, even if you roll 6 times: 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 = 6/6 = 100% chance? Nope. :)
- pkaye 9y agoImagine doing that with 7 dice... 7/6 probability!
- escherplex 9y agoWhich suggests the probability of the event not happening would be -1/6, which suggests the quasiprobability of the event not not happening. Obviously no ambiguity there. /s
- zwischenzug 9y agoNope, you're being clever.
- uryga 9y agocould you explain? I got the same thing...
- jwilk 9y agoI think it was meant to be a direct answer to "Am I being stupid [...]?"
- zwischenzug 9y agoYup... shows the value of HN votes...
- emj 9y agoIs the tutor fair and unbiased?
- freyir 9y agoYes, but the sequence of bits that has been transmitted over the Internet is finite. That makes panic’s argument technically true. Since we’re dealing with a sequence that’s zettabytes long, I’d guess it falls under the category of technically true but irrelevant.
- daveFNbuck 9y agoI wrote a quick Python snippet to compute the probabilities for all sequences of length 3 over 20 flips: [(x, sum(1 for i in range(2**20) if x in '{:020b}'.format(i)) / 2.0**20) for x in map('{:03b}'.format, range(8))] The output shows a 79% chance for "000" and a 91% chance for "010". "000" and "111" are actually the least likely substrings, with "010" and "101" in second place. Furthermore, "001" has a 97% chance of occurring. It's pretty easy to see why "001" is so much more likely than the others. Unless your string perfectly alternates 0s and 1s, you're going to get repeating pairs. What happens after you get a "00"? If there's ever a 1 again, there were at least two 0s before it. So you're almost guaranteed a "001" after "00", unless it's near the very end of the string. You only have a 50% chance of getting "000" from these though. A 1 completely resets the search for "000", but a 0 keeps the search alive for "001".
- zwischenzug 9y agoAgain: that looks for whether that sequence is in each tested string, which is a different problem. It tests if 'x' is 'in', rather than the number of times it is seen.
- daveFNbuck 9y agoBut the question being tested is whether a given string is in the bits that have been transferred over the internet. The number of times it is seen is not what we're talking about here.