diff --git a/Rethinking_2/End_of_chapter_problems/Chapter_4.ipynb b/Rethinking_2/End_of_chapter_problems/Chapter_4.ipynb index 35ae1f53..a97d3d07 100644 --- a/Rethinking_2/End_of_chapter_problems/Chapter_4.ipynb +++ b/Rethinking_2/End_of_chapter_problems/Chapter_4.ipynb @@ -157,7 +157,10 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "jp-MarkdownHeadingCollapsed": true, + "tags": [] + }, "source": [ "### 4M2.\n", "Translate the model just above into a quap formula.\n", @@ -188,7 +191,7 @@ "\n", "$\\beta$ ~ $logN(0,1)$ #It seems perfectly sensible that the amount an average student's height changes per year should only be positive. Additionally, I have no idea what the growth rate is so this enocodes ignorance about the rate of change of height per year\n", "\n", - "$\\sigma$ ~ $Unif(0,50)$" + "$\\sigma$ ~ $Unif(0,0.5)$ #This is the standard deviation of height, at a given age and expected height. This cannot conceivably be more than 1 metre. Half is a more sensible upper bound." ] }, { @@ -215,7 +218,9 @@ "more than 64cm. How does this lead you to revise your priors?\n", "\n", "#### Answer \n", - "This would cause me to use an even larger range of plausable values in my prior for $\\sigma$. Given my assumption for the students ages, increasing the range seems to be not sensible for the data at hand.\n", + "A maximum variance ($\\sigma^2$) can be enforced through an upper bound on the prior for $\\sigma$, set to $\\sqrt(64) = 8$ cm, or 0.08 m. Therefore the prior becomes\n", + "\n", + "$\\sigma$ ~ $Unif(0,0.08)$\n", "\n", "### 4M7.\n", "\n", @@ -1621,9 +1626,7 @@ { "cell_type": "code", "execution_count": 43, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "name": "stderr", @@ -1714,7 +1717,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.10.6" } }, "nbformat": 4,