tag:blogger.com,1999:blog-6894866515532737257.comments2015-06-25T15:33:24.443-07:00Probably Overthinking ItAllen Downeyhttps://plus.google.com/111942648516576371054noreply@blogger.comBlogger442125tag:blogger.com,1999:blog-6894866515532737257.post-8811494161127966382015-06-21T09:53:36.436-07:002015-06-21T09:53:36.436-07:00The betting example can't show anything unless...The betting example can't show anything unless you reconcile having a variable number of collection opportunities. But there is a way to make the problem easier to handle. Wake SB both days, but only ask her for her belief in Heads if it is Monday, or the coin landed Tails. And give her an hour to ponder what her answer will be, if she is asked (she knows both details on Sunday).<br /><br />In that hour, she knows that there is a 1/2 probability for either Heads or Tails, a 1/2 probability that it is Monday or Tuesday, and that these random variables are independent. So each combination has a 1/4 probability. That is, the prior probabilities are P(H&Mon)=P(H&Tue)=P(T&Mon)=P(T&Tue)=1/4.<br /><br />She also knows some conditional probabilities: P(Askl|H&Mon)=P(Ask|T&Mon)=P(Ask|T&Tue)=1 and P(Ask|H&Tue)=0. From these, she can use Bayes Rules to say P(H|Ask)=1/3. (I'm not going to write it out; it's simple, but long in this format).<br /><br />The thirder solution to the original problem is essentially the same. Different people take different steps trying to avoid saying that Tuesday, after Heads, exists as a potential observation opportunity for SB. They avoid it simply because she will be unconscious when, or if, it occurs. But it does exist, and her information content is the same in my variation when she is asked for her belief, as it is in the original when she is awake. How, or if, she would observe it is irrelevant when she observes it isn't the case.<br /><br />The halfer solution is saying that Tuesday, after Heads, does not happen. The other three possibilities represent the entire sample space for her observation possibilities, and a prior-probability space must be constructed to reflect that sample space.JeffJohttp://www.blogger.com/profile/09110352332876400907noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-4909279031719109702015-06-16T16:20:14.420-07:002015-06-16T16:20:14.420-07:00In this betting example, Sleeping Beauty can take ...In this betting example, Sleeping Beauty can take advantage of the extra information provided by each waking event to do better by canceling with a certain probability. I am still a novice at Bayesian stats, so before I tried calculating the optimum value using stats I ran a proof of concept test in Python. Sure enough, by canceling about 25% of the time Sleeping Beauty can increase her return from 50% to about 56%! If I get a chance in the next week or so I may sit down and generalize a formula for the optimum cancellation rate for an arbitrary number of waking events and bet payoff ratio.Cody Wheelandhttp://www.blogger.com/profile/03630072833157158797noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-3634596674146411872015-06-14T14:02:50.326-07:002015-06-14T14:02:50.326-07:00I believe it's meant as a joke... And an excus...I believe it's meant as a joke... And an excuse to learn Bayesian statistics.Juliehttp://www.blogger.com/profile/05748446414743697343noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-89100624997224406262015-06-13T07:38:22.375-07:002015-06-13T07:38:22.375-07:00SB is not obligated to bet based on her current be...SB is not obligated to bet based on her current beliefs. If she knows that more information is coming in the future, she can compute a posterior based on that future information and bet accordingly.<br /><br />Each time she wakes up, she should believe that she is more likely to be in the Tails scenario, but she also knows that more information is coming her way.<br /><br />Specifically, she knows that when she wakes up on Wednesday, and is told that it is Wednesday and the experiment is over, she will update her beliefs again and conclude that the probability of Heads is 50% and the bet is favorable.<br /><br />So when she wakes up on Monday or Tuesday and has the option to cancel the bet, she could think: "Based on my current beliefs, this bet is unfavorable, but I know that before the bet is resolved I will get more information that makes the bet favorable. So I will take that future information into account now and keep the bet (decline to cancel)."<br /><br />Again, the weirdness is not in her beliefs but in the unusual scenario where she knows that she will get more information in the future. The Bayesian formulation of the problem tells you what you should believe after performing each update, but in this case you have some flexibility about when to perform the update.Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-19744326636823239862015-06-13T07:00:00.752-07:002015-06-13T07:00:00.752-07:00Right, the bet should only be resolved once, sorry...Right, the bet should only be resolved once, sorry for not making that clear. (Otherwise, it's actually not right for her to accept it originally, if she loses twice whenever she loses, but only wins once whenever she wins).<br /><br />So, we agree that she should not cancel. But isn't there something odd? Put yourself in SB's position when you are woken up. You say that you have a "belief of 1/3 in the proposition that the coin is heads". The bet is unfavourable to you if the probability of heads is 1/3. And yet you don't cancel it. That suggests one sense in which you do NOT have a belief of 1/3 after all.Jameshttp://www.blogger.com/profile/10075856924139777288noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-22316745935964035922015-06-13T06:29:01.390-07:002015-06-13T06:29:01.390-07:00If the bet is only resolved once (on Wednesday), t...If the bet is only resolved once (on Wednesday), then SB should accept the bet (and not cancel it) because she is effectively betting on a coin toss with favorable odds, and the whole sleeping-waking scenario is irrelevant.<br /><br />But if (as I assumed) the bet is resolved each time she wakes up, then I stand by my answer: if she bets based on her priors, she would accept the bet; then, after she gets more information, she would cancel it. There's nothing irrational about that, is there?<br /><br />You are right that is it strange to accept a bet she knows she will cancel, but that's because it's unusual to know in advance that you will get information in the future. If you like, SB could think, "Based on what I know now, this bet is favorable, but I know that I will get information in the future that will change my beliefs and make this bet unfavorable, so I might as well decline it now."Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-39945994876251092032015-06-13T06:13:29.877-07:002015-06-13T06:13:29.877-07:00This comment has been removed by a blog administrator.Paulhttp://www.blogger.com/profile/04309125585593320043noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-88361958223578840382015-06-13T04:44:07.672-07:002015-06-13T04:44:07.672-07:00But the policy "never cancel" leads to h...But the policy "never cancel" leads to her winning money on average. (Specifically, if she stakes $100 for a return of $250 on heads, then her average gain is $25 - let's say the bet is resolved on Wednesday when she is woken up for good at the end of the experiment). This is better than "always cancel" in which case she never wins any money. So there is something odd about the logic which is leading to "always cancel". <br /><br />There would also be something strange about logic which would say she is right to make a bet that she knows in advance she is going to cancel. We could even suppose there is a non-refundable transaction fee of $5 to make the bet in the first place. Is she still right to make the bet (since her expected gain is more than $5), even though she knows she is going to cancel it? This seems like throwing $5 away. Jameshttp://www.blogger.com/profile/10075856924139777288noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-20672091790887275242015-06-13T04:33:13.134-07:002015-06-13T04:33:13.134-07:00Oops. I misread Mark's comment. Sorry, Mark,...Oops. I misread Mark's comment. Sorry, Mark, and thanks, Paul. You are right that SB learns that it is not Tuesday Heads, which refutes the halfer argument that SB learns nothing.Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-58706971757498613462015-06-13T04:27:56.716-07:002015-06-13T04:27:56.716-07:00Yes, she should cancel the bet. Based on her prio...Yes, she should cancel the bet. Based on her prior, the bet is favorable, so she was right to accept it. But then she gets more information, because the event she observed (waking up) was more likely under one hypothesis than the other. So she updates her beliefs and, based on her posterior, the bet is no longer favorable, so she would be right to cancel it.Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-72232863483045394312015-06-13T02:23:19.369-07:002015-06-13T02:23:19.369-07:00This comment has been removed by the author.Paulhttp://www.blogger.com/profile/04309125585593320043noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-31695697623364946342015-06-12T22:27:25.646-07:002015-06-12T22:27:25.646-07:00I'd be interested in your reaction to the foll...I'd be interested in your reaction to the following extension. Before going to sleep on Sunday, Sleeping Beauty makes a bet at odds of 1.5:1 that the coin will come down heads. (This is favourable for her when the probability of heads is 1/2, and unfavourable when the probability of heads is 1/3). She is told that whenever she is woken up, she will be offered the opportunity to cancel any outstanding bets. Later she finds herself woken up, and asked whether she wants to cancel any outstanding bets. Should she say yes or no? (Let's say she doesn't have access to any external randomness to help her choose). Is her best answer compatible with a "belief of 1/3 that the coin is showing heads"?<br /><br />Personally I think that to write "the thirder position is correct" may be overstating things. As a mathematical problem, it's not well-posed; there are various ways to formulate it rigorously as a conditional probability question, and different formulations have different answers. As a philosophical question, I find the 1/3 interpretation more appealing, but I don't know if that's a strong enough basis for saying one answer is "correct" and the other "incorrect"....Jameshttp://www.blogger.com/profile/10075856924139777288noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-79799080017559099142015-06-12T13:08:02.066-07:002015-06-12T13:08:02.066-07:00The problem states that she will be interviewed on...The problem states that she will be interviewed on Monday and Tuesday if the coin is tails, and on Monday only if it's heads. So being interviewed doesn't tell her anything about which day it is.<br /><br />But you are partly right: the posterior differs from the prior, so the datum (waking up) does provide information, as strange as that seems.Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-37975761741939417332015-06-12T12:57:50.523-07:002015-06-12T12:57:50.523-07:00I think it's interesting to note that contrary...I think it's interesting to note that contrary to the frequentist's argument, sleeping beauty has actually learned a piece of information after she's being woken: she is being interviewed. That allows a Bayesian update indicating that it's not Tuesday Heads (unless she thinks that the experimenter is a trickster and might be interviewing her anyway, which means we also should be taking into account her prior degrees of belief toward that possibility and updating all of that information).Mark Stiggehttp://www.blogger.com/profile/15824815708030310237noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-5022217751466989392015-05-31T18:17:04.290-07:002015-05-31T18:17:04.290-07:00I know this post is really old, but I just heard a...I know this post is really old, but I just heard a talk by Mlodinow at the World Science Festival, and I'm trying to grasp his example. Can you tell me if I'm thinking about this right? Suppose your neighbor has only one child, a girl named Florida. Suppose that you also have only one child. Is it the case that your child is more than 50% likely to be a girl? If so, I understand it. Otherwise, I need to try again! Thanks. Norahttp://www.blogger.com/profile/17498690085632193082noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-68457951902090365412015-05-20T20:55:48.705-07:002015-05-20T20:55:48.705-07:00Oh man, bad news for Jon Snow. I like him. ...whic...Oh man, bad news for Jon Snow. I like him. ...which I suppose should be enough to establish the low odds.northierthanthouhttp://www.blogger.com/profile/04831362921459744537noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-35283348986222066402015-05-01T17:31:06.813-07:002015-05-01T17:31:06.813-07:00Any good statistician knows about the 4 possibilit...Any good statistician knows about the 4 possibilities you speak of. Hypothesis testing is full of assumptions, and these assumptions are violated every day. The problem is not with the p-value, but with the people who misuse it, and the sheer number of 'experiments' that are performed every day. Don't mess with science!Ralph Wintershttp://www.blogger.com/profile/14548913261473484508noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-65266689754680154122015-05-01T14:03:23.973-07:002015-05-01T14:03:23.973-07:00Thank you for this clarification. I deliberately ...Thank you for this clarification. I deliberately chose this wording because it is more readable than the more pedantic version, and it is equally correct if we take "apparent effect" to include cases where the test statistic is equal or greater than what was observed. I realize that it is not completely unambiguous, but I stand by my editorial choice. Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-75478987476319483982015-05-01T13:35:50.355-07:002015-05-01T13:35:50.355-07:00"The p-value is the probability of the appare..."The p-value is the probability of the apparent effect under the null hypothesis..." No, still wrong. The p-value is the probability of the observed effect or one *more extreme* under the null hypothesis. All your tables are assuming that what you know is p<.01, not that p=.01.Richard Moreyhttp://www.blogger.com/profile/11319149283079163004noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-63822321644113926272015-04-24T03:14:23.061-07:002015-04-24T03:14:23.061-07:00This analysis seems to be working on an assumption...This analysis seems to be working on an assumption that there is a stationary stochastic process that produces these deaths, which is frankly an absurd assumption. Bayesian or frequentist, one really cannot model a process that doesn't actually exist.<br /><br />It is thinking like this that got the financial world to its knees, when applied to the behaviour of financial derivatives contracts.<br /><br />At least, if you assume a non-stationary process that has a limited rate of parameter change (which is a stretch in itself), the credible intervals should flare out widely after the range of available data.Reino Ruusuhttp://www.blogger.com/profile/10454242055654173650noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-91803362866917623662015-03-25T09:09:07.425-07:002015-03-25T09:09:07.425-07:00There's a chapter in Think Stats (2nd edition)...There's a chapter in Think Stats (2nd edition) about survival analysis, and a chapter in Think Bayes that does two-parameter Bayesian estimation. So you can put them together!<br /><br />But yes, I will write up the details when I have a chance.Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-83652018236213930932015-03-25T08:06:24.080-07:002015-03-25T08:06:24.080-07:00Thanks a lot for this, I love it!
Would you cons...Thanks a lot for this, I love it! <br /><br />Would you consider writing a blogpost explaining the math behind this kind of analysis? is it covered in your book? Matías Guzmán Naranjohttp://www.blogger.com/profile/11557127959079200429noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-55019520710383177792015-03-11T13:28:16.418-07:002015-03-11T13:28:16.418-07:00Allen, his/her point is that the p value is "...Allen, his/her point is that the p value is "the probability of the data given chance". It is not "the probability of chance given the data".dustin lockehttp://www.blogger.com/profile/12240156576005704547noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-56179634399275280132015-03-10T05:11:52.847-07:002015-03-10T05:11:52.847-07:00I'm not sure I understand your objection. I w...I'm not sure I understand your objection. I was using "due to chance" as a shorthand for "under the null hypothesis", since the null hypothesis is a model of random variation if there is no actual effect.<br /><br />The sentence you quoted is one of four possible explanations for an apparent effect: it might be caused by random variation in the absence of a real effect.<br /><br />As you said, the p-value is the probability of the apparent effect under the null hypothesis, which is the probability of the effect under (at least a model of) random chance.<br /><br />Can you clarify what you are objecting to?Allen Downeyhttp://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-59980598640532965072015-03-09T21:08:36.570-07:002015-03-09T21:08:36.570-07:00GamingLifer nails it. Allen, you appear to have m...GamingLifer nails it. Allen, you appear to have made *the* mistake the editors are so concerned about re p-values.dustin lockehttp://www.blogger.com/profile/12240156576005704547noreply@blogger.com