« first day (2913 days earlier)      last day (2312 days later) » 

Anonymous
18:00
If it's 37/6 we can take it to be 7 I think
I feel like it's gotta be longer
cus getting exactly 6 and then exactly 3 is not super easy...
Anonymous
OOOOH
Anonymous
Found my mistake
Anonymous
Case 1 is wrong
Anonymous
Let $E$ be the expected die rolls to get 6 and 3 consecutively.

**Cases:**

I: (probability $\frac{5}{6}$) No 6 in the first roll. So expected rolls would be E+1

II: (probability $\frac{1}{6}\times \frac{5}{6}$) 6 occurs in the first roll. No 3 in the second roll. We restart. So expected rolls would be E+2

III: (probability $\frac{1}{6}\times \frac{1}{6}$) 6 occurs in the first roll and 3 in the second roll. Expected rolls 2


$E = \frac{5}{6} (E+1) + \frac{5}{36} (E+2) + \frac{1}{36}\times 2$
Anonymous
18:05
Corrected now
Anonymous
Solving the last equation
Anonymous
$E=42$
I'm not sure I follow your method
Anonymous
Which part?
decided to do a mathematica simulation
18:09
like...the general method you're going for
one trial: generate two random dice rolls. if they're 6,3, end. if not, add another dice roll at the end and check again. take n to be the number of dice rolls prior to 6,3
Anonymous
@enumaris Did you get the cases 1,2 and 3?
Anonymous
The last equation is the recursion
i had mathematica do that 10000 times
no I mean I don't follow the method itself
like...I don't know what you're doing at each step and why you're doing it
Anonymous
@Semiclassical Cool. Can you find the expectation of that distribution numerically?
horizontal axis is the number of dice rolls, vertical is how many times that number showed up
Anonymous
Seems like it should be around 50
yep. I stored the outcomes, so I just take the mean value of them
doesn't that look reversed?
18:11
34.4
No.
like the more die you roll the fewer the times 6,3 showed up?
o.O
oh
Anonymous
@enumaris Let $E$ be the expected number die rolls to get 6 and 3 consecutively. Okay so far?
If you roll more dice, you're more likely to have hit 63 already
you did how many rolls until 6,3 showed up
got it
yes, which is how I interpreted the problem: "dice rolls until 6,3 shows up"
18:12
34.4 seems close to the 36 intuition that I have
gonna bump up the number of trials
Anonymous
10,000 is not a lot of iterations tho
My intuition is that it should be 36 since you just treat 6,3 as a single unit and there's a 1/36 shot of getting that exactly on 2 consequtive dice rolls
Anonymous
To show correct results
yeah
going up to 100,000 now
34.3 now
18:14
hmmm
Anonymous
It reduced?
Anonymous
Strange
that seems also intuitive to me cus
36 is the "naive way"
eh, I generated a new batch of 100000 trials
I didn't add on to the old one
but you also get a little easier to hit (6,3) if you allow more intersections
Like view the rolls in pairs of 2
(6,3) vs (not 6,3)
oh I was way off
that way you would intuitively need 72 rolls lol
that's the 100,000 distribution
one thing to note is that the line is relatively thick. I think that's because you handle even and odd cases separately.
Anonymous
2
A: Number of tosses until 3 consecutive results using conditions

luluMETHOD I: Let $E$ denote the answer. Let $E_1$ denote the answer if you have one $6$ before you start (so you win if your first two tosses are $6$ but otherwise you need three in a row). Similarly let $E_2$ denote the answer if you have two $6's$ before you start (so you win if the first toss i...

Anonymous
My method is explained here ^
I'm getting stuck trying to figure out a general expression for $P(6,3|n)$ lol
18:20
my own expression for P(n) seems to have failed rather painfully
Anonymous
26
A: How many times to roll a die before getting two consecutive sixes?

André NicolasInstead of finding the probability distribution, and then the expectation, we can work directly with expectations. That is often a useful strategy. Let $a$ be the expected additional waiting time if we have not just tossed a $6$. At the beginning, we certainly have not just tossed a $6$, so $a$ ...

@Blue I don't think that method works if the 6's are not identical...?
like it shouldn't work if you swap 3 6's with the sequence "641"
Anonymous
@enumaris Why not? That's why I changed the probabilities accordingly
it's obviously easier to get "666" in some given length "n" sequence than it is to get exactly "641"
Anonymous
Suppose you need to get a 641
Anonymous
18:21
There are 4 cases
Anonymous
At first roll say you don't get a 6
let's take a simpler example
Anonymous
Okaies
suppose you're looking at coins. And you look for HH vs HT
H=head T=tails
if you flip 3 times
you have HHH, HHT, HTH, THH, TTT, TTH, THT, HTT
oh wiat, it works there lol
there's 3 with HH and 3 with HT
hmmm
Anonymous
Yup, you can again divide them into cases
18:23
maybe I'm wrong XD
what about 4...
Anonymous
We can do this with absorbing Markov chains
Anonymous
Lemme verify the result with that
Having done some fitting, it looks like one should have P(n)=(1-1/36)^n*1/36
probably a bit more fiddly than that b/c of even vs. odd tho
@enumaris That's not obvious to me at all
In which case, one has $\sum_{n=0}^\infty P(n)=1$ and $\sum_{n=0}^\infty n P(n)=35$...huh
18:27
@ACuriousMind hmmm
Let's take coins
and
4 flips
there's 16 possible outcomes
I see 8 with "HH" and only 6 with "HT"
Can somebody verify this?
If I modify the above P(n) in the way I thought I should, I end up with 35.5 instead
nope
I counted wrong
it's 8 and 10
which is plausible, but the numbers seemed to be pointing to 34.5 instead...hrm
I suppose I'm wrong
in the opposite direction?
There's 10 combos with HT
dam I can't even count
hold on, I'm gonna count again
Maybe you should train some neural net to count for you :P
18:31
I count 8 HH's and 11 HT's
loool
but it does suggest "finding HH is not the same as finding HT"
which to me suggests "finding 666 is not the same as finding 641"
but I dunno
the question posed was actually "what is the expected number of flips before getting HT" and the answer was 4.
I used the die example cus it seems like a more general version
I mean in this particular case, the answer did reflect dmckee's intuition of "how many flips before the chances of getting a HT is greater than 50%?"
in that 3 flips the chances are 3/8 and 4 flips the chances are 11/16
but this is a much more difficult problem than I first thought lol
another attempt on my part:
the probability of getting it without any prior flips is 1/6*1/6=1/36
the probability of getting it with one prior flip is 1*1/6*1/6 since the first flip won't matter
for two prior flips: you didn't get it in these first two, which happens with probability (1-1/36), and then you did get it for the next two, with probability 1/36. so it's (1-1/36)*1/36
same idea for three flips.
hmm, I think I see the problem with four. I'm overcounting somehow
Anonymous
Markov chain method gives 36 :/
Anonymous
But where was my first method wrong
Anonymous
Couldn't spot still
Anonymous
18:40
1
A: How many times to roll a die before getting two consecutive sixes?

JMoravitzAnother method is to approach this with Linear Algebra and the use of Absorbing Markov Chains and Stochastic Matrices. We describe the scenario as a markov chain with the states $A_2,A_1,A_0$ corresponding to two, one, or zero sixes most recently seen. We have the following transition matrix: ...

Anonymous
Used this logic ^
okay, so: What's the probability to get XXXX63 where 63 doesn't show up earlier
@Semiclassical I feel like that problem is at the same difficulty as what's the probability to get 63 in XXXX
I mean
it literally is 1 minus that right
well, sure. that's the idea: make it recursive
however, I don't think it actually is just 1 minus that. I think that's what's tripping me up
18:43
no, you're actually right
what it isn't is one minus the probability of getting 63 at the end of XXXX
since you could also get it as X63X and that'd be just as bad
I feel like this is way too difficult a question to be asking as the first question in a warm up question section...
So I think that makes it (1-P(2)-P(3)-P(4))...
which is kinda yuck :/
I...I don't know...
I feel like my brain is dead now
the recursion I seem to get is $P(n+2)=\frac1{36}(1-\sum_{k=0}^n P(k))$ with $P(0)=P(1)=1/36$
which...yay?
I mean, that's not as horrible as it seems. It means that $P(n+1)-P(n+2)=\frac{1}{36}P(n)$
Which begins to look Fibonacci, and I sorta thought it should be...
@Blue The Brilliant.org says the expected length of flips to get "HT" is 4, while the expected length of flips to get "TT" is 6. So...it's...different...
18:52
One nice thing about that, in any case, is that you can multiply both sides by $n$ and resum to get the expectation on the RHS
@Blue How are you?
so that's $$E[n]=\sum_{n=0}^\infty n P(n) = 36 \sum_{n=0}^\infty n P(n+1)-36 \sum_{n=0}^\infty n P(n+2)$$
Anonymous
@enumaris Yeah, sure. I never said they're same
Anonymous
You need to adjust the cases accordingly
oh
I guess I didn't understand how you adjusted the cases
Anonymous
18:54
Let's solve it
then $$\sum_{n=0}^\infty n P(n+1)= \sum_{n=1}^\infty (n-1)P(n)=\sum_{n=0}^\infty (n-1)P(n)-(-1)P(0) = E[n]-1+P(0)=E(n)-1+1/36$$
Anonymous
Suppose we want HT
Anonymous
Case 1: Get no T. Probability 1/2 - expected E+1
Anonymous
Case 2: Get T but no H in second run
Anonymous
18:55
1/2*1/2 - expected E+2
Anonymous
Case 3: Get T and H consecutively
Anonymous
1/2*1/2 - expected 2
$$\sum_{n=0}^\infty n P(n+2)= \sum_{n=2}^\infty (n-2)P(n)=\sum_{n=0}^\infty (n-2)P(n)-(-2)P(0)-(-1)P(1) $$
$= E[n]-2+2P(0)+P(1)=E(n)-2+1/12$
Anonymous
E = 1/2(E+1) + 1/4(E+2) + 1/4(2)
Man, are you guys still going on with the probability questions?
18:57
So $E[n]=36(E[n]-1+1/36)-36(E[n]-2+1/12) = 36+1-3=34$...huh
Seems like you don't even need a physics problem to nerd snipe physicists.
i knew it was that link without even looking :P
Anonymous
@WrichikBasu hi!
@Blue after a long time...
Anonymous
Yep :D
Anonymous
19:03
Sup?
lol
@Blue so what was the final answer?
was it 4?
I got mathematica to solve the recurrence relation
Anonymous
@enumaris I'm getting the correct answer i.e. 6 for two consecutive heads but not for HT or TH
Anonymous
19:05
70
A: Expected Number of Coin Tosses to Get Five Consecutive Heads

André NicolasLet $e$ be the expected number of tosses. It is clear that $e$ is finite. Start tossing. If we get a tail immediately (probability $\frac{1}{2}$) then the expected number is $e+1$. If we get a head then a tail (probability $\frac{1}{4}$), then the expected number is $e+2$. Continue $\dots$. If w...

and what I get is $$p(n)=2^{-n-5} 3^{-n-2} \left(\left(3 \sqrt{2}+4\right) \left(2 \sqrt{2}+3\right)^n+\left(4-3 \sqrt{2}\right) \left(3-2 \sqrt{2}\right)^n\right) $$
Anonymous
I'm trying to spot the error in my method now
@Blue the answer as provided by Brilliant.org is 6 for HH, but 4 for HT
(You don't actually need to find this p(n) to compute the expectation value, tho)
Anonymous
@enumaris Yes, I'm getting the first one
Anonymous
19:06
Not the second
@Semiclassical holy jeez that's a complex expression
ehhh
it's actually not as fearsome as it seems
@ACuriousMind so about that infinite grid of resistors...
it's of the form $p(n)=A r_1^n+B r_2^n$
@Blue how are your studies going on? Internship over? Here in school, life is almost akin to hell!
Anonymous
@WrichikBasu Holidays now
where $p(0)=A+B=1/36$, $p(1)=Ar_1+Br_2 = 1/36$, and $r_{1,2}$ are the roots of the characteristic polynomial of the recurrence relation
Anonymous
Eeeh, good luck with school
@ACuriousMind I just found that actually! I wonder how many people they've gotten with that comic
Anonymous
Yeah, the last year is tough
19:08
I mean, it's the exact same sort of formula as you have for the Fibonacci sequence @enumaris
@Blue just finished a 300 page computer project. Studies are in hopeless case, except few subjects.
Anonymous
Damn, I remember that 300 page project thing. We just wrote 1 program each, lol
@Semiclassical blinks
Anonymous
And then shared the programs among ourselves
Anonymous
The teachers never even checked the projects
Anonymous
@WrichikBasu As long as your project is bound tidily and you wrap it nicely with brown paper you'll get full marks :P
Anonymous
And just make it look fat
$$p(n) = \frac{1}{36}\frac{1}{r_2-r_1}\left[(1-r_2)r_1^n-(1-r_1)r_2^n\right]$$
Anonymous
In my class I think everyone got a 100 on that one
@Blue all projects are over as of now. BTW, have you heard that Kaushik Sir has left school?
Anonymous
19:14
Ooh
Anonymous
Why?
blah, denominator should've been r1-r2
@Blue problems with new Principal, as far as i know. He has joined DPS.
Anonymous
Who's the new principal?
Anonymous
And you people got a new Chemistry teacher instead?
19:18
@Blue Rajashree Ma'am.
Anonymous
I see
@Blue yes, from Heritage school.
Anonymous
Cool, cool
Anonymous
Doing organic now?
Anonymous
Who's your English teacher btw?
19:21
@Blue Currently Sagota Ma'am is doing organic, and the new reacher is doing the rest. She teaches better than Sagota Ma'am.
Anonymous
Good for you..lol
@Blue Papia Ma'am also left along with Kaushik Sir, but has rejoined. Currently Kajalnayana Ma'am is taking all English classes.
Anonymous
Lots of drama it seems
@Blue Come to school one day, and you'll understand ;-)
Anonymous
Not going back to that hellhole XD
19:24
@Blue :-D
What is the condition of Jadavpur currently? No politics?
Anonymous
@WrichikBasu Yes, internship over
Anonymous
@WrichikBasu Nah, not much politics these days
Anonymous
It's doing better. But they still have lots of infrastructure issues
Anonymous
We are still using the 50 year old lab equipments
@Blue you have a link to your paper?
Anonymous
19:27
@WrichikBasu Paper not yet completely over :P
Anonymous
I can give you the overleaf link
@Blue Those will never change. It's the problem of almost every old University in Kolkata.
@Blue ok
Anonymous
@WrichikBasu Mailed it
Anonymous
The first link is editable (I don't own it). Please don't make any edits :P
Anonymous
The second one is view only
19:32
@Blue Got it. No problem, I won't do anything. By the way, subho bijoya.
Anonymous
Same to you :)
@Blue This year we have our first science exhibition.
Anonymous
Oh, where?
In school, as far as i know. Hexagon hall I think.
Anonymous
Nice
19:44
By the way @Blue you have anything to add to this:
Anonymous
Sorry, I'm a bit sleepy now
Anonymous
I'll see tomorrow
OK, good night!
Anonymous
Night!
cya pal
19:54
@blue btw, the first riddle for this week on that page I linked earlier is pretty interesting: fivethirtyeight.com/features/…
Anonymous
Aaaaah! No more riddles. I was planning on no more procrastination from tomorrow :)
Anonymous
(Jokes aside, I'll have a look at that. Thanks :P)
20:39
the riddle sounds game-theoretic...
cus your optimal design appears to be dependent on your roommate's designs and vice versa
it's a static 3 player game of perfect information eh
Actually, the way they’re running it is to pick submitted traps at random
So that’s very much imperfect information
Well "perfect information" means you have perfect information on theoretically how the game works and that every individual knows every other individual is rational and stuff like that. It doesn't involve knowing what your opponent is doing. You only know that he's rational and he knows your rational, and he knows you know he's rational, and so on and so forth...
No, perfect information means that there is no hidden information (such as unknown cards in a player's hand in a card game). Whether or not games that involve chance can be "perfect information" is a matter of debate.
Anonymous
21:11
@Blue Finally found the mistake. The point is that in case $2$ there's also a chance that $6$ occurs in the second roll. In that case, we need not wait for a $6$ and a $3$. We just wait for a $3$ in the third place. So there's an entire sequence $63$, $663$, $6663$, ... which was skipped
Anonymous
And I don't see any easy fix for this
@Blue yeah...
Anonymous
Markov chain gives the exact result i.e. 36. So I probably need to trace through the derivation of the absorbing Markov chain formulae
Anonymous
Anonymous
Wikipedia doesn't give any citations :/
Anonymous
21:14
Gotta refer to a textbook
Anonymous
@enumaris BTW did you get the answer by any other method so far?
Anonymous
I didn't read the latter half of your discussion
@Blue I got stuck trying to figure out $P(6,3|n)$ lol
I couldn't even count heads and tails correctly for 2 coins tossed 4 times
not much of a chance I can count 6,3 correctly for 2 die rolled n times
Conceptually I know what $P(6,3|n)$ means, but I'm unable to figure out a closed form combinatoric solution for it
after I figure it out, I just have to sum 1-P(n) from 0 to infty then
oh wow I actually applied Bayes' theorem correctly once...
progress
holy cow, I got that one right!
proud lol
21:30
ahh that moment when you realize smacking your head against a problem worked
brute force baby
I counted on my fingers all the different ways
(not really)
I would need something like 40,000 fingers to do that
that's pretty much how I got through my stats class (that was mostly a probability class) in college
Telling me I needed to know the distributions for coins, dice, and balls in hats...I say no
Anonymous
Nice, the derivation is given here
so what's the answer?
Anonymous
21:35
@enumaris We need to consult the generating function masters :P
Should be 34, from what I had earlier
Anonymous
@enumaris I'm getting 36 from Markov
you 2 should fight it out
lol
correctness by combat
What n do you start with?
I take the sequence 63 as 0 rolls not 2 (ie no rolls prior to 63)
Anonymous
21:37
Lemme elaborate my method...one min
If you include those rolls, then 34->36
Anonymous
Oh, I took 63 as 2 rolls
Ah, then we agree
Anonymous
Not taking 63 as 2 rolls would be weird :P
Anonymous
I mean for calculations it's fine
21:39
Eh, you’re counting how many rolls before getting 6,3
But if you’re getting them right away, then there’s no prior rolls
so
is it a coincidence the the answer was simply 1/6^2
Anonymous
Oh, if you frame it like that, I agree
Anonymous
@enumaris lol...maybe
or is the answer explicitly 1/P(some given number)^2
Anonymous
Maybe this could be done in 2 seconds :P
Anonymous
21:41
And we spent hours
Like if you had 10 sided die and you wanted to see the sequence 7,2 is the expected number of rolls 100?
So, how should change if you’ve got m outcomes rather than 6
Yeah
also, does it generalize to longer sequences
Yeah, it should
8 sided die and you want 4,3,2 is that 1/(1/8^3)
if the formula is that easy, I think we all missed a much easier way to solve it cus...what the heck
21:42
Probably not that simple
I suspect that if you pick a longer sequence you’ll get a higher-order recurrence relation for the probabilities
so you suspect it generalizes for number of faces of the die, but not for length of the subseqence?
Anonymous
Just to elaborate my method a bit:
Anonymous
$$\begin{matrix}
X & A_0 & A_1 & A_2\\
A_0 & 5/6 & 1/6 & 0\\
A_1 & 4/6 & 1/6 & 1/6\\
A_2 & 0 & 0 & 1
\end{matrix}$$
so that 1/(probability of a given face)^(length of subsequence) is not correct
Anonymous
This was my transition matrix
21:46
Well, what may help there is that you can extract the expected value directly from the recurrence relation
Anonymous
$A_0$ is the state where you have neither $6$ nor $6$ and $3$ at the end of the sequence
That’s the tedious sum I had earlier
Anonymous
$A_1$ is the state where you have $6$ at the end of the sequence
Anonymous
$A_2$ is the state where you have $6$ and $3$ at the end of the sequence
So it shouldn’t be hard to generalize, I just don’t have a simple answer off the top of my head
21:49
@Blue I lost the link to all those community problems on that site, can you link it again?
Thanks :D
I think the hard problems on there are quite tough...
Anonymous
You can sort it according to your wish
Anonymous
Just change the "Difficulty"
yeah
I just think the "hard" ones are really quite hard lol
Anonymous
21:54
Fun though. Learnt a lot today :)
Anonymous
First the tree problem and next your dice problem
Anonymous
I shouldn't touch anymore riddles for at least one week lol
Anonymous
Exams coming up
Anonymous
These can be addictive
Anonymous
:P
22:00
lol
22:17
Here's a cool puzzle for you: You have an infinite plane, on which an infinite number of parallel lines are drawn 1cm apart. You randomly drop a 1cm long needle in this grid. What is the probability that the needle doesn't touch any of the grid lines?
I’m getting 2/pi I think
gotta show ur work
I only remember the method, I don't recall the final answer lol
but it sounds roughly right
there's some pi in there
I worked out, for a needle whose center lands a distance 0<x<1/2 from a line, what range of angles will make the needle cross the lines
22:30
yeah looks like 2/pi is right
That gives a probability density and you integrate over x to get the density
sounds good
now you can do it for a length t needle with grid size l
That works for a short needle st least
WP has both cases
-.- you're not supposed to look it up bruh
Lol
I looked it up after I did the t=l case
22:56
@enumaris Not a well-defined question - "randomly" does not define a probability distribution over $\mathrm{R}^2\times S^1$ (location of the drop + orientation of the needle)
well you can argue with the peep on wikipedia on this: en.wikipedia.org/wiki/Buffon%27s_needle
they don't even include the word randomly
(it becomes well-defined if you make the plane finite)
(but then you have to consider boundary conditions)

« first day (2913 days earlier)      last day (2312 days later) »