メインコンテンツへスキップ Skip to main content

STATPLAY

[ PROBABILITYINFERENCEMODELING ]

統計って、じつはめっちゃ面白い。
公式を暗記するやつじゃなくて、グラフで感じて「あ、そうだったのか!」と気づく学問だ。

Statistics is way more fun than it looks.
Forget rote formulas — here the graphs move on their own, and the idea takes shape as you watch.

式は追える。でも絵が浮かばない——そう感じたタイミングで来てください。

Come here when your textbook makes sense — but nothing becomes a picture.

▼ このサイトの立ち位置
統計学を独習していて、参考書の数式を前に「式は読める。でも何を見ているのかわからない」で手が止まった人のための、最初の一歩。
ここは直感を掴む場所で、体系的な学習や計算演習は良質な参考書・問題集に任せる。95%信頼区間の"よくある誤解"も、t分布が正規分布から生える理由も、スライダーを動かせば一発で見える
そこで「あ、こういうことか」が起きたら、自信を持って参考書に戻ってください。それがここの目的です。
▼ What this site is for
If you're learning statistics on your own and got stuck at "wait, what does this formula even mean?" — this is your first step back.
This is a place to rebuild intuition. Systematic study and calculation drills belong to your textbook and problem set. But the "classic misreading" of the 95% confidence interval, or why the t-distribution even exists — drag a slider and you'll see it.
Once "oh, that's what it means" lands, go back to your textbook with confidence. That's the whole point.
▼ 参考書のどこで止まった?
順番に全部やる必要はないです。「ここで手が止まった」ところから触ってみてください。同じところで止まった人、たくさんいます。
正規分布って結局何? | 標準化って何をしているの? | 検定って結局どうやるの? | ベイズの定理が意味不明 | 中心極限定理がピンとこない
触ってみて「あ、そういうことか」が来たら、参考書に戻るとスッと読めるようになるはずです。
▼ Where did your textbook lose you?
You don't have to go through everything in order. Jump straight to the concept that made you stop. You're not the only one who got stuck there.
What even is a normal distribution? | What is standardization actually doing? | How do I actually run a test? | Bayes' theorem makes no sense | The Central Limit Theorem stays fuzzy
Once "oh, that's what it means" hits, go back to your textbook — it'll read differently.

コラム

Columns

統計は数式だけ眺めていても絵が浮かばない。身近な「あるある」から入ると、公式の意味がすっと見えてくる。
Formulas alone rarely make the picture vivid. Start from everyday surprises and the math behind them becomes intuitive.
偏差値って何? — 「上位○%」が3秒で見える →
偏差値60と70の差はたった10。でもレア度は5倍。その正体をインタラクティブに掴む。 関連: 標準正規分布 · 正規分布と標準化 · 中心極限定理
誕生日のパラドックス — 23人で50%超え? →
23人集まれば誕生日が被る確率は50%超。直感を裏切る確率の世界をシミュレーションで体感。 関連: 確率の基本法則 · 二項・ポアソン・指数分布 · カイ二乗検定
標準化って何? — 世界中の「ふつう」を比べる翻訳機 →
身長182cmとTOEIC 860点、どっちが「ふつう」から遠い? Z=(X−μ)/σ で単位を超えて比較する方法を3分で掴む。 関連: 標準正規分布 · 正規分布と標準化 · 中心極限定理 · 大数の法則 · 仮説検定 · 信頼区間
年収予測 — 統計でどこまで当てられるか →
年齢・性別・都道府県の3つだけで年収の「幅」が見える。重回帰分析の実践コラム。 関連: 単回帰分析 · 重回帰分析 · 相関係数 · 信頼区間
第一種・第二種の過誤って何が違うの? — 2×2の表で全部見える →
α・β・検出力・効果量・サンプルサイズ。2×2に置き直すと、過誤の混乱が一枚絵に収まる。 関連: 仮説検定 · 信頼区間 · ベイズの定理 · 分散分析(ANOVA) · 母比率の検定と推定 · 三大検定分布
標準偏差と標準誤差の違い — SDとSEを1枚の絵で見分ける →
標準偏差(SD)は個々のばらつき、標準誤差(SE)は平均の精度。字も式も似ているけれど別物で、n を動かすと2つは別の方向に動き出す。 関連: 中心極限定理 · 信頼区間 · 仮説検定 · 大数の法則 · 三大検定分布
What Is Hensachi? — Japan's School Score Is Just a Rescaled z-Score →
A 10-point gap in hensachi holds 5× the rarity. See what the number really measures, interactively. Related: Standard Normal · Normal Distribution · Central Limit Theorem
The Birthday Paradox — 23 People, 50%+ Chance →
With just 23 people, a shared birthday is more likely than not. Experience the paradox interactively. Related: Probability Rules · Discrete & Exponential · Chi-Squared Test
What Is Standardization? — The Universal Translator for "Normal" →
182 cm tall vs. TOEIC 860 — which is further from "average"? Learn how Z=(X−μ)/σ lets you compare across units in 3 minutes. Related: Standard Normal · Normal Distribution · Central Limit Theorem · Law of Large Numbers · Hypothesis Testing · Confidence Interval
Income Prediction — How Far Can Statistics Go? →
Age, gender, prefecture — just three inputs reveal a range of income. A hands-on column on multiple regression. Related: Simple Regression · Multiple Regression · Correlation · Confidence Interval
Type I vs Type II Errors — One 2×2 Table Sorts Them Out →
α, β, power, and effect size all live on a single 2×2 table. Once you see it, the confusion disappears. Related: Hypothesis Testing · Confidence Interval · Bayes' Theorem · ANOVA · Proportion Test · Three Test Distributions
Standard Deviation vs Standard Error — Telling SD and SE Apart in One Picture →
Standard deviation (SD) measures the spread of individuals; standard error (SE) measures the precision of the mean. Same-looking formulas, opposite reactions to n. Related: Central Limit Theorem · Confidence Interval · Hypothesis Testing · Law of Large Numbers · Three Test Distributions

ツール

Tools

インタラクティブ確率分布表 — 正規・t・χ²・F →
参考書の巻末にある4つの分布表を、グラフと同期させながら触れるツール。セルをクリックすると曲線上の位置がリアルタイムにハイライト。
Interactive Distribution Tables — Normal · t · χ² · F →
Four distribution tables from the back of your textbook, synced with live graphs. Click any cell and see its position highlighted on the curve in real time.
確率と分布PROBABILITY

不確実性を数式にする

Probability & Distributions — quantifying uncertainty

P1 / 標準正規分布

標準正規分布 — すべてのはじまり

Standard Normal — The Origin of Everything

統計のすべてを支配するあの曲線から始めよう——標準正規分布。中心極限定理も仮説検定も信頼区間も、すべてここに帰ってくる。まずはベルカーブを触ってみよう。
Let's start with the curve that dominates all of statistics — the standard normal. The Central Limit Theorem, hypothesis testing, confidence intervals — everything circles back here. Touch the bell curve first.

ぶっちゃけ この曲線ひとつがなければ、 この先に出てくる検定も、信頼区間も、t分布も、回帰分析も、ぜんぶ成立しない
標準正規分布 N(0, 1) は、平均0・標準偏差1のベル型カーブ。 「どんな正規分布も z = (x − μ) / σ でここに重ねられる」という一行のトリックが、 100年前の統計学者たちに"紙の表ひとつで世界中の確率を計算する"力を与えた。
つまりこれは、統計のラスボスじゃなくて、起源(オリジン)。 ここさえ掴めれば、残りのページは"標準正規の応用"として一気通貫で読める。

Honestly — without this single curve, none of what follows (tests, confidence intervals, the t-distribution, regression) would work.
The standard normal N(0, 1) is a bell curve with mean 0 and standard deviation 1. The one-line trick lets every normal distribution collapse onto this same curve — and that's how a single paper table can compute probabilities for the entire world.
In other words, it's not the final boss of statistics; it's the origin. Once you own this, the rest reads as "applications of the standard normal".

実験ガイド — 順番に試してみよう
  1. Step 1: k のスライダーを 1.0 にする → 面積は約68%。これが「±1σ に約7割」。
  2. Step 2: k を 1.96 にする → 面積は約95%。この数字、検定や信頼区間で何度も出てくる。
  3. Step 3: k を 3.0 まで広げる → ほぼ100%。外側はもうほとんどない。
Experiment Guide — try these in order
  1. Step 1: Set k to 1.0 → area is ~68%. That's "±1σ covers about 70%."
  2. Step 2: Set k to 1.96 → area is ~95%. You'll see this number everywhere in testing and CIs.
  3. Step 3: Stretch k to 3.0 → nearly 100%. Almost nothing lies outside.

▶ 「68 - 95 - 99.7」は暗記じゃなくて見て分かる

▶ "68 - 95 - 99.7" — no memorization, just see it

スライダーで幅 k を伸び縮みさせると、青く塗られた面積がそのまま"確率"。 ± 1σ ですでに約7割、± 2σ で約95%、± 3σ でほぼ全部。
z = 1.96 という数字に見覚えがあれば、それは"両側5%"の臨界値。 検定も信頼区間もこの 1.96 から出発する — それくらい、この曲線が主役なのだ。

Slide the width k; the blue-filled area IS the probability. ± 1σ already covers ~68%, ± 2σ is ~95%, ± 3σ is nearly everything.
That famous number z = 1.96? It's the two-tail 5% critical value — hypothesis tests and confidence intervals all start there.

P( |Z| ≤ k )
P( Z ≤ k )
外側の確率Outside prob.
実験ガイド — 順番に試してみよう
  1. Step 1: ▶ 標準化する を押す → μ=2, σ=1.5 の曲線がスーッと N(0,1) に変身する。
  2. Step 2: μ を −2、σ を 2.5 に変えて再度 ▶ → 全然違う形なのに、同じピンクの曲線にピタッ。
  3. Step 3: 進度スライダーを途中で止める → 変換の"途中経過"を観察。μ が0に、σ が1に近づいていく。
  4. Step 4: σ を 0.5 に → 尖った曲線が平たくなりながら標準正規に合流。
Experiment Guide — try these in order
  1. Step 1: Press ▶ Standardize → the μ=2, σ=1.5 curve morphs smoothly into N(0,1).
  2. Step 2: Change μ to −2, σ to 2.5, then ▶ again → a totally different curve snaps onto the same pink one.
  3. Step 3: Pause the progress slider midway → watch μ approach 0 and σ approach 1 in real time.
  4. Step 4: Set σ to 0.5 → a sharp peak flattens as it merges into the standard normal.

▶ 正規分布、ぜんぶ"あの一本"に化ける瞬間

▶ Watch every normal collapse onto "that one curve"

身長、IQ、血圧の測定値、工場の部品誤差 — 世の中にある正規分布っぽいものは平均も広がりもバラバラ。 でも z = (x − μ) / σ をかませるだけで、全部まとめてピンクのあの曲線にピタッと重なる。
スクロールしたら自動で変身していく(もう一度見たい時は ▶ ボタン)。これが、すべての統計公式が "標準正規表" 一枚で済む理由。

Height, IQ, blood pressure readings, factory part errors — real-world normal-ish things all have different means and spreads. Yet apply z = (x − μ) / σ and they all snap onto that pink curve.
It auto-plays on scroll (▶ to replay). That's why every statistical formula needs only one standard-normal table.

元の分布OriginalN(2.0, 1.5²)
変換後の平均Transformed mean
変換後のσTransformed σ
次は —正規分布そのものを扱う P2 正規分布
UP NEXT —the normal as a tool P2 Normal Distribution
P2 / 正規分布と標準化

正規分布と標準化 — 平均と散らばりを操る

Normal Distribution — Shaping Mean & Spread

標準正規は μ=0, σ=1 に固定されていた。実際のデータは平均も散らばりも自由μ と σ を動かして正規分布を道具として使いこなそう。標準化で Z に戻せば、どんな正規分布も標準正規と行き来できる。
The standard normal was fixed at μ=0, σ=1. Real data has any mean and spread. Move μ and σ to wield the normal as a tool. Standardization maps it back to Z, so any normal connects to the standard normal.

さっきの標準正規の 一般バージョンが正規分布 N(μ, σ²)μ が位置(どこが真ん中か)、σ が広がり(どれくらい散らばるか)。 スライダーを動かすと曲線がぬるっと動いて、指定した区間 [a, b] に入る確率(ピンクの面積)が リアルタイムで出る。
このピンクの面積こそ「割合」の正体。 たとえば成人男性の身長が N(170, 36)(平均170cm, σ=6cm)に従うとすると、 165〜175cm の人は全体の何%? → 標準化して z を計算すれば 約 59.6% と分かる。 偏差値、テストの点、測定誤差——だいたい正規で近似できるものは、ぜんぶこの面積計算で「〜%の人がこの範囲」が求まる。 下のスライダーでは標準化済みのスケール(μ=0, σ=1 付近)で同じ原理を体感できる。
Tip: グラフ上を直接ドラッグすると、近い方の a/b の境界を動かせる。

The general version of the standard normal is N(μ, σ²). μ sets the center, σ sets the spread. Slide the parameters and the curve glides; the probability of falling inside [a, b] (pink area) updates live.
That pink area IS the "percentage" you hear in the news. Say adult male heights follow N(170, 36) (mean 170cm, σ=6cm). What share falls in 165–175cm? Standardize and compute z-scores — you get ≈ 59.6%. Test scores, measurement errors, IQ — anything roughly normal gets its "X% of people in this range" from exactly this area. The sliders below use a standardized scale (μ=0, σ=1 range) so you can feel the same principle.
Tip: drag directly on the graph to move the a/b bounds — whichever handle is closest follows your finger.

実験ガイド — 順番に試してみよう
  1. Step 1: μ=0, σ=1 のまま a=−1, b=1 → 約68.3%。これが「±1σ に約7割」。
  2. Step 2: σ を 0.5 に縮める → 同じ [−1, 1] でもピンク面積が激増。散らばりが小さい=ほぼ全員がこの範囲。
  3. Step 3: μ を 2 に動かす → 曲線ごとスライド。a, b はそのままなのに面積が激変。
  4. Step 4: グラフ上を直接ドラッグ → 近い方の境界 a/b が指に追従する。
Experiment Guide — try these in order
  1. Step 1: Keep μ=0, σ=1, set a=−1, b=1 → ~68.3%. That's "±1σ covers ~70%."
  2. Step 2: Shrink σ to 0.5 → the pink area for the same [−1, 1] explodes. Less spread = almost everyone is in range.
  3. Step 3: Slide μ to 2 → the whole curve shifts. Same a,b, but area changes dramatically.
  4. Step 4: Drag directly on the graph → the nearest a/b boundary follows your finger.
P(a ≤ X ≤ b)
z-score (a)
z-score (b)
次は —確率の基本法則をベン図で P3 確率の基本法則
UP NEXT —probability rules with Venn diagrams P3 Probability Rules
P3 / 確率の基本法則

確率の基本法則 — ベン図で直感をつかむ

Probability Rules — Intuition with Venn Diagrams

正規分布の形を掴んだ。ここで基礎に立ち返る——すべてを支える確率の基本法則。加法定理、乗法定理、条件付き確率を面積で直感的に掴む。
You've got the shape of the normal. Now let's step back to the foundations — the probability rules that make all of it work. Addition, multiplication, and conditional probability visualized as overlapping areas.

加法定理、乗法定理、条件付き確率 — 公式を暗記する前に、面積で「見て」しまおう。
記号メモ: ∪ は「または(和集合)」、∩ は「かつ(共通部分)」、P(A|B) は「B が起きた条件でのAの確率」
P(A∪B) = P(A) + P(B) − P(A∩B) は「2つの円を重ねた面積から、重なりを引く」だけ。 条件付き確率 P(A|B) は「B の円の中で A が占める割合」。
独立ボタンを押すと P(A∩B) = P(A)·P(B) に自動調整 — 独立ってこういうこと。

Addition rule, multiplication rule, conditional probability — see them as areas before memorizing formulas.
Symbol cheat-sheet: ∪ = "or" (union), ∩ = "and" (intersection), P(A|B) = "probability of A given B happened"
P(A∪B) = P(A) + P(B) − P(A∩B) is just "area of two circles minus the overlap." Conditional probability P(A|B) is "the fraction of B's circle occupied by A."
Press the Independence button to snap P(A∩B) = P(A)·P(B) — that's what independence means.

具体例で考えてみよう
52枚のトランプから1枚引く。A = ハートが出る(13/52 = 0.25)、B = 絵札が出る(12/52 ≈ 0.23)。
A∩B = ハートの絵札(3/52 ≈ 0.06)。→ P(A∪B) = 0.25 + 0.23 − 0.06 = 0.42
独立の例:サイコロ2個。A = 1個目が偶数、B = 2個目が3以上。1個目の結果は2個目に影響しないので独立。P(A∩B) = 1/2 × 2/3 = 1/3。
Concrete example
Draw one card from a 52-card deck. A = heart (13/52 = 0.25), B = face card (12/52 ≈ 0.23).
A∩B = heart face card (3/52 ≈ 0.06). → P(A∪B) = 0.25 + 0.23 − 0.06 = 0.42.
Independence example: two dice. A = 1st is even, B = 2nd is ≥3. The 1st roll doesn't affect the 2nd, so independent. P(A∩B) = 1/2 × 2/3 = 1/3.
実験ガイド — 順番に試してみよう
  1. Step 1: P(A)=0.4, P(B)=0.3, P(A∩B)=0.12 → グラフ下の P(A∪B) 欄が 0.58 になるのを確認。0.4+0.3−0.12 = 0.58、これが加法定理。
  2. Step 2: 「独立にする」ボタンを押す → P(A∩B) が自動的に P(A)·P(B) に調整される。これが独立の意味。
  3. Step 3: P(A∩B) を 0 付近にする → 2つの円が離れる。これが「排反」(同時に起きない)。
  4. Step 4: P(A∩B) を P(B) に近づける → P(A|B) 欄が1に近づく。B が起きたらほぼ A も起きる、という関係。
Experiment Guide — try these in order
  1. Step 1: Set P(A)=0.4, P(B)=0.3, P(A∩B)=0.12 → check the P(A∪B) readout below the graph shows 0.58. That's 0.4+0.3−0.12 = 0.58, the addition rule.
  2. Step 2: Press "Set Independent" → P(A∩B) auto-adjusts to P(A)·P(B). That's what independence means.
  3. Step 3: Drag P(A∩B) near 0 → the circles separate. This is "mutually exclusive" (can't happen together).
  4. Step 4: Push P(A∩B) close to P(B) → the P(A|B) readout approaches 1. If B happens, A almost certainly happens too.

▶ インタラクティブ・ベン図

▶ Interactive Venn Diagram

P(A∪B)
P(A|B)
P(B|A)
独立?Independent?
次は —条件を反転させる P4 ベイズの定理
UP NEXT —flipping the conditional P4 Bayes' Theorem
P4 / ベイズの定理

ベイズの定理 — 事後確率の逆転劇

Bayes' Theorem — The Posterior Plot Twist

分布の道具箱が揃った。最後に条件付き確率を反転させる——これがベイズの定理。検査で陽性が出た→病気の確率は? ここで直感はよく裏切られる。
Distribution toolbox complete. Finally, Bayes' theorem flips the conditioning. You test positive — what's the chance you're actually sick? Intuition fails here; let's build it.

「感度99%・特異度95%の検査で陽性」= 99%病気?
答え:わずか 16.7%。医師でも半分以上が間違える超有名クイズ。
数字で追ってみよう。1000人の町のうち 10人が病気、990人が健康。全員に検査すると、陽性と判定されるのは合計 60人。内訳は——本当に病気の10人(真陽性)+ 健康なのに誤って陽性の50人(偽陽性)。もしあなたがこの60人の中にいるなら、本当に病気の確率は 10 ÷ 60 = 16.7%。健康な人の母数が圧倒的に多いほど、偽陽性が"本物"を薄めてしまう。

"The test has 99% sensitivity & 95% specificity, and you tested positive" — is there a 99% chance you're sick?
Answer: only 16.7%. More than half of doctors get this classic quiz wrong.
Walk through the numbers. In a town of 1,000, 10 people are sick and 990 are healthy. Test everyone and 60 come back positive — 10 truly sick (true positives) + 50 healthy but wrongly flagged (false positives). If you're one of those 60, your chance of actually being sick is 10 ÷ 60 = 16.7%. The larger the healthy majority, the more false positives dilute the real cases.

実験ガイド — 順番に試してみよう
  1. Step 1: 有病率を 0.001(一般集団)0.4(高リスク群) で往復してみる → 同じ感度99%・特異度95%なのに、陽性的中率が 1.96% から 92.86% へ大きく動く。事前確率の効き方を体感する。
  2. Step 2: 有病率 0.001 で陽性的中率はたった 1.96%。陽性100人のうち、実際に病気なのは2人だけ。直感とのズレを味わう。
  3. Step 3: 有病率を 0.001 のまま、特異度を 99.9% にする → 偽陽性が激減し、陽性的中率が劇的に改善。
  4. Step 4: 1000人の町の図を見ながら、TP(真陽性)と FP(偽陽性)の人数比を確認しよう。
Experiment Guide — try these in order
  1. Step 1: Sweep prevalence between 0.001 (general population) and 0.4 (high-risk group) → with the same 99% sensitivity and 95% specificity, PPV swings from 1.96% to 92.86%. Feel how strongly the prior dominates.
  2. Step 2: At prevalence 0.001, PPV is just 1.96% — only ~2 of 100 positives are actually sick. Feel the gap from intuition.
  3. Step 3: Keep prevalence at 0.001 but raise specificity to 99.9% → false positives plummet, PPV improves dramatically.
  4. Step 4: Watch the "town of 1,000" diagram and compare TP (true positive) vs FP (false positive) counts.
真陽性 TP(病気 & 陽性)True positives (sick & tested +)
偽陽性 FP(健康なのに陽性)False positives (healthy but tested +)
陽性だった人が本当に病気の確率If you tested +, chance you're sick
陰性だった人が本当に健康な確率If you tested NEG, chance you're healthy
次は —二項分布・ポアソン分布・指数分布 P5 二項・ポアソン・指数分布
UP NEXT —discrete and exponential distributions P5 Discrete & Exponential
P5 / 二項・ポアソン・指数分布

二項分布・ポアソン分布・指数分布 — 数える世界の確率モデル

Discrete & Exponential — Counting Probability Models

正規分布は連続で対称。でも現実のデータはそうとは限らない。コイン投げは離散、来客数はポアソン、待ち時間は指数分布。残りの分布で道具箱を完成させよう。
The normal is continuous and symmetric. But real data isn't always — coin flips are discrete, arrivals follow Poisson, wait times are exponential. Meet the other distributions that round out the toolkit.
統計の入り口でよく登場する二項分布ポアソン分布指数分布の三つ。成功回数・事象発生回数・待ち時間——離散と連続の橋渡しをスライダーで体感する。
Three core distributions every stats learner runs into: binomial, Poisson, and exponential. Slide through success counts, event counts, and waiting times to feel the bridge between discrete and continuous.
実験ガイド — 順番に試してみよう
  1. Step 1: 二項分布で n=20, p=0.5 → 左右対称のベル型。p を 0.1 に → 右に歪む。
  2. Step 2: 二項の n を 50、p を 0.06 に → np≈3。ポアソン(λ=3) と見比べてみよう。ほぼ同じ形。
  3. Step 3: ポアソンの λ=3 にしてグラフ左上の「E[X] = Var[X] = λ = 3.00」で平均=分散を確認。λ を 20 まで上げるとベル型に近づく。
Experiment Guide — try these in order
  1. Step 1: Binomial: set n=20, p=0.5 → symmetric bell. Change p to 0.1 → skews right.
  2. Step 2: Set binomial n=50, p=0.06 → np≈3. Compare with Poisson(λ=3) — nearly identical shapes.
  3. Step 3: Set Poisson λ=3 and check "E[X] = Var[X] = λ = 3.00" in the top-left of the graph. Raise λ to 20 → it approaches a bell.
二項分布 B(n, p)
いつ使う? → コイン10回で表が何回出るか、不良品検査で100個中何個不良か
When? → How many heads in 10 coin flips; how many defects in 100 items
Binomial B(n, p)
20
0.35
n → ∞ かつ np → λ で、二項はポアソンへ。
As n → ∞ with np → λ, the binomial approaches Poisson.
実験ガイド — ポアソン分布
  1. Step 1: λ=3 → 平均3回の事象。0〜6回あたりに集中している。グラフ左上の「E[X] = Var[X] = λ = 3.00」で平均=分散を確認。
  2. Step 2: λ を 1 に → ピークが左端に寄り、0回が最頻値。めったに起きない事象。
  3. Step 3: λ を 10 に → ベル型に近づく。正規分布の面影が見えてくる。
  4. Step 4: λ を 20 まで上げる → ほぼ正規分布の形。λ が大きくなると正規分布で近似できる(中心極限定理の効果)。
Experiment Guide — Poisson
  1. Step 1: λ=3 → average of 3 events. Most mass sits between 0 and 6. Check "E[X] = Var[X] = λ = 3.00" at the top-left.
  2. Step 2: Lower λ to 1 → peak shifts to 0. Rare events dominate.
  3. Step 3: Raise λ to 10 → starts looking bell-shaped. The normal is emerging.
  4. Step 4: Push λ to 20 → nearly normal in shape. As λ grows, Poisson can be approximated by a normal distribution (Central Limit Theorem at work).
ポアソン分布 Poisson(λ)
いつ使う? → 1時間にコールセンターに来る電話の本数、1日の交通事故件数
When? → Phone calls per hour at a call center; traffic accidents per day
Poisson(λ)
3
λ が大きくなるにつれ、ポアソンは正規分布に近づく。
As λ grows, Poisson approaches the normal distribution.
実験ガイド — 指数分布
  1. Step 1: λ=1 → 平均待ち時間 = 1。曲線は急激に減衰する。
  2. Step 2: λ を 0.2 に → なだらかに減衰。めったに起きない事象は長く待つ。
  3. Step 3: λ を 3 に → 急降下。頻繁に起きる事象は待ち時間が短い(平均 1/3)。
  4. Step 4: どの λ でも曲線の形は同じ「L字」。これが無記憶性 — 過去の待ち時間は将来に影響しない。
Experiment Guide — Exponential
  1. Step 1: λ=1 → mean wait time = 1. The curve drops sharply.
  2. Step 2: Set λ to 0.2 → gentle decay. Rare events mean long waits.
  3. Step 3: Set λ to 3 → steep drop. Frequent events = short waits (mean 1/3).
  4. Step 4: Every λ gives the same "L" shape. That is memorylessness — past waiting does not affect the future.
指数分布 Exp(λ) — 待ち時間
いつ使う? → 次の電話が来るまでの待ち時間、電球が切れるまでの寿命
When? → Time until next phone call; how long until a light bulb burns out
Exponential(λ) — waiting time
1
無記憶性:バスを10分待っても、あと何分待つかは今来た人と同じ。過去の待ち時間は将来に影響しない。
Memoryless: past waiting time tells you nothing about the future.
無記憶性デモ — 「もう10分待った」は無意味?
Memoryless Demo — Does "already waited 10 min" matter?
左は正規分布的な待ち時間。待てば待つほど「そろそろ来る」確率が上がる。右は指数分布。t をどれだけ動かしても曲線が変わらない——これが無記憶性。
Left: normal-like waiting. The longer you wait, the more likely arrival becomes. Right: exponential. Move t all you want — the curve never changes. That's memorylessness.
正規分布(普通の感覚)
Normal (everyday intuition)
← t が増えると左にシフト(「そろそろ来る」)
← as t grows, shifts left ("should come soon")
指数分布(無記憶)
Exponential (memoryless)
← t をいくら動かしても同じ形
← no matter how much t changes, same shape
0
0.20
同じ現象、3つの視点 — コールセンターの1時間
One Phenomenon, Three Views — A Call Center Hour
「1時間にλ件電話が来る」を3つの分布で同時に見る。λスライダーを動かすと3つとも変わる。同じ現象を「回数で数える」か「時間で測る」かの違い。
One process — "λ calls per hour" — viewed through three distributions simultaneously. Move λ and all three update. Same phenomenon, different angles.
3.0
二項分布 B(60, λ/60)
Binomial B(60, λ/60)
60分を1分刻み。
各分に電話が来るか来ないか。
60 one-minute slots.
Each minute: call or no call.
ポアソン分布 Poi(λ)
Poisson Poi(λ)
1時間に合計何件来る?
How many calls total in one hour?
指数分布 Exp(λ)
Exponential Exp(λ)
次の電話まで何分待つ?
(平均 60/λ 分)
How long until next call?
(mean 60/λ min)
次は —平均を取ると正規分布になる? I1 中心極限定理
UP NEXT —averages become normal I1 Central Limit Theorem

▼ この先の展開 — 推測統計へ

▼ What comes next — into Inference

確率と分布の基盤を固めた。ここから先は「サンプルから母集団を推測する」ステージ。
中心極限定理が「どんな分布でも平均は正規に近づく」と保証し、 大数の法則で「n を増やせば真値に収束する」という安心感を得る。 その上で信頼区間(どれくらいの精度?)と仮説検定(差はあるか?)を使いこなし、 最後に t・χ²・F の三大検定分布で「σ を知らない現実」に立ち向かう。

Probability and distributions are locked in. Next up: inferring population truths from samples.
The Central Limit Theorem guarantees sample means go normal, the Law of Large Numbers says they converge to the truth. Then confidence intervals (how precise?) and hypothesis tests (is there a difference?), capped by the t, χ², F trio for the real world where σ is unknown.

推測統計INFERENCE

サンプルから母集団を推測する

Statistical Inference — learning about populations from samples

I1 / 中心極限定理

中心極限定理 — なぜ正規分布は最強なのか

Central Limit Theorem — Why Normal Is King

正規分布の基礎を掴んだ。ここからは推測統計。1つのデータから平均を取ったらどんな形になる? ——ここで中心極限定理が効いてくる。サイコロでもポアソンでも、出発点は何でもいい。平均にした瞬間、世界はあの正規曲線に吸い込まれていく。
Normal distribution basics down. Now for statistical inference. What shape does the average of many samples take? Here comes the Central Limit Theorem: whatever you start with — dice, Poisson, anything — the average is pulled toward that same normal curve.

ちょっとヤバい事実 — もとの分布がどんなに歪んでいても、 そこから n個 取って平均する操作を繰り返すと、その平均たちの分布は勝手に ベル型(正規分布)に化ける。
下のラボでは 左=もとの分布(めっちゃ歪んでいる)右=標本平均の分布(正規に化けていく)を並べて見せている。 n を大きくするほど、右のベルがシュッと細くなる(SE = σ/√n)。

A fact worth pausing on — no matter how skewed the base distribution is, if you take n samples and average, then repeat, the distribution of those averages converges on its own to a bell (normal).
The lab below shows left = the raw skewed source side-by-side with right = the sample-mean distribution, so you can watch the bell emerge. Crank n up and the bell tightens (SE = σ/√n).

実験ガイド — 順番に試してみよう
  1. Step 1: 上のドロップダウンで「指数分布」を選び、n スライダーを 1 にして ▶ → 右に歪んだまま。まだ全然ベルじゃない。
  2. Step 2: n スライダーを 5 にして ▶ → 少しベルっぽくなるが、まだ歪み。
  3. Step 3: n スライダーを 30 にして ▶ → ほぼ正規分布。「n≥30」は定理が保証する値ではなく、経験的な目安。元の分布が極端に歪んでいると、もっと必要なこともある。
  4. Step 4: ドロップダウンを「二峰分布」に切り替えて同じことをやる → 山2つのやつですらベルに化ける衝撃。
Experiment Guide — try these in order
  1. Step 1: Use the dropdown above to choose "Exponential" and drag the n slider to 1, hit ▶ → still heavily skewed. Not a bell at all.
  2. Step 2: Drag the n slider to 5 and run → starting to look bell-ish, but still skewed.
  3. Step 3: Drag the n slider to 30 and run → nearly normal. "n≥30" is a practical rule of thumb, not a theorem — heavily skewed distributions may need more.
  4. Step 4: Switch the dropdown to "Bimodal" and repeat → even a two-peaked distribution morphs into a bell. Worth watching twice.
試行回数Trials0
標本平均の平均Mean of sample means
標本平均の標準偏差SD of sample means
理論SE = σ/√nTheoretical SE = σ/√n
次は —平均は本当に真値に近づく? I2 大数の法則
UP NEXT —does the sample mean really converge? I2 Law of Large Numbers
I2 / 大数の法則

大数の法則 — 試行を重ねれば真値に近づく

Law of Large Numbers — Converging to Truth

中心極限定理で「平均を取ると正規分布になる」と分かった。でもそもそも 標本平均 は、n を増やすと本当の平均に近づくのか? それを保証するのが大数の法則。中心極限定理が「形」の話なら、LLN は「中心が動かない」話。
The Central Limit Theorem showed that averages become normal. But does the sample mean actually converge to the true mean as n grows? That guarantee is the Law of Large Numbers. The Central Limit Theorem describes the shape; the Law of Large Numbers says the center won't run away.

コイン投げで最初の10回連続で表が出た — これ、別に珍しいことじゃない。 でも 1万回投げたら、表の割合はほぼ ぴったり 0.5 に収まる。
これが大数の法則。サンプルを増やすほど、観測値は"真の値"に吸い寄せられていく。 統計が"なんとなく"じゃなく"証拠"になる理由がここにある。

10 heads in a row at the start of a coin-flip? Not that weird. But flip it 10,000 times and the head-ratio locks onto almost exactly 0.5.
That's the Law of Large Numbers — the more samples you draw, the more observed values get pulled toward the truth. This is why statistics counts as evidence, not a vague hunch.

実験ガイド — 順番に試してみよう
  1. Step 1: p=0.5 で ▶ シミュレート → 最初は暴れるが、右に行くほど 0.5 に吸い寄せられる。
  2. Step 2: RESET して、もう一度 ▶ → 序盤の軌道は毎回違うが、終盤は毎回同じ場所に収束する。
  3. Step 3: p を 0.8 に変えてシミュレート → 赤線が 0.8 に引き寄せられることを確認。
  4. Step 4: p を 0.05(レアイベント)に → 最初はゼロ付近で張り付くが、やはり p に収束する。
Experiment Guide — try these in order
  1. Step 1: Set p=0.5, hit ▶ → the line wobbles wildly at first, then gets pulled toward 0.5.
  2. Step 2: RESET and run again → the early path is different every time, but it always converges.
  3. Step 3: Change p to 0.8 and simulate → the red line now converges to 0.8.
  4. Step 4: Set p to 0.05 (rare event) → it hugs zero early on, but still converges to p. The law holds.
試行回数Trials0
現在の平均Current mean
理論値Theoretical0.50
次は —有限サンプルで不確実性をどう表す? I3 信頼区間
UP NEXT —how to quantify uncertainty with finite n I3 Confidence Interval
I3 / 信頼区間

信頼区間 — 95%の本当の意味

Confidence Interval — What 95% Really Means

LLN は「∞なら当たる」と言う。でも我々はいつも有限サンプルしか持っていない。なら点推定周りに網を張って真値を捕まえよう——これが信頼区間。幅を広げれば当たりやすい、狭めれば精密。このトレードオフを目で見て掴む。
LLN says "at infinity, you're right." But in practice we always have a finite sample. So instead of a single point, drape a net around it — that's a confidence interval. Wider net, easier to catch; narrower, more precise. Watch the trade-off play out.

95% 信頼区間って実はよく誤解される概念。
「真の値が95%の確率でここに入る」 …ではなくて、 「同じサンプリングを何百回も繰り返すと、そのうち約95%の区間が真の値を掴む」が正しい。
下のラボではそれをゴリ押しで実演する。ピンクの細い線が"捕まえられなかった不運な区間"。 全体のピンク比率が ちゃんと5%前後に落ち着くのを確認できたら、もう信頼区間は分かったも同然。

The 95% confidence interval is famously misunderstood.
It does NOT mean "the true value is inside with 95% probability". The correct reading: "repeat this sampling many times, and ~95% of the resulting intervals will capture the true value".
The lab below brute-forces that intuition. Thin pink = the unlucky intervals that missed. Once the pink share settles around ~5%, you've got it.

実験ガイド — 順番に試してみよう
  1. Step 1: 信頼度95%, n=30 で ▶ 300回生成 → ピンク(外した区間)がちょうど5%前後になることを確認。
  2. Step 2: 信頼度を 80% に下げて再生成 → ピンクが増える。幅を狭めた分、当たりにくい。
  3. Step 3: 信頼度95%に戻し、n を 200 にする → 区間の幅がグッと狭くなる。サンプル数の力。
  4. Step 4: n を 5 にする → 幅がめちゃ広い。少ないサンプルでは"掴む網"が大きくないと当たらない。
Experiment Guide — try these in order
  1. Step 1: At 95% confidence, n=30, hit ▶ → pink (missed) intervals should be ~5% of the total.
  2. Step 2: Drop confidence to 80% and regenerate → more pink. Narrower net = more misses.
  3. Step 3: Back to 95%, set n to 200 → intervals get much tighter. The power of large samples.
  4. Step 4: Set n to 5 → intervals are huge. With few samples, you need a wide net to catch the truth.
作成した区間Intervals built0
捕捉率Coverage
期待値Expected95%
次は —幅から YES/NO へ I4 仮説検定
UP NEXT —from width to yes/no I4 Hypothesis Testing
I4 / 仮説検定

仮説検定 — 棄却か、棄却できないか

Hypothesis Testing — Reject or Fail to Reject

信頼区間が「幅として」不確実性を出す道具なら、仮説検定は「YES/NO として」それを使う道具。帰無仮説の世界でこのデータは起こりえるか? 起こりにくいなら reject——同じ分布、同じ σ/n、質問が違うだけ
If a CI expresses uncertainty as a width, hypothesis testing turns it into a yes/no decision. Under the null world, could this data have happened? If it's too unlikely, reject. Same distribution, same σ/n — just a different question.

検定 = 裁判だと思うと超わかりやすい。
H₀帰無仮説):この薬は効かない(=無罪)」をいったん仮置きし、データから計算した 検定統計量 z事前に決めた棄却域 に落ちたら有罪宣告 — つまり H₀ を棄却 する。
ここでは2画面で攻める:① z値と棄却域の幾何学(両側・右側・左側)② 冤罪(α)と見逃し(β)のトレードオフ

Think of testing as a trial.
You start by assuming H₀ ("the drug has no effect" = "innocent"). Then if your computed test statistic z lands in the pre-chosen rejection region, you convict — that is, reject H₀.
Two panels below: ① geometry of z and rejection regions (two-sided, right, left), and ② false alarms (α) vs. misses (β).

実験ガイド — 順番に試してみよう
  1. Step 1: ① で z=1.96, α=0.05, 両側 → ギリギリ棄却域の境界。p値≈0.05。ここが分水嶺。
    α(有意水準)=「これより極端なら偶然じゃないと判断する」基準線。α が棄却域の広さを決める。
  2. Step 2: 「観測 z」スライダーを 2.5 に → 棄却域に深く入り、p値が小さくなる。「強い証拠」。
  3. Step 3: 検定タイプのドロップダウンを「右側」に切替 → 同じ z=1.96 でも棄却域が片側に集中し、p値が半分に。
Experiment Guide — try these in order
  1. Step 1: Panel ①: z=1.96, α=0.05, two-sided → right on the boundary. p≈0.05. The watershed.
    α (significance level) = the threshold for "too extreme to be coincidence." It sets the width of the rejection zone.
  2. Step 2: Drag the "Observed z" slider to 2.5 → deep in the rejection zone, p-value shrinks. "Strong evidence."
  3. Step 3: Switch the test-type dropdown to "Right" → same z=1.96 but rejection area is one-sided; p-value halves.

▶ ① 基本:z値と棄却域

▶ ① Basics: z-statistic & rejection region

検定統計量 zTest statistic z
臨界値Critical value
p値p-value
判定Decision
実験ガイド — 順番に試してみよう
  1. Step 1: δ=2, α=0.05 → 検出力が高い(紫のほとんどが棄却域に入る)。
  2. Step 2: δ を 0.5 に → 紫と青がほぼ重なり、検出力がガクッと落ちる。小さな差は見逃しやすい。
  3. Step 3: α を 0.01 に厳しくする → 棄却域が狭まり、β(見逃し)が増える。トレードオフ。
  4. Step 4: グラフ上を左右にドラッグ → 臨界値を直接動かして α と β の綱引きを体感。
Experiment Guide — try these in order
  1. Step 1: δ=2, α=0.05 → high power (most of the purple curve falls in the rejection region).
  2. Step 2: Lower δ to 0.5 → purple and blue nearly overlap; power drops sharply. Small effects are hard to detect.
  3. Step 3: Tighten α to 0.01 → rejection region shrinks, β (misses) increases. The trade-off in action.
  4. Step 4: Drag horizontally on the chart → move the critical boundary and feel the α vs β tug-of-war.

▶ ② 2つの誤り:α・β・検出力

▶ ② Two kinds of errors: α, β, power

ここは α(第1種の誤り)/ β(第2種の誤り)/ 検出力 のトレードオフを触って体感する場
気になったら戻ってきてOK。深い概念整理(2×2マトリクス・α と β が「別の世界」の確率である理由など)は 『過誤の2×2』コラムでまとめています。
Tip: グラフ上を左右にドラッグすると、臨界値(α の境界)を直接動かせる。

This panel is a hands-on playground for the α (Type I) / β (Type II) / power trade-off.
Come back whenever you want to feel the trade-off. For the deeper conceptual write-up (the 2×2 matrix, why α and β live in different worlds), see the "Type I & II in a 2×2 table" column.
Tip: drag horizontally on the chart to slide the critical boundary (α).

α (第1種の誤り)α (Type I error)
臨界値Critical value
β (第2種の誤り)β (Type II error)
検出力 1−βPower 1−β
次は —平均から比率へ I5 母比率の検定と推定
UP NEXT —from means to proportions I5 Proportion Test
I5 / 母比率の検定と推定

母比率の検定と推定 — 標本比率から母比率を探る

Proportion Test & Estimation — from sample proportion to the truth

母平均で信頼区間や検定をやったときと、考え方はまったく同じ。ただ「連続的なデータの平均」から「成功 or 失敗のカウント」に変わると、標準誤差の形がちょっと違ってくる。ここを触って慣れておくと、参考書の公式がスッと入ってくるはず。
The logic is exactly the same as when we did confidence intervals and hypothesis tests for means. The only twist: data is now "success or failure" counts instead of continuous measurements, so the standard error formula changes shape. Play with the sliders here and the textbook formulas read more easily afterward.

データが「成功 / 失敗」の二択しかない世界。標本比率 p̂ = x/n がすべての出発点で、n が十分大きければ正規分布で近似できる(中心極限定理のおかげ)。
ここでは ① 区間推定② 1標本検定③ 2標本検定 の順に触っていく。平均のときと何が同じで何が違うのか、比べながら進めると整理しやすい。

A world where every data point is just "success" or "failure." The sample proportion p̂ = x/n is the starting point, and when n is large enough the normal approximation kicks in (thanks to the Central Limit Theorem).
We'll work through ① interval estimation② one-sample test③ two-sample test. Compare each step with what you learned for means — spotting the similarities makes the differences easy to absorb.

実験ガイド — 順番に試してみよう
  1. Step 1: n=15, p̂=0.50, 95% → 信頼区間がかなり広い。たった15人では精度が出ない。
  2. Step 2: n を 100 に → 信頼区間がぐっと狭まる。サンプルサイズの威力を実感。
  3. Step 3: p̂ を 0.90 に → 分散 p(1-p) が小さくなり、CI が狭くなる。p̂=0.50 が最も広い。
  4. Step 4: p̂=0.90 のまま n を 10 に下げる → ⚠ 警告が出たら正規近似の条件を満たしていない。
Experiment Guide — try these in order
  1. Step 1: n=15, p̂=0.50, 95% → the interval is really wide. Just 15 people isn't enough precision.
  2. Step 2: Push n to 100 → the interval tightens up fast. Feel the power of sample size.
  3. Step 3: Set p̂ to 0.90 → variance p(1-p) shrinks, so the CI narrows. p̂=0.50 gives the widest interval.
  4. Step 4: Keep p̂=0.90, drop n to 10 → if ⚠ appears, the normal approximation conditions aren't met.

▶ ① 母比率の区間推定

▶ ① Confidence interval for a proportion

標準誤差 SEStandard error SE
信頼区間 下限CI lower bound
信頼区間 上限CI upper bound
誤差幅 EMargin of error E
シミュレーション — 「95%」の意味を確かめる

「95%信頼区間って、つまり何?」── 言葉だけ追うと迷子になりやすい場面。整理すると「同じ調査を何回もやったら、そのうち約95%の区間が真の母比率を捕まえる」ということ。
200回試してみると、この「95%」が本当かどうか確かめられる。

Simulation — verify what "95%" really means

"What does a 95% CI actually mean?" — easy to lose the thread by chasing the words alone. Reframed: "if you repeated the same survey many times, about 95% of the intervals would capture the true proportion."
Run it 200 times and see whether that 95% claim holds up.

▶ ①-b 信頼区間シミュレーション

▶ ①-b CI simulation

生成数Generated0
捕捉率Coverage rate
実験ガイド — 比率の検定を体験
  1. Step 1: n=100, p̂=0.60, p₀=0.50, α=0.05, 両側 → 「60%は50%と有意に違うか?」
  2. Step 2: p₀ を 0.55 に → z が小さくなり棄却できなくなる。差が小さいと見分けがつかない。
  3. Step 3: n を 400 に → 同じ p̂=0.60, p₀=0.55 でも今度は棄却できる。サンプルサイズの威力。
  4. Step 4: 検定タイプを「右側」に → 「50%より大きいか」だけを問う片側検定。p値が半分に。
Experiment Guide — experience proportion testing
  1. Step 1: n=100, p̂=0.60, p₀=0.50, α=0.05, two-sided → "Is 60% significantly different from 50%?"
  2. Step 2: Change p₀ to 0.55 → z shrinks and you can no longer reject. Small differences are hard to detect.
  3. Step 3: Increase n to 400 → same p̂=0.60, p₀=0.55 but now you reject. The power of sample size.
  4. Step 4: Switch test type to "Right" → one-sided test asking only "greater than 50%?" The p-value halves.

▶ ② 母比率の検定(1標本z検定)

▶ ② One-sample z-test for a proportion

母平均の検定でやったことと同じ流れ。帰無仮説 H₀: p = p₀ を立てて、標本から計算した z が棄却域に入るかどうかを見るだけ。
標準誤差の式が √(p₀(1−p₀)/n) に変わるところだけ押さえれば、もう迷わないはず。

Same flow as testing a population mean. Set up H₀: p = p₀, compute z from the sample, and check whether it lands in the rejection region.
The only twist is that the standard error becomes √(p₀(1−p₀)/n). Nail that, and the rest is familiar.

検定統計量 zTest statistic z
臨界値Critical value
p値p-value
判定Decision
実験ガイド — 2群の比率を比較
  1. Step 1: n₁=n₂=100, p̂₁=0.60, p̂₂=0.45 → 差は有意か?
  2. Step 2: p̂₂ を 0.55 に近づける → z が小さくなり、棄却が難しくなる。
  3. Step 3: n₁=n₂=400 に増やす → 同じ差でも検出力が上がる。
  4. Step 4: n₁=50, n₂=200 と非対称にしてみる → 小さい方のnが精度のボトルネック。
Experiment Guide — compare two groups
  1. Step 1: n₁=n₂=100, p̂₁=0.60, p̂₂=0.45 → is the difference significant?
  2. Step 2: Move p̂₂ toward 0.55 → z shrinks, rejection gets harder.
  3. Step 3: Increase both to n₁=n₂=400 → same gap, more power.
  4. Step 4: Try n₁=50, n₂=200 (asymmetric) → the smaller n is the bottleneck.

▶ ③ 2つの母比率の差の検定

▶ ③ Two-proportion z-test

「薬Aと薬B、どっちが効く?」「広告A vs B、クリック率に差はある?」── そういう2群比較のための検定。
H₀: p₁ = p₂ を仮定してプール比率で共通のSEを作るところがポイント。ここだけ押さえれば1標本と同じ。

"Drug A vs. Drug B — which works better?" "Ad A vs. Ad B — is the click-through rate really different?" This test is for comparing two groups.
The key idea: under H₀: p₁ = p₂, we pool both samples into a single pooled proportion to build a shared SE. Get that, and the rest mirrors the one-sample test.

プール比率 p̂Pooled proportion p̂
検定統計量 zTest statistic z
p値p-value
判定Decision
次は —σ を知らない世界へ I6 t・χ²・F
UP NEXT —into the world where σ is unknown I6 t, χ², F
I6 / t · χ² · F 分布I6 / t · χ² · F Distributions

三大検定分布 — t・χ²・F の素顔

Three Test Distributions — Meet t, χ² & F

ここまで平均の検定には σ を知っている前提だった。現実では σ も推定するしかない。その瞬間 Z は t 分布に化ける。分散を直接検定するなら χ²、2つの分散を比べるなら F。全部 N(0,1) の子孫だけど、何を知らないかで名前が変わる。
Up to now we've tested means assuming σ is known. In practice you must estimate σ too — and the moment you do, Z morphs into t. Test a variance directly: χ². Compare two variances: F. All descendants of N(0,1); the name changes based on what you don't know.

t・χ²・F は、どれも正規分布から"作って"生まれた派生分布。 "もとは標準正規なんだけど、標本からしか情報を取れない現実"を反映するためにスケーリングしたもの、と思うとスッキリする。
ざっくり使い分けると — t:母分散を知らずに平均を検定する時(=現実の平均検定はほぼ全部これ)。 χ²:分散そのものの検定、独立性や適合度(カテゴリカル)。 F:分散比の検定(分散分析 ANOVA、回帰の全体 F 検定)。
自由度 df を動かすと、t は df→∞ で N(0,1) に一致し、χ²/F は df が大きいほど対称なベル形に近づく。これ自体、裏では中心極限定理が効いている。

t, χ², F are all derived from the normal. Think of them as "the standard normal, scaled to reflect that we only ever see a sample".
Use them for: t — testing a mean when the population variance is unknown (i.e. nearly every real test of a mean); χ² — testing a variance, independence, goodness-of-fit for categorical data; F — ratios of variances (ANOVA, the overall F in regression).
Slide df: t converges to N(0,1) as df→∞, and χ²/F get more symmetric with more df. The Central Limit Theorem is quietly doing the work under the hood.

実験ガイド — 順番に試してみよう
  1. Step 1: n=3 → 自由度1、裾がめちゃくちゃ重い。正規分布(灰色の点線)と比べてみよう。
  2. Step 2: n=10 → まだ正規より裾が厚いが、だいぶ近づいてきた。
  3. Step 3: n=31 → ほぼ N(0,1) と区別がつかない。信頼区間の2本のバーもほぼ重なる。
Experiment Guide — try these in order
  1. Step 1: n=3 → df=1, extremely heavy tails. Compare with the normal (gray dashed line).
  2. Step 2: n=10 → still heavier tails than normal, but getting closer.
  3. Step 3: n=31 → nearly indistinguishable from N(0,1). The CI bars nearly overlap.

▶ t 分布

▶ t distribution

作り方: t = Z / √(χ²ₖ/k) , Z~N(0,1)。
使いどころ: 母分散未知の平均検定、回帰係数の t 値。
例:クラス30人の平均点が全国平均と違うか調べるとき。
クセ: 正規より裾が重い(外れ値に優しい)。df→∞ で N(0,1)。
Built from: t = Z / √(χ²ₖ/k), Z~N(0,1).
Use for: testing means with unknown variance, regression t-values.
Flavor: heavier tails than N(0,1); matches N(0,1) as df→∞.
信頼水準:Confidence:
↔ グラフを左右にドラッグで n 変更↔ Drag the graph horizontally to change n
サンプルサイズ nSample size n 5
自由度 dfdf 4
信頼水準Confidence 95%
t 臨界値t critical ±2.776
z 臨界値z critical ±1.960
t / z 比t / z ratio 1.416

サンプルが少ないとき、正規分布で計算した信頼区間は狭すぎる。t分布はその不確実性を正直に反映した分布です。nが増えるにつれt分布は正規分布に近づく——それがこの2本のバーで見えます。With small samples, a normal-based CI is too narrow — overconfident. The t-distribution honestly reflects that extra uncertainty. As n grows, t converges to normal — that's what the two bars show.

実験ガイド — χ²分布
  1. Step 1: 「公正なサイコロ」のまま試行ボタンを何度か押す → 均等なはずでも毎回バラつく。棒グラフの偏りとχ²統計量の変化を見る。
  2. Step 2: セレクトを「イカサマ」に切り替えて試行 → 1の目だけ飛び出て、χ²が棄却域に入る。
  3. Step 3: 試行回数スライダーを増やす → サンプルが多いほど小さな偏りでも検出できる(検出力が上がる)。
  4. Step 4: dfスライダーを動かして分布の形状変化も確認。df=30 → ほぼ正規分布に。
Experiment Guide — χ² distribution
  1. Step 1: Keep "Fair die" selected and press Roll a few times → even a fair die varies each time. Watch the bar chart and χ² statistic change.
  2. Step 2: Switch to "Loaded" and roll → face 1 jumps out, χ² enters the rejection region.
  3. Step 3: Increase the rolls slider → more samples detect smaller biases (higher power).
  4. Step 4: Move the df slider to explore the shape. df=30 → nearly normal.

▶ χ² 分布

▶ χ² distribution

作り方: χ²ₖ = Z₁² + Z₂² + ... + Zₖ² (標準正規を k 個足して二乗和)。
使いどころ: 分散の検定、独立性/適合度のカイ二乗検定。
例:サイコロの出目が均等か、アンケートの「はい/いいえ」に偏りがないか調べるとき。
クセ: 非負・右に歪む。平均 = k、分散 = 2k。df大で正規ベル化。
Built from: χ²ₖ = Z₁² + Z₂² + ... + Zₖ² (sum of k squared standard normals).
Use for: variance tests, chi-square tests of independence / goodness-of-fit.
Flavor: non-negative, right-skewed. Mean = k, variance = 2k. Goes bell-shaped with large df.
↔ グラフを左右にドラッグで df 変更↔ Drag the graph horizontally to change df
試行回数 nRolls n 60
自由度 dfdf 5
検定統計量 χ²Test statistic χ²
χ² 臨界値χ² critical 11.070
p 値p-value
判定Verdict

カイ二乗分布は「観察と期待のズレの大きさ」を測る物差しです。ズレが偶然の範囲か、本物の偏りかを判定するために使います。The chi-squared distribution measures "how big is the gap between observed and expected." It tells you whether that gap is just random noise or a real bias.

実験ガイド — F分布
  1. Step 1: AとBのSDを同じ(例:10と10)にする → F≈1、棄却されない。
  2. Step 2: BのSDだけ大きくする(例:A=5, B=15)→ Fが大きくなり棄却域に入る。
  3. Step 3: nを増やす → 同じSD差でもp値が下がる(検出力が上がる)。
  4. Step 4: AとBのSDを交互に変えて「分散比」の意味を体感しよう。
Experiment Guide — F distribution
  1. Step 1: Set A and B to the same SD (e.g. 10 and 10) → F≈1, not rejected.
  2. Step 2: Increase B only (e.g. A=5, B=15) → F grows and enters the rejection region.
  3. Step 3: Increase n → same SD gap but lower p-value (more power).
  4. Step 4: Alternate A and B's SD to feel what "variance ratio" means.

▶ F 分布

▶ F distribution

作り方: F = (χ²ₘ/m) / (χ²ₙ/n) (2つの独立な χ² の比)。
使いどころ: 分散分析(ANOVA)、回帰モデルの全体 F 検定。
例:3クラスの平均点に差があるか調べるとき(一元配置分散分析)。
クセ: 非負・右歪み。分子/分母の df で形が変わる。
Built from: F = (χ²ₘ/m) / (χ²ₙ/n) (ratio of two independent χ² / df).
Use for: ANOVA, overall F-test in regression.
Flavor: non-negative, right-skewed. Shape depends on both df.
↔ グラフを左右にドラッグで n 変更↔ Drag the graph horizontally to change n
グループA SDGroup A SD 8
グループB SDGroup B SD 15
df₁, df₂ 19, 19
F 統計量F statistic 3.516
F 臨界値F critical 2.168
p 値p-value 0.005

F分布は2つのグループの「ばらつきの比」を評価します。分散分析(ANOVA)もこのF統計量を使って、グループ間の差を検定しています。The F-distribution evaluates the ratio of two groups' spread. ANOVA also uses this F-statistic to test whether group means differ.

次は —「ズレ」を数値化して検定する I7 カイ二乗検定
UP NEXT —quantifying "deviation" and testing it I7 Chi-Squared Test
I7 / カイ二乗検定I7 / Chi-Squared Test

カイ二乗検定 — ズレを数値化する

Chi-Squared Test — Quantifying the Gap

ここまでは「平均」の検定だった。でも世の中にはカテゴリしかないデータがある — アンケートの選択肢、サイコロの出目、病気と喫煙の組み合わせ。こういうデータの「ズレ」を測るのが カイ二乗検定。期待からのズレが大きいほど、χ² 統計量が光る。
So far we've tested means. But some data is purely categorical — survey choices, dice outcomes, disease × smoking. The chi-squared test quantifies "deviation from expectation" for these counts. The bigger the mismatch, the brighter the χ² statistic glows.

適合度検定は「観測されたカテゴリ分布は、理論分布と合っているか?」を調べる。サイコロが公正かどうか、が典型例。
独立性検定は「2つのカテゴリ変数は独立か?」を調べる。クロス集計表の各セルで期待度数とのズレを計算し、χ² = Σ (O−E)²/E を合計する。
なぜ E で割る? → 「期待10人に対して2人のズレ」と「期待1000人に対して2人のズレ」は重みが違う。E で割ることで相対的なズレに揃えている。
どちらも χ²分布に従う統計量を使い、右裾の面積が p 値になる。自由度は適合度なら k−1、独立性なら (r−1)(c−1)。

Goodness-of-fit asks: "Does the observed category distribution match a theoretical one?" Classic example: is the die fair?
Test of independence asks: "Are two categorical variables independent?" Compute χ² = Σ (O−E)²/E across every cell of the contingency table.
Why divide by E? → A deviation of 2 from an expected 10 matters more than 2 from an expected 1,000. Dividing by E turns raw gaps into relative ones.
Both use a χ²-distributed statistic; the p-value is the right-tail area. df = k−1 for goodness-of-fit, (r−1)(c−1) for independence.

実験ガイド — 順番に試してみよう
  1. Step 1: ① 適合度:「公正なサイコロ」で自動試行 → n が増えるほど χ² が安定し、p値が大きいまま(帰無仮説を棄却しない)。
  2. Step 2: 「イカサマ」に切り替えて自動試行 → χ² が急上昇し、p値が α を下回る。不正が検出される瞬間。
  3. Step 3: ② 独立性:左上のセルだけクリックして偏りを作る → χ² が跳ね上がり、独立性が棄却される。
  4. Step 4: リセットして、各セルを均等にクリック → χ² は小さいまま。偏りがなければ独立と判定。
Experiment Guide — try these in order
  1. Step 1: ① Goodness-of-fit: select "Fair die" and auto-roll → as n grows, χ² stays low, p-value stays high (fail to reject).
  2. Step 2: Switch to "Loaded" and auto-roll → χ² shoots up, p-value drops below α. The cheat is caught.
  3. Step 3: ② Independence: click only the top-left cell to create imbalance → χ² spikes, independence is rejected.
  4. Step 4: Reset and click cells evenly → χ² stays small. No imbalance = independence holds.

▶ ① 適合度検定 — サイコロは公正か?

▶ ① Goodness-of-Fit — Is the Die Fair?

🎲 左側のバーをクリックして出目を1つずつ追加(Shift+クリックで−1)🎲 Click a bar on the left to add one roll (Shift+click to subtract)
試行回数 nRolls n 0
検定統計量 χ²Test statistic χ²
自由度 dfdf
p値p-value
判定Decision
実験ガイド — 順番に試してみよう
  1. Step 1: 左上セルと右下セルを多めにクリック → 対角に偏ると χ² が上がり「独立でない」と判定。
  2. Step 2: ↺ リセットし、全セルを均等にクリック → χ² が小さいまま。偏りがなければ独立。
  3. Step 3: α を 0.01 に → 棄却のハードルが上がる。同じデータでも判定が変わることがある。
  4. Step 4: 極端に1つのセルだけ大量クリック → 期待度数との乖離が大きく、p値が激減する。
Experiment Guide — try these in order
  1. Step 1: Click the top-left and bottom-right cells repeatedly → diagonal bias raises χ², verdict: "not independent."
  2. Step 2: Reset, then click all cells evenly → χ² stays small. No bias = independent.
  3. Step 3: Set α to 0.01 → higher bar for rejection. Same data might flip the verdict.
  4. Step 4: Flood a single cell → huge gap from expected frequencies, p-value plummets.

▶ ② 独立性検定 — 2変数は独立か?

▶ ② Test of Independence — Are Two Variables Independent?

左側のセルをクリックして観測値を+1(Shift+クリックで−1)Click a cell on the left to add +1 (Shift+click for −1)
総数 nTotal n 0
検定統計量 χ²Test statistic χ²
自由度 dfdf
p値p-value
判定Decision
次は —3群以上を一度に比較する I8 分散分析(ANOVA)
UP NEXT —comparing three or more groups at once I8 ANOVA
I8 / ANOVA

分散分析(ANOVA) — F値の直感を掴む

ANOVA — Feel What the F-Statistic Really Means

カイ二乗検定は「カテゴリのズレ」を測った。では「3グループ以上の平均値に差があるか?」はどう調べる? t検定を何度も繰り返すと偽陽性が膨らむ — 分散分析(ANOVA)なら、全グループを一度に比較できる。
The chi-squared test quantified "category deviations." But how do we test whether means differ across three or more groups? Repeating t-tests inflates false positives — ANOVA compares all groups in a single test.

「グループ間の違い」と「グループ内のバラつき」を比べるのがANOVA。
違いがバラつきに比べて大きければ「差がある」と判定。スライダーで動かして体感しよう。

ANOVA compares "how different the groups are" vs. "how spread out each group is."
When the difference outweighs the spread, we conclude the groups really differ. Move the sliders to feel it.

実験ガイド — 多重比較の問題
  1. Step 1: ▶ 100回 をクリック — 差がない3群でt検定を3回繰り返す試行を100回実施。
  2. Step 2: 赤い点の割合を確認 — 理論上14.3%のはずが、実測値はどうなる?
  3. Step 3: ▶ 1000回 で試行を追加 — 試行数が増えると14.3%に収束していく。
Experiment Guide — Multiple Comparisons Problem
  1. Step 1: Click ▶ 100 trials — runs 100 experiments where 3 identical groups are compared with 3 pairwise t-tests.
  2. Step 2: Check the red dot ratio — theory predicts 14.3%. What do you get?
  3. Step 3: Click ▶ 1000 trials — as trials accumulate, the rate converges toward 14.3%.

▶ なぜt検定を繰り返してはいけないか

▶ Why You Can't Just Repeat t-Tests

まず「ANOVAがなぜ必要か」を体験。差がない3群(N(0,1)×20人)でt検定を3回繰り返すと、偽陽性はどこまで膨らむ? First, experience why ANOVA is needed. With 3 identical groups (N(0,1), n=20), repeat 3 pairwise t-tests — how bad does the false-positive rate get?
試行回数Trials 0
偽陽性False positives 0
偽陽性率FP rate 0.0%

上のシミュレーションで見た「偽陽性の膨張」を、一度の検定で回避するのがこのF検定(ANOVA)です。

実験ガイド — F値を体感する
  1. Step 1: 群間の差をゼロにする → F値が1付近に。全群が「同じ集団」のように見える。
  2. Step 2: 群間の差を大きくする → F値が上がり、p値が下がる。棄却域に入る瞬間を確認。
  3. Step 3: 群内のばらつきを大きくする → 同じ差でもF値が下がる。「差があっても検出できない」体験。
  4. Step 4: サンプルサイズを増やす → F値が上がる。大きなサンプルほど小さな差を検出できる(検出力)。

The F-test (ANOVA) below is how we avoid the false-positive inflation you just saw in the simulation above.

Experiment Guide — Feel the F-Statistic
  1. Step 1: Set between-group difference to zero → F ≈ 1. All groups look like one population.
  2. Step 2: Increase between-group difference → F rises, p drops. Watch it cross the rejection threshold.
  3. Step 3: Increase within-group spread → same difference but F drops. "Real differences can hide in noise."
  4. Step 4: Increase sample size → F rises. Larger samples detect smaller effects (statistical power).

▶ 群間分散 vs 群内分散 — F値をスライダーで体感

▶ Between vs. Within — Feel the F-Statistic

F
群間 dfBetween df
群内 dfWithin df
p
SSB
SSW
η²
判定Decision
次は —2変数の「つながり」を測る M0 相関係数
UP NEXT —measuring the "link" between two variables M0 Correlation

▼ この先の展開 — モデリングへ

▼ What comes next — into Modeling

検定で「差があるか」「独立か」を判定できるようになった。ここから先は「関係を見つけて予測する」ステージ。
相関係数で 2 変数の「つながり」を測り、単回帰で直線を引いて予測に変える。 そして重回帰で「他の要因を制御しながら、本当の効果を測る」—— 検定・信頼区間・F 分布が全部ここに合流する。統計の道具箱の集大成へ。

You can now test for differences and independence. Next: finding relationships and predicting.
Correlation measures the "link" between two variables, then simple regression turns it into prediction. Then multiple regression controls for confounders to measure true effects — tests, CIs, and the F-distribution all converge here. The full statistical toolkit comes together.

モデリングMODELING

関係を見つけ、予測する

Modeling — finding relationships and making predictions

M0 / 相関係数

相関係数 — 2変数の「つながり」を測る

Correlation — Measuring the Link Between Two Variables

カイ二乗検定は「カテゴリ同士の関連」を数値化した。でも「身長と体重」「勉強時間とテストの点」のように連続な数値どうしの関係はどう測る? → 相関係数 r が「一緒に動く度合い」を −1 〜 +1 の1つの数字にまとめてくれる。
The chi-squared test quantified associations between categories. But how do we measure the relationship between continuous numbers — height vs. weight, study time vs. test scores? → The correlation coefficient r compresses "how much they move together" into a single number from −1 to +1.

2つの変数が「一緒に動くかどうか」を測るのが相関係数 r。 +1 なら完全な正の直線関係、−1 なら完全な負の直線関係、0 なら直線的な関係がない。 キャンバスをクリックすると点が追加され、r がリアルタイムで変わる。 黄色い破線が平均線で、4つの象限に分かれる——緑の象限に点が多いほど正の相関、赤の象限に多いほど負の相関。 この色分けが、公式 Σ(x−x̄)(y−ȳ) の「符号の綱引き」そのもの。

The correlation coefficient r measures whether two variables move together. +1 means a perfect positive linear relationship, −1 a perfect negative one, 0 means no linear relationship. Click the canvas to add points and watch r update in real time. The yellow dashed lines mark the means, splitting the space into four quadrants — more points in green quadrants means positive correlation, more in red means negative. This coloring is the "tug-of-war of signs" in the formula Σ(x−x̄)(y−ȳ).

実験ガイド — 相関係数を体感する
  1. Step 1: r = 0.80 で「生成」→ 右上がりの帯。緑の象限に点が集中している。
  2. Step 2: r = −0.60 に変えて「生成」→ 右下がり。赤の象限に点が多い。
  3. Step 3: r = 0.00 で「生成」→ 四象限にほぼ均等に散らばる。帯ではなく「雲」。
  4. Step 4: CLEAR して、U字型に手で点を配置 → r ≈ 0 なのに明らかに関係がある! → r は「直線関係」しか捉えられない。
Experiment Guide — Feel the Correlation
  1. Step 1: Set r = 0.80, click Generate → an upward-sloping band. Points cluster in the green quadrants.
  2. Step 2: Change to r = −0.60, Generate → downward slope. More points in the red quadrants.
  3. Step 3: Set r = 0.00, Generate → points spread evenly across all four quadrants. A "cloud," not a band.
  4. Step 4: CLEAR, then manually place a U-shape → r ≈ 0 yet there's an obvious pattern! r only captures linear relationships.
↑ キャンバスをクリックで点を追加↑ Click canvas to add points
n0
相関係数 rCorrelation r
共分散 CovCovariance
実験ガイド — 数字の裏をのぞく
  1. Step 1: アニメーションを見る。点が順に現れて、パターンが全然違うのに…
  2. Step 2: 各プロットの r ≈ 0.816 を確認。全部ほぼ同じ!
  3. Step 3: 回帰直線が出現 → 直線もほぼ同じ。でも II は曲線、III は外れ値、IV は1点が支配。
  4. Step 4: 「再生」で何度でも見直せる。数字だけでは見えないものがある。
Experiment Guide — Peek Behind the Numbers
  1. Step 1: Watch the animation. Points appear one by one, patterns look totally different…
  2. Step 2: Check each plot's r ≈ 0.816. They're all nearly identical!
  3. Step 3: Regression lines appear → lines are nearly identical too. Yet II is curved, III has an outlier, IV is dominated by one point.
  4. Step 4: Click "Replay" to watch again. Numbers alone don't tell the whole story.

▶ r の落とし穴 — アンスコムの例▶ The pitfall of r — Anscombe's Quartet

次は —関係を「予測」に変える M1 単回帰分析
UP NEXT —turning relationships into predictions M1 Simple Regression
M1 / 単回帰分析

単回帰分析 — 最小二乗法で線を引く

Simple Regression — Drawing the OLS Line

相関係数で「つながりの強さ」は測れた。次は「x が 1 増えたら y はどれだけ動く?」——関係を予測に変えるのが単回帰。2 変数に直線を 1 本引くだけ——でも、その傾き β̂ の背後にはさっきまでやった t 検定・信頼区間 がしっかり効いている。
Correlation measured "how strong the link is." Next: "if x goes up by 1, how much does y move?" — simple regression turns the relationship into prediction. One line through two variables — and the t-tests and CIs you just learned power the inference on its slope β̂.

説明変数が1つだけの回帰が単回帰。x が1増えると y は β₁ だけ動く、という線形関係を仮定する。 最小二乗法は、全ての点との縦方向の差(残差)の二乗和を最小化する直線を選ぶ方法。 キャンバスをクリックすると点が追加され、回帰直線が"ぴろん"と動く。 緑のバーが残差。R² は「どれだけ直線で説明できたか」の指標(0〜1)。

Regression with just one explanatory variable is simple regression. It assumes a linear relationship: when x increases by 1, y moves by β₁. Ordinary least squares (OLS) picks the line that minimizes the sum of squared vertical residuals. Click the canvas to add points and watch the line snap into place. Green bars are residuals. R² (in 0–1) measures how much of y the line explains.

実験ガイド — 順番に試してみよう
  1. Step 1: 「ランダム20点」を押す → 回帰直線と R² が出る。緑のバー(残差)の大きさを見る。
  2. Step 2: 直線から遠い場所にクリックで 外れ値を1つ追加 → 直線がグイッと引っ張られる。外れ値の影響力。
  3. Step 3: CLEAR して、ほぼ一直線に 5点 だけ打つ → R²≈1.0。完全な線形関係。
  4. Step 4: CLEAR して、丸く(円形に)点を配置 → R²≈0。直線では捉えられない関係。
Experiment Guide — try these in order
  1. Step 1: Hit "Random 20 pts" → a regression line and R² appear. Check the green bars (residuals).
  2. Step 2: Click far from the line to add one outlier → the line jerks toward it. Watch how far a single point can drag the fit.
  3. Step 3: CLEAR and place 5 points nearly in a line → R² ≈ 1.0. A perfect linear relationship.
  4. Step 4: CLEAR and arrange points in a circle → R² ≈ 0. A line can't capture this pattern.
↑ キャンバスをクリックして点追加↑ Click the canvas to add points
n0
傾き β₁Slope β₁
切片 β₀Intercept β₀
相関係数 rCorrelation r
次は —他の影響を取り除く M2 重回帰分析
UP NEXT —controlling for everything else M2 Multiple Regression
M2 / 重回帰分析

重回帰分析 — 複数の変数で予測する

Multiple Regression — Predict with multiple variables

単回帰では「勉強時間だけ」で成績を予測した。でも待って——たくさん勉強する人ほど睡眠を削っているとしたら? 睡眠不足が成績を下げる分、勉強の本当の効果が隠れてしまう重回帰は「他の要因をコントロールして、各変数の本当の効果を取り出す」道具だ。
Simple regression predicted scores from study hours alone. But what if heavy studiers sleep less — and lost sleep drags scores down? The true effect of studying gets masked by a hidden variable. Multiple regression controls for other factors to isolate each variable's real contribution.

変数が1つなら直線、2つなら3D空間の平面。 でも大事なのは幾何ではなく「なぜ変数を加えるのか」——交絡(隠れた変数の影響)を取り除いて、各変数の純粋な効果を見るためだ。 まず左右の比較パネルで「β₁が変わる瞬間」を体感しよう。

One variable gives a line; two give a plane in 3D. But the point isn't geometry — it's removing confounding to isolate each variable's true effect. Start with the side-by-side comparison to see the moment β₁ shifts.

実験ガイド — 交絡を体感する
  1. Step 1: デフォルト(相関 = −0.5)で左右のβ₁を見比べる。単回帰のほうが小さい——勉強の効果が過小評価されている。
  2. Step 2: 相関スライダーを0にする → 左右のβ₁がほぼ同じに。「交絡がなければ差は出ない」。
  3. Step 3: 相関を+0.5にする → 今度は単回帰のβ₁が大きすぎる。交絡の方向で過小にも過大にもなる。
  4. Step 4: R²の変化も確認。重回帰は常に単回帰以上——変数を加えて説明力が上がった。
Experiment Guide — Feel Confounding
  1. Step 1: At default (corr = −0.5), compare β₁ left vs. right. Simple regression is smaller — the study effect is underestimated.
  2. Step 2: Set correlation to 0 → both β₁ values nearly match. "No confounding, no bias."
  3. Step 3: Set correlation to +0.5 → now simple regression β₁ is too large. Confounding can bias in either direction.
  4. Step 4: Check R² too. Multiple regression is always ≥ simple — adding a variable improved explanatory power.

▶ 単回帰 vs 重回帰 — β₁が変わる瞬間

▶ Simple vs. Multiple Regression — Watch β₁ Shift

同じデータで「勉強時間だけ」と「勉強+睡眠」で回帰する。相関スライダーで交絡の強さを変えてみよう。 Same data, two models: "study hours only" vs. "study + sleep." Adjust the correlation slider to change confounding strength.
単回帰 β₁Simple β₁
重回帰 β₁Multiple β₁
差(交絡による歪み)Gap (confounding bias)
単回帰 R²Simple R²
重回帰 R²Multiple R²
実験ガイド — 3Dで回帰平面を体感する
  1. Step 1: 3Dグラフをドラッグして回転。半透明の面が回帰平面——データ点がこの面に沿って並んでいる。
  2. Step 2: 勉強時間のスライダーを動かす → 予測点が平面の「x₁方向」に移動。傾き = β₁。
  3. Step 3: 睡眠時間も動かす → 「x₂方向」に移動。傾き = β₂。2つの変数それぞれの貢献が見える。
  4. Step 4: 再サンプリングを数回押す → β₁, β₂, R²が毎回少し変わる。推定値にも「ばらつき」がある。
Experiment Guide — Feel the Regression Plane in 3D
  1. Step 1: Drag the 3D plot to rotate. The translucent surface is the regression plane — data points align along it.
  2. Step 2: Move the study slider → the prediction dot slides along the x₁ direction. The tilt = β₁.
  3. Step 3: Move sleep too → it moves along x₂. The tilt = β₂. Each variable's contribution is visible.
  4. Step 4: Hit Resample a few times → β₁, β₂, R² shift slightly each time. Estimates have variability too.
β̂₁(勉強1hあたり)β̂₁ (per study hour)
β̂₂(睡眠1hあたり)β̂₂ (per sleep hour)

▼ ここまでの全体像

▼ The Big Picture

標準正規から始まり、確率→分布→推測統計→回帰モデルと、入門統計学の主要トピックを一気通貫で体験した。
すべてのページは標準正規分布 N(0,1) から派生している—— t 分布は「σ を知らない正規」、χ² は「正規の二乗和」、F は「χ² の比」、回帰の検定は t と F。 各トピックの個別ページで数式や詳細な解説をさらに深掘りできる。

From the standard normal through probability, distributions, inference, and regression — the core scope of introductory statistics, end to end.
Every page is a descendant of N(0,1): t = "normal with unknown σ," χ² = "sum of squared normals," F = "ratio of χ²'s," regression tests use t and F. Dive deeper into each topic's dedicated page for formulas and detailed explanations.