Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notations for estimated versus non estimated params #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions glm_intro.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:b8b49930aa7985b5bc23ce2ca370bd8a6dcf28e682ad358717cd22b809761f79"
"signature": "sha256:7e89761e7403e9f0cb555d0f2a14fec7fba3373c536ba322f392da66771703e9"
},
"nbformat": 3,
"nbformat_minor": 0,
Expand Down Expand Up @@ -285,7 +285,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"$\\evec$ is the vector of errors $e_1 ... e_{12}$:"
"$\\bf{e}$ is the vector of errors $e_1 ... e_{12}$:"
]
},
{
Expand Down Expand Up @@ -318,7 +318,7 @@
"Bear with with us for a little trick. If $\\mathbf{o}$ is a vector of ones, then we can rewrite the formula as:\n",
"\n",
"$$\n",
"\\yvec = c\\mathbf{o} + b\\xvec + \\evec\n",
"\\yvec = c\\mathbf{o} + b\\xvec + \\bf{e}\n",
"$$\n",
"\n",
"because $o_i = 1$ and so $co_i = c$."
Expand Down Expand Up @@ -380,15 +380,27 @@
"In symbols:\n",
"\n",
"$$\n",
"\\yvec = \\Xmat \\bvec + \\evec\n",
"\\yvec = \\Xmat \\bf{B} + \\bf{e}\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We still haven't found our best fitting line. But before we go further, it might be obvious that we can easily add a new predictor here."
"We use the symbols $\\bf{B}$ and $\\bf{e}$ when we have given them some values (here, we estimated $\\bf{B}$ - albeit visually- and therefore $\\bf{e}$ because we gave B the values (10, .9). We still haven't found our best fitting line. But before we go further, it might be obvious that we can easily add a new predictor here."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If we have not estimated the parameters $\\bf{B}$, then we use the greek notations for the unknowns:\n",
"\n",
"\n",
"$$\n",
"\\yvec = \\Xmat \\bf{\\bvec} + \\bf{\\evec}\n",
"$$"
]
},
{
Expand Down Expand Up @@ -459,7 +471,7 @@
"metadata": {},
"source": [
"$\\newcommand{\\bhat}{\\hat{\\bvec}} \\newcommand{\\yhat}{\\hat{\\yvec}}$\n",
"Our students and their psychopathy scores are a *sample* from the population of all students' psychopathy scores. The parameters $\\bvec$ are the parameters that fit the design $\\Xmat$ to the *population* scores. We only have a sample from this population, so we cannot get the true population $\\bvec$ vector, we can only *estimate* $\\bvec$ from our sample. We will write this sample estimate as $\\bhat$ to distinguish it from the true population parameters $\\bvec$."
"Our students and their psychopathy scores are a *sample* from the population of all students' psychopathy scores. The parameters $\\bvec$ are the parameters that fit the design $\\Xmat$ to the *population* scores. We only have a sample from this population, so we cannot get the true population $\\bvec$ vector, we can only *estimate* $\\bvec$ from our sample. We will write this sample estimate as $\\bhat$ or $\\bf{B}$ to distinguish it from the true population parameters $\\bvec$."
]
},
{
Expand Down Expand Up @@ -1055,6 +1067,14 @@
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
Expand Down