Closed resonates7 closed 2 years ago
If you look at figure 12.6, that might help to visualize the first two kinds of error:
The dark, narrow region in the middle shows uncertainty due to sampling; that is, how much we would expect the estimated slope and intercept to vary if we collect another random sample. It is relatively narrow because we have enough data to estimate the slope and intercept with some precision.
However, even if we knew the slope and intercept exactly, we would still be uncertain about the future because past data shows that there is substantial random variation around the long-term trend. The wide, lighter region shows how much variation we should expect in the predictions going forward.
The third kind of error is modeling error; that is, the possibility that the model is not right. In this example, we assume that the long-term trend is a straight line that will continue into the future. In reality, that's probably not true: there's no theoretical reason to think it should be a straight line, and even if it were, things might change in the future to change it (for example, what if a bunch of states legalized cannabis?!).
I hope that helps!
Allen
On Tue, Jun 22, 2021, at 5:42 PM, resonates7 wrote:
Could someone please provide the intuition behind the code in section 12.8 demonstrating modeling and predictive uncertainty? That is shown in the Prediction section of the exercises. I get the code, but not how it relates to those types of uncertainty.
Also, how does that relate to Sampling Error, Random Variation, and Modeling Error as explained in the book?
Thanks in advance for the clarification!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkStats2/issues/184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLP3IX2VFA4GSGFJZNSKDTUD7TVANCNFSM47EQVWIA.
Thanks Allen, that explaination helps. And thanks for this book! I’ve gotten a lot out of it.
From: Allen Downey @.> Sent: Tuesday, June 22, 2021 5:58 PM To: AllenDowney/ThinkStats2 @.> Cc: resonates7 @.>; Author @.> Subject: Re: [AllenDowney/ThinkStats2] Intuition behind section 12.8 modeling and predictive uncertainty (#184)
If you look at figure 12.6, that might help to visualize the first two kinds of error:
The dark, narrow region in the middle shows uncertainty due to sampling; that is, how much we would expect the estimated slope and intercept to vary if we collect another random sample. It is relatively narrow because we have enough data to estimate the slope and intercept with some precision.
However, even if we knew the slope and intercept exactly, we would still be uncertain about the future because past data shows that there is substantial random variation around the long-term trend. The wide, lighter region shows how much variation we should expect in the predictions going forward.
The third kind of error is modeling error; that is, the possibility that the model is not right. In this example, we assume that the long-term trend is a straight line that will continue into the future. In reality, that's probably not true: there's no theoretical reason to think it should be a straight line, and even if it were, things might change in the future to change it (for example, what if a bunch of states legalized cannabis?!).
I hope that helps!
Allen
On Tue, Jun 22, 2021, at 5:42 PM, resonates7 wrote:
Could someone please provide the intuition behind the code in section 12.8 demonstrating modeling and predictive uncertainty? That is shown in the Prediction section of the exercises. I get the code, but not how it relates to those types of uncertainty.
Also, how does that relate to Sampling Error, Random Variation, and Modeling Error as explained in the book?
Thanks in advance for the clarification!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkStats2/issues/184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLP3IX2VFA4GSGFJZNSKDTUD7TVANCNFSM47EQVWIA.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkStats2/issues/184#issuecomment-866364344 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AL3TESIOC53JNT33H3IRDVTTUEBO7ANCNFSM47EQVWIA .
Could someone please provide the intuition behind the code in section 12.8 demonstrating modeling and predictive uncertainty? That is shown in the Prediction section of the exercises. I get the code, but not how it relates to those types of uncertainty.
Also, how does that relate to Sampling Error, Random Variation, and Modeling Error as explained in the book?
Thanks in advance for the clarification!