Wolfram
Mathematica
8의 신기능: 매개 변수 추정 및 검정
◄
이전
|
다음
►
핵심 알고리즘
Hotelling
검정을 이용한 위조 지폐 발견
진짜와 위조 스위스 은행권에 대한 다양한 측정 값의 Hotelling
검정을 이용한 위조 지폐 발견 연산 벙법으로,
통계를 계산하여 가짜라는 사실을 두드러지게 나타내는 쌍을 선택합니다.
In[1]:=
X
data = ExampleData[{"Statistics", "SwissBankNotes"}]; colheads = ExampleData[{"Statistics", "SwissBankNotes"}, "ColumnHeadings"];
In[2]:=
X
Framed[GraphicsGrid[ Table[cBills = Pick[data[[All, {i, j}]], data[[All, -1]], 1]; gBills = Pick[data[[All, {i, j}]], data[[All, -1]], 0]; If[i == j, Graphics[ Style[Text[colheads[[i]]], Bold, FontSize -> 12, FontFamily -> "Verdana"], Background -> White, Frame -> True, FrameTicks -> None], ListPlot[{cBills, gBills}, PlotStyle -> {{PointSize -> .05, Hue[.742, .7, .7]}, {PointSize -> .05, Hue[.242, .7, .7]}}, Frame -> True, Axes -> False, FrameTicks -> None, AspectRatio -> 1, Background -> White, ImageSize -> 80, Epilog -> Inset[Framed[ Style[ToString@ NumberForm[ TTest[{cBills, gBills}, Automatic, "TestStatistic", VerifyTestAssumptions -> None], {4, 1}], Bold, FontFamily -> "Verdana"], RoundingRadius -> 5, Background -> Directive[Lighter[Yellow, .75]]], Scaled[{.3, .75}]]]], {i, 6}, {j, 6}]], RoundingRadius -> 10, FrameMargins -> 10, Background -> GrayLevel[.9]]
Out[2]=