(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 26925, 713] NotebookOptionsPosition[ 20550, 613] NotebookOutlinePosition[ 20973, 630] CellTagsIndexPosition[ 20930, 627] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Introduction to Mathematica", "Title", CellChangeTimes->{{3.6660391054616375`*^9, 3.666039123583289*^9}},ExpressionUUID->"4d8b3ddc-6e6b-4f94-908b-\ db3785c41c3e"], Cell["Vito, March 2023", "Text", CellChangeTimes->{{3.6660391342891912`*^9, 3.6660391478536825`*^9}, { 3.6819866909501514`*^9, 3.6819866947018976`*^9}, {3.887980507423069*^9, 3.887980512732957*^9}},ExpressionUUID->"57e503e2-a47c-407f-b04c-\ d16fe255ba43"], Cell[CellGroupData[{ Cell["Class 2 - Basic statistics and random number generation", "Section", CellChangeTimes->{{3.6819872339244375`*^9, 3.6819872360021133`*^9}, { 3.6820866288332634`*^9, 3.6820866297114024`*^9}, {3.682136440320263*^9, 3.682136459193177*^9}},ExpressionUUID->"77b92bf1-f0f5-4ee9-ab85-\ e83abce46032"], Cell[CellGroupData[{ Cell["The three classes of parentheses", "Subsection", CellChangeTimes->{{3.699086253593501*^9, 3.6990862627126694`*^9}},ExpressionUUID->"2e734fd4-7145-48ae-89cb-\ 3bff7150a7c4"], Cell[BoxData[ RowBox[{"a", "=", RowBox[{"{", RowBox[{"alfa", ",", "beta", ",", "gama"}], "}"}]}]], "Input", CellChangeTimes->{{3.699086308366395*^9, 3.699086319475719*^9}},ExpressionUUID->"02dacfb7-14cc-46b9-b040-\ cf4cf20ba501"], Cell[BoxData[ RowBox[{"a", "[", RowBox[{"[", "1", "]"}], "]"}]], "Input",ExpressionUUID->"e0771169-b33a-4efe-86a9-7218b814fd92"], Cell[BoxData[ RowBox[{"a", "[", RowBox[{"[", "2", "]"}], "]"}]], "Input", CellChangeTimes->{ 3.6990862975599136`*^9},ExpressionUUID->"d77ece31-249f-4bdc-b83c-\ d0009cb5a10a"], Cell[BoxData[ RowBox[{"a", "[", RowBox[{"[", "3", "]"}], "]"}]], "Input", CellChangeTimes->{ 3.699086302122263*^9},ExpressionUUID->"5dca96dc-37d5-4c32-a569-\ 0ea3b36d859f"], Cell[BoxData[ RowBox[{"a", "[", RowBox[{"[", "4", "]"}], "]"}]], "Input", CellChangeTimes->{{3.6990863052377396`*^9, 3.6990863055688353`*^9}},ExpressionUUID->"6b5a567e-6a68-4e83-b62f-\ dbf2dd90fcaf"], Cell[BoxData[ RowBox[{"Length", "[", "a", "]"}]], "Input",ExpressionUUID->"e5fe2b2f-5d7a-4fae-a9cf-0e3dae4585df"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " has 4 kinds of parentheses:\n ( ) defines the order of operations\n [ ] \ contains function argument(s)\n { } contains the elements of a list\n [[ ]] \ indexes a list element" }], "Text", CellChangeTimes->{{3.585482490648244*^9, 3.5854825918096695`*^9}, { 3.5854826474218907`*^9, 3.5854826701261787`*^9}, 3.60199753749016*^9, { 3.681988959092741*^9, 3.681989006678919*^9}, {3.681989049492234*^9, 3.6819890914802003`*^9}},ExpressionUUID->"512d8581-178f-48ec-97d8-\ a30b85662b66"] }, Open ]], Cell[CellGroupData[{ Cell["Building lists from expressions", "Subsection", CellChangeTimes->{{3.6820874289892144`*^9, 3.6820874350679455`*^9}, { 3.682134535793104*^9, 3.682134541930743*^9}},ExpressionUUID->"57f4ccc1-4252-416b-9908-\ b2ac4713d8a8"], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", "5"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.666689427644501*^9, 3.666689450805501*^9}},ExpressionUUID->"261e60d0-c7b3-4536-8f11-\ 7f1cb5ee6532"], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", "2", ",", "5"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.666689460133664*^9, 3.6666894604051285`*^9}},ExpressionUUID->"a3088ce7-11f8-4fbd-b172-\ c7c614837334"], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", "2", ",", "5", ",", "0.5"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.6666894731332955`*^9, 3.6666894773728213`*^9}},ExpressionUUID->"636e6c86-a45f-4bdf-8cd4-\ 841b12f30331"], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "^", "2"}], ",", RowBox[{"{", "5", "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.666689489515831*^9, 3.6666894930771227`*^9}},ExpressionUUID->"9c919942-a35d-4eae-8916-\ 170ab95a40e8"], Cell[CellGroupData[{ Cell["The template expression can be a list", "Subsubsection", CellChangeTimes->{{3.6666895217953033`*^9, 3.666689527435688*^9}, { 3.6820875558907013`*^9, 3.6820875577062798`*^9}, {3.6820876957935543`*^9, 3.682087714571005*^9}, {3.887980660528837*^9, 3.8879806780831356`*^9}},ExpressionUUID->"ff775a18-30ba-413d-9efa-\ 5421f2bba3a4"], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"t", ",", RowBox[{ RowBox[{"20", "t"}], "-", RowBox[{"5", RowBox[{"t", "^", "2"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "4", ",", RowBox[{"1", "/", "4"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.666689532560916*^9, 3.666689568019999*^9}},ExpressionUUID->"9b2edcdc-6e96-4a76-a8dc-\ 95f3affac4f1"], Cell[BoxData[ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"t", ",", RowBox[{ RowBox[{"20", "t"}], "-", RowBox[{"5", RowBox[{"t", "^", "2"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "4", ",", RowBox[{"1", "/", "4"}]}], "}"}]}], "]"}], "//", "N"}]], "Input", CellChangeTimes->{{3.666689576756732*^9, 3.66668959069164*^9}},ExpressionUUID->"e152e792-8db3-4bd5-8f04-\ 343f7b824f19"], Cell[BoxData[ RowBox[{"trajectory", "=", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"5", "t"}], ",", RowBox[{ RowBox[{"20", "t"}], "-", RowBox[{"5", RowBox[{"t", "^", "2"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "4", ",", RowBox[{"1", "/", "4"}]}], "}"}]}], "]"}], "//", "N"}]}]], "Input", CellChangeTimes->{{3.666689594881755*^9, 3.666689597331601*^9}, 3.666691591907414*^9, {3.682087746602739*^9, 3.682087748886918*^9}},ExpressionUUID->"acaf14cf-ba34-4bfc-a1e7-\ c7e17453b874"], Cell["A data set is plotted with ListPlot[ ]", "Text", CellChangeTimes->{{3.666689654635191*^9, 3.6666896726982846`*^9}, { 3.682087727715189*^9, 3.682087740553239*^9}, 3.6821345632203712`*^9},ExpressionUUID->"1078e307-1b5a-44b9-9929-\ b0d8326d7eba"], Cell[BoxData[ RowBox[{"ListPlot", "[", "trajectory", "]"}]], "Input", CellChangeTimes->{{3.666689604087756*^9, 3.666689609772377*^9}, { 3.6820877538880587`*^9, 3.6820877593364944`*^9}},ExpressionUUID->"95d32d1f-3164-4ac7-944c-\ eb52141d5e7e"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"trajectory", ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}]], "Input",Expressi\ onUUID->"33ca694f-a5c2-4962-add3-e2379536ef4d"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Random Numbers", "Subsection", CellChangeTimes->{{3.5854831834650297`*^9, 3.58548321045081*^9}, { 3.6819906522469587`*^9, 3.681990654985243*^9}},ExpressionUUID->"9538cba5-15f1-4cb3-9871-\ fa1aa6ae16aa"], Cell[BoxData[ RowBox[{"Random", "[", "]"}]], "Input", CellChangeTimes->{{3.5854832140134897`*^9, 3.5854832167323627`*^9}},ExpressionUUID->"fb033eb0-7e0d-4406-9496-\ 45fcccd11e7a"], Cell[BoxData[ RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.585483220732568*^9, 3.585483235170829*^9}},ExpressionUUID->"75037c43-c4ba-44c3-b251-\ d10db09e3821"], Cell[BoxData[ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", "5"}], "]"}]], "Input", CellChangeTimes->{{3.5854832442025404`*^9, 3.585483247093312*^9}},ExpressionUUID->"7815358d-cb52-46af-9ca5-\ c83f2d7a2fb0"], Cell[BoxData[ RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "10"}], "]"}]], "Input", CellChangeTimes->{{3.5854833130966725`*^9, 3.58548333516033*^9}},ExpressionUUID->"7fd4798f-332d-4c91-9783-\ 45b5e6b1f695"], Cell[BoxData[ RowBox[{ RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"6", ",", "0.5"}], "]"}], ",", "10"}], "]"}], " ", RowBox[{"(*", " ", RowBox[{"throwing", " ", "6", " ", "coins", " ", "10", " ", "times"}], " ", "*)"}]}]], "Input", CellChangeTimes->{{3.585483341238742*^9, 3.5854833822252474`*^9}, { 3.6621017525219026`*^9, 3.662101761247978*^9}, 3.682092129331648*^9, { 3.682134591092683*^9, 3.6821345938303947`*^9}},ExpressionUUID->"7e85881c-245e-460a-89ba-\ c5a471ec5c02"] }, Open ]], Cell[CellGroupData[{ Cell["Basic operations", "Subsection", CellChangeTimes->{{3.5854834179770823`*^9, 3.58548342468055*^9}, { 3.681990658549677*^9, 3.6819906628513193`*^9}},ExpressionUUID->"75a6df92-d8d4-46c0-a394-\ 63db25395f49"], Cell[BoxData[ RowBox[{"rn", "=", RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"20", ",", "3"}], "]"}], ",", "10"}], "]"}]}]], "Input", CellChangeTimes->{{3.585483432415304*^9, 3.585483447728608*^9}},ExpressionUUID->"3d5a8479-1241-4010-b231-\ 4aa925c8cc1b"], Cell[BoxData[ RowBox[{"Mean", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.585483452494459*^9, 3.5854834564477816`*^9}},ExpressionUUID->"38cca35e-1f7d-4c09-b3fc-\ 3ddff23fe38b"], Cell[BoxData[ RowBox[{"StandardDeviation", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.585483459416708*^9, 3.585483466010771*^9}},ExpressionUUID->"c1de15eb-8b24-4ce5-bcba-\ fc7fd4e73b30"], Cell[BoxData[ RowBox[{"Median", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.6819906255373836`*^9, 3.681990629208457*^9}},ExpressionUUID->"37738b5f-af4c-47b8-9538-\ 6b42d819e55f"], Cell[BoxData[ RowBox[{"Variance", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.585483469729739*^9, 3.5854834750268583`*^9}},ExpressionUUID->"527cb3ac-a929-4bc3-bebf-\ 09906f1461e2"], Cell[BoxData[ RowBox[{"rn", "=", RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"6", ",", "0.5"}], "]"}], ",", "10"}], "]"}]}]], "Input", CellChangeTimes->{{3.5854834841367292`*^9, 3.5854835230449495`*^9}},ExpressionUUID->"581c8d9a-2c16-44fa-bb00-\ 876d6d92af4b"], Cell[BoxData[ RowBox[{"Mean", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.585483530154686*^9, 3.585483533373602*^9}},ExpressionUUID->"d8081890-06ea-487e-a1e8-\ e8f95cba72f6"], Cell[BoxData[ RowBox[{"%", "//", "N"}]], "Input", CellChangeTimes->{{3.585483539608324*^9, 3.5854835439835467`*^9}},ExpressionUUID->"584c8e28-8a7b-4ed0-91bb-\ f8bb01b715a8"] }, Open ]], Cell[CellGroupData[{ Cell["Histograms", "Subsection", CellChangeTimes->{{3.585483555812252*^9, 3.585483560906271*^9}, 3.6819906671211157`*^9, 3.682087486327202*^9},ExpressionUUID->"719875f4-1824-4fb9-a975-\ 5ead388d00a2"], Cell[BoxData[ RowBox[{"Histogram", "[", "rn", "]"}]], "Input", CellChangeTimes->{{3.5854835764226847`*^9, 3.5854835804541407`*^9}},ExpressionUUID->"2df81858-b289-4d81-b180-\ e9c5583eb934"], Cell[BoxData[ RowBox[{"Histogram", "[", RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"20", ",", "3"}], "]"}], ",", "100"}], "]"}], " ", "]"}]], "Input", CellChangeTimes->{{3.5854835857825413`*^9, 3.5854836059711027`*^9}},ExpressionUUID->"337e1256-b21c-4367-87f9-\ c034e58f351a"], Cell[BoxData[ RowBox[{ RowBox[{"t", "=", RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"20", ",", "3"}], "]"}], ",", "100"}], "]"}]}], " ", ";"}]], "Input", CellChangeTimes->{{3.5854836260346055`*^9, 3.5854836326755705`*^9}},ExpressionUUID->"0c5c9e75-4f77-4e76-a3ab-\ 11bdab78068c"], Cell[BoxData[ RowBox[{"Histogram", "[", "t", "]"}]], "Input", CellChangeTimes->{{3.5854836364726706`*^9, 3.5854836465825615`*^9}},ExpressionUUID->"81c2838e-a4db-4a82-b04d-\ db7b707fa0db"], Cell[BoxData[ RowBox[{"Mean", "[", "t", "]"}]], "Input", CellChangeTimes->{{3.5854836500358377`*^9, 3.5854836520984488`*^9}},ExpressionUUID->"2651f514-6c7c-4c38-99c3-\ 3876f77fd046"], Cell[BoxData[ RowBox[{"StandardDeviation", "[", "t", "]"}]], "Input", CellChangeTimes->{{3.585483655582997*^9, 3.5854836604895215`*^9}},ExpressionUUID->"641fca70-11af-4e9f-b4c9-\ 9052f8a5f1c8"], Cell[BoxData[ RowBox[{"Round", "[", RowBox[{"%", ",", "0.1"}], "]"}]], "Input", CellChangeTimes->{{3.5854836670523653`*^9, 3.58548367403708*^9}},ExpressionUUID->"6457e771-8f97-41d1-a314-\ aff91a21837e"] }, Open ]], Cell[CellGroupData[{ Cell["Statistical distributions", "Subsection", CellChangeTimes->{{3.585482166803506*^9, 3.5854821812886047`*^9}, { 3.681990671811638*^9, 3.681990676012204*^9}},ExpressionUUID->"8d78a640-a0b2-49bb-a9c1-\ 5707200ec449"], Cell[BoxData[ RowBox[{"CDF", "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.585482190304691*^9, 3.585482220978141*^9}},ExpressionUUID->"a8da9b80-d174-4a81-8de1-\ 42ad428e676f"], Cell[BoxData[ RowBox[{"PDF", "[", RowBox[{ RowBox[{"ChiSquareDistribution", "[", "n", "]"}], ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.585482234666334*^9, 3.5854823141548166`*^9}},ExpressionUUID->"da59aa06-c101-49f6-96b8-\ 80700585c6a9"], Cell[BoxData[ RowBox[{"PDF", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"6", ",", "p"}], "]"}], ",", "i"}], "]"}]], "Input", CellChangeTimes->{{3.5854823359371567`*^9, 3.5854824010811524`*^9}, { 3.6820872717694287`*^9, 3.6820872729558334`*^9}},ExpressionUUID->"7c6184e4-34fb-49cf-b66a-\ 5c869d648048"], Cell[BoxData[ RowBox[{"Plot", "[", " ", RowBox[{ RowBox[{"PDF", "[", RowBox[{ RowBox[{"ChiSquareDistribution", "[", "5", "]"}], ",", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "20"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"chiSquare", ",", " ", "probability"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.666689100854618*^9, 3.66668913427907*^9}, { 3.682087288854311*^9, 3.682087318987868*^9}},ExpressionUUID->"b4bede74-b8f8-4163-8510-\ 641821a38d3a"], Cell[BoxData[ RowBox[{"PDF", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"6", ",", "p"}], "]"}], ",", "i"}], "]"}]], "Input", CellChangeTimes->{{3.5854823359371567`*^9, 3.5854824010811524`*^9}},ExpressionUUID->"4205fc5a-836e-4e74-b572-\ 9c95ad7a74ca"], Cell[BoxData[ RowBox[{"DiscretePlot", "[", " ", RowBox[{ RowBox[{"PDF", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"6", ",", RowBox[{"1", "/", "6"}]}], "]"}], ",", "i"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "6"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"n", ",", " ", "probability"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.6666891724870033`*^9, 3.666689234607752*^9}, { 3.6820873018312845`*^9, 3.6820873035309486`*^9}},ExpressionUUID->"edfe6171-71eb-436c-b24d-\ c6efd3d048bd"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Exerc\[IAcute]cios", "Section", CellChangeTimes->{{3.699086614197372*^9, 3.6990866162184167`*^9}},ExpressionUUID->"a59f8331-39cd-4198-a646-\ fedd116a6814"], Cell["\<\ 2) Simula\[CCedilla]\[ATilde]o do lan\[CCedilla]amento de um proj\[EAcute]til \ - parte 1. Gerar um conjunto de dados que, uma vez graficado, represente a posi\ \[CCedilla]\[ATilde]o vertical medida (com erros, portanto) de um proj\ \[EAcute]til em movimento livre. i.\tMonte uma tabela com a posi\[CCedilla]\[ATilde]o vertical afetada da \ incerteza de medida ii.\tGrafique o resultado do item i iii.\tEscreva uma rotina que fa\[CCedilla]a tanto o sorteio quanto o gr\ \[AAcute]fico iv.\tVerifique o que acontece cada vez que voc\[EHat] recalcular a linha de \ comando do item iii 3) Distribui\[CCedilla]\[ATilde]o da m\[EAcute]dia de uma medida Verificar, por simula\[CCedilla]\[ATilde]o, como se distribui a m\[EAcute]dia \ de uma medida e examinar a vari\[AHat]ncia da m\[EAcute]dia depende do n\ \[UAcute]mero de dados e do n\[UAcute]mero de simula\[CCedilla]\[OTilde]es. i.\tSorteie 10 n\[UAcute]meros aleat\[OAcute]rios gaussianos de media 10 e \ desvio padr\[ATilde]o 3 ii.\tCalcule a m\[EAcute]dia desses valores iii.\tEscreva uma rotina que sorteie os valores e fa\[CCedilla]a a \ m\[EAcute]dia de 10 aleatorios gaussianos iv.\tFa\[CCedilla]a uma lista com 100 medias de 10 aleat\[OAcute]rios \ gaussianos v.\tHistograme essa lista vi.\tRefa\[CCedilla]a a lista com as medias de 1000 medidas de 10 aleat\ \[OAcute]rios gaussianos e histograme vii.\tFa\[CCedilla]a uma lista com as medidas de 1000 medidas de 90 aleat\ \[OAcute]rios gaussianos e histograme viii.\tCompare os histogramas dos itens v, vi e vii e discuta o resultado \ \>", "Text", CellChangeTimes->{ 3.699086637585882*^9},ExpressionUUID->"c362b0bf-bd78-4194-b377-\ c9d69421d43f"] }, Open ]], Cell[CellGroupData[{ Cell["Exercises", "Section", CellChangeTimes->{{3.6820866521195292`*^9, 3.682086655991496*^9}},ExpressionUUID->"79c7e181-f7da-4f1d-b536-\ abc76575996e"], Cell[CellGroupData[{ Cell["How the average of a measurement is distributed", "Subsection", CellChangeTimes->{{3.6666905705237074`*^9, 3.6666905896347218`*^9}, { 3.6666912187016115`*^9, 3.6666912195018044`*^9}, {3.6820912925127544`*^9, 3.682091307597604*^9}},ExpressionUUID->"75294e5c-3074-45b1-b39f-\ d12427e6bcae"], Cell["\<\ i. Draw 10 normal random number with average 10 and standard deviation 3. ii. Evaluate the average of these 10 numbers. iii. Write a single line of code that draws 10 random numbers and evaluates \ their average. iv. Build a list with 100 averages of 10 normal random numbers. v. Histogram that list. vi. Repeat item iv, but now using 1000 simulated sets, and draw its histogram. vii. Build a list with the averages of a 1000 data sets, each one with 90 \ normal random numbers, and draw its histogram. viii. Compare the histograms of items v, vi and vii, and discuss the result.\ \>", "Text", CellChangeTimes->{{3.6820913214399943`*^9, 3.682091386549185*^9}, { 3.6820914550548635`*^9, 3.682091762730371*^9}, {3.6821346928015013`*^9, 3.6821347931285715`*^9}, {3.6821350503263807`*^9, 3.682135052373987*^9}},ExpressionUUID->"cf03042f-c855-4050-9042-\ db2e0ed9732c"] }, Open ]], Cell[CellGroupData[{ Cell["Simulating a projectile\[CloseCurlyQuote]s launch", "Subsection", CellChangeTimes->{{3.682086685797871*^9, 3.6820866975184216`*^9}, { 3.682086743301941*^9, 3.682086743800783*^9}},ExpressionUUID->"cd733e7f-b560-4ac1-964a-\ 94ca55c70ad4"], Cell["\<\ The code: vertical = Table[ {t,20t-5t^2}, {t,0,4,0.25} ] generates a data set that, once plotted with ListPlot[ ], represents the vertical position of a projectile falling freely, in meters. In order to simulate a measurement with standard deviation 0.5 m in the position, replace 20t-5t^2 by RandomVariate[NormalDistribution[ 20t-5t^2, 0.5 ]. i. Build a table with the vertical position affected by statistical \ fluctuation. ii. ListPlot the table obtained in item i. iii. Write the random sampling and the plot of the simulated values in a single Mathematica instruction. iv. See what happens every time you recalculate the instruction of item iii. Obs.: Similar simulation tasks will be used when we study the least squares method to provide for test cases. \ \>", "Text", CellChangeTimes->{{3.6820867802741923`*^9, 3.6820868498023586`*^9}, { 3.6820868836422787`*^9, 3.6820871516465006`*^9}, {3.6820913913813915`*^9, 3.6820914332127557`*^9}, 3.6820918173208275`*^9, {3.682134800132326*^9, 3.6821348441991863`*^9}, {3.6821348858574753`*^9, 3.6821350437400465`*^9}, {3.6821350802515745`*^9, 3.682135253893587*^9}, { 3.682135335309238*^9, 3.682135361987986*^9}},ExpressionUUID->"81774351-503f-444d-94f5-\ 3cc362eadc77"] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{1141.2, 568.8}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, Magnification->1.5, FrontEndVersion->"13.1 for Microsoft Windows (64-bit) (August 22, 2022)", StyleDefinitions->"Default.nb", ExpressionUUID->"2beddeaf-54d6-4dcd-9862-dbb21f27a43b" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 172, 3, 146, "Title",ExpressionUUID->"4d8b3ddc-6e6b-4f94-908b-db3785c41c3e"], Cell[754, 27, 261, 4, 52, "Text",ExpressionUUID->"57e503e2-a47c-407f-b04c-d16fe255ba43"], Cell[CellGroupData[{ Cell[1040, 35, 303, 4, 100, "Section",ExpressionUUID->"77b92bf1-f0f5-4ee9-ab85-e83abce46032"], Cell[CellGroupData[{ Cell[1368, 43, 182, 3, 81, "Subsection",ExpressionUUID->"2e734fd4-7145-48ae-89cb-3bff7150a7c4"], Cell[1553, 48, 241, 6, 42, "Input",ExpressionUUID->"02dacfb7-14cc-46b9-b040-cf4cf20ba501"], Cell[1797, 56, 132, 2, 42, "Input",ExpressionUUID->"e0771169-b33a-4efe-86a9-7218b814fd92"], Cell[1932, 60, 181, 5, 42, "Input",ExpressionUUID->"d77ece31-249f-4bdc-b83c-d0009cb5a10a"], Cell[2116, 67, 179, 5, 42, "Input",ExpressionUUID->"5dca96dc-37d5-4c32-a569-0ea3b36d859f"], Cell[2298, 74, 207, 5, 42, "Input",ExpressionUUID->"6b5a567e-6a68-4e83-b62f-dbf2dd90fcaf"], Cell[2508, 81, 114, 1, 42, "Input",ExpressionUUID->"e5fe2b2f-5d7a-4fae-a9cf-0e3dae4585df"], Cell[2625, 84, 557, 11, 190, "Text",ExpressionUUID->"512d8581-178f-48ec-97d8-a30b85662b66"] }, Open ]], Cell[CellGroupData[{ Cell[3219, 100, 232, 4, 81, "Subsection",ExpressionUUID->"57f4ccc1-4252-416b-9908-b2ac4713d8a8"], Cell[3454, 106, 280, 8, 42, "Input",ExpressionUUID->"261e60d0-c7b3-4536-8f11-7f1cb5ee6532"], Cell[3737, 116, 292, 8, 42, "Input",ExpressionUUID->"a3088ce7-11f8-4fbd-b172-c7c614837334"], Cell[4032, 126, 306, 8, 42, "Input",ExpressionUUID->"636e6c86-a45f-4bdf-8cd4-841b12f30331"], Cell[4341, 136, 257, 7, 42, "Input",ExpressionUUID->"9c919942-a35d-4eae-8916-170ab95a40e8"], Cell[CellGroupData[{ Cell[4623, 147, 343, 5, 67, "Subsubsection",ExpressionUUID->"ff775a18-30ba-413d-9efa-5421f2bba3a4"], Cell[4969, 154, 450, 14, 42, "Input",ExpressionUUID->"9b2edcdc-6e96-4a76-a8dc-95f3affac4f1"], Cell[5422, 170, 483, 15, 42, "Input",ExpressionUUID->"e152e792-8db3-4bd5-8f04-343f7b824f19"], Cell[5908, 187, 623, 18, 42, "Input",ExpressionUUID->"acaf14cf-ba34-4bfc-a1e7-c7e17453b874"], Cell[6534, 207, 257, 4, 52, "Text",ExpressionUUID->"1078e307-1b5a-44b9-9929-b0d8326d7eba"], Cell[6794, 213, 249, 5, 42, "Input",ExpressionUUID->"95d32d1f-3164-4ac7-944c-eb52141d5e7e"], Cell[7046, 220, 198, 4, 42, "Input",ExpressionUUID->"33ca694f-a5c2-4962-add3-e2379536ef4d"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[7293, 230, 214, 4, 81, "Subsection",ExpressionUUID->"9538cba5-15f1-4cb3-9871-fa1aa6ae16aa"], Cell[7510, 236, 184, 4, 42, "Input",ExpressionUUID->"fb033eb0-7e0d-4406-9496-45fcccd11e7a"], Cell[7697, 242, 256, 7, 42, "Input",ExpressionUUID->"75037c43-c4ba-44c3-b251-d10db09e3821"], Cell[7956, 251, 284, 8, 42, "Input",ExpressionUUID->"7815358d-cb52-46af-9ca5-c83f2d7a2fb0"], Cell[8243, 261, 288, 7, 42, "Input",ExpressionUUID->"7fd4798f-332d-4c91-9783-45b5e6b1f695"], Cell[8534, 270, 555, 13, 42, "Input",ExpressionUUID->"7e85881c-245e-460a-89ba-c5a471ec5c02"] }, Open ]], Cell[CellGroupData[{ Cell[9126, 288, 216, 4, 81, "Subsection",ExpressionUUID->"75a6df92-d8d4-46c0-a394-63db25395f49"], Cell[9345, 294, 315, 8, 42, "Input",ExpressionUUID->"3d5a8479-1241-4010-b231-4aa925c8cc1b"], Cell[9663, 304, 186, 4, 42, "Input",ExpressionUUID->"38cca35e-1f7d-4c09-b3fc-3ddff23fe38b"], Cell[9852, 310, 197, 4, 42, "Input",ExpressionUUID->"c1de15eb-8b24-4ce5-bcba-fc7fd4e73b30"], Cell[10052, 316, 188, 4, 42, "Input",ExpressionUUID->"37738b5f-af4c-47b8-9538-6b42d819e55f"], Cell[10243, 322, 190, 4, 42, "Input",ExpressionUUID->"527cb3ac-a929-4bc3-bebf-09906f1461e2"], Cell[10436, 328, 322, 8, 42, "Input",ExpressionUUID->"581c8d9a-2c16-44fa-bb00-876d6d92af4b"], Cell[10761, 338, 184, 4, 42, "Input",ExpressionUUID->"d8081890-06ea-487e-a1e8-e8f95cba72f6"], Cell[10948, 344, 178, 4, 42, "Input",ExpressionUUID->"584c8e28-8a7b-4ed0-91bb-f8bb01b715a8"] }, Open ]], Cell[CellGroupData[{ Cell[11163, 353, 209, 4, 81, "Subsection",ExpressionUUID->"719875f4-1824-4fb9-a975-5ead388d00a2"], Cell[11375, 359, 193, 4, 42, "Input",ExpressionUUID->"2df81858-b289-4d81-b180-e9c5583eb934"], Cell[11571, 365, 340, 9, 42, "Input",ExpressionUUID->"337e1256-b21c-4367-87f9-c034e58f351a"], Cell[11914, 376, 349, 10, 42, "Input",ExpressionUUID->"0c5c9e75-4f77-4e76-a3ab-11bdab78068c"], Cell[12266, 388, 192, 4, 42, "Input",ExpressionUUID->"81c2838e-a4db-4a82-b04d-db7b707fa0db"], Cell[12461, 394, 187, 4, 42, "Input",ExpressionUUID->"2651f514-6c7c-4c38-99c3-3876f77fd046"], Cell[12651, 400, 198, 4, 42, "Input",ExpressionUUID->"641fca70-11af-4e9f-b4c9-9052f8a5f1c8"], Cell[12852, 406, 210, 5, 42, "Input",ExpressionUUID->"6457e771-8f97-41d1-a314-aff91a21837e"] }, Open ]], Cell[CellGroupData[{ Cell[13099, 416, 224, 4, 81, "Subsection",ExpressionUUID->"8d78a640-a0b2-49bb-a9c1-5707200ec449"], Cell[13326, 422, 276, 7, 42, "Input",ExpressionUUID->"a8da9b80-d174-4a81-8de1-42ad428e676f"], Cell[13605, 431, 259, 7, 42, "Input",ExpressionUUID->"da59aa06-c101-49f6-96b8-80700585c6a9"], Cell[13867, 440, 335, 8, 42, "Input",ExpressionUUID->"7c6184e4-34fb-49cf-b66a-5c869d648048"], Cell[14205, 450, 551, 15, 42, "Input",ExpressionUUID->"b4bede74-b8f8-4163-8510-641821a38d3a"], Cell[14759, 467, 282, 7, 42, "Input",ExpressionUUID->"4205fc5a-836e-4e74-b572-9c95ad7a74ca"], Cell[15044, 476, 608, 16, 42, "Input",ExpressionUUID->"edfe6171-71eb-436c-b24d-c6efd3d048bd"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[15701, 498, 165, 3, 100, "Section",ExpressionUUID->"a59f8331-39cd-4198-a646-fedd116a6814"], Cell[15869, 503, 1669, 35, 708, "Text",ExpressionUUID->"c362b0bf-bd78-4194-b377-c9d69421d43f"] }, Open ]], Cell[CellGroupData[{ Cell[17575, 543, 156, 3, 100, "Section",ExpressionUUID->"79c7e181-f7da-4f1d-b536-abc76575996e"], Cell[CellGroupData[{ Cell[17756, 550, 300, 4, 81, "Subsection",ExpressionUUID->"75294e5c-3074-45b1-b39f-d12427e6bcae"], Cell[18059, 556, 889, 17, 328, "Text",ExpressionUUID->"cf03042f-c855-4050-9042-db2e0ed9732c"] }, Open ]], Cell[CellGroupData[{ Cell[18985, 578, 248, 4, 81, "Subsection",ExpressionUUID->"cd733e7f-b560-4ac1-964a-94ca55c70ad4"], Cell[19236, 584, 1274, 24, 501, "Text",ExpressionUUID->"81774351-503f-444d-94f5-3cc362eadc77"] }, Open ]] }, Open ]] }, Open ]] } ] *)