(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 11207, 369] NotebookOptionsPosition[ 10144, 329] NotebookOutlinePosition[ 10580, 348] CellTagsIndexPosition[ 10537, 345] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{ RowBox[{"q", "=."}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zbar", "=", " ", RowBox[{ RowBox[{ SuperscriptBox["p", "2"], " ", "a"}], " ", "+", " ", RowBox[{"2", " ", "p", " ", "q", " ", "d"}], " ", "+", RowBox[{ SuperscriptBox["q", "2"], " ", RowBox[{"(", RowBox[{"-", "a"}], ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Vz", "=", " ", RowBox[{ RowBox[{ SuperscriptBox["p", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", " ", "-", " ", "zbar"}], ")"}], "2"]}], " ", "+", " ", RowBox[{"2", " ", "p", " ", "q", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"d", " ", "-", " ", "zbar"}], ")"}], "2"]}], " ", "+", " ", RowBox[{ SuperscriptBox["q", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], " ", "-", " ", "zbar"}], ")"}], "2"]}]}]}], ";"}]}], "Input", CellChangeTimes->{{3.430677460556917*^9, 3.430677647986525*^9}, { 3.430678344449049*^9, 3.430678352152478*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"\[Alpha]1", "=", " ", RowBox[{ RowBox[{"p", " ", "a"}], " ", "+", " ", RowBox[{"q", " ", "d"}], " ", "-", "zbar"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Alpha]2", "=", " ", RowBox[{ RowBox[{"q", " ", RowBox[{"(", RowBox[{"-", "a"}], ")"}]}], " ", "+", " ", RowBox[{"p", " ", "d"}], " ", "-", "zbar"}]}], ";"}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"FullSimplify", "[", "\[Alpha]1", "]"}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", "\[Alpha]2", "]"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"d", " ", RowBox[{"(", RowBox[{"1", "-", RowBox[{"2", " ", "p"}]}], ")"}], " ", "q"}], "+", RowBox[{"a", " ", RowBox[{"(", RowBox[{"p", "-", SuperscriptBox["p", "2"], "+", SuperscriptBox["q", "2"]}], ")"}]}]}]], "Output", CellChangeTimes->{ 3.430677188099141*^9, 3.4306777112791777`*^9, 3.430677910044056*^9, { 3.430678299023242*^9, 3.43067830804961*^9}, 3.4306783571103973`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"d", " ", "p", " ", RowBox[{"(", RowBox[{"1", "-", RowBox[{"2", " ", "q"}]}], ")"}]}], "-", RowBox[{"a", " ", RowBox[{"(", RowBox[{ SuperscriptBox["p", "2"], "+", "q", "-", SuperscriptBox["q", "2"]}], ")"}]}]}]], "Output", CellChangeTimes->{ 3.430677188099141*^9, 3.4306777112791777`*^9, 3.430677910044056*^9, { 3.430678299023242*^9, 3.43067830804961*^9}, 3.4306783571778297`*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"BV22", " ", "=", " ", RowBox[{"2", " ", "\[Alpha]2"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"BV12", "=", " ", RowBox[{"\[Alpha]2", " ", "+", " ", "\[Alpha]1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"BV11", " ", "=", " ", RowBox[{"2", "\[Alpha]1"}]}], ";"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"meanBV", " ", "=", " ", RowBox[{ RowBox[{"p", " ", "p", " ", "BV11"}], " ", "+", " ", RowBox[{"2", " ", "p", " ", "q", " ", "BV12"}], " ", "+", " ", RowBox[{"q", " ", "q", " ", "BV22"}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"VarBV", " ", "=", " ", RowBox[{ RowBox[{ SuperscriptBox["p", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"BV11", "-", "meanBV"}], ")"}], "2"]}], " ", "+", " ", RowBox[{"2", " ", "p", " ", "q", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"BV12", "-", "meanBV"}], ")"}], "2"]}], " ", "+", RowBox[{ SuperscriptBox["q", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"BV22", "-", "meanBV"}], ")"}], "2"]}]}]}], ";"}], "\[IndentingNewLine]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"q", "=", RowBox[{"1", "-", "p"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", "VarBV", "]"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", "+", "d", "-", RowBox[{"2", " ", "d", " ", "p"}]}], ")"}], "2"]}]], "Output", CellChangeTimes->{ 3.430677207571789*^9, 3.430677711431781*^9, 3.430677910186417*^9, { 3.4306782991809177`*^9, 3.43067830819415*^9}, 3.430678357306148*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"We", " ", "can", " ", "rearrange", " ", "VarBV", " ", "to"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"VarBV", " ", "=", " ", StyleBox[ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{"-", "q"}], ")"}], " ", "p", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", "+", StyleBox[ RowBox[{"d", RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"2", "p"}]}], ")"}]}], "Text", FontColor->RGBColor[0, 0, 1]]}], ")"}], "2"]}], "Text", FontColor->RGBColor[0, 0, 1]]}], StyleBox[" ", "Text", FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["since", "Text", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", "Text", FontColor->RGBColor[0, 0, 1]], RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"2", "p"}]}], ")"}]}], "=", " ", RowBox[{ RowBox[{"(", RowBox[{"q", " ", "-", " ", "p"}], ")"}], " ", "we", " ", "get"}]}], "\[IndentingNewLine]", StyleBox[ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{"(", RowBox[{"-", "q"}], ")"}], " ", "p", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", "+", StyleBox[ RowBox[{"d", RowBox[{"(", RowBox[{"q", " ", "-", " ", "p"}], ")"}]}], "Text", FontColor->RGBColor[0, 0, 1]]}], ")"}], "2"], " ", "hence"}], "Text", FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{"VarBV", " ", "=", " ", StyleBox[ RowBox[{"2", " ", "p", " ", "q", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", "+", StyleBox[ RowBox[{"d", RowBox[{"(", RowBox[{"q", " ", "-", " ", "p"}], ")"}]}], "Text", FontColor->RGBColor[0, 0, 1]]}], ")"}], "2"]}], "Text", FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{ RowBox[{ RowBox[{ "Since", " ", "the", " ", "variance", " ", "in", " ", "breeding", " ", "values"}], " ", "=", " ", RowBox[{"additive", " ", "genetic", " ", "variance"}]}], ",", " ", RowBox[{"the", " ", "additive", " ", "genetic", " ", "variance"}]}], "Text", FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["varA", "Text", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", "Text", FontColor->RGBColor[0, 0, 1]], StyleBox["=", "Text", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", "Text", FontColor->RGBColor[0, 0, 1]], RowBox[{ StyleBox[ RowBox[{ StyleBox["v", "Text", FontColor->RGBColor[0, 0, 1]], "arBV"}]], " ", "=", " ", StyleBox[ RowBox[{"2", " ", "p", " ", "q", " ", SuperscriptBox[ RowBox[{"(", RowBox[{"a", "+", StyleBox[ RowBox[{"d", RowBox[{"(", RowBox[{"q", " ", "-", " ", "p"}], ")"}]}], "Text", FontColor->RGBColor[0, 0, 1]]}], ")"}], "2"]}], "Text", FontColor->RGBColor[0, 0, 1]]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{ "Now", " ", "the", " ", "mean", " ", "breeding", " ", "value", " ", "should", " ", "be", " ", RowBox[{"zero", ".", " ", "To"}], " ", "check", " ", "this", " ", "we", " ", "simplify", " ", "meanBV"}], "Text", FontColor->RGBColor[0, 0, 1]]}], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FullSimplify", "[", "meanBV", "]"}]], "Input"], Cell[BoxData["0"], "Output", CellChangeTimes->{ 3.430677711470076*^9, 3.43067791022815*^9, {3.43067829924319*^9, 3.430678308234951*^9}, 3.4306783573451977`*^9}] }, Open ]], Cell[TextData[StyleBox["now we can calculate the dominance variance as the \ total phenotypic variance (Vz) minus the additive genetic variance (VarBV). \ We can do that because under our assumption there is no other source of \ variation in the population. ", "Text", FontColor->RGBColor[0, 0, 1]]], "Text", CellChangeTimes->{{3.43067811713762*^9, 3.4306782038860207`*^9}}, EmphasizeSyntaxErrors->True, FormatType->"TextForm"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"VD", " ", "=", RowBox[{"Vz", " ", "-", "VarBV"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", "VD", "]"}]}]}]], "Input", CellChangeTimes->{{3.430677662684537*^9, 3.4306776877339582`*^9}, { 3.430677726656372*^9, 3.4306777393759127`*^9}, {3.430677879919736*^9, 3.430677905327467*^9}}], Cell[BoxData[ RowBox[{"4", " ", SuperscriptBox["d", "2"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], "2"], " ", SuperscriptBox["p", "2"]}]], "Output", CellChangeTimes->{{3.4306777115281477`*^9, 3.4306777406998787`*^9}, { 3.430677889720331*^9, 3.430677910279264*^9}, {3.4306782992815447`*^9, 3.430678308300805*^9}, 3.4306783573962708`*^9}] }, Open ]] }, WindowSize->{865, 712}, WindowMargins->{{96, Automatic}, {Automatic, 15}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, CellLabelAutoDelete->True, Magnification->2, FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (March 13, 2008)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 1109, 33, 190, "Input"], Cell[1680, 56, 418, 13, 85, "Input"], Cell[CellGroupData[{ Cell[2123, 73, 149, 2, 85, "Input"], Cell[2275, 77, 458, 13, 64, "Output"], Cell[2736, 92, 458, 13, 64, "Output"] }, Open ]], Cell[3209, 108, 351, 10, 115, "Input"], Cell[3563, 120, 260, 6, 54, "Input"], Cell[3826, 128, 604, 19, 126, "Input"], Cell[CellGroupData[{ Cell[4455, 151, 204, 6, 115, "Input"], Cell[4662, 159, 436, 12, 59, "Output"] }, Open ]], Cell[5113, 174, 3468, 107, 496, "Text"], Cell[CellGroupData[{ Cell[8606, 285, 70, 1, 54, "Input"], Cell[8679, 288, 167, 3, 54, "Output"] }, Open ]], Cell[8861, 294, 433, 7, 142, "Text"], Cell[CellGroupData[{ Cell[9319, 305, 398, 9, 115, "Input"], Cell[9720, 316, 408, 10, 59, "Output"] }, Open ]] } ] *) (* End of internal cache information *)