(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 10368, 305] NotebookOptionsPosition[ 8756, 243] NotebookOutlinePosition[ 9098, 258] CellTagsIndexPosition[ 9055, 255] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Aula 1 TEDFE 2014", "Subtitle", CellChangeTimes->{{3.616746072140585*^9, 3.61674608356341*^9}}], Cell["\<\ Vamos supor que a probabilidade de recobrir uma \[AAcute]rea com 2 \ \[AAcute]tomos \[EAcute] 0,300... e evaporar 15 \[AAcute]tomos.\ \>", "Text", CellChangeTimes->{{3.6167461109719396`*^9, 3.6167461649427223`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"p", "=", "0.3"}]], "Input", CellChangeTimes->{{3.6167461687711625`*^9, 3.616746172708993*^9}}], Cell[BoxData["0.3`"], "Output", CellChangeTimes->{3.616746174224742*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"r", "=", RowBox[{"RandomReal", "[", "]"}]}]], "Input", CellChangeTimes->{{3.616746206266609*^9, 3.6167462131421824`*^9}, { 3.6167463627237873`*^9, 3.616746363161324*^9}}], Cell[BoxData["0.05715331248037381`"], "Output", CellChangeTimes->{3.6167462252213116`*^9, 3.6167463638488812`*^9}] }, Open ]], Cell[TextData[{ "Ao examinar uma \[AAcute]rea, ela tem dois atomos ou um n\[UAcute]mero \ diferente de \[AAcute]tomos recobrindo. Para simular essa probabilidade p=0,3 \ de encontrar exatamente dois atomos, vamos dizer que se ", Cell[BoxData[ FormBox[" ", TraditionalForm]], FormatType->"TraditionalForm"] }], "Text", CellChangeTimes->{{3.6167462712844763`*^9, 3.6167464804351444`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"0", "<=", "r", "<=", "p", " "}]], "Input", CellChangeTimes->{{3.6167464617538595`*^9, 3.6167464617694836`*^9}}], Cell[BoxData["True"], "Output", CellChangeTimes->{3.616746462910204*^9}] }, Open ]], Cell["temos dois \[AAcute]tomos recobrindo a \[AAcute]rea", "Text", CellChangeTimes->{{3.6167464873575954`*^9, 3.6167464961581144`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"r", "=", RowBox[{"RandomReal", "[", "]"}]}]], "Input", CellChangeTimes->{{3.6167464826072006`*^9, 3.6167465081591125`*^9}}], Cell[BoxData["0.7426416112993861`"], "Output", CellChangeTimes->{3.616746510049893*^9}] }, Open ]], Cell[BoxData[""], "Input", CellChangeTimes->{{3.6167465168942146`*^9, 3.6167465181130652`*^9}}], Cell["J\[AAcute] se ", "Text", CellChangeTimes->{{3.6167465237541595`*^9, 3.616746525348042*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"r", ">", "p"}]], "Input", CellChangeTimes->{{3.6167465319892187`*^9, 3.61674653764594*^9}}], Cell[BoxData["True"], "Output", CellChangeTimes->{3.616746538521013*^9}] }, Open ]], Cell["\<\ ent\[ATilde]o h\[AAcute] um n\[UAcute]mero de \[AAcute]tomos diferentes de 2 \ recobrindo a \[AAcute]rea examinada.\ \>", "Text", CellChangeTimes->{{3.616746580754796*^9, 3.6167466063350487`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"list", "=", RowBox[{"RandomReal", "[", RowBox[{"1", ",", "100"}], "]"}]}]], "Input", CellChangeTimes->{{3.6167466843917675`*^9, 3.616746708550027*^9}, { 3.6167467768786163`*^9, 3.616746831237597*^9}, {3.616747085522234*^9, 3.6167470866629534`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "0.723010009371521`", ",", "0.5119786390910237`", ",", "0.9110019708802568`", ",", "0.18218229791324236`", ",", "0.541477706645138`", ",", "0.6362463484548015`", ",", "0.9153833159488503`", ",", "0.980108534731079`", ",", "0.018803811051480546`", ",", "0.31950743231950507`", ",", "0.5246801227103268`", ",", "0.5923268049343489`", ",", "0.31599785779760836`", ",", "0.036698555313948056`", ",", "0.30143456494780874`", ",", "0.3776311966894279`", ",", "0.1627168020903349`", ",", "0.3542449186550689`", ",", "0.660363581253568`", ",", "0.6194610719291256`", ",", "0.9232829692749229`", ",", "0.9905163286123835`", ",", "0.80014672734064`", ",", "0.6090163775251196`", ",", "0.5754749195404232`", ",", "0.09697962561357443`", ",", "0.37789297013070877`", ",", "0.20060118187039366`", ",", "0.08029696054836832`", ",", "0.43238978582845666`", ",", "0.3290351947665755`", ",", "0.7480038392704296`", ",", "0.7480732040868248`", ",", "0.6947205452921212`", ",", "0.10949566613648232`", ",", "0.44111443903208003`", ",", "0.04480295228325559`", ",", "0.3972563688111952`", ",", "0.18728774905679235`", ",", "0.7525180588569211`", ",", "0.45353139028787814`", ",", "0.42387271202910304`", ",", "0.49048311277572165`", ",", "0.5260183386479995`", ",", "0.4318469514931471`", ",", "0.7846901491177483`", ",", "0.7127886402352444`", ",", "0.8647835784810685`", ",", "0.8729671732747557`", ",", "0.1891692353464407`", ",", "0.47450979126592197`", ",", "0.3396228701890225`", ",", "0.2657413847387342`", ",", "0.03364228412643211`", ",", "0.9852716390559708`", ",", "0.17854813509361223`", ",", "0.754060265472301`", ",", "0.11773140591610853`", ",", "0.4894208689816819`", ",", "0.9382179852597057`", ",", "0.6346993613855172`", ",", "0.9270027763287674`", ",", "0.014840630094791196`", ",", "0.7490757149039728`", ",", "0.8429880300421715`", ",", "0.6051188185962975`", ",", "0.2965042708344705`", ",", "0.3167494834732443`", ",", "0.7018091238070561`", ",", "0.13492506598670406`", ",", "0.9709448622730201`", ",", "0.9074391834669076`", ",", "0.19957612280030146`", ",", "0.9299343748487576`", ",", "0.12238577284101715`", ",", "0.6599013470610819`", ",", "0.7303372326406223`", ",", "0.5377225491458653`", ",", "0.045557126137343085`", ",", "0.6363950260074491`", ",", "0.5057958547785548`", ",", "0.8401410193803209`", ",", "0.02212210551965632`", ",", "0.6100770891288954`", ",", "0.36279066277594096`", ",", "0.27315739238249837`", ",", "0.7561259559060456`", ",", "0.04684693063280854`", ",", "0.6239347817662599`", ",", "0.25093106119357267`", ",", "0.5116782445199752`", ",", "0.9424780240217634`", ",", "0.20871210369670945`", ",", "0.5166131553012108`", ",", "0.8599228600703297`", ",", "0.8049726879769397`", ",", "0.23187943505681652`", ",", "0.3723371719888513`", ",", "0.5981788369746974`", ",", "0.10624385333320263`"}], "}"}]], "Output", CellChangeTimes->{{3.6167467129253874`*^9, 3.6167467350470085`*^9}, { 3.616746805891735*^9, 3.616746831893898*^9}, 3.6167470873505106`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Count", "[", RowBox[{"list", ",", RowBox[{"u_", "/;", RowBox[{"u", "<=", "p"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.6167468158769445`*^9, 3.6167468402852244`*^9}, { 3.616746908347659*^9, 3.616746916533059*^9}, {3.616747090553902*^9, 3.6167471010187426`*^9}, {3.616747220502917*^9, 3.6167472222374363`*^9}}], Cell[BoxData["28"], "Output", CellChangeTimes->{{3.6167469130327673`*^9, 3.6167469168924637`*^9}, { 3.6167470921634088`*^9, 3.61674710173755*^9}, 3.616747223628173*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Count", "[", RowBox[{"list", ",", RowBox[{"u_", "/;", RowBox[{"u", "<=", "p"}]}]}], "]"}], "/", "100"}]], "Input", CellChangeTimes->{{3.616747235785438*^9, 3.616747263115836*^9}}], Cell[BoxData[ FractionBox["7", "25"]], "Output", CellChangeTimes->{{3.61674723817626*^9, 3.616747263865895*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Count", "[", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{"1", ",", "1000000"}], "]"}], ",", RowBox[{"u_", "/;", RowBox[{"u", "<=", "p"}]}]}], "]"}], "/", "1000000"}]], "Input", CellChangeTimes->{{3.616747338437459*^9, 3.61674737653438*^9}}], Cell[BoxData[ FractionBox["5997", "20000"]], "Output", CellChangeTimes->{{3.616747341828368*^9, 3.6167473856132574`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"%", "//", "N"}]], "Input", CellChangeTimes->{{3.6167473934385557`*^9, 3.616747394719819*^9}}], Cell[BoxData["0.29985`"], "Output", CellChangeTimes->{3.616747395454255*^9}] }, Open ]], Cell["\<\ Conclus\[ATilde]o: a fra\[CCedilla]\[ATilde]o da placa recoberta por 2 \ \[AAcute]tomos ser\[AAcute] com certeza proxima de 30% somente se a \ \[AAcute]rea da placa (o n\[UAcute]mero de casas dispon\[IAcute]veis) for \ suficientemente grande.\ \>", "Text", CellChangeTimes->{{3.616747419721898*^9, 3.6167474775185165`*^9}}] }, Open ]] }, WindowSize->{767, 852}, WindowMargins->{{Automatic, 568}, {44, Automatic}}, FrontEndVersion->"10.0 for Microsoft Windows (64-bit) (July 1, 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 102, 1, 56, "Subtitle"], Cell[685, 25, 226, 4, 30, "Text"], Cell[CellGroupData[{ Cell[936, 33, 119, 2, 31, "Input"], Cell[1058, 37, 73, 1, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[1168, 43, 200, 4, 31, "Input"], Cell[1371, 49, 115, 1, 31, "Output"] }, Open ]], Cell[1501, 53, 393, 8, 49, "Text"], Cell[CellGroupData[{ Cell[1919, 65, 136, 2, 31, "Input"], Cell[2058, 69, 73, 1, 31, "Output"] }, Open ]], Cell[2146, 73, 137, 1, 30, "Text"], Cell[CellGroupData[{ Cell[2308, 78, 151, 3, 31, "Input"], Cell[2462, 83, 88, 1, 31, "Output"] }, Open ]], Cell[2565, 87, 96, 1, 31, "Input"], Cell[2664, 90, 98, 1, 30, "Text"], Cell[CellGroupData[{ Cell[2787, 95, 116, 2, 31, "Input"], Cell[2906, 99, 73, 1, 31, "Output"] }, Open ]], Cell[2994, 103, 207, 4, 30, "Text"], Cell[CellGroupData[{ Cell[3226, 111, 285, 6, 31, "Input"], Cell[3514, 119, 3228, 54, 292, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6779, 178, 354, 7, 31, "Input"], Cell[7136, 187, 172, 2, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7345, 194, 230, 6, 31, "Input"], Cell[7578, 202, 114, 2, 46, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7729, 209, 301, 8, 31, "Input"], Cell[8033, 219, 123, 2, 46, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[8193, 226, 118, 2, 31, "Input"], Cell[8314, 230, 77, 1, 31, "Output"] }, Open ]], Cell[8406, 234, 334, 6, 49, "Text"] }, Open ]] } ] *) (* End of internal cache information *)