1:HL["/_next/static/media/e4af272ccee01ff0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/css/97132489b96da1d5.css","style",{"crossOrigin":""}] 0:["Y_TW_5cOL4VPb7FuqRz3I",[[["",{"children":[["slug","blog3","d"],{"children":["__PAGE__?{\"slug\":\"blog3\"}",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/97132489b96da1d5.css","precedence":"next","crossOrigin":""}]],"$L4"]]]] 5:HL["/_next/static/css/5b2728e81018a7be.css","style",{"crossOrigin":""}] 6:I[8326,["326","static/chunks/326-ead410bae2047633.js","986","static/chunks/986-f27c5a2c4d841870.js","42","static/chunks/app/%5Bslug%5D/page-419f452b4066bb25.js"],""] 7:I[6954,[],""] 8:I[7264,[],""] 3:[null,["$","html",null,{"lang":"ja","children":["$","body",null,{"className":"__className_f367f3 flex flex-col min-h-screen","children":[["$","header",null,{"className":"blog-header py-5","children":["$","div",null,{"className":"container mx-auto px-4","children":["$","div",null,{"className":"flex flex-col items-start","children":[["$","$L6",null,{"href":"/","className":"hover:no-underline","children":["$","h1",null,{"className":"text-6xl font-serif text-gray-800 mb-2 font-normal","children":"Shingoの数学ノート"}]}],["$","p",null,{"className":"text-xl text-gray-400 font-normal","children":"プログラミングと機械学習のメモ"}]]}]}]}],["$","main",null,{"className":"flex-grow","children":["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children",["slug","blog3","d"],"children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L8",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L9","$La",null],"segment":"__PAGE__?{\"slug\":\"blog3\"}"},"styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5b2728e81018a7be.css","precedence":"next","crossOrigin":""}]]}],"segment":["slug","blog3","d"]},"styles":[]}]}],["$","footer",null,{"className":"bg-[#DDDDDD] text-[#999999] py-8 mt-12 text-center border-t border-[#e5e5e5]","children":["$","div",null,{"className":"container mx-auto px-4","children":[["$","p",null,{"className":"mb-2","children":"© All rights reserved by Shingo Sekine."}],["$","p",null,{"children":["$","a",null,{"href":"#","className":"hover:text-blue-500 transition-colors","children":"Back to top"}]}]]}]}]]}]}],null] 4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Shingoの数学ノート"}],["$","meta","2",{"name":"description","content":"プログラミング言語と機械学習のメモ"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"256x256"}],["$","meta","5",{"name":"next-size-adjust"}]] b:I[6180,["326","static/chunks/326-ead410bae2047633.js","986","static/chunks/986-f27c5a2c4d841870.js","42","static/chunks/app/%5Bslug%5D/page-419f452b4066bb25.js"],""] d:I[9703,["326","static/chunks/326-ead410bae2047633.js","986","static/chunks/986-f27c5a2c4d841870.js","42","static/chunks/app/%5Bslug%5D/page-419f452b4066bb25.js"],""] c:T1dd27,/*@jsxRuntime automatic @jsxImportSource react*/ const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; const {useMDXComponents: _provideComponents} = arguments[0]; function _createMdxContent(props) { const _components = Object.assign({ p: "p", a: "a", span: "span", math: "math", semantics: "semantics", mrow: "mrow", msub: "msub", mover: "mover", mi: "mi", mo: "mo", annotation: "annotation", h2: "h2", ol: "ol", li: "li", mn: "mn", br: "br", msup: "msup", pre: "pre", code: "code", img: "img", h3: "h3", ul: "ul" }, _provideComponents(), props.components); return _jsxs(_Fragment, { children: [_jsxs(_components.p, { children: [_jsx(_components.a, { href: "/blog2", children: "前回の続き" }), "です。まだ見ていない方はそちらから見てください。前回と同様、標本から求められた偏回帰係数を", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat\\beta_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "、母集団の偏回帰係数を", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "としています。"] }), "\n", _jsx(_components.h2, { children: "仮説検定とp値 概要" }), "\n", _jsx(_components.p, { children: "よく言葉は耳にするけど、解釈しようとするとなかなか難しいのがp値です。まずp値を知る前に、仮説検定について少しだけ説明します。" }), "\n", _jsx(_components.p, { children: "仮説検定とは、母集団のある性質を標本の統計量を使って検証をする手法です。線形回帰分析のt検定と呼ばれる仮説検定では、ある説明変数が目的変数に対して影響をもっているかを検定します。" }), "\n", _jsxs(_components.ol, { children: ["\n", _jsxs(_components.li, { children: ["母集団に関する棄却したい仮説(帰無仮説)と主張したい仮説(対立仮説)を設定します。線形回帰分析では帰無仮説を「説明変数が目的変数に対して影響を持っていない」=「母集団の偏回帰係数が0」、つまり「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」と仮定し、対立仮説を「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { mathvariant: "normal", children: "≠" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i \\ne 0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsxs(_components.span, { className: "mrel", children: [_jsx(_components.span, { className: "mrel", children: _jsx(_components.span, { className: "mord vbox", children: _jsx(_components.span, { className: "thinbox", children: _jsxs(_components.span, { className: "rlap", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsx(_components.span, { className: "inner", children: _jsx(_components.span, { className: "mord", children: _jsx(_components.span, { className: "mrel", children: "" }) }) }), _jsx(_components.span, { className: "fix" })] }) }) }) }), _jsx(_components.span, { className: "mrel", children: "=" })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」と仮定します。"] }), "\n", _jsxs(_components.li, { children: ["帰無仮説が成り立っていると仮定したときに、標本から得た統計量がどのくらいの確率で起こるかを求めます。この確率をp値と呼びます。線形回帰分析では、「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」を仮定したとき、今回計算した", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat\\beta_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "がどのくらいの確率で起こるかを計算します。"] }), "\n", _jsx(_components.li, { children: "あらかじめどれくらいの確率で起こった場合に帰無仮説を棄却するかを決めておき(この閾値を有意水準と呼ぶ)、p値がそれを下回っていたら帰無仮説がそもそも成り立っていなかったと判断し、帰無仮説を棄却して対立仮説を採択します。例えば線形回帰分析で有意水準を0.05に設定しておいた場合、p値が0.05を下回ったら「説明変数が目的変数に対して影響を持っていない」という仮説を棄却し、「影響を持っている」可能性が高いと判断します。" }), "\n"] }), "\n", _jsx(_components.p, { children: "この検定によって帰無仮説を棄却したとき、その仮説は「統計的に有意である」と言います。" }), "\n", _jsx(_components.h2, { children: "線形回帰分析でのp値の計算方法" }), "\n", _jsxs(_components.p, { children: ["では実際に線形回帰分析のp値を計算してみましょう。", _jsx(_components.br, {}), "\n", "帰無仮説「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」を仮定したとき、今回の標本から求められた", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat{\\beta}_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "はどのくらいの確率であり得るのかを求めます。"] }), "\n", _jsxs(_components.p, { children: ["実は、", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "の条件の元では、以下の式が自由度", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsx(_components.mo, { stretchy: "false", children: "(" }), _jsx(_components.mi, { children: "n" }), _jsx(_components.mo, { children: "−" }), _jsx(_components.mi, { children: "k" }), _jsx(_components.mo, { stretchy: "false", children: ")" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "(n-k)" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1em", verticalAlign: "-0.25em" } }), _jsx(_components.span, { className: "mopen", children: "(" }), _jsx(_components.span, { className: "mord mathnormal", children: "n" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2222em" } }), _jsx(_components.span, { className: "mbin", children: "−" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2222em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1em", verticalAlign: "-0.25em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.03148em" }, children: "k" }), _jsx(_components.span, { className: "mclose", children: ")" })] })] })] }) }), "のt分布に従うことが知られています。これをt値と呼びます。", _jsx(_components.br, {}), "\n", "なお、", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsx(_components.mi, { children: "s" }), _jsx(_components.mi, { children: "t" }), _jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "d" }), _jsx(_components.mi, { children: "e" })] }), _jsx(_components.mi, { children: "r" }), _jsx(_components.mi, { children: "r" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "std_err" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8444em", verticalAlign: "-0.15em" } }), _jsx(_components.span, { className: "mord mathnormal", children: "s" }), _jsx(_components.span, { className: "mord mathnormal", children: "t" }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", children: "d" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.1514em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "0em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "e" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.02778em" }, children: "rr" })] }) })] }) }), "は", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat{\\beta}_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "の(不偏)標準偏差であり、標準誤差と呼ばれます。標準誤差が大きいほど", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat{\\beta}_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "のばらつきが大きくなります。"] }), "\n", _jsxs(_components.p, { children: ["2020/09/02追記:", _jsx(_components.a, { href: "/blog26", children: "t値の証明に関するブログ" }), "をアップロードしました。数学に自信のある方はご覧ください。"] }), "\n", _jsxs(_components.p, { children: ["t値を使用することにより、今回の確率はどの程度であるのかを算出することができます。ちなみに、自由度", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsx(_components.mi, { children: "n" }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "n" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.4306em" } }), _jsx(_components.span, { className: "mord mathnormal", children: "n" })] }) })] }) }), "のt分布は標準正規分布を自由度", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsx(_components.mi, { children: "n" }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "n" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.4306em" } }), _jsx(_components.span, { className: "mord mathnormal", children: "n" })] }) })] }) }), "の", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msup, { children: [_jsx(_components.mi, { children: "χ" }), _jsx(_components.mn, { children: "2" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\chi^2" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.0085em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", children: "χ" }), _jsx(_components.span, { className: "msupsub", children: _jsx(_components.span, { className: "vlist-t", children: _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.8141em" }, children: _jsxs(_components.span, { style: { top: "-3.063em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mtight", children: "2" }) })] }) }) }) }) })] })] }) })] }) }), "分布で割った分布であり、以下のような分布になっています。"] }), "\n", _jsx(_components.pre, { children: _jsxs(_components.code, { className: "hljs language-python", children: [_jsx(_components.span, { className: "hljs-keyword", children: "import" }), " scipy.stats ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " stats\n", _jsx(_components.span, { className: "hljs-keyword", children: "import" }), " matplotlib.pyplot ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " plt\n", _jsx(_components.span, { className: "hljs-keyword", children: "import" }), " numpy ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " np\nx = np.arange(-", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "0.1" }), ")\nplt.plot(x, stats.t.pdf(x=x, df=", _jsx(_components.span, { className: "hljs-number", children: "2" }), "), label=", _jsx(_components.span, { className: "hljs-string", children: "\"t dim:2\"" }), ", c=", _jsx(_components.span, { className: "hljs-string", children: "\"blue\"" }), ")\nplt.plot(x, stats.t.pdf(x=x, df=", _jsx(_components.span, { className: "hljs-number", children: "5" }), "), label=", _jsx(_components.span, { className: "hljs-string", children: "\"t dim:5\"" }), ", c=", _jsx(_components.span, { className: "hljs-string", children: "\"green\"" }), ")\nplt.plot(x, stats.t.pdf(x=x, df=", _jsx(_components.span, { className: "hljs-number", children: "30" }), "), label=", _jsx(_components.span, { className: "hljs-string", children: "\"t dim:30\"" }), ", c=", _jsx(_components.span, { className: "hljs-string", children: "\"red\"" }), ")\nplt.plot(x, stats.norm.pdf(x=x), label=", _jsx(_components.span, { className: "hljs-string", children: "\"norm\"" }), ", c=", _jsx(_components.span, { className: "hljs-string", children: "\"gray\"" }), ")\nplt.legend()\nplt.show()\n"] }) }), "\n", _jsxs(_components.p, { children: [_jsx(_components.img, { src: "/images/blog3/t.png", alt: "t分布", title: "t分布" }), _jsx(_components.br, {}), "\n", "t分布の自由度を大きくすると、正規分布に従います。", _jsx(_components.br, {}), "\n", "また、", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsx(_components.mi, { children: "X" }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "X" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6833em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.07847em" }, children: "X" })] }) })] }) }), "を自由度", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsx(_components.mo, { stretchy: "false", children: "(" }), _jsx(_components.mi, { children: "n" }), _jsx(_components.mo, { children: "−" }), _jsx(_components.mi, { children: "k" }), _jsx(_components.mo, { stretchy: "false", children: ")" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "(n-k)" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1em", verticalAlign: "-0.25em" } }), _jsx(_components.span, { className: "mopen", children: "(" }), _jsx(_components.span, { className: "mord mathnormal", children: "n" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2222em" } }), _jsx(_components.span, { className: "mbin", children: "−" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2222em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1em", verticalAlign: "-0.25em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.03148em" }, children: "k" }), _jsx(_components.span, { className: "mclose", children: ")" })] })] })] }) }), "に従うt分布としたとき、p値は以下のようになります。", _jsx(_components.br, {}), "\n", "p値は帰無仮説「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」を仮定したとき、今回のt値はどれくらいあり得ないかという確率を表しています。もしt値が2、自由度が2であった場合、次のグレーの部分の確率がp値になります。"] }), "\n", _jsx(_components.pre, { children: _jsxs(_components.code, { className: "hljs language-python", children: [_jsx(_components.span, { className: "hljs-keyword", children: "import" }), " scipy.stats ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " stats\n", _jsx(_components.span, { className: "hljs-keyword", children: "import" }), " matplotlib.pyplot ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " plt\n", _jsx(_components.span, { className: "hljs-keyword", children: "import" }), " numpy ", _jsx(_components.span, { className: "hljs-keyword", children: "as" }), " np\nx = np.arange(-", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "0.1" }), ")\ny = stats.t.pdf(x=x, df=", _jsx(_components.span, { className: "hljs-number", children: "2" }), ")\nplt.plot(x, y, label=", _jsx(_components.span, { className: "hljs-string", children: "\"t dim:2\"" }), ", c=", _jsx(_components.span, { className: "hljs-string", children: "\"blue\"" }), ")\nplt.fill_between(x, y, ", _jsx(_components.span, { className: "hljs-number", children: "0" }), ", x <= -", _jsx(_components.span, { className: "hljs-number", children: "2" }), ", facecolor=", _jsx(_components.span, { className: "hljs-string", children: "'gray'" }), ", alpha=", _jsx(_components.span, { className: "hljs-number", children: "0.5" }), ")\nplt.fill_between(x, y, ", _jsx(_components.span, { className: "hljs-number", children: "0" }), ", x >= ", _jsx(_components.span, { className: "hljs-number", children: "2" }), ", facecolor=", _jsx(_components.span, { className: "hljs-string", children: "'gray'" }), ", alpha=", _jsx(_components.span, { className: "hljs-number", children: "0.5" }), ")\nplt.legend()\nplt.show()\n"] }) }), "\n", _jsxs(_components.p, { children: [_jsx(_components.img, { src: "/images/blog3/t2.png", alt: "p値", title: "p値" }), _jsx(_components.br, {}), "\n", "p値は帰無仮説「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "を仮定したとき、今回のt値はどれくらいあり得ないかという確率を表しています。もしt値が2、自由度が2であった場合、次のグレーの部分の確率がp値になります。"] }), "\n", _jsx(_components.h2, { children: "p値の実際の計算" }), "\n", _jsxs(_components.p, { children: ["では最後に、Boston House Priceのデータのp値の計算をしていきましょう。", _jsx(_components.br, {}), "\n", "今回は変数「INDUS」のp値を求めていきます。(注:", _jsx(_components.a, { href: "/blog2", children: "前回のブログ" }), "のコードを実行している状態で以下を実行してください。)"] }), "\n", _jsx(_components.pre, { children: _jsxs(_components.code, { className: "hljs language-python", children: ["var = ", _jsx(_components.span, { className: "hljs-string", children: "\"INDUS\"" }), "\nn, k = X.shape\n", _jsx(_components.span, { className: "hljs-built_in", children: "print" }), "(", _jsx(_components.span, { className: "hljs-string", children: "\"データ数:\"" }), ", n, ", _jsx(_components.span, { className: "hljs-string", children: "\"、説明変数の数:\"" }), ", k)\nbeta = result.params[var]\n", _jsx(_components.span, { className: "hljs-built_in", children: "print" }), "(", _jsx(_components.span, { className: "hljs-string", children: "\"beta:\"" }), ", beta)\nstd_err = result.bse[var]\n", _jsx(_components.span, { className: "hljs-built_in", children: "print" }), "(", _jsx(_components.span, { className: "hljs-string", children: "\"std_err:\"" }), ", std_err)\nt = beta / std_err\n", _jsx(_components.span, { className: "hljs-built_in", children: "print" }), "(", _jsx(_components.span, { className: "hljs-string", children: "\"t値:\"" }), ", t)\np = result.pvalues[var]\n", _jsx(_components.span, { className: "hljs-built_in", children: "print" }), "(", _jsx(_components.span, { className: "hljs-string", children: "\"p値:\"" }), ", p)\nx = np.arange(-", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "5" }), ", ", _jsx(_components.span, { className: "hljs-number", children: "0.1" }), ")\ny = stats.t.pdf(x=x, df=n-k)\nplt.plot(x, y, label=", _jsx(_components.span, { className: "hljs-string", children: "\"t dim:{}\"" }), ".", _jsx(_components.span, { className: "hljs-built_in", children: "format" }), "(n-k), c=", _jsx(_components.span, { className: "hljs-string", children: "\"blue\"" }), ")\nplt.fill_between(x, y, ", _jsx(_components.span, { className: "hljs-number", children: "0" }), ", x <= -", _jsx(_components.span, { className: "hljs-built_in", children: "abs" }), "(t), facecolor=", _jsx(_components.span, { className: "hljs-string", children: "'gray'" }), ", alpha=", _jsx(_components.span, { className: "hljs-number", children: "0.5" }), ")\nplt.fill_between(x, y, ", _jsx(_components.span, { className: "hljs-number", children: "0" }), ", x >= ", _jsx(_components.span, { className: "hljs-built_in", children: "abs" }), "(t), facecolor=", _jsx(_components.span, { className: "hljs-string", children: "'gray'" }), ", alpha=", _jsx(_components.span, { className: "hljs-number", children: "0.5" }), ")\nplt.legend()\nplt.show()\n"] }) }), "\n", _jsx(_components.h3, { children: "実行結果" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "hljs language-text", children: "データ数: 506 、説明変数の数: 13\nbeta: 0.02055862636706962\nstd_err: 0.061495688952085036\nt値: 0.3343100421736567\np値: 0.7382880714047482\n" }) }), "\n", _jsxs(_components.p, { children: [_jsx(_components.img, { src: "/images/blog3/t3.png", alt: "p値", title: "p値" }), _jsx(_components.br, {}), "\n", "グレーの部分の確率がp値です(0.73)。これほどp値が高いのでは", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { mathvariant: "normal", children: "≠" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta \\ne 0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsxs(_components.span, { className: "mrel", children: [_jsx(_components.span, { className: "mrel", children: _jsx(_components.span, { className: "mord vbox", children: _jsx(_components.span, { className: "thinbox", children: _jsxs(_components.span, { className: "rlap", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsx(_components.span, { className: "inner", children: _jsx(_components.span, { className: "mord", children: _jsx(_components.span, { className: "mrel", children: "" }) }) }), _jsx(_components.span, { className: "fix" })] }) }) }) }), _jsx(_components.span, { className: "mrel", children: "=" })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "と結論づけるのは難しいですね。"] }), "\n", _jsx(_components.h2, { children: "まとめ" }), "\n", _jsxs(_components.ul, { children: ["\n", _jsx(_components.li, { children: "仮説検定とは、母集団のある性質を標本の統計量を使って検証をする手法である。" }), "\n", _jsxs(_components.li, { children: ["線形回帰では、説明変数が目的変数に対して影響を持っているかどうかを調べる際、帰無仮説を「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」としてt検定を実施する。"] }), "\n", _jsxs(_components.li, { children: ["帰無仮説「", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsxs(_components.mrow, { children: [_jsxs(_components.msub, { children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mi, { children: "i" })] }), _jsx(_components.mo, { children: "=" }), _jsx(_components.mn, { children: "0" })] }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\beta_i=0" })] }) }) }), _jsxs(_components.span, { className: "katex-html", "aria-hidden": "true", children: [_jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.8889em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } }), _jsx(_components.span, { className: "mrel", children: "=" }), _jsx(_components.span, { className: "mspace", style: { marginRight: "0.2778em" } })] }), _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "0.6444em" } }), _jsx(_components.span, { className: "mord", children: "0" })] })] })] }) }), "」を仮定したとき、今回のデータから得られた", _jsx(_components.span, { className: "math math-inline", children: _jsxs(_components.span, { className: "katex", children: [_jsx(_components.span, { className: "katex-mathml", children: _jsx(_components.math, { xmlns: "http://www.w3.org/1998/Math/MathML", children: _jsxs(_components.semantics, { children: [_jsx(_components.mrow, { children: _jsxs(_components.msub, { children: [_jsxs(_components.mover, { accent: "true", children: [_jsx(_components.mi, { children: "β" }), _jsx(_components.mo, { children: "^" })] }), _jsx(_components.mi, { children: "i" })] }) }), _jsx(_components.annotation, { encoding: "application/x-tex", children: "\\hat{\\beta}_i" })] }) }) }), _jsx(_components.span, { className: "katex-html", "aria-hidden": "true", children: _jsxs(_components.span, { className: "base", children: [_jsx(_components.span, { className: "strut", style: { height: "1.1523em", verticalAlign: "-0.1944em" } }), _jsxs(_components.span, { className: "mord", children: [_jsx(_components.span, { className: "mord accent", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsxs(_components.span, { className: "vlist", style: { height: "0.9579em" }, children: [_jsxs(_components.span, { style: { top: "-3em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "mord mathnormal", style: { marginRight: "0.05278em" }, children: "β" })] }), _jsxs(_components.span, { style: { top: "-3.2634em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "3em" } }), _jsx(_components.span, { className: "accent-body", style: { left: "-0.1667em" }, children: _jsx(_components.span, { className: "mord", children: "^" }) })] })] }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.1944em" }, children: _jsx(_components.span, {}) }) })] }) }), _jsx(_components.span, { className: "msupsub", children: _jsxs(_components.span, { className: "vlist-t vlist-t2", children: [_jsxs(_components.span, { className: "vlist-r", children: [_jsx(_components.span, { className: "vlist", style: { height: "0.3117em" }, children: _jsxs(_components.span, { style: { top: "-2.55em", marginLeft: "-0.0528em", marginRight: "0.05em" }, children: [_jsx(_components.span, { className: "pstrut", style: { height: "2.7em" } }), _jsx(_components.span, { className: "sizing reset-size6 size3 mtight", children: _jsx(_components.span, { className: "mord mathnormal mtight", children: "i" }) })] }) }), _jsx(_components.span, { className: "vlist-s", children: "​" })] }), _jsx(_components.span, { className: "vlist-r", children: _jsx(_components.span, { className: "vlist", style: { height: "0.15em" }, children: _jsx(_components.span, {}) }) })] }) })] })] }) })] }) }), "はどれくらいの確率なのかを表したのがp値である。"] }), "\n"] }), "\n", _jsx(_components.h3, { children: "参考文献" }), "\n", _jsx(_components.p, { children: _jsx(_components.a, { href: "https://bellcurve.jp/statistics/course/9702.html", children: "統計学の時間" }) })] }); } function MDXContent(props = {}) { const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { children: _jsx(_createMdxContent, props) })) : _createMdxContent(props); } return { default: MDXContent }; a:["$","div",null,{"className":"container mx-auto px-4 py-8 max-w-7xl","children":["$","div",null,{"className":"flex flex-col md:flex-row gap-8","children":[["$","article",null,{"className":"w-full md:w-[70%] bg-white shadow-lg rounded-lg p-8","children":[["$","header",null,{"className":"mb-8 border-b pb-4","children":[["$","div",null,{"className":"flex items-center gap-2 mb-2","children":[["$","$L6",null,{"href":"/","className":"text-gray-500 hover:text-orange-500","children":"Home"}],["$","span",null,{"className":"text-gray-300","children":">"}],["$","span",null,{"className":"text-gray-500","children":"$undefined"}]]}],["$","h1",null,{"className":"text-3xl font-bold mb-4","children":"統計学と線形回帰分析2(仮説検定とp値)"}],["$","div",null,{"className":"text-gray-500 flex flex-wrap gap-4 items-center mb-6","children":[["$","time",null,{"className":"flex items-center gap-1 text-sm","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","height":"18px","viewBox":"0 0 24 24","width":"18px","fill":"#666666","className":"mr-1","children":[["$","path",null,{"d":"M0 0h24v24H0V0z","fill":"none"}],["$","path",null,{"d":"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"}]]}],"日付: ","2019-07-24"]}],["$","div",null,{"className":"flex flex-wrap gap-2","children":[["$","$L6","データ分析",{"href":"/tags/データ分析","className":"bg-gray-100 hover:bg-blue-100 px-2 py-1 rounded text-sm text-gray-600 hover:text-blue-600 transition-colors","children":["#","データ分析"]}]]}]]}]]}],["$","div",null,{"className":"prose max-w-none prose-headings:border-b prose-headings:pb-2 prose-a:text-orange-600","children":["$","$Lb",null,{"compiledSource":"$c","frontmatter":{},"scope":{}}]}],["$","div",null,{"className":"flex justify-between items-center mt-12","children":[["$","div",null,{"className":"flex-1","children":["$","$L6",null,{"href":"/blog2","className":"group flex flex-col items-start p-4 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-all","children":[["$","span",null,{"className":"text-sm text-gray-500 mb-1 group-hover:text-orange-600 flex items-center","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","className":"h-4 w-4 mr-1","fill":"none","viewBox":"0 0 24 24","stroke":"currentColor","children":["$","path",null,{"strokeLinecap":"round","strokeLinejoin":"round","strokeWidth":2,"d":"M15 19l-7-7 7-7"}]}],"Previous"]}],["$","span",null,{"className":"font-medium text-gray-800 dark:text-gray-200 line-clamp-2","children":"統計学と線形回帰分析(母集団と標本)"}]]}]}],["$","div",null,{"className":"w-8"}],["$","div",null,{"className":"flex-1 text-right","children":["$","$L6",null,{"href":"/blog5","className":"group flex flex-col items-end p-4 rounded-lg border border-gray-100 hover:border-orange-200 hover:bg-orange-50 transition-all","children":[["$","span",null,{"className":"text-sm text-gray-500 mb-1 group-hover:text-orange-600 flex items-center","children":["Next",["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","className":"h-4 w-4 ml-1","fill":"none","viewBox":"0 0 24 24","stroke":"currentColor","children":["$","path",null,{"strokeLinecap":"round","strokeLinejoin":"round","strokeWidth":2,"d":"M9 5l7 7-7 7"}]}]]}],["$","span",null,{"className":"font-medium text-gray-800 dark:text-gray-200 line-clamp-2","children":"無料でSASを使ってみる。(SAS University Edition)"}]]}]}]]}],["$","$Ld",null,{}]]}],["$","div",null,{"className":"w-full md:w-[30%]","children":"$Le"}]]}]}] 9:null f:I[9009,["326","static/chunks/326-ead410bae2047633.js","986","static/chunks/986-f27c5a2c4d841870.js","42","static/chunks/app/%5Bslug%5D/page-419f452b4066bb25.js"],""] e:["$","aside",null,{"className":"w-full flex flex-col gap-6","children":[["$","div",null,{"className":"bg-white p-6 rounded shadow-sm border","children":[["$","h3",null,{"className":"font-bold text-lg mb-4 text-[#494949] border-b pb-2","children":"プロフィール"}],["$","div",null,{"className":"flex items-center mb-4","children":[["$","$Lf",null,{}],["$","span",null,{"className":"font-bold","children":"Shingo.S"}]]}],["$","p",null,{"className":"mb-4 text-base leading-relaxed text-gray-600","children":["データサイエンティストとして働いています。仕事では主にPythonやSAS、Rを用いて分析しています。",["$","br",null,{}],["$","br",null,{}],"統計検定1級、Kaggle Expert。",["$","br",null,{}],"自然言語処理に興味があります。"]}],["$","div",null,{"className":"mt-4 flex items-center","children":["$","a",null,{"href":"https://x.com/shingo97358922","target":"_blank","rel":"noopener noreferrer","className":"flex items-center gap-2 text-gray-600 hover:text-black transition-colors","children":[["$","svg",null,{"className":"w-5 h-5","fill":"currentColor","viewBox":"0 0 24 24","aria-hidden":"true","children":["$","path",null,{"d":"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}]}],["$","span",null,{"className":"text-sm font-medium","children":"@shingo97358922"}]]}]}]]}],["$","div",null,{"className":"bg-white p-6 rounded shadow-sm border","children":[["$","h3",null,{"className":"font-bold text-lg mb-4 text-[#494949] border-b pb-2","children":"アクセスカウンター"}],["$","div",null,{"className":"flex flex-col gap-2 text-gray-600 pl-2","children":[["$","div",null,{"className":"flex items-center gap-4","children":[["$","span",null,{"className":"w-12 text-right","children":"累計"}],["$","span",null,{"children":":"}],["$","span",null,{"className":"font-mono text-lg font-bold","children":"72320"}]]}],["$","div",null,{"className":"flex items-center gap-4","children":[["$","span",null,{"className":"w-12 text-right","children":"本日"}],["$","span",null,{"children":":"}],["$","span",null,{"className":"font-mono text-lg font-bold","children":"17"}]]}],["$","div",null,{"className":"flex items-center gap-4","children":[["$","span",null,{"className":"w-12 text-right","children":"昨日"}],["$","span",null,{"children":":"}],["$","span",null,{"className":"font-mono text-lg font-bold","children":"33"}]]}]]}]]}],["$","div",null,{"className":"bg-white p-6 rounded shadow-sm border","children":[["$","h3",null,{"className":"font-bold text-lg mb-4 text-[#494949] border-b pb-2","children":"月別アーカイブ"}],["$","ul",null,{"className":"text-base text-gray-600","children":[["$","li","2026年2月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2026-02","className":"hover:text-blue-500 transition-colors block","children":["2026年2月"," (",1,")"]}]}],["$","li","2025年2月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2025-02","className":"hover:text-blue-500 transition-colors block","children":["2025年2月"," (",1,")"]}]}],["$","li","2024年10月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2024-10","className":"hover:text-blue-500 transition-colors block","children":["2024年10月"," (",1,")"]}]}],["$","li","2024年7月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2024-07","className":"hover:text-blue-500 transition-colors block","children":["2024年7月"," (",1,")"]}]}],["$","li","2024年2月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2024-02","className":"hover:text-blue-500 transition-colors block","children":["2024年2月"," (",1,")"]}]}],["$","li","2023年6月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2023-06","className":"hover:text-blue-500 transition-colors block","children":["2023年6月"," (",1,")"]}]}],["$","li","2023年5月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2023-05","className":"hover:text-blue-500 transition-colors block","children":["2023年5月"," (",1,")"]}]}],["$","li","2023年3月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2023-03","className":"hover:text-blue-500 transition-colors block","children":["2023年3月"," (",2,")"]}]}],["$","li","2022年10月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2022-10","className":"hover:text-blue-500 transition-colors block","children":["2022年10月"," (",2,")"]}]}],["$","li","2022年9月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2022-09","className":"hover:text-blue-500 transition-colors block","children":["2022年9月"," (",2,")"]}]}],["$","li","2022年7月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2022-07","className":"hover:text-blue-500 transition-colors block","children":["2022年7月"," (",1,")"]}]}],["$","li","2022年3月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2022-03","className":"hover:text-blue-500 transition-colors block","children":["2022年3月"," (",1,")"]}]}],["$","li","2021年11月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-11","className":"hover:text-blue-500 transition-colors block","children":["2021年11月"," (",1,")"]}]}],["$","li","2021年10月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-10","className":"hover:text-blue-500 transition-colors block","children":["2021年10月"," (",2,")"]}]}],["$","li","2021年7月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-07","className":"hover:text-blue-500 transition-colors block","children":["2021年7月"," (",2,")"]}]}],["$","li","2021年5月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-05","className":"hover:text-blue-500 transition-colors block","children":["2021年5月"," (",2,")"]}]}],["$","li","2021年4月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-04","className":"hover:text-blue-500 transition-colors block","children":["2021年4月"," (",2,")"]}]}],["$","li","2021年2月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2021-02","className":"hover:text-blue-500 transition-colors block","children":["2021年2月"," (",1,")"]}]}],["$","li","2020年10月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-10","className":"hover:text-blue-500 transition-colors block","children":["2020年10月"," (",1,")"]}]}],["$","li","2020年9月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-09","className":"hover:text-blue-500 transition-colors block","children":["2020年9月"," (",1,")"]}]}],["$","li","2020年7月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-07","className":"hover:text-blue-500 transition-colors block","children":["2020年7月"," (",1,")"]}]}],["$","li","2020年6月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-06","className":"hover:text-blue-500 transition-colors block","children":["2020年6月"," (",1,")"]}]}],["$","li","2020年5月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-05","className":"hover:text-blue-500 transition-colors block","children":["2020年5月"," (",1,")"]}]}],["$","li","2020年4月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-04","className":"hover:text-blue-500 transition-colors block","children":["2020年4月"," (",1,")"]}]}],["$","li","2020年3月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-03","className":"hover:text-blue-500 transition-colors block","children":["2020年3月"," (",1,")"]}]}],["$","li","2020年2月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-02","className":"hover:text-blue-500 transition-colors block","children":["2020年2月"," (",1,")"]}]}],["$","li","2020年1月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2020-01","className":"hover:text-blue-500 transition-colors block","children":["2020年1月"," (",1,")"]}]}],["$","li","2019年12月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-12","className":"hover:text-blue-500 transition-colors block","children":["2019年12月"," (",1,")"]}]}],["$","li","2019年11月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-11","className":"hover:text-blue-500 transition-colors block","children":["2019年11月"," (",2,")"]}]}],["$","li","2019年10月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-10","className":"hover:text-blue-500 transition-colors block","children":["2019年10月"," (",2,")"]}]}],["$","li","2019年9月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-09","className":"hover:text-blue-500 transition-colors block","children":["2019年9月"," (",1,")"]}]}],["$","li","2019年8月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-08","className":"hover:text-blue-500 transition-colors block","children":["2019年8月"," (",8,")"]}]}],["$","li","2019年7月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-07","className":"hover:text-blue-500 transition-colors block","children":["2019年7月"," (",1,")"]}]}],["$","li","2019年6月",{"className":"mb-2 border-b border-dashed border-gray-200 pb-1 last:border-none","children":["$","$L6",null,{"href":"/archives/2019-06","className":"hover:text-blue-500 transition-colors block","children":["2019年6月"," (",2,")"]}]}]]}]]}],["$","div",null,{"className":"bg-white p-6 rounded shadow-sm border","children":[["$","h3",null,{"className":"font-bold text-lg mb-4 text-[#494949] border-b pb-2","children":"タグ一覧"}],["$","div",null,{"className":"flex flex-wrap gap-2","children":[["$","$L6","データ分析",{"href":"/tags/データ分析","className":"bg-gray-100 hover:bg-blue-500 hover:text-white rounded px-2 py-1 text-sm transition-colors duration-200 text-gray-600","children":["データ分析"," (",18,")"]}],["$","$L6","自然言語処理",{"href":"/tags/自然言語処理","className":"bg-gray-100 hover:bg-blue-500 hover:text-white rounded px-2 py-1 text-sm transition-colors duration-200 text-gray-600","children":["自然言語処理"," (",16,")"]}],["$","$L6","SAS",{"href":"/tags/SAS","className":"bg-gray-100 hover:bg-blue-500 hover:text-white rounded px-2 py-1 text-sm transition-colors duration-200 text-gray-600","children":["SAS"," (",12,")"]}],["$","$L6","Kaggle",{"href":"/tags/Kaggle","className":"bg-gray-100 hover:bg-blue-500 hover:text-white rounded px-2 py-1 text-sm transition-colors duration-200 text-gray-600","children":["Kaggle"," (",3,")"]}],["$","$L6","雑談",{"href":"/tags/雑談","className":"bg-gray-100 hover:bg-blue-500 hover:text-white rounded px-2 py-1 text-sm transition-colors duration-200 text-gray-600","children":["雑談"," (",2,")"]}]]}]]}],["$","div",null,{"className":"bg-white p-6 rounded shadow-sm border","children":[["$","h3",null,{"className":"font-bold text-lg mb-4 text-[#494949] border-b pb-2","children":"広告枠"}],["$","div",null,{"className":"flex justify-center items-center","children":[["$","a",null,{"href":"https://px.a8.net/svt/ejp?a8mat=4AXI0F+CULTTE+348+6CWQP","rel":"nofollow","target":"_blank","children":["$","img",null,{"style":{"border":0},"width":"250","height":"250","alt":"","src":"https://www25.a8.net/svt/bgt?aid=260223855777&wid=001&eno=01&mid=s00000000404001068000&mc=1"}]}],["$","img",null,{"style":{"border":0},"width":"1","height":"1","src":"https://www17.a8.net/0.gif?a8mat=4AXI0F+CULTTE+348+6CWQP","alt":""}]]}]]}]]}]