(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.4' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 24212, 614] NotebookOptionsPosition[ 23557, 585] NotebookOutlinePosition[ 23903, 600] CellTagsIndexPosition[ 23860, 597] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Generating covariances", "Title", CellChangeTimes->{{3.667841797493497*^9, 3.6678418022373376`*^9}}], Cell[CellGroupData[{ Cell["\<\ Model: x=x0 + \[Delta]x + \[Delta]xy and y=y0 + \[Delta]y \[PlusMinus] \ \[Delta]xy with \[Delta]x \[Distributed]N(0,\[Epsilon]x), \[Delta]y \ \[Distributed]N(0,\[Epsilon]y) and \[Delta] \[Distributed]N(0,\[Epsilon]xy)\ \>", "Section", CellChangeTimes->{{3.6681135803536696`*^9, 3.668113733922218*^9}, { 3.66811377469701*^9, 3.6681137776610117`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", " ", RowBox[{ RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{"\[Sigma]x", ",", "\[Sigma]y", ",", "\[Rho]"}], "}"}], ",", RowBox[{ RowBox[{"\[Sigma]x", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"\[Epsilon]x", "^", "2"}], "+", RowBox[{"\[Epsilon]xy", "^", "2"}]}], "]"}]}], ";", RowBox[{"\[Sigma]y", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"\[Epsilon]y", "^", "2"}], "+", RowBox[{"\[Epsilon]xy", "^", "2"}]}], "]"}]}], ";", RowBox[{"\[Rho]", "=", RowBox[{"sign", " ", RowBox[{ RowBox[{"\[Epsilon]xy", "^", "2"}], "/", RowBox[{"(", RowBox[{"\[Sigma]x", " ", "\[Sigma]y"}], ")"}]}]}]}], ";", RowBox[{"Show", "[", " ", RowBox[{ RowBox[{"ListPlot", "[", " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"x0", ",", "\[Epsilon]x"}], "]"}], "]"}], "+", "d"}], ",", RowBox[{ RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"y0", ",", "\[Epsilon]y"}], "]"}], "]"}], "+", RowBox[{"sign", " ", "d"}]}]}], "}"}], "/.", RowBox[{"d", "\[Rule]", RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "\[Epsilon]xy"}], "]"}], "]"}]}]}], ",", RowBox[{"{", "size", "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{"x", ",", "18"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"y", ",", "18"}], "]"}]}], "}"}]}], ",", RowBox[{"TicksStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"FontSize", "\[Rule]", "16"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "x0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "y0"}]}], "}"}]}], "}"}]}], " ", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Sigma]x=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Sigma]x", ",", "0.1"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.96"}], "}"}], "]"}]}], "]"}], " ", "]"}], ",", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Sigma]y=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Sigma]y", ",", "0.1"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.90"}], "}"}], "]"}]}], "]"}], " ", "]"}], ",", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Rho]=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Rho]", ",", "0.01"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.84"}], "}"}], "]"}]}], "]"}], " ", "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", " ", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Epsilon]x", ",", "2"}], "}"}], ",", "1.", ",", "3."}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Epsilon]y", ",", "2"}], "}"}], ",", "1.", ",", "3."}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Epsilon]xy", ",", "1.5"}], "}"}], ",", "0.1", ",", "5."}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"sign", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Initialization", "\[RuleDelayed]", RowBox[{"(", RowBox[{ RowBox[{"x0", "=", "20"}], ";", RowBox[{"y0", "=", "10"}], ";", RowBox[{"size", "=", "1000"}]}], ")"}]}]}], "]"}]], "Input", CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGCQBGIQ/Vhsyqxbwa8dp1Z/WwuiU+TnbwLR95xOgend9pnb QfTapf4HQbSVqupxEC1wZ9kJEF2XUHIORK/6t/wSiFZZUP0YRJssnPocRDMJ 7fwJoot2M3HfBtJHNTWFQbQwW48SiJZw6XYC0Tp3HXxBtMFL5nIQHbrboQVE pyUFTwLRXzKeTwbRP1YKnALR7yzcLoDoDpOOuyC6pyz5AYheKsn1FETXCV4D 0y9fdzg/Arlnhn8IiN7QPmM5X8hrx4jYvytBdM3xuM0g+o7XsfMgesuUGf9A tJXfVyZ+IK21L0sRRPM1ngPTtesrN1oAabvN77eC6Cqxk4dAtJfmlxsgumbi kwcgutIo/yGITgpSeAOiX32bBaY1Jrz+CKId2Gu/gGgO8bzMeCA9g/k3mAYA idLRNg== "]], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`sign$$ = 1, $CellContext`\[Epsilon]x$$ = 2, $CellContext`\[Epsilon]xy$$ = 1.5, $CellContext`\[Epsilon]y$$ = 2, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`\[Epsilon]x$$], 2}, 1., 3.}, {{ Hold[$CellContext`\[Epsilon]y$$], 2}, 1., 3.}, {{ Hold[$CellContext`\[Epsilon]xy$$], 1.5}, 0.1, 5.}, {{ Hold[$CellContext`sign$$], 1}, {-1, 1}}}, Typeset`size$$ = { 902., {237., 244.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`\[Epsilon]x$953$$ = 0, $CellContext`\[Epsilon]y$954$$ = 0, $CellContext`\[Epsilon]xy$955$$ = 0, $CellContext`sign$956$$ = False}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`sign$$ = 1, $CellContext`\[Epsilon]x$$ = 2, $CellContext`\[Epsilon]xy$$ = 1.5, $CellContext`\[Epsilon]y$$ = 2}, "ControllerVariables" :> { Hold[$CellContext`\[Epsilon]x$$, $CellContext`\[Epsilon]x$953$$, 0], Hold[$CellContext`\[Epsilon]y$$, $CellContext`\[Epsilon]y$954$$, 0], Hold[$CellContext`\[Epsilon]xy$$, $CellContext`\[Epsilon]xy$955$$, 0], Hold[$CellContext`sign$$, $CellContext`sign$956$$, False]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`\[Sigma]x$, $CellContext`\[Sigma]y$, $CellContext`\ \[Rho]$}, $CellContext`\[Sigma]x$ = Sqrt[$CellContext`\[Epsilon]x$$^2 + $CellContext`\[Epsilon]xy$$^2]; \ $CellContext`\[Sigma]y$ = Sqrt[$CellContext`\[Epsilon]y$$^2 + $CellContext`\[Epsilon]xy$$^2]; \ $CellContext`\[Rho]$ = $CellContext`sign$$ \ ($CellContext`\[Epsilon]xy$$^2/($CellContext`\[Sigma]x$ \ $CellContext`\[Sigma]y$)); Show[ ListPlot[ Table[ ReplaceAll[{RandomVariate[ NormalDistribution[$CellContext`x0, \ $CellContext`\[Epsilon]x$$]] + $CellContext`d, RandomVariate[ NormalDistribution[$CellContext`y0, \ $CellContext`\[Epsilon]y$$]] + $CellContext`sign$$ $CellContext`d}, \ $CellContext`d -> RandomVariate[ NormalDistribution[ 0, $CellContext`\[Epsilon]xy$$]]], {$CellContext`size}], AxesLabel -> { Style[$CellContext`x, 18], Style[$CellContext`y, 18]}, TicksStyle -> Directive[FontSize -> 16], PlotRange -> {{0, 2 $CellContext`x0}, {0, 2 $CellContext`y0}}, AspectRatio -> Automatic], Graphics[ Text[ Style[ StringJoin["\[Sigma]x=", ToString[ Round[$CellContext`\[Sigma]x$, 0.1]]], 18], Scaled[{0.08, 0.96}]]], Graphics[ Text[ Style[ StringJoin["\[Sigma]y=", ToString[ Round[$CellContext`\[Sigma]y$, 0.1]]], 18], Scaled[{0.08, 0.9}]]], Graphics[ Text[ Style[ StringJoin["\[Rho]=", ToString[ Round[$CellContext`\[Rho]$, 0.01]]], 18], Scaled[{0.08, 0.84}]]]]], "Specifications" :> {{{$CellContext`\[Epsilon]x$$, 2}, 1., 3.}, {{$CellContext`\[Epsilon]y$$, 2}, 1., 3.}, {{$CellContext`\[Epsilon]xy$$, 1.5}, 0.1, 5.}, {{$CellContext`sign$$, 1}, {-1, 1}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{953., {323., 330.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>(($CellContext`x0 = 20; $CellContext`y0 = 10; $CellContext`size = 1000); Typeset`initDone$$ = True), SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.668035511571762*^9, 3.6681049688222895`*^9, 3.668113917483444*^9, 3.668114261608247*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Model: x=x0 + \[Delta]x + \[Delta]xy and y=y0 + \[Delta]y \[PlusMinus] \ \[Delta]xy with \[Delta]x \[Distributed]N(0,\[Epsilon]x), \[Delta]y \ \[Distributed]N(0,\[Epsilon]y) and \[Delta] \[Distributed]N(0,\[Epsilon]xy) \ so that \[Epsilon]xy gives the correlation coefficient chosen with the slider\ \>", "Section", CellChangeTimes->{{3.6681135803536696`*^9, 3.668113733922218*^9}, { 3.66811377469701*^9, 3.6681137776610117`*^9}, {3.668113808099464*^9, 3.668113857048334*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"\[Sigma]x", ",", "\[Sigma]y", ",", "\[Epsilon]xy"}], "}"}], ",", RowBox[{ RowBox[{"\[Epsilon]xy", "=", RowBox[{"Sqrt", "[", " ", RowBox[{ RowBox[{"\[Rho]", "^", "2"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"\[Epsilon]x", "^", "2"}], " ", "+", " ", RowBox[{"\[Epsilon]y", "^", "2"}], " ", "+", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"\[Epsilon]x", "^", "2"}], "-", RowBox[{"\[Epsilon]y", "^", "2"}]}], ")"}], "^", "2"}], "+", RowBox[{"4", RowBox[{ RowBox[{"(", RowBox[{"\[Epsilon]x", " ", RowBox[{"\[Epsilon]y", "/", "\[Rho]"}]}], ")"}], "^", "2"}]}]}], "]"}]}], ")"}], "/", RowBox[{"(", RowBox[{"2", "-", RowBox[{"2", RowBox[{"\[Rho]", "^", "2"}]}]}], ")"}]}]}], " ", "]"}]}], ";", RowBox[{"\[Sigma]x", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"\[Epsilon]x", "^", "2"}], "+", RowBox[{"\[Epsilon]xy", "^", "2"}]}], "]"}]}], ";", RowBox[{"\[Sigma]y", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"\[Epsilon]y", "^", "2"}], "+", RowBox[{"\[Epsilon]xy", "^", "2"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"ListPlot", "[", " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"xc", ",", "\[Epsilon]x"}], "]"}], "]"}], "+", "d"}], ",", RowBox[{ RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"yc", ",", "\[Epsilon]y"}], "]"}], "]"}], "+", RowBox[{"sign", " ", "d"}]}]}], "}"}], "/.", RowBox[{"d", "\[Rule]", RowBox[{"RandomVariate", "[", RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "\[Epsilon]xy"}], "]"}], "]"}]}]}], ",", RowBox[{"{", "sampleSize", "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{"x", ",", "18"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"y", ",", "18"}], "]"}]}], "}"}]}], ",", RowBox[{"TicksStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"FontSize", "\[Rule]", "16"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "xc"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "yc"}]}], "}"}]}], "}"}]}], " ", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Sigma]x=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Sigma]x", ",", "0.1"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.96"}], "}"}], "]"}]}], "]"}], " ", "]"}], ",", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Sigma]y=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Sigma]y", ",", "0.1"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.90"}], "}"}], "]"}]}], "]"}], " ", "]"}], ",", RowBox[{"Graphics", "[", " ", RowBox[{"Text", "[", " ", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"\"\<\[Epsilon]xy=\>\"", "<>", RowBox[{"ToString", "[", " ", RowBox[{"Round", "[", " ", RowBox[{"\[Epsilon]xy", ",", "0.1"}], "]"}], "]"}]}], ",", "18"}], "]"}], ",", RowBox[{"Scaled", "[", RowBox[{"{", RowBox[{"0.08", ",", "0.84"}], "}"}], "]"}]}], "]"}], " ", "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Epsilon]x", ",", "2"}], "}"}], ",", "1.", ",", "3."}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Epsilon]y", ",", "2"}], "}"}], ",", "1.", ",", "3."}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Rho]", ",", "0.5"}], "}"}], ",", "0.001", ",", "0.99"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"sign", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Initialization", "\[RuleDelayed]", RowBox[{"(", RowBox[{ RowBox[{"xc", "=", "20"}], ";", RowBox[{"yc", "=", "10"}], ";", RowBox[{"sampleSize", "=", "1000"}]}], ")"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.667857132553491*^9, 3.6678571386056037`*^9}, { 3.667857200340616*^9, 3.667857203441946*^9}, {3.667857253356439*^9, 3.667857269751398*^9}, {3.6678573263692713`*^9, 3.6678573789627247`*^9}, { 3.668035603715843*^9, 3.668035643805501*^9}, {3.6680356798201704`*^9, 3.66803587978815*^9}, {3.6681050267512355`*^9, 3.6681051152042227`*^9}, { 3.6681052098080893`*^9, 3.6681052320682917`*^9}, {3.668105306984674*^9, 3.66810539394493*^9}, {3.6681132973001504`*^9, 3.6681134379289455`*^9}, { 3.6681134865838914`*^9, 3.6681134889072094`*^9}, {3.6681142781685605`*^9, 3.6681142804019575`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`sign$$ = 1, $CellContext`\[Epsilon]x$$ = 2, $CellContext`\[Epsilon]y$$ = 2, $CellContext`\[Rho]$$ = 0.5, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`\[Epsilon]x$$], 2}, 1., 3.}, {{ Hold[$CellContext`\[Epsilon]y$$], 2}, 1., 3.}, {{ Hold[$CellContext`\[Rho]$$], 0.5}, 0.001, 0.99}, {{ Hold[$CellContext`sign$$], 1}, {-1, 1}}}, Typeset`size$$ = { 833., {220., 226.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`\[Epsilon]x$1809$$ = 0, $CellContext`\[Epsilon]y$1810$$ = 0, $CellContext`\[Rho]$1811$$ = 0, $CellContext`sign$1812$$ = False}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`sign$$ = 1, $CellContext`\[Epsilon]x$$ = 2, $CellContext`\[Epsilon]y$$ = 2, $CellContext`\[Rho]$$ = 0.5}, "ControllerVariables" :> { Hold[$CellContext`\[Epsilon]x$$, $CellContext`\[Epsilon]x$1809$$, 0], Hold[$CellContext`\[Epsilon]y$$, $CellContext`\[Epsilon]y$1810$$, 0], Hold[$CellContext`\[Rho]$$, $CellContext`\[Rho]$1811$$, 0], Hold[$CellContext`sign$$, $CellContext`sign$1812$$, False]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`\[Sigma]x$, $CellContext`\[Sigma]y$, $CellContext`\ \[Epsilon]xy$}, $CellContext`\[Epsilon]xy$ = Sqrt[$CellContext`\[Rho]$$^2 (($CellContext`\[Epsilon]x$$^2 + \ $CellContext`\[Epsilon]y$$^2 + Sqrt[($CellContext`\[Epsilon]x$$^2 - \ $CellContext`\[Epsilon]y$$^2)^2 + 4 ($CellContext`\[Epsilon]x$$ \ ($CellContext`\[Epsilon]y$$/$CellContext`\[Rho]$$))^2])/(2 - 2 $CellContext`\[Rho]$$^2))]; $CellContext`\[Sigma]x$ = Sqrt[$CellContext`\[Epsilon]x$$^2 + $CellContext`\[Epsilon]xy$^2]; \ $CellContext`\[Sigma]y$ = Sqrt[$CellContext`\[Epsilon]y$$^2 + $CellContext`\[Epsilon]xy$^2]; Show[ ListPlot[ Table[ ReplaceAll[{RandomVariate[ NormalDistribution[$CellContext`xc, \ $CellContext`\[Epsilon]x$$]] + $CellContext`d, RandomVariate[ NormalDistribution[$CellContext`yc, \ $CellContext`\[Epsilon]y$$]] + $CellContext`sign$$ $CellContext`d}, \ $CellContext`d -> RandomVariate[ NormalDistribution[ 0, $CellContext`\[Epsilon]xy$]]], {$CellContext`sampleSize}], AxesLabel -> { Style[$CellContext`x, 18], Style[$CellContext`y, 18]}, TicksStyle -> Directive[FontSize -> 16], PlotRange -> {{0, 2 $CellContext`xc}, {0, 2 $CellContext`yc}}, AspectRatio -> Automatic], Graphics[ Text[ Style[ StringJoin["\[Sigma]x=", ToString[ Round[$CellContext`\[Sigma]x$, 0.1]]], 18], Scaled[{0.08, 0.96}]]], Graphics[ Text[ Style[ StringJoin["\[Sigma]y=", ToString[ Round[$CellContext`\[Sigma]y$, 0.1]]], 18], Scaled[{0.08, 0.9}]]], Graphics[ Text[ Style[ StringJoin["\[Epsilon]xy=", ToString[ Round[$CellContext`\[Epsilon]xy$, 0.1]]], 18], Scaled[{0.08, 0.84}]]]]], "Specifications" :> {{{$CellContext`\[Epsilon]x$$, 2}, 1., 3.}, {{$CellContext`\[Epsilon]y$$, 2}, 1., 3.}, {{$CellContext`\[Rho]$$, 0.5}, 0.001, 0.99}, {{$CellContext`sign$$, 1}, {-1, 1}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{884., {305., 312.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>(($CellContext`xc = 20; $CellContext`yc = 10; $CellContext`sampleSize = 1000); Typeset`initDone$$ = True), SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.66811350816671*^9, 3.6681139454093337`*^9, 3.6681142873292913`*^9}] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{1350, 685}, WindowMargins->{{-8, Automatic}, {Automatic, 0}}, FrontEndVersion->"10.4 for Microsoft Windows (64-bit) (February 25, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 107, 1, 90, "Title"], Cell[CellGroupData[{ Cell[712, 27, 366, 6, 63, "Section"], Cell[CellGroupData[{ Cell[1103, 37, 5793, 151, 352, "Input"], Cell[6899, 190, 4529, 96, 670, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[11477, 292, 495, 8, 97, "Section"], Cell[CellGroupData[{ Cell[11997, 304, 6759, 173, 352, "Input"], Cell[18759, 479, 4758, 101, 667, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *)