0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

統計学検定2級問題演習メモ

Last updated at Posted at 2025-05-28

2017

相対度数とは、各階級の度数を全体の度数で割ったものです。
Relative frequency is the ratio of the frequency of a class to the total number of observations.

計算式 / Formula:

$$
\text{相対度数} = \frac{\text{階級の度数}}{\text{全体の度数}}
\quad
\text{Relative Frequency} = \frac{\text{Class Frequency}}{\text{Total Frequency}}
$$

Python例 / Python Example:

import pandas as pd

data = pd.Series([65, 70, 85, 90, 90, 95, 100, 100, 100, 105])
freq_table = data.value_counts().sort_index()
rel_freq = freq_table / len(data)
print(rel_freq)

2. 階級と階級値の関係・グラフの読み方

Class Intervals, Midpoints, and Graph Reading

  • 階級 (class interval): 連続したデータ範囲(例: 70〜79)
    Class interval: A range of values (e.g., 70–79)

  • 階級値(中央値)(class midpoint): 各階級の上下の境界値の平均
    Class midpoint: The average of the lower and upper boundaries of the class

$$
\text{階級値} = \frac{\text{下限} + \text{上限}}{2}
\quad
\text{Midpoint} = \frac{\text{Lower Bound} + \text{Upper Bound}}{2}
$$

グラフの読み方 / Graph Interpretation

  • 縦軸は度数や相対度数を示す(棒の高さ)
    Y-axis shows frequency or relative frequency.
  • 横軸は階級や階級値を示す
    X-axis shows class intervals or midpoints.

3. 単回帰分析・切片・標準誤差・t値

Simple Linear Regression: Intercept, Standard Error, and t-Value

回帰式 / Regression Equation:

$$
Y = a + bX + \epsilon
\quad
Y: 目的変数 / Target variable
\quad
X: 説明変数 / Explanatory variable
\quad
a: 切片 / Intercept
\quad
b: 傾き / Slope
$$

t値 / t-Value:

$$
t = \frac{\text{回帰係数}}{\text{標準誤差}}
\quad
t = \frac{\text{Coefficient}}{\text{Standard Error}}
$$

Python例 / Python Example:

import statsmodels.api as sm

X = df[['X']]
X = sm.add_constant(X)  # 切片を追加 / Add intercept
model = sm.OLS(df['Y'], X).fit()
print(model.summary())

4. 変動係数の定義 / Definition of Coefficient of Variation (CV)

**変動係数(CV)**は、平均に対する標準偏差の比率です。
CV indicates how much variability exists relative to the mean.

計算式 / Formula:

$$
\text{CV} = \frac{\text{標準偏差}}{\text{平均}} \times 100%
\quad
CV = \frac{\text{Standard Deviation}}{\text{Mean}} \times 100%
$$

Python例 / Python Example:

cv = df['Variable'].std() / df['Variable'].mean()
print('Coefficient of Variation:', cv)

5. 中央値・平均・標準偏差の違い

Median, Mean, and Standard Deviation

用語 日本語の説明 英語の説明
平均 (Mean) 全データの平均値 Arithmetic average of the data
中央値 (Median) 並べた時の中央の値 Middle value when sorted
標準偏差 (Standard Deviation) 平均からのばらつき Spread of values from the mean

6. 箱ひげ図の見方 / How to Read a Box Plot

  • 箱 (Box): 第1四分位数 (Q1) ~ 第3四分位数 (Q3)
    The box shows the interquartile range (Q1 to Q3).

  • 線(ひげ)(Whiskers): 最小値と最大値(外れ値を除く)
    Whiskers extend to the minimum and maximum values, excluding outliers.

  • 線の中間 (Median line): 中央値を示す
    A line inside the box shows the median.

  • 点 (Outliers): 箱やひげから極端に離れた値
    Dots indicate outliers (extreme values outside 1.5×IQR).


コレログラムの読み方と正誤判断

Understanding Correlograms and Evaluating Statements


コレログラムとは

What is a Correlogram?

コレログラムは、時系列データの**自己相関係数(autocorrelation coefficient)**をラグ(遅れ)ごとに示したグラフです。
A correlogram is a graph that displays the autocorrelation coefficients of a time series at different time lags.

図中の点線は、「時系列が無相関である」という帰無仮説のもとでの5%有意水準の棄却限界値を示します。
The dashed lines in the graph represent the 5% significance level bounds under the null hypothesis that the series has no autocorrelation.


各記述の検討

Evaluation of Each Statement


Ⅰ:正しい / Correct

キャベツの価格における12か月後の相関は有意であり、ビールの価格は有意でない。
The autocorrelation at 12 months for cabbage prices is statistically significant, while for beer prices it is not.

  • キャベツの価格はラグ12で棄却限界値の外 → 有意な年周期の傾向がある
    Cabbage prices have significant autocorrelation at lag 12 → suggesting seasonal trend.
  • ビールの価格はラグ12で棄却限界値の内 → 有意性がない
    Beer prices fall within bounds → no significant yearly pattern.

✅ よって、この記述は正しい。
✅ Therefore, this statement is correct.


Ⅱ:正しい / Correct

ラグ1の自己相関係数が約0.5で、翌月の価格と相関している。
Lag-1 autocorrelation is about 0.5, meaning this month's price is correlated with next month's price.

  • ラグ1の自己相関係数 ≈ 0.5 かつ棄却限界値の外 → 有意な短期的連続性
    A lag-1 autocorrelation of around 0.5 beyond the bounds → statistically significant short-term dependence.

✅ したがって正しい。
✅ This interpretation is accurate.


Ⅲ:誤り / Incorrect

コレログラムは2系列間の相関を示すことができる。
The correlogram can show correlation between two different time series.

  • コレログラムは1系列の自己相関のみを対象とする
    Correlograms only show autocorrelation within a single series.
  • 複数の時系列間の相関(例:キャベツとビールの価格)を調べるには「交差相関(cross-correlation)」が必要
    To analyze relationships between two time series (e.g., cabbage and beer prices), cross-correlation is required.

❌ よって、この記述は誤り。
❌ Therefore, this statement is incorrect.


結論 / Conclusion

記述 / Statement 評価 / Judgment 理由 / Reason
I 正しい / Correct ラグ12で有意な自己相関あり(キャベツ)
II 正しい / Correct ラグ1での翌月との有意な自己相関あり
III 誤り / Incorrect コレログラムは2系列間の相関を扱えない

補足:交差相関との違い

Note: Difference from Cross-Correlation

指標 / Metric 対象 / Target 用途 / Use
自己相関(Autocorrelation) 1つの時系列内 / Within one series トレンド・周期性の確認 / Trend & seasonality
交差相関(Cross-correlation) 2つの時系列間 / Between two series 他系列との関係 / Lead-lag effects

🔢 ラスパイレス価格指数の定義 / Definition of Laspeyres Price Index

■ 数式 / Formula

$$
L_t = \frac{\sum_{i=1}^n p_{it} \cdot q_{i0}}{\sum_{i=1}^n p_{i0} \cdot q_{i0}} \times 100
$$

  • $p_{it}$:年$t$の財 $i$ の価格 / Price of good $i$ in year $t$
  • $p_{i0}$:基準年の財 $i$ の価格 / Price of good $i$ in base year
  • $q_{i0}$:基準年の財 $i$ の数量 / Quantity of good $i$ in base year

■ 意味 / Interpretation

  • ラスパイレス価格指数は、**基準年と同じ数量(購入量)**を比較年にも購入したと仮定したとき、どれだけ支出額が変化したかを示す指標です。
  • The Laspeyres Price Index measures the cost change of purchasing the same basket of goods as in the base year, but at the prices of the current year.

🧮 加重平均の形での表現 / Weighted Average Form

$$
L_t = \sum_{i=1}^n \left( \frac{p_{i0} \cdot q_{i0}}{\sum_{j=1}^n p_{j0} \cdot q_{j0}} \cdot \frac{p_{it}}{p_{i0}} \right) \times 100
$$

  • それぞれの財の基準年の支出割合を重みとし、**価格の変化率(比較年価格 ÷ 基準年価格)**をかけている
  • Each item’s expenditure share in the base year is used as a weight, and multiplied by its price ratio (current / base year)

📊 ダミーデータを用いた例 / Example Using Dummy Data

● 条件 / Data:

  • 基準年:2015年(Base Year: 2015)
  • 比較年:2016年(Comparison Year: 2016)
  • 財A: $p_{A,2015} = 340.73$, $p_{A,2016} = 340.03$, $q_{A,2015} = 6200$
  • 財B: $p_{B,2015} = 149.57$, $p_{B,2016} = 144.3$, $q_{B,2015} = 19865$

● 式 / Calculation:

$$
L_{2016} = \frac{340.03 \times 6200 + 144.3 \times 19865}{340.73 \times 6200 + 149.57 \times 19865} \times 100
$$


● 結果の意味 / Interpretation of Result:

  • 分子:2016年の価格で2015年と同じ数量を購入した場合の総支出額
    → Total expenditure in 2016 prices using 2015 quantities

  • 分母:2015年の価格での総支出額
    → Total expenditure in 2015 prices using 2015 quantities

  • この比率 ×100 がラスパイレス物価指数であり、100を基準に物価が上がったか下がったかを示します。
    → This ratio ×100 gives the Laspeyres Price Index, indicating whether prices increased or decreased relative to the base year.


✅ まとめ / Summary Table

用語 / Term 日本語説明 / Japanese 英語説明 / English
ラスパイレス指数 / Laspeyres Index 基準年の数量で支出を計算する物価指数 A price index using base year quantities
分子 / Numerator 比較年価格 × 基準年数量の合計 Sum of (current year price × base year qty)
分母 / Denominator 基準年価格 × 基準年数量の合計 Sum of (base year price × base year qty)
意味 / Meaning 物価がどれだけ上がったか(基準年比) Indicates how much prices have changed

🌐 抽出法に関する基本用語 / Sampling Methods – Key Terms

用語(日本語) 用語(英語) 定義・説明(日本語) Definition (English)
母集団 Population 調査対象となる全体(例:全国の世帯) The entire group being studied (e.g., all households in a country)
標本 Sample 調査のために選ばれた一部の要素 A subset of the population selected for the study
単純無作為抽出法 Simple random sampling 母集団から無作為に標本を抽出する方法 Each unit in the population has an equal chance of being selected
クラスター抽出法 Cluster sampling 母集団を集団に分けてから、いくつかのクラスターを無作為に選び、その中全てを調査 Randomly select groups (clusters) and survey all units within them
多段抽出法 Multistage sampling 複数段階にわけて標本を抽出する方法 Sampling is done in two or more stages (e.g., region → household)
層化抽出法 Stratified sampling 母集団を層(カテゴリ)に分け、それぞれから標本を抽出する方法 Divide the population into strata, then sample from each stratum
系統抽出法 Systematic sampling 母集団に順番をつけ、等間隔で抽出する方法 Select every k-th unit after a random starting point

🧪 実験 vs 観察研究の用語 / Experimental vs Observational Studies

用語(日本語) 用語(英語) 定義・説明(日本語) Definition (English)
実験研究 Experimental study 研究者が処置(介入)を無作為に割り当てる研究方法 The researcher randomly assigns treatments or interventions
観察研究 Observational study 介入なしで、自然な選択や行動を観察する研究 Observing subjects without manipulating variables
無作為割付 Random assignment 研究対象をランダムにグループ分けする手法 Assigning subjects randomly to treatment/control groups
処置(介入) Treatment (intervention) 被験者に与える影響のある要因(薬、行動など) An action or item administered to subjects to study its effect

🔍 問題設定 / Problem Setup (Pokémon Ver.)

日本語:
あるポケモンセンターAとBが、モンスターボールを生産しています。

  • センターAで作られる割合:60% → $P(A) = 0.6$
  • センターBで作られる割合:40% → $P(B) = 0.4$
  • センターAで不良ボールが出る確率:1% → $P(\text{Bad}|A) = 0.01$
  • センターBで不良ボールが出る確率:0.5% → $P(\text{Bad}|B) = 0.005$

販売後に不良ボールが見つかりました。それが「センターA」産である確率 $P(A|\text{Bad})$ を求めよ。


English:
Two Pokémon Centers, A and B, manufacture Poké Balls.

  • 60% of all Poké Balls are made at Center A: $P(A) = 0.6$
  • 40% are made at Center B: $P(B) = 0.4$
  • The probability a ball from A is defective: $P(\text{Bad}|A) = 0.01$
  • The probability a ball from B is defective: $P(\text{Bad}|B) = 0.005$

A defective Poké Ball was found. What is the probability that it was made at Center A?
That is: Find $P(A|\text{Bad})$.


📘 ベイズの定理 / Bayes' Theorem

$$
P(A|\text{Bad}) = \frac{P(\text{Bad}|A) \cdot P(A)}{P(\text{Bad})}
$$

分母:全体で不良品となる確率 $P(\text{Bad})$ を求める
Calculate the total probability of getting a defective ball:

$$
P(\text{Bad}) = P(\text{Bad}|A) \cdot P(A) + P(\text{Bad}|B) \cdot P(B)
= 0.01 \cdot 0.6 + 0.005 \cdot 0.4 = 0.006 + 0.002 = 0.008
$$


🧮 代入して計算 / Plug in and Calculate

$$
P(A|\text{Bad}) = \frac{0.01 \cdot 0.6}{0.008} = \frac{0.006}{0.008} = 0.75
$$


✅ 結論 / Final Answer

日本語:
見つかった不良品がポケモンセンターAで生産された確率は 0.75(=75%) です。

English:
The probability that the defective Poké Ball was made at Pokémon Center A is 0.75 (or 75%).


🧠 ポイントまとめ / Summary Points

用語 / Term 日本語の意味 / Japanese Meaning 英語定義 / English Definition
$P(A)$ Aで作られる確率 Probability that the ball is made at Center A
( P(\text{Bad} A) ) Aで作られたボールが不良品になる確率 Probability that a ball from A is defective
( P(A \text{Bad}) ) 不良品であるとき、それがAで作られた確率 Probability that a defective ball came from A
ベイズの定理 / Bayes' Theorem 事後確率を求める公式 A formula to update probability given new evidence

📌 1. 確率密度関数の定義 / Definition of a Probability Density Function

✅ 条件 / Conditions:

  • 非負性(Non-negativity):
    $f(x) \geq 0$ for all $x \in \mathbb{R}$

  • 全確率が1になること(Normalization):

    $$
    \int_{-\infty}^{\infty} f(x),dx = 1
    $$


🧮 2. 定数 $c$ の決定 / Determining Constant $c$

関数の定義 / Function:

$$
f(x) = c \cdot x(2 - x),\quad \text{defined on } x \in [0, 2]
$$

条件:

$$
\int_0^2 c \cdot x(2 - x),dx = 1
$$

計算 / Calculation:

$$
\int_0^2 x(2 - x),dx = \int_0^2 (2x - x^2),dx = [x^2 - \frac{1}{3}x^3]_0^2 = 4 - \frac{8}{3} = \frac{4}{3}
$$

$$
c \cdot \frac{4}{3} = 1 \Rightarrow c = \frac{3}{4}
$$


📊 3. 期待値 $E(X)$ / Expectation

$$
E(X) = \int_0^2 x \cdot f(x),dx = \int_0^2 x \cdot \frac{3}{4}x(2 - x),dx = \frac{3}{4} \int_0^2 x^2(2 - x),dx
$$

$$
= \frac{3}{4} \int_0^2 (2x^2 - x^3),dx = \frac{3}{4} \left[ \frac{2}{3}x^3 - \frac{1}{4}x^4 \right]_0^2
= \frac{3}{4} \left[ \frac{16}{3} - \frac{16}{4} \right] = \frac{3}{4} \cdot \left( \frac{16 - 12}{3} \right) = \frac{3}{4} \cdot \frac{4}{3} = 1
$$

✅ よって、$E(X) = 1$


📈 4. 分散 $V(X)$ / Variance

$$
E(X^2) = \int_0^2 x^2 \cdot f(x),dx = \int_0^2 x^2 \cdot \frac{3}{4}x(2 - x),dx = \frac{3}{4} \int_0^2 x^3(2 - x),dx
$$

$$
= \frac{3}{4} \int_0^2 (2x^3 - x^4),dx = \frac{3}{4} \left[ \frac{2}{4}x^4 - \frac{1}{5}x^5 \right]_0^2
= \frac{3}{4} \left( 8 - \frac{32}{5} \right) = \frac{3}{4} \cdot \frac{40 - 32}{5} = \frac{3}{4} \cdot \frac{8}{5} = \frac{6}{5}
$$

$$
V(X) = E(X^2) - (E(X))^2 = \frac{6}{5} - 1^2 = \frac{1}{5}
$$

✅ よって、分散 $V(X) = \frac{1}{5}$


🧾 結論 / Final Results Summary

指標 / Statistic 式 / Formula 値 / Value
定数 $c$ $\frac{3}{4}$ 0.75
期待値 $E(X)$ $\int x f(x),dx$ 1
二乗平均 $E(X^2)$ $\int x^2 f(x),dx$ $\frac{6}{5}$
分散 $V(X)$ $E(X^2) - (E(X))^2$ $\frac{1}{5}$

以下に、日本語と英語の併記で、カイ二乗分布・t分布・F分布・ポアソン分布に関する問題を用語・定義・背景と共に体系的に整理・解説します。


✅ 1. 確率変数 $Z_1, Z_2, ..., Z_n$ が $N(0,1)$ に独立に従うとき

日本語:

標準正規分布に従う確率変数 $Z_i$ を自乗して足し合わせた

$$
W = Z_1^2 + Z_2^2 + \cdots + Z_n^2
$$

自由度 $n$カイ二乗分布($\chi^2(n)$)に従う。

English:

If $Z_1, Z_2, ..., Z_n \sim N(0,1)$ independently, then

$$
W = \sum_{i=1}^{n} Z_i^2 \sim \chi^2(n)
$$


✅ 2. t分布と自由度 / t-distribution and Degrees of Freedom

日本語:

標準正規分布 $Z \sim N(0,1)$ と独立なカイ二乗分布 $W \sim \chi^2(n)$ に対し、

$$
T = \frac{Z}{\sqrt{W / n}}
$$

は自由度 $n$ の t分布に従う。

English:

If $Z \sim N(0,1)$ and $W \sim \chi^2(n)$, with $Z$ and $W$ independent, then

$$
T = \frac{Z}{\sqrt{W / n}} \sim t(n)
$$


✅ 3. F分布の定義 / Definition of F-distribution

日本語:

独立な2つのカイ二乗分布 $W_1 \sim \chi^2(m_1)$, $W_2 \sim \chi^2(m_2)$ に対し

$$
F = \frac{(W_1 / m_1)}{(W_2 / m_2)} \sim F(m_1, m_2)
$$

English:

Let $W_1 \sim \chi^2(m_1)$, $W_2 \sim \chi^2(m_2)$ be independent. Then

$$
F = \frac{W_1/m_1}{W_2/m_2} \sim F(m_1, m_2)
$$


✅ 4. 正規分布を用いた計算問題 / Normal Distribution Questions

仮定:
点数 $X \sim N(50, 10^2)$

(1) $P(X \geq 60)$

$$
Z = \frac{60 - 50}{10} = 1 \Rightarrow P(X \geq 60) = P(Z \geq 1) = 1 - 0.8413 = 0.1587
$$


(2) 5人中1人だけ60点以上

→ 二項分布 $B(n=5, p=0.1587)$ の確率

$$
P(\text{just one}) = \binom{5}{1} \cdot (0.1587)^1 \cdot (0.8413)^4 \approx 5 \cdot 0.1587 \cdot 0.5 \approx 0.397
$$


(3) 標本平均 $\bar{X} \geq 52$

$$
\bar{X} \sim N(50, (10^2)/5 = 20) \Rightarrow Z = \frac{52 - 50}{\sqrt{20}} \approx \frac{2}{4.47} \approx 0.45
\Rightarrow P(Z \geq 0.45) \approx 0.326
$$


✅ 5. ポアソン分布の例題 / Poisson Example (交通事故)

  • 年間件数:518件
  • 1日あたり平均:$\lambda = 518 / 365 \approx 1.418$

[1] 分散の推定値 / Variance estimate:

$$
\text{For Poisson: } E(X) = \text{Var}(X) = \hat{\lambda} = 1.418
$$


[2] 事故0件の確率

$$
P(X=0) = \frac{\lambda^0 e^{-\lambda}}{0!} = e^{-1.418} \approx 0.242
$$


📘 用語対訳まとめ / Key Statistical Terms

日本語 / Japanese 英語 / English
標準正規分布 Standard Normal Distribution
カイ二乗分布 Chi-square Distribution
t分布 Student's t-distribution
F分布 F-distribution
ポアソン分布 Poisson Distribution
自由度 Degrees of Freedom
確率密度関数 Probability Density Function
期待値・分散 Expectation / Variance
標本平均 Sample Mean

✅ (1) F統計量と自由度 / F-statistic and Degrees of Freedom

日本語:
F統計量の出力において自由度 (1, 199) の意味は以下の通り。

  • 1(分子の自由度):説明変数の数(log(販売価格))
  • 199(分母の自由度):標本数 $n = 201$ から、回帰係数の数(2つ:切片と傾き)を引いた値。

English:
In the F-statistic output, degrees of freedom (1, 199) indicate:

  • 1 (numerator): Number of explanatory variables (log(price))
  • 199 (denominator): $n = 201$ samples − 2 parameters (intercept and slope)

✅ (2) t検定の統計量 / t-statistic for hypothesis testing

前提 / Setup:

  • 推定された係数:$\hat{\beta} = -4.89615$
  • 標準誤差:$SE(\hat{\beta}) = 0.28922$
  • 帰無仮説:$\beta_0 = -1$

t統計量:

$$
t = \frac{\hat{\beta} - \beta_0}{SE(\hat{\beta})} = \frac{-4.89615 + 1}{0.28922} = \frac{-3.89615}{0.28922} \approx -13.47
$$

Interpretation(英語):
This large negative t-value suggests a significant difference from the hypothesized value.

日本語:
このt値は非常に大きく(絶対値で)、帰無仮説は強く棄却される。


✅ (3) 回帰式と傾きの解釈 / Regression Formula and Interpretation

回帰式 / Regression Equation:

$$
\log(\text{Sales}) = 7.92546 - 4.89615 \cdot \log(\text{Price})
$$

日本語での意味:

  • 販売価格が10倍になると、販売数量は $10^{-4.89615} $ 倍に減少。
  • log(price)が1増えると、log(sales)は約4.9減る → 売上が約 $e^{-4.9} $ 倍になる。

English Interpretation:

  • A 1-unit increase in log(price) decreases log(sales) by approximately 4.9.
  • That implies sales drop by about $e^{-4.9} \approx 0.0074$, or 0.74%.

✅ (4) 母比率の信頼区間 / Confidence Interval for Population Proportion

設定 / Setup:

  • 標本比率:$\hat{p} = 0.483$
  • 標本サイズ:$n = 1897$
  • 信頼係数(1.96 はおおよそ95%信頼区間に対応)

信頼区間:

$$
CI = \hat{p} \pm z \cdot \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} \
= 0.483 \pm 1.96 \cdot \sqrt{\frac{0.483 \cdot 0.517}{1897}} \approx [0.461, 0.505]
$$

日本語:
「非常に関心がある」と答えた割合の95%信頼区間は約$0.461, 0.505$である。

English:
The 95% confidence interval for the proportion is approximately $[0.461, 0.505]$.


✅ (5) 2つの母比率の差の検定 / Confidence Interval for Difference in Proportions

前提 / Setup:

  • 調査1:$p_1 = 0.483, n_1 = 1897$
  • 調査2:$p_2 = 0.416, n_2 = 1925$
  • 信頼係数:1.96(95%)

差の信頼区間:

$$
CI = (p_1 - p_2) \pm 1.96 \cdot \sqrt{\frac{p_1(1 - p_1)}{n_1} + \frac{p_2(1 - p_2)}{n_2}} \
= 0.067 \pm 1.96 \cdot \sqrt{\frac{0.483 \cdot 0.517}{1897} + \frac{0.416 \cdot 0.584}{1925}} \approx [0.036, 0.098]
$$

Interpretation(日本語):
信頼区間が0を含まないため、「非常に関心がある」と答える割合に統計的に有意な差がある。

Interpretation(英語):
Because the confidence interval does not include 0, the difference in proportions is statistically significant at the 5% level.


1. 仮説検定とP値 / Hypothesis Testing and P-value

✅ 用語定義 / Terminology

用語 日本語定義 英語定義
帰無仮説 H₀ 差がない・効果がないという仮説 Null hypothesis: no effect/difference
対立仮説 H₁ 差がある・効果があるという仮説 Alternative hypothesis: there is an effect
P値 (P-value) H₀のもとで観測統計量以上の極端な値が出る確率 Probability of observing a test statistic as extreme or more under H₀
有意水準 α H₀を誤って棄却する確率の許容上限 Significance level: threshold to reject H₀
検出力 (Power) H₁のもとで正しくH₀を棄却する確率 Probability of correctly rejecting H₀ under H₁

✅ 判断基準 / Decision Rule

  • P値 < α(例:0.05) → H₀を棄却する / Reject H₀
  • P値 ≥ α → H₀を棄却しない / Fail to reject H₀

2. 適合度検定 / Goodness-of-Fit Test

✅ 条件 / Setup

  • 観測度数:各カテゴリーの実データ
  • 期待度数:H₀に基づく理論的分布(例:多項分布)
  • 自由度:カテゴリ数 − 1(ただし母数推定時は −1 をさらに引く)

✅ カイ二乗統計量 / Chi-square statistic

$$
\chi^2 = \sum_{i=1}^{k} \frac{(O_i - E_i)^2}{E_i}
$$

  • $O_i$: 観測度数 / observed frequency
  • $E_i$: 期待度数 / expected frequency

✅ 判断 / Decision

  • χ²が臨界値より大きい → H₀を棄却する
  • 臨界値はχ²分布の上側点(例:自由度2の5%点 ≈ 5.99)

3. 分散分析 (一元配置) / One-Way ANOVA

✅ 帰無仮説 / Null Hypothesis

  • 全グループの母平均は等しい

    $H_0: \mu_1 = \mu_2 = \cdots = \mu_k$

✅ F統計量 / F-statistic

$$
F = \frac{\text{水準間平方和 (SSB) / 自由度 (k - 1)}}{\text{残差平方和 (SSE) / 自由度 (n - k)}}
$$

  • 水準間平方和 = 群ごとの平均との差の2乗和
  • 残差平方和 = 群内のばらつきの2乗和

✅ 判断 / Decision

  • F > 臨界値 → H₀を棄却する
  • 自由度(k−1, n−k)のF分布を使う(例:自由度(5, 77))

4. 信頼区間と群間差検定 / Confidence Interval & Proportion Difference Test

✅ 母比率の信頼区間 / CI for Population Proportion

$$
\hat{p} \pm z_{\alpha/2} \cdot \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}
$$

✅ 2群の母比率差の信頼区間 / CI for Difference in Proportions

$$
(p_1 - p_2) \pm z_{\alpha/2} \cdot \sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}}
$$

  • 0を含まない → 群間で有意差あり

5. F分布と近似法 / F-distribution and Approximation

  • F(k, ∞)分布 ≈ χ²(k)/k に近似可能
  • 自由度大きいとき、F分布の臨界値はχ²分布から算出可能

補足例:F統計量の近似計算

✅ 例:自由度 (5,77) の上側1%点

$$
\text{χ²}{0.01}(5) ≈ 15.09 ⇒ F{0.01}(5, ∞) ≈ \frac{15.09}{5} ≈ 3.02
$$

F値がこの値より大きければ帰無仮説を棄却できる。

📊 箱ひげ図の読解 / Reading Boxplots

✅ 五数要約 / Five-number summary

  • 最小値 (minimum)
  • 第1四分位数 Q1 (1st quartile)
  • 中央値 Median (Q2)
  • 第3四分位数 Q3 (3rd quartile)
  • 最大値 (maximum)

✅ 判定の観点 / Interpretation Points

  • 中央値の比較 → データの中心の違い
  • 範囲(最大−最小) → 散らばりの大きさ
  • 四分位範囲(IQR) → 箱の幅=Q3−Q1
  • 外れ値の有無 → 箱ひげから外れた点

✅ 英語説明 / English Summary

A boxplot displays the five-number summary: minimum, Q1, median, Q3, and maximum. From the boxplot, we can compare distributions, detect skewness, and identify outliers.


📈 累積度数・中央値 / Cumulative Frequency and Median

✅ 中央値の位置判定 / Finding the Median Class

  • 累積度数 (Cumulative frequency) を利用して、全体の半数を超える最初の階級が中央値階級

The median class is the interval where the cumulative frequency first exceeds half the total frequency.


📉 相対度数とヒストグラムの判別 / Relative Frequency and Histogram

  • 階級幅一定なら度数比較で良い
  • グラフの形・棒の高さ・最大値から系列を識別

Histograms can be used to identify datasets by comparing heights of bars and their distribution patterns.


⏳ 時系列と自己相関 / Time Series and Autocorrelation

✅ 用語と定義 / Terminology

用語 説明(日本語) 説明(英語)
ラグ (Lag) 時系列の遅れ単位 Time delay between observations
自己相関係数 (ACF) 同一系列内での相関 Correlation of a time series with its lagged values
コレログラム (Correlogram) 自己相関のグラフ Plot of ACF against lags
トレンド成分 長期的傾向 Long-term trend component
季節変動 (Seasonality) 周期的な変動 Regular periodic fluctuations

✅ 観察ポイント / What to look for

  • 自己相関が徐々に減衰 → トレンドあり
  • 交互に正負に振れる → サイクルあり(周期性)

📐 相関と回帰の基本 / Correlation and Regression

✅ 相関係数 (r)

  • 値域:−1 ~ +1
  • r ≈ −1 → 負の強い相関(ほぼ直線的)
  • r ≈ 0 → 相関なし
  • r ≈ +1 → 正の強い相関

Correlation measures the strength and direction of a linear relationship between two variables.

✅ 回帰直線の特徴 / Properties of Regression Line

  • 回帰直線は重心(平均x, 平均y)を必ず通る
  • 残差(観測値 − 予測値)の和は常に0

🧠 まとめ / Summary Table

項目 日本語解説 English Description
箱ひげ図 中央値・分布の広がりが可視化できる Visualizes median and spread
累積度数 階級の累積で中央値階級を特定 Used to find the median class
相対度数 各階級の割合で特徴づける Shows proportion in each class
時系列 トレンドや季節変動を持つデータ Data with trend and seasonality
相関・回帰 数値間の直線関係性を測定・予測 Measures and predicts linear relationships

✅ 回帰分析とt検定に関する用語・数式まとめ(日本語・英語)

1. 単回帰モデル / Simple Linear Regression Model

数式 / Formula:

$$
Y = \beta_0 + \beta_1 X + \varepsilon
$$

  • $Y$: 目的変数(従属変数) / Dependent variable
  • $X$: 説明変数(独立変数) / Independent variable
  • $\beta_0$: 切片(intercept)
  • $\beta_1$: 傾き(slope / regression coefficient)
  • $\varepsilon$: 誤差項 / Error term

2. 最小二乗法(OLS)による推定 / Ordinary Least Squares Estimation

推定式 / Estimators:

$$
\hat{\beta}_1 = \frac{\sum (X_i - \bar{X})(Y_i - \bar{Y})}{\sum (X_i - \bar{X})^2}
\quad , \quad
\hat{\beta}_0 = \bar{Y} - \hat{\beta}_1 \bar{X}
$$

  • $\hat{\beta}_1$: 傾きの推定値 / Estimated slope
  • $\hat{\beta}_0$: 切片の推定値 / Estimated intercept

3. 残差と残差平方和 / Residuals and RSS

数式 / Formula:

$$
e_i = Y_i - \hat{Y}_i = Y_i - (\hat{\beta}_0 + \hat{\beta}_1 X_i)
\quad , \quad
\text{RSS} = \sum e_i^2
$$

  • $e_i$: 各データ点の残差 / Residual
  • RSS (Residual Sum of Squares): 残差平方和

4. 分散の推定と標準誤差 / Variance and Standard Error

分散の推定 / Variance of Residuals:

$$
\hat{\sigma}^2 = \frac{\text{RSS}}{n - 2}
$$

  • $n - 2$: 自由度 / Degrees of freedom (n observations, 2 parameters)

標準誤差(傾きの) / Standard Error of $\hat{\beta}_1$:

$$
SE(\hat{\beta}_1) = \sqrt{\frac{\hat{\sigma}^2}{\sum (X_i - \bar{X})^2}}
$$


5. t検定統計量 / t-statistic for Hypothesis Testing

帰無仮説 / Null Hypothesis:

$$
H_0: \beta_1 = \beta_{1,0}
\quad , \quad
H_1: \beta_1 \neq \beta_{1,0}
$$

検定統計量 / t-statistic:

$$
t = \frac{\hat{\beta}1 - \beta{1,0}}{SE(\hat{\beta}_1)}
\quad \text{(自由度 df = n - 2)}
$$

  • このt値はt分布に従う / This t-value follows a t-distribution under $H_0$

6. 決定係数 $R^2$ / Coefficient of Determination

$$
R^2 = 1 - \frac{\text{RSS}}{\text{TSS}} = \frac{\text{ESS}}{\text{TSS}}
$$

  • TSS (Total Sum of Squares): $\sum (Y_i - \bar{Y})^2$
  • ESS (Explained Sum of Squares): $\sum (\hat{Y}_i - \bar{Y})^2$
  • RSS: $\sum (Y_i - \hat{Y}_i)^2$

7. 回帰分析における仮定(Gauss-Markov条件) / Assumptions

日本語 英語
線形性 Linearity
誤差の平均が0 Zero-mean error
分散の一定性 Homoscedasticity
誤差の独立性 Independence
説明変数の非確率性 Fixed X (non-stochastic)

8. 英和用語一覧(索引)

日本語 英語
回帰係数 Regression coefficient
残差平方和 Residual sum of squares (RSS)
総平方和 Total sum of squares (TSS)
説明変数 Independent variable
従属変数 Dependent variable
標準誤差 Standard error
自由度 Degrees of freedom
決定係数 Coefficient of determination ($R^2$)
t検定 t-test
帰無仮説 Null hypothesis
対立仮説 Alternative hypothesis

1. コインの重さ推定と分散計算 / Estimation and Variance of Coin Weights

状況:

  • コインAとBの重さを $X = a + b + \varepsilon_1$, $Y = a - b + \varepsilon_2$ と2回の測定で取得
  • 誤差 $\varepsilon_1, \varepsilon_2 \sim N(0, \sigma^2)$, 相互に独立

推定式 / Estimators:

$$
\hat{a} = \frac{X + Y}{2} = a + \frac{\varepsilon_1 + \varepsilon_2}{2}
\quad , \quad
\hat{b} = \frac{X - Y}{2} = b + \frac{\varepsilon_1 - \varepsilon_2}{2}
$$

分散の導出 / Variance:

$$
\text{Var}(\hat{a}) = \text{Var}\left(\frac{\varepsilon_1 + \varepsilon_2}{2}\right)
= \frac{1}{4}(\sigma^2 + \sigma^2) = \frac{\sigma^2}{2}
$$

$$
\text{Var}(\hat{b}) = \text{Var}\left(\frac{\varepsilon_1 - \varepsilon_2}{2}\right)
= \frac{1}{4}(\sigma^2 + \sigma^2) = \frac{\sigma^2}{2}
$$

  • よって、2回測定で2つの変数の推定が可能で、それぞれの推定量の分散は $\sigma^2/2$
  • 通常の一回ずつの測定では分散は $\sigma^2$ → 精度が向上

2. 条件付き確率(ベイズの定理)

問題概要:

  • 漁港Xの仕入確率:0.4
  • 漁港Xで規格外となる確率:0.1
  • 規格外全体の確率を求め、そのうちXである確率を計算

ベイズの定理 / Bayes' Theorem:

$$
P(X|D) = \frac{P(D|X) \cdot P(X)}{P(D)}
$$

全体の規格外確率 / Marginal Probability:

$$
P(D) = 0.4 \times 0.1 + 0.3 \times 0.05 + 0.3 \times 0.02 = 0.061
$$

条件付き確率(X産である確率):

$$
P(X|D) = \frac{0.4 \times 0.1}{0.061} \approx 0.66
$$


3. 勝敗の確率(二項分布・試合終了確率)

問題概要:

名人Aが勝つ確率 $p = 0.7$、挑戦者Bが勝つ確率 $q = 0.3$

第5局で終了し、Aが勝利 / Finish at game 5 with A's win:

$$
\binom{4}{3} \cdot (0.7)^3 \cdot (0.3)^1 \cdot 0.7 = 4 \cdot 0.343 \cdot 0.3 \cdot 0.7 \approx 0.28812
$$

第7局で終了(3勝3敗で第7局):

$$
\binom{6}{3} \cdot (0.7)^3 \cdot (0.3)^3 = 20 \cdot 0.343 \cdot 0.027 \approx 0.18522
$$


まとめ / Summary

項目 数式 解釈
Bの重さの推定量 $\hat{b} = \frac{X - Y}{2}$ 2回の計測で推定可能
分散 $\frac{\sigma^2}{2}$ 個別測定よりも精度が良い
規格外全体 $P(D) = 0.061$ 全体の規格外発生率
条件付き確率 (P(X D) \approx 0.66) ベイズの定理適用
試合5局終了 約0.28812 3勝+最後勝利の確率
試合7局終了 約0.18522 3勝3敗から決着の確率

t検定・相関係数・二変量正規分布・カイ二乗分布:数式と解説(日本語・英語)


1. t検定に使う基本式 / Basic formula for t-test

(1) 単回帰分析での係数検定 / t-test for regression coefficient

$$
t = \frac{\hat{\beta} - \beta_0}{\text{SE}(\hat{\beta})}
$$

  • $\hat{\beta}$:推定された回帰係数 / Estimated regression coefficient
  • $\beta_0$:帰無仮説の下の係数値 / Hypothesized coefficient under $H_0$
  • $\text{SE}(\hat{\beta})$:標準誤差 / Standard error
  • $t$ は自由度 $n - k$ の t分布に従う / $t$ follows a t-distribution with $n - k$ degrees of freedom

2. 相関係数の導出と分散・共分散の式 / Covariance and Correlation

(2) 独立な確率変数 X, Y から導く和と差の分散 / Variance of sum and difference

  • $U = X + Y$, $V = X - Y$ のとき:

$$
\begin{aligned}
\operatorname{Var}(U) &= \operatorname{Var}(X) + \operatorname{Var}(Y) = \sigma_1^2 + \sigma_2^2 \
\operatorname{Var}(V) &= \operatorname{Var}(X) + \operatorname{Var}(Y) = \sigma_1^2 + \sigma_2^2 \
\operatorname{Cov}(U, V) &= \operatorname{Cov}(X + Y, X - Y) = \sigma_1^2 - \sigma_2^2
\end{aligned}
$$

(3) 相関係数の式 / Correlation coefficient

$$
\rho_{UV} = \frac{\operatorname{Cov}(U, V)}{\sqrt{\operatorname{Var}(U)\operatorname{Var}(V)}} = \frac{\sigma_1^2 - \sigma_2^2}{\sigma_1^2 + \sigma_2^2}
$$

  • 相関係数が0となる条件:$\sigma_1^2 = \sigma_2^2$
  • このとき、UとVは独立

3. 二変量正規分布 / Bivariate Normal Distribution

  • 確率変数 $X \sim N(0, \sigma_1^2)$, $Y \sim N(0, \sigma_2^2)$, 独立と仮定
  • 線形変換 $U = X + Y$, $V = X - Y$ により、$U$ と $V$ も正規分布に従う
  • 相関係数 $\rho_{UV} = 0$ のとき、$U$ と $V$ は独立になる

4. カイ二乗分布と検定 / Chi-square distribution

(4) 基本式 / Basic

  • 自由度 $k$ のカイ二乗分布:$W \sim \chi^2_k$
  • 標準正規変数 $Z \sim N(0, 1)$ に対し、$Z^2 \sim \chi^2_1$

(5) 上側5%点 / Upper 5% critical point

  • $P(\chi^2_k \geq c) = 0.05$
  • 例えば:自由度1の場合 $c = 3.84$

5. χ²分布の閾値から必要な自由度を導出 / Critical value and degrees of freedom

  • 不等式 $2n > \chi^2_{0.05}(n)$ を満たす最小の $n$ を探す
  • 表から逆算して判定する(例:$n = 8$ のとき $\chi^2_{0.05}(8) = 15.51$)

まとめ / Summary

用語 / Term 数式 / Formula 説明 / Description
t検定統計量 $t = \frac{\hat{\beta} - \beta_0}{\text{SE}(\hat{\beta})}$ 回帰係数の検定に使う
分散(和) $\operatorname{Var}(X+Y) = \sigma_1^2 + \sigma_2^2$ 独立なら加法性が成り立つ
共分散 $\operatorname{Cov}(X+Y, X-Y) = \sigma_1^2 - \sigma_2^2$ 和と差の共分散
相関係数 $\rho = \frac{\sigma_1^2 - \sigma_2^2}{\sigma_1^2 + \sigma_2^2}$ 分散が等しければ0
カイ二乗検定点 $P(W \geq c) = \alpha$ 片側検定の閾値として使用

1. カイ二乗(χ²)検定の上側5%点と自由度の関係 / Chi-square critical values and degrees of freedom

カイ二乗分布の上側5%点(有意水準5%) / Upper 5% critical value of χ²-distribution

自由度 df 上側5%点 χ²(0.05, df)
1 3.84
2 5.99
3 7.81
4 9.49
5 11.07
6 12.59
7 14.07
8 15.51
9 16.92

式の例:

2n > χ²(0.05, n) を満たす最小のnを探すとき
例)2n > 15.51 → n > 7.75 → n = 8 が最小


2. 相対誤差による標本サイズの推定 / Sample size estimation using relative error

基本式(正規近似)/ Basic Formula (Normal Approximation):

$$
P\left( \left| \frac{\overline{X} - \mu}{SE} \right| \leq z \right) = 1 - \alpha
$$

ここで:

  • $\overline{X}$:標本平均 / Sample mean
  • $\mu$:母平均 / Population mean
  • $SE = \frac{\sigma}{\sqrt{n}}$:標準誤差 / Standard Error
  • $z$:信頼係数 / z-value from standard normal distribution

相対誤差 $r = 0.05$, 変動係数 $CV = \frac{\sigma}{\mu} = 0.4$, 信頼係数 $z = 2$(95%近似)

$$
\frac{r}{CV} \cdot \sqrt{n} = z
\Rightarrow \sqrt{n} = \frac{z \cdot CV}{r}
\Rightarrow n = \left( \frac{2 \cdot 0.4}{0.05} \right)^2 = 256
$$

よって、最小の整数として必要な標本サイズは
n = 260


3. 有限母集団補正を含めた標本サイズの推定 / Finite population correction (FPC)

$$
SE = \frac{\sigma}{\sqrt{n}} \cdot \sqrt{\frac{N - n}{N - 1}}
$$

このときの必要標本サイズ $n$ は、以下の式から数値解する:

$$
\frac{r}{CV} \cdot \sqrt{n} \cdot \sqrt{\frac{N - n}{N - 1}} = z
$$

例:母集団 $N = 5000$、上と同様の設定で数値的に解いて

→ 必要な標本サイズは n ≈ 234〜244


4. 信頼区間の幅と標本サイズの関係 / Confidence interval width and sample size

標本数 $n$ が大きいほど:

  • 信頼区間は狭くなる / CI becomes narrower
  • 標準誤差は小さくなる / SE decreases

標本平均の信頼区間(90%) / 90% Confidence Interval:

$$
\overline{X} \pm z_{0.95} \cdot \frac{s}{\sqrt{n}}, \quad z_{0.95} = 1.645
$$


5. 分散分析 (ANOVA) の自由度と分散比 F / Degrees of freedom and F-statistic

  • 群間自由度:水準数 − 1(例:4群 → df = 3)
  • 群内自由度:全体のサンプル数 − 群数(例:n=20, 群数=4 → df = 16)

平均平方 / Mean Square:

$$
\text{MS}{\text{between}} = \frac{\text{SS}{\text{between}}}{df_{\text{between}}}, \quad \text{MS}{\text{within}} = \frac{\text{SS}{\text{within}}}{df_{\text{within}}}
$$

F値 / F-value:

$$
F = \frac{\text{MS}{\text{between}}}{\text{MS}{\text{within}}}
$$

→ このFが自由度(df1, df2)のF分布に従う。
→ p値と比較し、有意か判断


まとめ / Summary Table

項目 数式・内容 英語訳
相対誤差と標本数 $n = \left( \frac{z \cdot CV}{r} \right)^2$ Sample size from relative error
有限母集団補正 $SE = \frac{\sigma}{\sqrt{n}} \cdot \sqrt{\frac{N - n}{N - 1}}$ Finite Population Correction
信頼区間 $\overline{X} \pm z \cdot \frac{s}{\sqrt{n}}$ Confidence Interval
カイ二乗上側5%点 自由度ごとに表を参照 Upper 5% critical value of χ²
分散分析のF統計量 $F = \frac{MS_{between}}{MS_{within}}$ F-statistic in ANOVA

t検定と回帰分析の数式・用語集(t-tests and Regression Analysis: Terms and Equations)

1. 基本用語 / Basic Terminology

  • 母平均 (Population Mean): μ

  • 標本平均 (Sample Mean): $\bar{x}$

  • 母標準偏差 (Population Standard Deviation): σ

  • 標本標準偏差 (Sample Standard Deviation): s

  • 標準誤差 (Standard Error):

    $$
    SE = \frac{s}{\sqrt{n}}
    $$

2. t検定 / t-Test

(a) 単一標本のt検定 / One-sample t-test

  • 帰無仮説: $H_0: \mu = \mu_0$

  • t統計量:

    $$
    t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}
    $$

  • 自由度 (Degrees of Freedom): $df = n - 1$

(b) 対応のあるt検定 / Paired t-test

  • t統計量:

    $$
    t = \frac{\bar{d}}{s_d / \sqrt{n}}
    $$

  • $\bar{d}$: 差の平均 / Mean of Differences

  • $s_d$: 差の標準偏差 / Std. Dev. of Differences

(c) 独立2標本のt検定 / Two-sample t-test (Equal Variance)

  • 帰無仮説: $H_0: \mu_1 = \mu_2$

  • プール分散:

    $$
    s_p^2 = \frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}
    $$

  • t統計量:

    $$
    t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_p^2(\frac{1}{n_1} + \frac{1}{n_2})}}
    $$

  • 自由度: $df = n_1 + n_2 - 2$

3. 回帰分析 / Linear Regression

(a) 単回帰 / Simple Linear Regression

  • 回帰式 (Regression Equation):

    $$
    y = \beta_0 + \beta_1 x + \varepsilon
    $$

  • 推定式:

    $$
    \hat{y} = b_0 + b_1 x
    $$

  • 回帰係数の推定値 (Estimated Coefficients):

    $$
    b_1 = \frac{\sum(x_i - \bar{x})(y_i - \bar{y})}{\sum(x_i - \bar{x})^2}
    $$

    $$
    b_0 = \bar{y} - b_1 \bar{x}
    $$

(b) 決定係数 (R-squared)

  • 説明変動 / 全変動:

    $$
    R^2 = \frac{SSR}{SST} = 1 - \frac{SSE}{SST}
    $$

  • SST (Total Sum of Squares): $\sum(y_i - \bar{y})^2$

  • SSR (Regression Sum of Squares): $\sum(\hat{y}_i - \bar{y})^2$

  • SSE (Error Sum of Squares): $\sum(y_i - \hat{y}_i)^2$

(c) 回帰係数のt検定

  • 帰無仮説: $H_0: \beta_j = 0$

  • t統計量:

    $$
    t = \frac{b_j}{SE(b_j)}
    $$

  • 自由度: $df = n - k - 1$

(d) F検定 (回帰全体の有意性)

  • F統計量:

    $$
    F = \frac{SSR/k}{SSE/(n-k-1)}
    $$

  • 自由度: $(k, n - k - 1)$


2016

統計的記述と分析の基本例題(Statistical Descriptions and Analytical Examples)

1. ヒストグラムの読み取り(Reading Histograms)

  • 日本語: ヒストグラムは変数の分布を視覚的に捉えるためのグラフであり、単峰性かつ右に裾が長い(右に歪んでいる)場合、最頻値<中央値<平均の関係が成立する。
  • English: A histogram helps visualize the distribution of data. When the distribution is unimodal and skewed to the right, the mode < median < mean typically holds.

2. 中央値と最頻値(Median and Mode)

  • 日本語: 中央値はデータを昇順に並べたときの中央の値であり、データ数が奇数のときは中央の1点、偶数のときは中央2点の平均となる。

  • English: The median is the middle value in a sorted dataset. If the number of data points is odd, it’s the center value; if even, it’s the average of the two central values.

  • 最頻値: 最も出現頻度の高い値(モード)で、相対度数が最大の階級の代表値とする場合が多い。

  • Mode: The most frequently occurring value, typically the representative value of the class with the highest relative frequency.

3. 累積相対度数(Cumulative Relative Frequency)

  • 日本語: 累積相対度数はある階級以下の相対度数の合計であり、中央値や四分位数を求めるのに使う。
  • English: Cumulative relative frequency is the running total of relative frequencies, useful for determining medians and quartiles.

4. 四分位範囲と分布の形状(Quartile Range and Distribution Shape)

  • 日本語: 第1四分位数(Q1)は累積相対度数25%の位置、第3四分位数(Q3)は75%の位置。Q3 - Q1が四分位範囲(IQR)。

  • English: The first quartile (Q1) is the data point at 25% cumulative frequency, and the third quartile (Q3) is at 75%. Their difference, Q3 - Q1, defines the interquartile range (IQR).

  • 右に裾が長い分布: モードが分布の左側に位置し、平均が大きい値に引っ張られている。

  • Right-skewed distribution: The mode lies on the left, with the mean dragged rightward by larger values.

5. 散布図と相関係数(Scatter Plot and Correlation Coefficient)

  • 日本語: 散布図から明らかな直線的な上昇傾向が見られる場合、強い正の相関があると考えられる(例:r ≒ 0.87)。
  • English: If a scatter plot shows a clear upward linear trend, there is strong positive correlation (e.g., r ≈ 0.87).

統計検定2級 重要用語・問題例まとめ

Key Concepts and Example Problems from the Grade 2 Statistical Examination


1. 散布図と相関係数

Scatter Plot and Correlation Coefficient

  • 日本語: 相関係数 $r$ は -1 ~ +1 の範囲をとり、+1 に近いほど強い正の相関、-1 に近いほど強い負の相関を意味する。

  • English: The correlation coefficient $r$ ranges from -1 to +1. Values close to +1 indicate strong positive correlation; values close to -1 indicate strong negative correlation.

  • 正答例: 得点と勝点の相関係数 $r = 0.87$、失点と勝点 $r = -0.83$、得点と失点 $r = -0.55$


2. 抽出法の種類と特徴

Types of Sampling and Their Characteristics

  • 層別抽出(Stratified Sampling): 母集団を層に分けて各層から無作為に抽出し、精度を高める。
  • 多段抽出(Multistage Sampling): 段階的に単位を抽出するが、層の数が増えるほど精度が落ちる傾向。
  • クラスター抽出(Cluster Sampling): 母集団を小集団に分け、いくつかのクラスターから全員を調査。

3. 実験計画法(Design of Experiments)

Design of Experiments: 3 Key Principles by Fisher

  • 振り返し(Replication): 同一処理を複数回行い、ばらつきを確認。
    Replication ensures that variability can be estimated.

  • 無作為化(Randomization): 処理を無作為に割り当て、系統誤差を避ける。
    Randomization transforms systematic errors into random errors.

  • 局所管理(Blocking): 実験条件を均一にするため、均質なブロックに分ける。
    Blocking controls known sources of variation.


4. 確率の基本問題とベイズの定理

Basic Probability and Bayes' Theorem

  • 血液型予測問題:

    • $P(\text{予想正解}) = \sum P(\text{型}) \times P(\text{型を正しく予想})$
    • 例: $0.4 \times 0.4 + 0.3 \times 0.3 + 0.2 \times 0.2 + 0.1 \times 0.1 = 0.3$
  • Bayesの定理(Bayes’ Theorem):

    $$
    P(A|B) = \frac{P(B|A)P(A)}{P(B)}
    $$


5. ポアソン分布と正規近似

Poisson Distribution and Normal Approximation

  • 確率質量関数(PMF):

    $$
    P(X = x) = \frac{e^{-\lambda} \lambda^x}{x!}
    $$

  • 分散と期待値:

    $$
    \mathbb{E}[X] = \lambda, \quad \text{Var}[X] = \lambda
    $$

  • 連続補正を伴う正規近似:

    $$
    P(X > 60) \approx P(Z > \frac{60.5 - \lambda}{\sqrt{\lambda}})
    $$


6. 標準化得点と共分散・相関係数

Standard Scores, Covariance, and Correlation

  • 共分散(Covariance):

    $$
    \text{Cov}(X, Y) = \mathbb{E}[(X - \mu_X)(Y - \mu_Y)]
    $$

  • 相関係数(Correlation Coefficient):

    $$
    \rho_{X,Y} = \frac{\text{Cov}(X,Y)}{\sigma_X \sigma_Y}
    $$


7. 分散分析の基礎(ANOVA)

Basic of Analysis of Variance

  • 自由度(Degrees of Freedom):
    $df = n - p$(n = 標本数、p = 推定パラメータ数)

  • t値の計算:

    $$
    t = \frac{\hat{\beta} - \beta_0}{SE(\hat{\beta})}
    $$


■ ポアソン分布と正規近似

Poisson distribution and normal approximation

Xをイベントの参加人数とすると、Xは平均50人のポアソン分布に従う。
Let X be the number of event participants. X follows a Poisson distribution with a mean of 50.

このとき、Xは平均50・分散50の正規分布で近似できる。
Then, X can be approximated by a normal distribution with mean 50 and variance 50.

記念品が60個では足りなくなる確率は、
The probability that 60 souvenirs are not enough is:

$$
P(X > 60) = P\left(Z > \frac{60 - 50}{\sqrt{50}}\right) = P(Z > 1.41) ≈ 0.0793
$$

連続補正を考慮すると、
With continuity correction:

$$
P(X > 60.5) = P\left(Z > \frac{60.5 - 50}{\sqrt{50}}\right) = P(Z > 1.48) ≈ 0.0694
$$


■ 正規分布による逆算と目標値

Back-calculation using normal distribution

Y ~ Poisson(20) のとき、Yを正規分布で近似:
When Y follows Poisson(20), approximate using normal distribution:

$$
P(Y + 30 > x) = 0.05 ⇒ P(Z > \frac{x - 50}{\sqrt{20}}) = 0.05
$$

標準正規分布表より:

$$
\frac{x - 50}{\sqrt{20}} = 1.645 ⇒ x = 57
$$


■ 中央値と分位数の解析

Median and quartile calculation

確率変数Xの確率密度関数f(x)が図示されており、
The PDF of variable X is graphically provided.

第1四分位数Q1を求める条件は:

$$
P(X < Q1) = 0.25
$$

この積分を評価し、得られる解が $t = -1 + \frac{\sqrt{2}}{2}$ の場合、これがQ1。


■ 不偏分散推定と平方完成

Unbiased variance estimator and completing the square

標本の平均からの偏差の二乗和の期待値:

$$
E\left[\sum_{i=1}^n (X_i - \mu)^2\right] - n E\left[\left(\overline{X} - \mu\right)^2\right] = (n - 1)\sigma^2
$$

ここから得られる不偏分散推定量:

$$
\hat{\sigma}^2 = \frac{1}{n - 1} \sum_{i=1}^n (X_i - \overline{X})^2
$$

また、

$$
E[\overline{X}^2] = \frac{1}{n} \sum E[X_i^2] - \frac{1}{n} E\left[\sum (X_i - \overline{X})^2\right]
$$


■ ベルヌーイ分布と二項分布の分散最大

Bernoulli/Binomial distribution and maximum variance

成功確率pのベルヌーイ分布の和は二項分布に従う。
Sum of Bernoulli trials with probability p → Binomial(n, p).

分散は:

$$
\text{Var} = np(1 - p)
$$

これを平方完成すると最大は:

$$
\frac{1}{4n}(p = 0.5 のとき最大)
$$


■ 比率の仮説検定

Hypothesis testing for population proportion

帰無仮説 $H_0: p = p_0$、対立仮説 $H_1: p \ne p_0$ の両側検定。
Two-sided test with null hypothesis $H_0: p = p_0$

標準正規分布を用いた棄却域:

$$
|Z| > 1.96(有意水準5%の場合)
$$


■ クロス集計表と期待度数

Contingency Table and Expected Frequency

観測度数(実際に得られたデータ):
Observed frequencies:

区分 夏季 Summer 冬季 Winter 合計 Total
区分 A 42 30 72
区分 B 25 96 121
区分 C 23 17 40
区分 D 1 192 193
区分 E 19 96 115
合計 110 431 541

※行・列の合計は仮定です。原文に明確な対応がなかったため例示しました。正確な集計表に基づいて調整可能です。

期待度数の計算(行・列の和から)

Expected Frequency Calculation (under null hypothesis):

帰無仮説:夏季と冬季で分布は同じ(度数構成比が同等)。
Null hypothesis: The distributions in summer and winter are equal.

期待度数(Expected frequency):

$$
E_{ij} = \frac{\text{Row total}_i \times \text{Column total}_j}{\text{Grand total}}
$$

または、夏季と冬季しかない場合:

$$
E = \frac{\text{各セルの列合計}}{2}
$$


■ 検定統計量と自由度

Test Statistic and Degrees of Freedom

カイ二乗検定統計量:
Chi-square statistic:

$$
\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}
$$

  • $O_{ij}$: 観測度数 / Observed frequency
  • $E_{ij}$: 期待度数 / Expected frequency

自由度(Degrees of Freedom):

$$
df = (\text{行数} - 1) \times (\text{列数} - 1) = (2 - 1) \times (5 - 1) = 4
$$


■ 棄却判定(5%有意水準)

Decision at 5% significance level

自由度4における上側5%点:
Upper 5% critical value for df = 4:

$$
\chi^2_{0.05}(4) = 9.49
$$

  • 検定統計量 > 9.49 → 帰無仮説棄却(分布に差がある)
  • Test statistic > 9.49 → Reject null hypothesis: Distributions are different.

回帰分析とt検定の基礎式・用語まとめ

Key Formulas and Terminology for Regression and t-Test


■ 1. t検定の基本構造

One-sample t-test(1標本t検定):

$$
t = \frac{\bar{X} - \mu_0}{s / \sqrt{n}}
$$

  • $\bar{X}$: 標本平均 / sample mean
  • $\mu_0$: 母平均の仮定値 / hypothesized population mean
  • $s$: 不偏標準偏差 / sample standard deviation
  • $n$: 標本サイズ / sample size
  • $t$: 自由度 $n - 1$ のt分布に従う / follows $t_{n-1}$

■ 2. 二標本t検定(差の検定)

Two-sample t-test:

$$
t = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}
$$

  • 対応のある・ないで計算式は変化
  • 等分散仮定があれば「プールされた分散」を使用

■ 3. t分布の特性

  • 平均0、自由度 $\nu$ に依存
  • 標準正規分布に比べて裾が重い(n小さいと顕著)
  • 中心極限定理により nが大きいと正規分布に近似される

■ 4. 回帰分析におけるt統計量

回帰係数の有意性検定(t検定):

$$
t = \frac{\hat{\beta}}{\text{SE}(\hat{\beta})}
$$

  • $\hat{\beta}$: 回帰係数の推定値 / estimated coefficient
  • $\text{SE}(\hat{\beta})$: 標準誤差 / standard error of the estimate
  • 自由度:$n - p$(p: パラメータ数)

■ 5. 検定の棄却基準と有意水準

  • 両側検定 Two-tailed: $|t| > t_{\alpha/2}(df)$
  • 片側検定 One-tailed: $t > t_{\alpha}(df)$ or $t < -t_{\alpha}(df)$

例: 有意水準5%の場合

  • 自由度20なら $t_{0.025}(20) ≈ 2.086$(両側)
  • 標準正規近似では $Z_{0.025} = 1.96$

■ 6. P値と棄却判定

  • $p$-value: 観測された統計量が帰無仮説のもとでどれだけ極端かを示す
  • $$
    $$

\text{If } p < \alpha \Rightarrow \text{帰無仮説を棄却する}
]

  • 両側検定: $p = 2 \cdot P(Z > |z_{\text{obs}}|)$

■ 7. 信頼区間(t値またはZ値を用いる)

$$
\hat{\theta} \pm t_{\alpha/2}(df) \cdot \text{SE}(\hat{\theta})
$$

  • 例:

    • $\hat{\beta} = -60.263$, $\text{SE} = 4.414$, 信頼水準90% → $t = 1.645$
    • 区間:$[-60.263 \pm 4.414 \cdot 1.645] = [-67.52, -53.00]$

■ 8. 回帰と相関の補足用語

用語 英語 説明
決定係数 $R^2$ 説明変数が従属変数をどれだけ説明できるか(当てはまりの尺度)
自由度修正済み決定係数 Adjusted $R^2$ モデルの複雑さを加味した $R^2$
残差 Residual 観測値と予測値の差:$e_i = y_i - \hat{y}_i$
残差平方和 RSS $\sum (y_i - \hat{y}_i)^2$
総平方和 TSS $\sum (y_i - \bar{y})^2$
F統計量 $F$-statistic 全体のモデルの有意性を検定(回帰係数がすべて0か)

■ 9. t検定と正規分布の使い分け

  • 標本サイズ $n$ が小さい(<30)→ t分布使用
  • $n$ が大きい or 母分散既知 → 正規分布使用(中心極限定理)

■ 1. 箱ひげ図(Boxplot)

読み取れる情報 / Information Derived

  • 最小値(minimum)
  • 第1四分位数(Q1) / First quartile
  • 中央値(Q2) / Median
  • 第3四分位数(Q3) / Third quartile
  • 最大値(maximum)

読み取れない情報 / Not Directly Readable

  • 標準偏差(standard deviation): ❌
  • 平均(mean): ❌

■ 2. 相関と散布図(Correlation and Scatter Plots)

相関係数の定義 / Correlation Coefficient

$$
r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2} \sqrt{\sum (y_i - \bar{y})^2}}
$$

  • $r = 1$: 完全な正の相関 / Perfect positive correlation
  • $r = -1$: 完全な負の相関 / Perfect negative correlation
  • $r = 0$: 相関なし / No linear correlation

二値データでの相関係数(ファイ係数)

Phi coefficient for 2×2 contingency table

$$
\phi = \frac{ad - bc}{\sqrt{(a + b)(c + d)(a + c)(b + d)}}
$$


■ 3. クロス集計表(Contingency Table)

期待度数(Expected Frequency)

$$
E_{ij} = \frac{(\text{Row Total}) \times (\text{Column Total})}{\text{Grand Total}}
$$

カイ二乗検定統計量(Chi-Square Statistic)

$$
\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}
$$

  • 自由度 $df = (r-1)(c-1)$(r: 行数, c: 列数)

■ 4. 消費者物価指数(Consumer Price Index: CPI)

CPIの推移計算 / CPI Calculation

$$
\text{CPI}{t+1} = \text{CPI}{t} \times (1 + \text{Inflation Rate})
$$

例:

$$
\text{CPI}{2015} = 103.2, \quad \text{Inflation}{2016} = 1.0%, \quad \text{Inflation}_{2017} = 1.8%
$$

$$
\text{CPI}_{2017} = 103.2 \times 1.01 \times 1.018 = 106.1
$$


■ 5. ヒストグラムの基本構造(Histogram)

  • 各階級の**幅(class width)**が等しい場合、**棒の高さ(height)**は度数に比例
  • 箱ひげ図と整合するヒストグラムは、四分位点・最大値・最小値の範囲と一致している必要あり

■ 6. その他用語(Others)

日本語 英語 解説
中央値 Median データを小さい順に並べた時の中央の値
四分位範囲 Interquartile Range $Q3 - Q1$、ばらつきの指標
モード Mode 最頻値。最も出現回数の多い値
範囲 Range 最大値 - 最小値
ファイ係数 Phi Coefficient 2値データ用の相関係数、相関強度を表す
散布図 Scatter Plot 2変数間の関係を視覚化
箱ひげ図 Boxplot 中央・四分位・外れ値を示す統計図表

■ 1. 消費者物価指数(CPI)とインフレーション率

CPI and Inflation Rate

● 年間の物価上昇率

Annual Inflation Rate

$$
\text{Inflation Rate} = \frac{P_{t+1} - P_t}{P_t}
$$

  • $P_t$: 年 $t$ のCPI / CPI in year $t$
  • $P_{t+1}$: 年 $t+1$ のCPI / CPI in year $t+1$

● 基準変更時の補正

Rebasing CPI

$$
P'_t = \frac{100}{100.8} \cdot P_t
$$

  • 新基準を2006年=100とするとき / When 2006 base is changed to 100

■ 2. 階差系列(差分)と時系列予測

First-Order Difference Series and Forecasting

● 階差系列

Difference Series

$$
\Delta Y_t = Y_t - Y_{t-1}
$$

(時系列データの増減変化を可視化)
(Visualizes increase/decrease over time)

● 時系列の外挿予測(extrapolation)

Forecasting Outside Sample Period

$$
\hat{Y}_t = \beta_0 + \beta_1 t
$$

  • 外挿(Extrapolation)とは、学習期間外への推定のこと / Extrapolation = prediction outside observed range

■ 3. 回帰分析における検定と推定

Inference in Regression Analysis

● 推定値・標準誤差・t値の関係

Estimator, Standard Error, and t-statistic

$$
t = \frac{\text{Estimate}}{\text{Standard Error}} \Rightarrow \text{SE} = \frac{\text{Estimate}}{t}
$$

例:

$$
t = \frac{0.937}{0.0429} \approx 21.86
$$


■ 4. 標本調査の誤差

Errors in Sampling Surveys

日本語 英語 説明 / Explanation
全数調査 Census 母集団全体を調査(コスト・時間がかかる)
標本調査 Sample Survey 一部のみ調査、標本誤差が生じる
標本誤差 Sampling Error 無作為抽出による誤差(数式で評価可能)
非標本誤差 Non-Sampling Error 拒否・虚偽申告・誤解など、設計外の誤差

統計検定2級:確率・分布・推定の要点整理

Level 2 Statistics: Probability, Distribution, and Estimation Summary


■ 1. トーナメントと確率(Tournament and Conditional Probability)

● 勝ち上がり確率

Winning Probability in Tournament

  • 勝敗が確率 $\frac{1}{2}$ の独立試行で与えられる場合、連勝は掛け算で評価される。
    → 2連勝の確率: $\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}$

  • 条件付き確率 $P(A \cap B) = P(A) \cdot P(B|A)$ を用いる。


■ 2. 連続型確率分布と分布関数

Continuous Distribution and CDF

● 分布関数

Cumulative Distribution Function (CDF)

$$
F(x) = P(X \leq x)
$$

例: $F(x) = x^2$ for $0 \leq x \leq 1$ の中央値は

$$
F(c) = 0.5 \Rightarrow c = \sqrt{0.5}
$$


■ 3. 確率密度関数と期待値・分散

PDF, Expectation, and Variance

● 密度関数(例)

$$
f(x) = \begin{cases}
2x & 0 \leq x \leq 1 \
0 & \text{otherwise}
\end{cases}
$$

  • 期待値(Expected value)

$$
E[X] = \int_0^1 x \cdot 2x dx = \frac{2}{3}
$$

  • 分散(Variance)

$$
V[X] = E[X^2] - (E[X])^2 = \frac{1}{2} - \left(\frac{2}{3}\right)^2 = \frac{1}{18}
$$


■ 4. 標本平均と分散の性質

Sample Mean and Its Variance

● 無作為抽出された標本平均の分布

$$
\bar{X} \sim N\left( \mu, \frac{\sigma^2}{n} \right)
$$


■ 5. 変動係数と必要標本数

Coefficient of Variation and Required Sample Size

● 変動係数(CV)と精度制約

$$
\text{CV} = \frac{\sqrt{V[\bar{X}]}}{E[\bar{X}]} = \frac{\sigma/\sqrt{n}}{\mu}
\Rightarrow \frac{\sigma}{\mu \sqrt{n}} \leq 0.05
$$

  • 変形して必要な標本数 $n$ を求める。
    例: $\sigma / \mu \leq 0.8 \Rightarrow n \geq 256$

■ 6. 標本比率と分散

Sample Proportion and Variance

● 二項分布に基づく推定量の分散

$$
Y \sim B(n, p) \Rightarrow \hat{p} = \frac{Y}{n}, \quad V[\hat{p}] = \frac{p(1 - p)}{n}
$$

  • 例:$p = 0.45, n = 2000 \Rightarrow V[\hat{p}] = \frac{0.45 \times 0.55}{2000}$

■ 7. 推定量の性質

Estimator Properties

日本語 英語 定義
不偏推定量 Unbiased Estimator 平均が母数に等しい
一致推定量 Consistent Estimator 標本サイズ増加に伴って母数に収束する
最尤推定量 MLE 観測データの確率を最大化する推定値
有効推定量 Efficient Estimator 最小分散をもつ不偏推定量

■ 1. 母平均の信頼区間(Confidence Interval for Population Mean)

分散未知・小標本(t分布使用)

Unknown Variance, Small Sample (t-distribution)

$$
\bar{x} \pm t_{1-\alpha/2}(n-1) \cdot \frac{s}{\sqrt{n}}
$$

  • $\bar{x}$: 標本平均 / Sample mean
  • $s$: 標本標準偏差 / Sample standard deviation
  • $n$: 標本サイズ / Sample size
  • $t$: 自由度 $n-1$ のt分布の百分位点 / t critical value with $n-1$ degrees of freedom

:$n = 6, \bar{x} = 1.01, s = 0.11, \alpha = 0.01 \Rightarrow \mu \in [0.83, 1.19]$


■ 2. t検定とp値の解釈(t-test and p-value)

t値の定義 / t-value

$$
t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}
$$

  • $\mu_0$: 帰無仮説の母平均値 / Hypothesized population mean

両側検定での判断基準 / Two-tailed test criteria

  • $|t| > t_{1-\alpha/2}$ → 棄却域 / Reject $H_0$
  • p値 < 有意水準 → 有意 / Significant

■ 3. 2標本t検定(Two-sample t-test)

母平均の差の検定 / Testing Mean Differences

$$
t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}
$$

  • 自由度:$df = n_1 + n_2 - 2$

■ 4. クロス集計とカイ二乗検定(Contingency Table & Chi-Square Test)

期待度数(Expected Frequency)

$$
E_{ij} = \frac{(Row\ Total) \times (Column\ Total)}{Grand\ Total}
$$

カイ二乗統計量(Chi-Square Statistic)

$$
\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}
$$

  • 自由度(Degrees of Freedom)

    $$
    df = (r-1)(c-1)
    $$


■ 5. 回帰分析(Linear Regression)

回帰式の形式 / Regression Equation

$$
\hat{y} = \beta_0 + \beta_1 x_1 + \cdots + \beta_k x_k
$$

  • 切片(intercept): $\beta_0$
  • 回帰係数(regression coefficients): $\beta_i$

回帰係数の有意性 / Significance of Coefficients

  • p値 < 0.05 ⇒ 有意 / Significant
  • 信頼区間がゼロを含まない ⇔ 有意

■ 6. 決定係数とF検定(R² and F-test)

決定係数(R²)

  • 全体のばらつきに対して、モデルが説明できる割合
  • 高いほどモデルの説明力が高い / The higher, the better model fit

F検定のp値

  • モデル全体の有意性を検定する
  • p値 < 0.05 ⇒ モデル全体が有意 / Significant model

■ 7. 回帰の解釈例(Interpretation Example)


高齢者数の回帰係数:1.02805 → 高齢者数が1人増えるごとに購読数が1.03部増える傾向
平均給与の値が0(=全国平均)として代入予測可能


統計検定2級:母集団の平均・分散・変動係数・二項分布と推定理論

Level 2 Statistics: Mean, Variance, Coefficient of Variation, and Binomial Estimation


■ 1. 標本平均とその分散

Sample Mean and Its Variance

  • 母平均:$\mu$、母分散:$\sigma^2$ の母集団から無作為抽出した標本 $(X_1, X_2, \ldots, X_n)$ の標本平均 $\bar{X}$ に対して、

$$
E[\bar{X}] = \mu, \quad V[\bar{X}] = \frac{\sigma^2}{n}
$$

  • The expected value of the sample mean is the population mean, and its variance is the population variance divided by the sample size.

■ 2. 変動係数の評価と必要標本サイズ

Coefficient of Variation (CV) and Required Sample Size

  • 定義:

$$
\text{CV} = \frac{\text{Standard Error}}{\mu} = \frac{\sqrt{\sigma^2/n}}{\mu} = \frac{\sigma}{\mu\sqrt{n}}
$$

  • CVを0.05以下に抑える条件:

$$
\frac{\sigma}{\mu\sqrt{n}} \leq 0.05 \Rightarrow \sqrt{n} \geq \frac{\sigma/\mu}{0.05}
$$

  • 例:母集団の変動係数 $\sigma/\mu \leq 0.8$ のとき、

$$
\sqrt{n} \geq \frac{0.8}{0.05} = 16 \Rightarrow n \geq 256
$$

  • To keep the coefficient of variation under 0.05, at least 256 samples are required if the population CV is ≤ 0.8.

■ 3. 確率密度関数と分散計算

PDF and Variance Calculation

  • $f(x) = 2x$ for $0 \leq x \leq 1$, elsewhere 0 の連続型確率変数 X の場合:

$$
E[X] = \int_0^1 x \cdot 2x , dx = \frac{2}{3}, \quad E[X^2] = \int_0^1 x^2 \cdot 2x , dx = \frac{1}{2}
$$

$$
V[X] = E[X^2] - (E[X])^2 = \frac{1}{2} - \left(\frac{2}{3}\right)^2 = \frac{1}{18}
$$

  • The variance is computed using the shortcut formula: $V[X] = E[X^2] - (E[X])^2$

■ 4. 二項分布と推定量の分散

Binomial Distribution and Estimator Variance

  • 二項分布 $Y \sim B(n, p)$ において:

$$
E[Y] = np, \quad V[Y] = np(1 - p)
$$

  • 相対度数 $\hat{p} = Y/n$ の分散は:

$$
V[\hat{p}] = \frac{p(1-p)}{n}
$$

  • The variance of the estimator for proportion $\hat{p}$ is $\frac{p(1-p)}{n}$

■ 5. 無作為抽出と分布の近似

Random Sampling and Distribution Approximation

  • 標本が十分大きければ、復元抽出でなくても近似的に二項分布に従うとみなせる。
    (正確には超幾何分布だが、差が小さいため近似可能)

  • When sampling size is large, we can approximate the distribution of responses as binomial even under non-replacement.


■ 6. 推定量の性質

Properties of Estimators

  • 「現職に投票した」と答えた人の割合は、母比率 $p$ の不偏推定量 unbiased estimatorかつ一致推定量 consistent estimatorである。

  • The sample proportion is both an unbiased and consistent estimator of the population proportion.


母平均の信頼区間・t検定・検出力

Confidence Interval, t-test, and Statistical Power for Population Mean


■ 1. 母平均の99%信頼区間(母分散が未知)

99% Confidence Interval for the Mean (Unknown Variance)

  • 与えられた情報:
    標本平均 $\bar{x} = 1.01$、不偏標準偏差 $s = 0.11$、標本サイズ $n = 6$

  • 信頼区間の計算式:

$$
\bar{x} \pm t_{0.005}(n-1) \cdot \frac{s}{\sqrt{n}}
$$

  • 上記を代入すると:

$$
1.01 \pm 4.032 \cdot \frac{0.11}{\sqrt{6}} \approx 1.01 \pm 0.18
\Rightarrow 0.83 \leq \mu \leq 1.19
$$

  • Since the sample is small and the population variance is unknown, we use the t-distribution with 5 degrees of freedom.

■ 2. t検定による有意性検定(帰無仮説:母平均 = 1)

t-test for the Population Mean (H₀: μ = 1)

  • 検定統計量(t値)の計算:

$$
t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} = \frac{1.01 - 1}{0.11 / \sqrt{6}} \approx 0.223
$$

  • 自由度5のt分布における上側10%点(片側) = 1.476 → $0.223 < 1.476$

  • 両側検定の場合、P値 ≈ 0.4 → 有意水準5%では棄却されない

  • The null hypothesis is not rejected at the 5% significance level.


■ 3. 2標本t検定の自由度

Degrees of Freedom in Two-Sample t-test

  • 標本サイズ:n₁ = 6、n₂ = 4
  • 帰無仮説:2群の母平均に差がない
  • 自由度:

$$
df = n_1 + n_2 - 2 = 6 + 4 - 2 = 8
$$

  • The t-distribution with 8 degrees of freedom is used for comparing two means.

■ 4. 検出力(Power)計算

Calculation of Statistical Power

  • 帰無仮説:$\mu = 600$、実際の平均:$\mu = 630$、標準誤差:10、
    有意水準5%の片側検定 → 棄却点:$Z = 2.33$

  • 標準化された検定統計量(非中央分布):

$$
P\left( \frac{\bar{X} - 630}{10} > -0.67 \right) = 1 - P(Z > 0.67) = 0.7486
$$

  • The power is the probability of correctly rejecting a false null hypothesis.
    → 検出力 ≈ 0.7486

■ 備考

  • 小標本の場合、分散の未知性が信頼区間の幅に大きく影響
  • t分布とZ分布の違いは自由度により特に顕著
  • 検出力(power)は効果検出の感度を示す重要指標であり、効果量・標本サイズ・有意水準に依存する

検出力・クロス集計・χ²検定・回帰分析に関する要点

Statistical Power, Contingency Tables, χ² Test, and Regression Analysis


■ 1. 検出力(Power of a Hypothesis Test)

Statistical Power for μ = 630, under H₀: μ = 600

  • 条件:標本平均 $\bar{X}$、標準誤差 $SE = 10$、棄却域は $Z > 2.33$(片側検定、α=0.01)

  • 実際の母平均 μ = 630 のもとでの標準化:

$$
P\left( \frac{\bar{X} - 630}{10} > -0.67 \right) = 1 - P(Z > 0.67) = 1 - 0.2514 = 0.7486
$$

  • 検出力 = 0.7486
    → 真の平均が630であるとき、帰無仮説を正しく棄却できる確率は約75%

■ 2. クロス集計表と期待度数(Contingency Table and Expected Frequencies)

購入したい 購入したくない 合計
男性 Male 80 40 120
女性 Female 40 60 100
合計 Total 120 100 220
  • 期待度数(Expected frequency)の計算:

$$
E = \frac{\text{行和 × 列和}}{\text{全体}}
例:男性かつ購入希望 = \frac{120 × 120}{220} = 65.5
$$


■ 3. χ²検定統計量(Chi-Square Test Statistic)

  • 検定統計量の計算式:

$$
\chi^2 = \sum \frac{(O - E)^2}{E}
= \frac{(80 - 65.5)^2}{65.5} + \cdots + \frac{(60 - 45.5)^2}{45.5}
$$

  • 自由度(Degrees of Freedom):

$$
df = (r - 1)(c - 1) = (2 - 1)(2 - 1) = 1
$$

  • Use χ²-distribution with 1 degree of freedom for a 2×2 table.

■ 4. 回帰分析における係数の解釈とF検定

Regression Coefficients and F-test Interpretation

  • 高齢者数の回帰係数 β̂ = 1.02805
    → 高齢者が0.6人の県と0.5人の県を比較すると:

$$
1.02805 × (0.6 - 0.5) = 0.102805(部)
$$

高齢者数が多いほど新聞購読数が増える傾向

  • F検定のP値 = 1.73e-05 → 0.05未満 → モデルは有意(全体として説明力あり)

  • 平均給与の係数のP値 < 0.05 → 平均給与も説明変数として有意

  • 回帰係数のP値と95%信頼区間がゼロを含まないことは同値である。


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?