(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 15839, 514]*) (*NotebookOutlinePosition[ 16572, 540]*) (* CellTagsIndexPosition[ 16528, 536]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Quartiles, Interquartile range and outlier boundaries.", "Title"], Cell[BoxData[ \(Needs["\"]\)], "Input", CellLabel->"In[54]:="], Cell[BoxData[ \(Needs["\"]\)], "Input", CellLabel->"In[55]:="], Cell[CellGroupData[{ Cell["\<\ This notebook describes a method to determine potential and actual \ outliers. Below is data on computer use for metropolitan areas in 1994. Data \ were obtained from the US Census. First variable is the name of the city, \ second variable is the proportion of survey respondents who said that they \ had a computer at home.\ \>", "Subtitle"], Cell[BoxData[ \(\(Computer = {{"\", 0.1298701299\ }, \n{"\", 0.0542168675\ }, \n{"\", 0.3\ }, \n{"\", 0.025\ }, \n{"\", 0.0285714286\ }, \n{"\", 0.1219512195\ }, \n{"\", 0.1428571429\ }, \n{"\", 0.0759837178\ }, \n{"\", 0.0875912409\ }, \n{"\", 0.0912547529\ }, \n{"\", 0.1351351351\ }, \n{"\", 0.0243902439\ }, \n{"\", 0.0863309353\ }, \n{"\", 0.0357142857\ }, \n{"\", 0.1144278607\ }, \n{"\", 0.0476190476\ }, \n{"\", 0.0921052632\ }, \n{"\", 0.1551724138\ }, \n{"\", 0.0760095012\ }, \n{"\", 0.1666666667\ }, \n{"\", 0.0666666667\ }, \n{"\", 0.0588235294\ }, \n{"\", 0.3333333333\ }, \n{"\", 0.1041666667\ }, \n{"\", 0.0864197531\ }, \n{"\", 0.078125\ }, \n{"\", 0.05\ }, \n{"\", 0.1214953271\ }, \n{"\", 0.0363636364\ }, \n{"\", 0.1162790698\ }, \n{"\", 0.1217391304\ }, \n{"\", 0.0700636943\ }, \n{"\", 0.1333333333\ }, \n{"\", 0.0752688172\ }, \n{"\", 0.1123595506\ }, \n{"\", 0.1020408163\ }, \n{"\", 0.0963855422\ }, \n{"\", 0.0983606557\ }, \n{"\", 0.0952380952\ }, \n{"\", 0.0285714286\ }, \n{"\", 0.108974359\ }, \n{"\", 0.0425531915\ }, \n{"\", 0.1\ }, \n{"\", 0.05\ }, \n{"\", 0.0833333333\ }, \n{"\", 0.0739299611\ }, \n{"\", 0.023255814\ }, \n{"\", 0.0673076923\ }, \n{"\", 0.0863477246\ }, \n{"\", 0.1612903226\ }, \n{"\", 0.1489361702\ }, \n{"\", 0.0847457627\ }, \n{"\", 0.0810810811\ }, \n{"\", 0.0625\ }, \n{"\", 0.1238095238\ }, \n{"\", 0.1627906977\ }, \n{"\", 0.0454545455\ }, \n{"\", 0.0752688172\ }, \n{"\", 0.0454545455\ }, \n{"\", 0.0735294118\ }, \n{"\", 0.108490566\ }, \n{"\", 0.0877192982\ }, \n{"\", 0.0364963504\ }, \n{"\", 0.0653465347\ }, \n{"\", 0.0717948718\ }, \n{"\", 0.0568181818\ }, \n{"\", 0.2380952381\ }, \n{"\", 0.0948275862\ }, \n{"\", 0.093220339\ }, \n{"\", 0.1061946903\ }, \n{"\", 0.0555555556\ }, \n{"\", 0.0975609756\ }, \n{"\", 0.093220339\ }, \n{"\", 0.119047619\ }, \n{"\", 0.0570469799\ }, \n{"\", 0.0544871795\ }, \n{"\", 0.112244898\ }, \n{"\", 0.1493506494\ }, \n{"\", 0.1067961165\ }, \n{"\", 0.125\ }, \n{"\", 0.193877551\ }, \n{"\", 0.0813953488\ }, \n{"\", 0.1666666667\ }, \n{"\", 0.1646341463\ }, \n{"\", 0.0989010989\ }, \n{"\", 0.1176470588\ }, \n{"\", 0.0833333333\ }, \n{"\", 0.0833333333\ }, \n{"\", 0.0588235294\ }, \n{"\", 0.1578947368\ }, \n{"\", 0.1538461538\ }, \n{"\", 0.0666666667\ }, \n{"\", 0.1444444444\ }, \n{"\", 0.025\ }, \n{"\", 0.0869565217\ }, \n{"\", 0.0967741935\ }, \n{"\", 0.0294117647\ }, \n{"\", 0.0327868852\ }, \n{"\", 0.1851851852\ }, \n{"\", 0.0794979079\ }, \n{"\", 0.1272727273\ }, \n{"\", 0.0322580645\ }, \n{"\", 0.1066666667\ }, \n{"\", 0.1891891892\ }, \n{"\", 0.1071428571\ }, \n{"\", 0.2173913043\ }, \n{"\", 0.1129707113\ }, \n{"\", 0.0582524272\ }, \n{"\", 0.0422535211\ }, \n{"\", 0.0408163265\ }, \n{"\", 0.0537634409\ }\n}; \)\)], "Input", CellLabel->"In[56]:="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{"D", StyleBox["escriptive", FontFamily->"Arial", FontWeight->"Plain"]}]], StyleBox[" ", FontFamily->"Arial", FontWeight->"Plain"], RowBox[{ StyleBox["statistics", FontFamily->"Arial", FontWeight->"Plain"], StyleBox[".", FontFamily->"Arial"]}]}]], "Subtitle", FontWeight->"Bold"], Cell[CellGroupData[{ Cell[BoxData[ \(Min[Column[Computer, 2]]\)], "Input", CellLabel->"In[57]:="], Cell[OutputFormData["\<\ 0.02325581399999999\ \>", "\<\ 0.023255814\ \>"], "Output", CellLabel->"Out[57]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Max[Column[Computer, 2]]\)], "Input", CellLabel->"In[58]:="], Cell[OutputFormData["\<\ 0.3333333332999999\ \>", "\<\ 0.3333333333\ \>"], "Output", CellLabel->"Out[58]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Mean[Column[Computer, 2]]\)], "Input", CellLabel->"In[59]:="], Cell[OutputFormData["\<\ 0.09730479806216212\ \>", "\<\ 0.0973048\ \>"], "Output", CellLabel->"Out[59]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Median[Column[Computer, 2]]\)], "Input", CellLabel->"In[60]:="], Cell[OutputFormData["\<\ 0.0877192982\ \>", "\<\ 0.0877192982\ \>"], "Output", CellLabel->"Out[60]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(StandardDeviation[Column[Computer, 2]]\)], "Input", CellLabel->"In[61]:="], Cell[OutputFormData["\<\ 0.05338201749741321\ \>", "\<\ 0.053382\ \>"], "Output", CellLabel->"Out[61]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Qstats = \ Quartiles[Column[Computer, 2]]\)], "Input", CellLabel->"In[72]:="], Cell[OutputFormData[ "\<\ {0.05882352939999999, 0.0877192982, 0.120883400075}\ \>", "\<\ {0.0588235, 0.0877192982, 0.120883}\ \>"], "Output", CellLabel->"Out[72]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ICQ = \ Qstats[\([3]\)]\ - \ Qstats[\([1]\)]\)], "Input", CellLabel->"In[73]:="], Cell[OutputFormData["\<\ 0.06205987067499999\ \>", "\<\ 0.0620599\ \>"], "Output", CellLabel->"Out[73]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(InnerLeft\ = \ Qstats[\([1]\)]\ - \ 1.5*ICQ\)], "Input", CellLabel->"In[64]:="], Cell[OutputFormData["\<\ {0.05882352939999999 - 1.5*(-0.05882352939999999 + TableForm[{0.05882352939999999, 0.0877192982, 0.120883400075}][[3]]), 0.0877192982 - 1.5*(-0.0877192982 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[3]]), 0.120883400075 - 1.5*(-0.120883400075 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[ 3]])}\ \>", "\<\ {0.0588235 - 1.5 (-0.0588235 + 0.0588235 [[3]]), 0.0877192982 - 1.5 \ (-0.0877193 + 0.0588235 [[3]]), 0.0877192982 \ 0.0877192982 0.120883 \ 0.120883 0.120883 - 1.5 (-0.120883 + 0.0588235 [[3]])} 0.0877192982 0.120883\ \>"], "Output", CellLabel->"Out[64]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(InnerRight\ = \ Qstats[\([1]\)]\ \ + 1.5*ICQ\)], "Input", CellLabel->"In[65]:="], Cell[OutputFormData["\<\ {0.05882352939999999 + 1.5*(-0.05882352939999999 + TableForm[{0.05882352939999999, 0.0877192982, 0.120883400075}][[3]]), 0.0877192982 + 1.5*(-0.0877192982 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[3]]), 0.120883400075 + 1.5*(-0.120883400075 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[ 3]])}\ \>", "\<\ {0.0588235 + 1.5 (-0.0588235 + 0.0588235 [[3]]), 0.0877192982 + 1.5 \ (-0.0877193 + 0.0588235 [[3]]), 0.0877192982 \ 0.0877192982 0.120883 \ 0.120883 0.120883 + 1.5 (-0.120883 + 0.0588235 [[3]])} 0.0877192982 0.120883\ \>"], "Output", CellLabel->"Out[65]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(OuterLeft\ = \ Qstats[\([1]\)]\ - \ 3. *ICQ\)], "Input", CellLabel->"In[66]:="], Cell[OutputFormData["\<\ {0.05882352939999999 - 3.*(-0.05882352939999999 + TableForm[{0.05882352939999999, 0.0877192982, 0.120883400075}][[3]]), 0.0877192982 - 3.*(-0.0877192982 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[3]]), 0.120883400075 - 3.*(-0.120883400075 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[ 3]])}\ \>", "\<\ {0.0588235 - 3. (-0.0588235 + 0.0588235 [[3]]), 0.0877192982 - 3. \ (-0.0877193 + 0.0588235 [[3]]), 0.0877192982 \ 0.0877192982 0.120883 \ 0.120883 0.120883 - 3. (-0.120883 + 0.0588235 [[3]])} 0.0877192982 0.120883\ \>"], "Output", CellLabel->"Out[66]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(OuterRight = \ Qstats[\([1]\)]\ + \ 3. *ICQ\)], "Input", CellLabel->"In[67]:="], Cell[OutputFormData["\<\ {0.05882352939999999 + 3.*(-0.05882352939999999 + TableForm[{0.05882352939999999, 0.0877192982, 0.120883400075}][[3]]), 0.0877192982 + 3.*(-0.0877192982 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[3]]), 0.120883400075 + 3.*(-0.120883400075 + TableForm[{0.05882352939999999, \ 0.0877192982, 0.120883400075}][[ 3]])}\ \>", "\<\ {0.0588235 + 3. (-0.0588235 + 0.0588235 [[3]]), 0.0877192982 + 3. \ (-0.0877193 + 0.0588235 [[3]]), 0.0877192982 \ 0.0877192982 0.120883 \ 0.120883 0.120883 + 3. (-0.120883 + 0.0588235 [[3]])} 0.0877192982 0.120883\ \>"], "Output", CellLabel->"Out[67]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FenceLeft1\ = \ Select[Computer, And[#[\([2]\)]\ <= InnerLeft, #[\([2]\)]\ > \ OuterLeft]&]\)], "Input", CellLabel->"In[68]:="], Cell[OutputFormData["\<\ {}\ \>", "\<\ {}\ \>"], "Output", CellLabel->"Out[68]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FenceLeft2\ = \ Select[Computer, #[\([2]\)]\ <= OuterLeft&]\)], "Input", CellLabel->"In[69]:="], Cell[OutputFormData["\<\ {}\ \>", "\<\ {}\ \>"], "Output", CellLabel->"Out[69]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FenceRight1\ = \ TableForm[ Select[Computer, And[#[\([2]\)]\ >= InnerRight, #[\([2]\)]\ < \ OuterRight]&]]\)], "Input", CellLabel->"In[70]:="], Cell[OutputFormData["\<\ {}\ \>", "\<\ \ \>"], "Output", CellLabel->"Out[70]//TableForm="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(FenceRight2\ = \ TableForm[Select[Computer, #[\([2]\)]\ >= OuterRight&]]\)], "Input", CellLabel->"In[71]:="], Cell[OutputFormData["\<\ {}\ \>", "\<\ \ \>"], "Output", CellLabel->"Out[71]//TableForm="] }, Open ]] }, Open ]] }, Open ]] }, FrontEndVersion->"Microsoft Windows 3.0", ScreenRectangle->{{0, 1024}, {0, 712}}, WindowToolbars->"EditBar", WindowSize->{980, 570}, WindowMargins->{{2, Automatic}, {Automatic, 5}}, Magnification->1, StyleDefinitions -> "TutorialBook.nb" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 71, 0, 61, "Title"], Cell[1805, 53, 104, 2, 31, "Input"], Cell[1912, 57, 99, 2, 31, "Input"], Cell[CellGroupData[{ Cell[2036, 63, 352, 6, 120, "Subtitle"], Cell[2391, 71, 6007, 112, 2584, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8435, 188, 451, 16, 33, "Subtitle"], Cell[CellGroupData[{ Cell[8911, 208, 82, 2, 31, "Input"], Cell[8996, 212, 110, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9143, 223, 82, 2, 31, "Input"], Cell[9228, 227, 110, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9375, 238, 83, 2, 31, "Input"], Cell[9461, 242, 108, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9606, 253, 85, 2, 31, "Input"], Cell[9694, 257, 103, 5, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[9834, 267, 96, 2, 31, "Input"], Cell[9933, 271, 107, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10077, 282, 99, 2, 31, "Input"], Cell[10179, 286, 167, 7, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10383, 298, 103, 2, 31, "Input"], Cell[10489, 302, 108, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10634, 313, 103, 2, 31, "Input"], Cell[10740, 317, 879, 25, 140, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[11656, 347, 104, 2, 31, "Input"], Cell[11763, 351, 879, 25, 140, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12679, 381, 103, 2, 31, "Input"], Cell[12785, 385, 867, 25, 140, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13689, 415, 102, 2, 31, "Input"], Cell[13794, 419, 867, 25, 140, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14698, 449, 171, 5, 31, "Input"], Cell[14872, 456, 83, 5, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14992, 466, 122, 3, 31, "Input"], Cell[15117, 471, 83, 5, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15237, 481, 196, 6, 54, "Input"], Cell[15436, 489, 92, 5, 42, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15565, 499, 139, 3, 31, "Input"], Cell[15707, 504, 92, 5, 42, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)