STAT-07 · STATISTICS

기대값·분산·조건부 기대값Expectation, variance and conditional expectation

이름표의 가중평균에서 총분산·정보·최적 예측으로From weighted tickets to total variance, information and optimal prediction

실습 6종 · 풀이 포함 연습문제 60개6 labs · 60 exercises with solutions

기초Foundations

1. 평균을 계산하기 전에 무엇을 고르는지 묻는다1. Ask what is selected before calculating a mean

실제 펭귄의 몸무게 기록 342개를 책상에 한 장씩 놓았다고 생각해 봅시다. 한 장을 균등하게 고르고 몸무게를 읽는다면, 기대값은 342개 값의 산술평균입니다. 이번에는 종을 먼저 세 종류 중 하나로 균등하게 고른 뒤, 그 종의 기록 한 장을 균등하게 고릅니다. 같은 기록을 사용해도 각 기록의 선택 확률이 달라져 평균이 달라집니다.

기대값은 값과 확률을 함께 요약하는 수입니다. 어떤 자료의 평균인지, 어떤 법칙에 대한 평균인지 묻지 않고 숫자 하나만 적으면 의미를 놓칩니다. 이 장에서는 숫자에 확률을 곱해 더하는 쉬운 입구에서 시작하여, 조건부 평균과 전체 평균, 그룹 안 변동과 그룹 사이 변동의 관계를 유도합니다.

Imagine one ticket for each of 342 available penguin mass records. Select a ticket uniformly and read its mass: the expectation is their arithmetic mean. Alternatively, first select one of three species uniformly, then select a record uniformly within that species. The same records receive different selection probabilities and produce a different expectation.

An expectation summarizes values together with their probability law. A number without the question “average of what, under which law?” loses meaning. We begin with probability-weighted sums, then derive conditional means, total expectation, and the division of variation into within-group and between-group components.

기초Foundations

2. 기대값은 확률을 무게로 둔 평균이다2. Expectation is an average weighted by probabilities

네 이름표 a,b,c,d의 반환값이 (0,1,1,2)이고 각각의 확률이 1/4이라고 합시다. 0을 한 번, 1을 두 번, 2를 한 번 세므로 평균은 1입니다. 이름표의 확률이 같기 때문에 익숙한 산술평균이 나타납니다.

E[X]=∑i=14pixi=14(0)+14(1)+14(1)+14(2)=1,pi≥0, ∑ipi=1E[X]=\sum_{i=1}^{4}p_i x_i=\frac14(0)+\frac14(1)+\frac14(1)+\frac14(2)=1,\qquad p_i\ge0,\ \sum_i p_i=1

가중치를 (1,2,3,4)로 정했다면 총가중치 10으로 나누어 확률을 만듭니다. 기대값은 (0+2+3+8)/10=1.3입니다. 가중치 자체와 확률을 구별하세요. 모든 가중치를 두 배로 늘려도 정규화한 법칙과 기대값은 같습니다.

전체 가중치가 0이면 정규화할 수 없습니다. 이때 기대값은 0이 아니라 미정의입니다. 음의 가중치는 이 장의 확률 법칙을 만들지 못합니다. 음수인 반환값은 가능하지만 음수인 확률은 가능하지 않다는 차이도 분명히 합시다.

Let tickets a, b, c, d return (0,1,1,2), each with probability 1/4. Averaging one zero, two ones and one two gives one. The familiar arithmetic mean appears because ticket probabilities are equal.

E[X]=∑i=14pixi=14(0)+14(1)+14(1)+14(2)=1,pi≥0, ∑ipi=1E[X]=\sum_{i=1}^{4}p_i x_i=\frac14(0)+\frac14(1)+\frac14(1)+\frac14(2)=1,\qquad p_i\ge0,\ \sum_i p_i=1

Weights (1,2,3,4) instead yield probabilities after division by ten, and expectation (0+2+3+8)/10=1.3. Distinguish weights from probabilities. Multiplying every weight by two leaves the normalized law unchanged.

Zero total weight cannot define a probability law; its expectation is undefined rather than zero. Negative weights are not allowed here. A returned value may be negative while a probability may not.

기초Foundations

3. 같은 값으로 모으거나 먼저 변환해도 계산할 수 있다3. Group equal values or transform before averaging

앞의 균등 이름표에서 값 1은 두 장에 적혀 있으므로 P(X=1)=1/2입니다. 이름표별로 더한 기대값과 서로 다른 값별로 질량을 모아 더한 기대값이 같습니다. 같은 수에 붙은 확률들을 합치는 순서만 바뀐 것입니다.

E[g(X)]=∑ωg(X(ω))P({ω})=∑xg(x)pX(x)E[g(X)]=\sum_\omega g(X(\omega))P(\{\omega\})=\sum_x g(x)p_X(x)

g(x)=x²이면 값을 먼저 제곱하여 (0,1,1,4)를 얻고 평균을 냅니다. 결과는 1.5입니다. 원래 평균 1을 제곱한 1과 다릅니다. 기대값 계산에서 함수를 안팎으로 마음대로 이동할 수는 없습니다.

유한 법칙에서는 위 식이 항상 계산됩니다. 무한 법칙에서는 g(X)가 비음수이거나 적분 가능할 때 합을 안전하게 묶을 수 있습니다. 분포변환을 처음부터 다시 구하지 않고 g(X)의 기대값을 계산하는 이 원리를 LOTUS라고 부르기도 합니다. 이름보다 ‘각 결과의 변환값에 원래 확률을 곱한다’는 뜻을 먼저 기억합시다.

Two uniform tickets return one, so P(X=1)=1/2. Summing by tickets or by distinct returned values gives the same expectation. Only the grouping of probability mass changes.

E[g(X)]=∑ωg(X(ω))P({ω})=∑xg(x)pX(x)E[g(X)]=\sum_\omega g(X(\omega))P(\{\omega\})=\sum_x g(x)p_X(x)

For g(x)=x², transform the values into (0,1,1,4) and average to obtain 1.5. Squaring the original mean gives one instead. A nonlinear function cannot generally be moved through an expectation.

The finite calculation is automatic. Infinite regroupings require a nonnegative or integrable transformed variable. This expected-value rule, sometimes called LOTUS, avoids first deriving the transformed distribution. Remember the operation before its acronym: multiply each transformed value by its original probability.

기초Foundations

4. 기대값 실습: 값과 무게를 따로 움직인다4. Expectation lab: move values and weights separately

네 이름표의 값과 비음수 가중치를 바꾸어 보세요. 각 행의 ‘값×확률’ 기여를 더한 것이 기대값입니다. 제곱·절댓값·기준 이상을 나타내는 지시함수로 바꾸면, 변환한 뒤의 기대값과 평균을 변환한 값을 비교할 수 있습니다.

기본값 (0,1,1,2), 균등 법칙에서 E[X]=1, E[X²]=1.5를 먼저 손으로 계산하세요. 다음에는 2가 적힌 이름표의 가중치만 높입니다. 기대값이 커지는 이유는 새 값을 관측했기 때문이 아니라 선택 법칙을 바꾸었기 때문입니다.

지시함수는 기준 이상이면 1, 아니면 0입니다. 그 기대값은 기준 이상 사건의 확률이 됩니다. 기준값을 평균과 비교한 0 또는 1과는 다른 계산입니다. 모든 무게를 0으로 만들었을 때의 미정의 표시도 확인하세요.

Change four values and their nonnegative weights. Adding the value-times-probability contributions gives the expectation. Choose a square, absolute value or threshold indicator to compare the expectation after transformation with a transformation of the mean.

First verify E[X]=1 and E[X²]=1.5 for uniform (0,1,1,2). Then increase only the weight of the ticket returning two. The resulting change reflects a new selection law, not a new observation.

An indicator returns one at or above the threshold and zero otherwise. Its expectation is the event probability, distinct from thresholding the mean. Check that setting every weight to zero produces an undefined law.

기초Foundations

5. 기대값은 다음 값이나 가장 흔한 값이 아니다5. An expectation need not be the next or most common value

공정한 주사위의 기대값은 3.5이지만 어느 면에도 3.5가 적혀 있지 않습니다. 기대값이 관측 가능한 값일 필요는 없습니다. 최빈값은 가장 큰 확률 질량의 위치이고, 중앙값은 질량을 양쪽으로 나누는 위치입니다. 세 질문이 서로 다릅니다.

가정한 보상 Y가 확률 0.99로 0, 확률 0.01로 100을 준다면 E[Y]=1입니다. 한 번의 결과는 0 또는 100이며 대개 0입니다. 기대값 1만으로 한 번의 위험이나 드문 큰 결과를 충분히 설명할 수 없습니다.

독립이고 같은 법칙을 따르며 적분 가능한 반복에서는 장기 평균과 기대값을 연결하는 대수의 법칙을 배웁니다. 기대값의 정의 자체가 반복 실험을 요구하는 것은 아닙니다. 고정된 실제 기록의 선택 평균을 미래 예측이나 인과효과라고 부르려면 별도의 모형과 근거가 필요합니다.

A fair die has expectation 3.5 although none of its faces shows 3.5. The mean need not be an attainable value. A mode locates the largest probability mass, while a median divides probability; these answer different questions.

An assumed reward Y returns zero with probability 0.99 and 100 with probability 0.01. Its expectation is one, but a single outcome is zero or 100 and usually zero. The expectation alone does not describe one-trial risk or rare large outcomes.

The law of large numbers later connects expectation to averages of independent, identically distributed, integrable repetitions. Repetitions are not required to define expectation. Treating a selection average of historical records as a future forecast or causal effect requires additional justification.

기초Foundations

6. 평균의 제곱과 제곱의 평균을 구별한다6. Distinguish the square of a mean from the mean square

두 값 −1과 1을 똑같이 선택하면 E[X]=0이지만 E[X²]=1입니다. 부호가 평균에서 상쇄되어도 제곱한 크기는 사라지지 않습니다. 따라서 ‘평균이 0이니 값도 모두 0’이라는 추론은 성립하지 않습니다.

E[(X−E[X])2]=E[X2]−(E[X])2≥0,(E[X])2≤E[X2]E[(X-E[X])^2]=E[X^2]-(E[X])^2\ge0,\qquad (E[X])^2\le E[X^2]

제곱 적분 가능한 X에서는 오른쪽 차이가 분산입니다. 절댓값에도 |E[X]|≤E[|X|]가 성립합니다. 일반적으로 볼록함수 φ에 대한 Jensen 부등식 φ(E[X])≤E[φ(X)]가 있지만, X의 적분 가능성과 φ(X)의 기대값 존재 등 적용 조건을 확인해야 합니다. 이 장의 유한 실습에서는 모든 반환값이 유한하여 제곱과 절댓값 계산이 안전합니다.

볼록하지 않은 지시함수에는 같은 방향의 부등식을 자동 적용하지 않습니다. X가 균등하게 0과 2를 반환하고 기준이 1이면 E[1{X≥1}]=1/2이지만 1{E[X]≥1}=1입니다. 수식의 모양이 비슷해도 조건이 다릅니다.

For equally likely values −1 and one, E[X]=0 but E[X²]=1. Signs cancel in the mean without eliminating squared size. A zero mean therefore does not imply zero values.

E[(X−E[X])2]=E[X2]−(E[X])2≥0,(E[X])2≤E[X2]E[(X-E[X])^2]=E[X^2]-(E[X])^2\ge0,\qquad (E[X])^2\le E[X^2]

For square-integrable X, the difference is its variance. Also |E[X]|≤E[|X|]. Jensen’s inequality extends this principle to convex φ, subject to integrability and existence conditions. All finite-valued labs here safely support squares and absolute values.

A threshold indicator is not convex, so do not assign it the same inequality. For equally likely zero and two at threshold one, E[1{X≥1}]=1/2 whereas 1{E[X]≥1}=1. Similar-looking operations can have different conditions.

기초Foundations

7. 기대값의 선형성은 합을 펴면 나온다7. Linearity follows by distributing the weighted sum

같은 결과에서 X와 Y 두 숫자를 읽고 Z=aX+bY+c를 만듭니다. 유한 법칙에서 각 결과의 확률을 곱해 더하면 a와 b를 합 밖으로 꺼낼 수 있고, 상수 c에는 전체 확률 1이 곱해집니다.

E[aX+bY+c]=∑ω(aX(ω)+bY(ω)+c)pω=aE[X]+bE[Y]+c.\begin{aligned}E[aX+bY+c]&=\sum_\omega (aX(\omega)+bY(\omega)+c)p_\omega\\&=aE[X]+bE[Y]+c.\end{aligned}

이 유도 어디에도 독립이라는 가정이 없습니다. X와 Y가 완전히 함께 움직이거나 반대로 움직여도, 같은 결합법칙 아래에서 각 기대값이 적분 가능하면 선형성이 성립합니다. 여러 변수의 유한 합으로도 그대로 확장됩니다.

무한한 변수 합에 기대값을 옮기는 일은 다른 문제입니다. 비음수 합이면 단조수렴을, 부호가 섞이면 절대 적분 가능성을 보장하는 조건 등을 확인해야 합니다. 유한 합의 쉬운 분배법칙을 무한 급수에 무조건 복사하지 맙시다.

Read X and Y from the same outcome and form Z=aX+bY+c. Distribute the finite probability-weighted sum. Constants a and b leave the sum; c is multiplied by total probability one.

E[aX+bY+c]=∑ω(aX(ω)+bY(ω)+c)pω=aE[X]+bE[Y]+c.\begin{aligned}E[aX+bY+c]&=\sum_\omega (aX(\omega)+bY(\omega)+c)p_\omega\\&=aE[X]+bE[Y]+c.\end{aligned}

No step assumes independence. Perfectly aligned or opposed variables satisfy linearity under their common joint law when the expectations are integrable. The result extends to any finite sum.

Interchanging expectation and an infinite series is a separate question. Nonnegative terms permit monotone convergence; signed terms need suitable absolute-integrability conditions or other justified interchange results. Do not transfer a finite distributive rule to arbitrary infinite sums.

기초Foundations

8. 같은 이름표를 읽는 것과 두 번 고르는 것은 다르다8. Reading one ticket differs from selecting two independently

네 균등 이름표에서 X=(0,1,2,3), Y=(3,2,1,0)라고 합시다. 같은 이름표를 읽으면 언제나 X+Y=3입니다. E[X]=E[Y]=1.5이므로 E[X+Y]=3이며 분산은 0입니다. X와 Y는 독립이 아니지만 선형성이 정확히 맞습니다.

이번에는 X용 이름표와 Y용 이름표를 독립적으로 고릅니다. 16개의 순서쌍에 각각 확률 1/16을 주는 새 법칙입니다. 합은 0부터 6까지 가능하지만 기대값은 여전히 3입니다. 같은 주변분포와 같은 합의 기대값만으로 결합법칙까지 같다고 할 수 없습니다.

E[XY]=1 (paired),E[X]E[Y]=94,Cov⁡(X,Y)=−54E[XY]=1\ \text{(paired)},\qquad E[X]E[Y]=\frac94,\qquad \operatorname{Cov}(X,Y)=-\frac54

독립 재선택에서는 E[XY]=9/4, 공분산은 0이며 합의 분산은 5/2입니다. 실제 연도별 매출에서 같은 품목의 두 값을 읽는 것을 독립 재선택으로 바꾸면 ‘그 품목의 연간 변화’라는 질문도 바뀝니다.

On four uniform tickets, let X=(0,1,2,3) and Y=(3,2,1,0). Reading both from the same ticket always gives X+Y=3. Both means are 1.5, so the sum has mean three and variance zero. Linearity holds despite dependence.

Alternatively, independently select one X ticket and one Y ticket. The new law assigns probability 1/16 to each of 16 ordered pairs. The sum now ranges from zero to six while its mean remains three. Equal marginals and equal sum expectations do not determine a joint law.

E[XY]=1 (paired),E[X]E[Y]=94,Cov⁡(X,Y)=−54E[XY]=1\ \text{(paired)},\qquad E[X]E[Y]=\frac94,\qquad \operatorname{Cov}(X,Y)=-\frac54

Under independent reselection, E[XY]=9/4, covariance is zero, and the sum variance is 5/2. Replacing same-category annual sales pairs by independent category draws also changes the question being answered.

기초Foundations

9. 선형성 실습: 평균의 합과 곱의 평균을 대조한다9. Linearity lab: compare means of sums and products

X와 Y의 값, 공통 이름표의 가중치, a와 b를 바꾸어 Z=aX+bY를 계산합니다. 같은 이름표의 짝과 독립 재선택을 전환할 때 주변평균은 그대로지만 결합확률은 달라집니다.

먼저 기본값에서 a=b=1을 선택하고, E[Z]=aE[X]+bE[Y]가 두 법칙 모두에서 맞는지 보세요. 그다음 E[XY]와 E[X]E[Y]를 비교합니다. 곱은 합처럼 선형성이 보장하는 대상이 아닙니다.

b=−1로 바꾸면 차이의 분산에 −2Cov(X,Y)가 나타납니다. ‘분산은 늘 더한다’고 외우지 말고 계수와 교차항의 부호를 읽으세요. 실습의 독립 옵션은 원래 자료의 독립성을 증명하지 않고, 명시적으로 새 곱법칙을 정의합니다.

Change paired values, ticket weights and coefficients a, b to form Z=aX+bY. Switch between same-ticket pairs and independent reselection. Marginal means stay fixed while the joint probabilities change.

Begin with a=b=1 and verify E[Z]=aE[X]+bE[Y] under both laws. Then compare E[XY] with E[X]E[Y]. Products are not covered by the linearity of sums.

Setting b=−1 introduces −2Cov(X, Y) into the variance of the difference. Read coefficients and cross-term signs instead of always adding variances. The independent option defines a new product law; it does not prove the original pairing independent.

기초Foundations

10. 지시함수의 기대값으로 사건과 개수를 연결한다10. Indicators connect expectations to probabilities and counts

사건 A가 일어나면 1, 아니면 0을 반환하는 I_A를 생각합시다. 기대값은 1·P(A)+0·P(Aᶜ)=P(A)입니다. 확률 문제를 숫자의 평균 문제로 바꾸는 다리입니다.

E[IA]=P(A),N=∑i=1mIAi ⟹ E[N]=∑i=1mP(Ai)E[I_A]=P(A),\qquad N=\sum_{i=1}^{m}I_{A_i}\ \Longrightarrow\ E[N]=\sum_{i=1}^{m}P(A_i)

N이 기준을 만족한 이름표의 수라면 각 지시함수의 기대값을 더하면 됩니다. 유한한 사건 개수 m에 대해 독립일 필요가 없습니다. 다만 같은 이름표를 두 번 세면 ‘서로 다른 대상의 수’가 아니라 중복을 포함한 집계가 된다는 점은 여전히 확인해야 합니다.

가정한 두 사건이 사실 같은 사건이고 각각 확률 1/2라면 I_A+I_A=2I_A의 기대값은 1입니다. 그러나 분산은 1이며, 독립한 두 Bernoulli(1/2)의 분산 1/2와 다릅니다. 기대 개수와 변동을 계산하는 가정은 같지 않습니다.

Let I_A return one when event A occurs and zero otherwise. Its expectation is 1·P(A)+0·P(Aᶜ)=P(A). Indicators turn an event-probability problem into numerical averaging.

E[IA]=P(A),N=∑i=1mIAi ⟹ E[N]=∑i=1mP(Ai)E[I_A]=P(A),\qquad N=\sum_{i=1}^{m}I_{A_i}\ \Longrightarrow\ E[N]=\sum_{i=1}^{m}P(A_i)

For a finite count of qualifying events, add their probabilities without requiring independence. Check what is being counted: duplicated tickets do not suddenly become distinct targets.

If two events are the same event of probability 1/2, then I_A+I_A=2I_A has mean one but variance one. Two independent Bernoulli(1/2) variables instead have sum variance 1/2. The assumptions needed for a mean and for its variation differ.

선택 심화Optional extension

11. 비음수 기대값은 무한대일 수도 있다11. A nonnegative expectation may be infinite

유한 이름표에서는 모든 값이 유한하면 기대값도 유한합니다. 그러나 무한히 많은 가능한 값에서는 각 값이 유한하더라도 평균이 무한대가 될 수 있습니다. n=1,2,…에 대해 X=2ⁿ을 확률 2⁻ⁿ으로 반환하는 가정 법칙을 생각합시다. 확률의 합은 1입니다.

∑n=1∞2−n=1,E[X]=∑n=1∞2n2−n=∑n=1∞1=+∞\sum_{n=1}^{\infty}2^{-n}=1,\qquad E[X]=\sum_{n=1}^{\infty}2^n2^{-n}=\sum_{n=1}^{\infty}1=+\infty

매우 큰 값의 확률이 작아져도 ‘값×확률’ 기여가 줄지 않습니다. 상위 값을 아직 보지 못한 유한 시뮬레이션에서 유한 평균이 나온다는 사실은 이 법칙의 유한 기대값을 증명하지 못합니다.

X_N=2ⁿ·1{n≤N}처럼 큰 번호의 결과를 0으로 잘라낸 변수를 만들면 E[X_N]=N입니다. X_N은 X로 단조 증가하고 기대값도 끝없이 증가합니다. 수리기초 24장의 단조수렴정리가 이 과정을 정식으로 뒷받침합니다. 단위가 있는 값이라면 2ⁿ에 해당 단위도 붙여야 합니다.

Finite tickets with finite values always have a finite mean. Infinite possibilities behave differently. Consider the assumed law returning X=2ⁿ with probability 2⁻ⁿ for n=1,2,… . The probabilities sum to one.

∑n=1∞2−n=1,E[X]=∑n=1∞2n2−n=∑n=1∞1=+∞\sum_{n=1}^{\infty}2^{-n}=1,\qquad E[X]=\sum_{n=1}^{\infty}2^n2^{-n}=\sum_{n=1}^{\infty}1=+\infty

Although large values become rarer, each value-times-probability contribution remains one. A finite simulation producing a finite average cannot establish finiteness of this expectation.

Define X_N=2ⁿ·1{n≤N}, replacing higher-index outcomes by zero. Then E[X_N]=N, and X_N increases to X. Monotone convergence from Mathematical Foundations Chapter 24 justifies the limiting expectation. Attach the appropriate physical unit if the returned values carry one.

선택 심화Optional extension

12. 양과 음을 따로 보아야 기대값의 존재를 말할 수 있다12. Separate positive and negative parts before asserting existence

X⁺=max(X,0), X⁻=max(−X,0)로 정하면 X=X⁺−X⁻, |X|=X⁺+X⁻입니다. 비음수 기대값 둘을 먼저 계산하여 E[X]를 정의합니다. 둘 다 무한대라면 ∞−∞를 계산할 수 없으므로 기대값은 미정의입니다.

E[X]=E[X+]−E[X−],X∈L1⟺E[∣X∣]<∞⟺E[X] is well-defined and finite.\begin{aligned}E[X]&=E[X^+]-E[X^-],\\X\in L^1&\Longleftrightarrow E[|X|]<\infty\\&\Longleftrightarrow E[X]\text{ is well-defined and finite}.\end{aligned}

예를 들어 ±2ⁿ 각각에 확률 2⁻ⁿ⁻¹을 주면 양과 음의 기여가 각 번호마다 1/2입니다. 양쪽 기대값이 모두 무한대입니다. 겉보기 대칭이라고 평균을 0으로 선언할 수 없습니다. 같은 크기의 양·음을 짝지어 0을 얻는 특정 절단은 기대값의 존재를 대신하지 않습니다.

한쪽만 무한대이면 확장된 기대값 +∞ 또는 −∞는 정의할 수 있습니다. 이 장에서 ‘적분 가능’이라고 말할 때는 E[|X|]<∞를 뜻하며 유한한 실수 기대값을 보장합니다. 이후 선형성·조건부 기대값 정리의 가정에서 이 말을 다시 사용합니다.

Write X⁺=max(X,0) and X⁻=max(−X,0). Then X=X⁺−X⁻ and |X|=X⁺+X⁻. Calculate the two nonnegative expectations first. If both are infinite, their difference is undefined.

E[X]=E[X+]−E[X−],X∈L1⟺E[∣X∣]<∞⟺E[X] is well-defined and finite.\begin{aligned}E[X]&=E[X^+]-E[X^-],\\X\in L^1&\Longleftrightarrow E[|X|]<\infty\\&\Longleftrightarrow E[X]\text{ is well-defined and finite}.\end{aligned}

Assign probability 2⁻ⁿ⁻¹ to each of ±2ⁿ. Every positive and negative contribution has magnitude 1/2, so both parts have infinite expectation. Symmetry does not make the expectation zero. A chosen symmetric truncation is not a substitute for existence of the expectation.

If exactly one part is infinite, an extended expectation +∞ or −∞ is defined. “Integrable” here means E[|X|]<∞ and guarantees a finite real expectation. This condition will appear in linearity and conditional-expectation results.

학부 연결 · 선택Undergraduate bridge · optional

13. 평균이 유한해도 두 번째 모멘트는 무한할 수 있다13. A finite mean need not imply a finite second moment

k차 원점 모멘트는 E[Xᵏ], 절대 모멘트는 E[|X|ᵏ]입니다. 첫 모멘트가 중심을, 두 번째 모멘트가 제곱 크기를 측정합니다. 제곱 적분 가능하다는 말은 E[X²]<∞라는 뜻입니다.

n≥1에서 P(X=2ⁿ)=3/4ⁿ이라는 가정 법칙은 확률 합이 1입니다. E[X]=3Σ2⁻ⁿ=3이지만 E[X²]=Σ3=∞입니다. 유한 평균과 무한 분산이 함께 존재하는 예입니다. 반대로 P(X=2ⁿ)=7/8ⁿ이면 E[X]=7/3, E[X²]=7, 분산은 14/9로 모두 유한합니다.

∣x∣≤1+x2⟹E[X2]<∞ ⟹ E[∣X∣]<∞|x|\le1+x^2\quad\Longrightarrow\quad E[X^2]<\infty\ \Longrightarrow\ E[|X|]<\infty

따라서 두 번째 모멘트의 유한성은 첫 기대값의 유한성보다 강한 요구입니다. 변수의 단위가 g라면 첫 모멘트는 g, 두 번째 모멘트와 분산은 g²입니다. 단위 없는 확률과 단위 있는 모멘트를 함께 읽어야 합니다.

A raw kth moment is E[Xᵏ]; an absolute moment is E[|X|ᵏ]. The first concerns location and the second squared size. Square integrability means E[X²]<∞.

The assumed law P(X=2ⁿ)=3/4ⁿ for n≥1 has total probability one. Its mean is 3Σ2⁻ⁿ=3, but its second moment is Σ3=∞. A finite mean can coexist with infinite variance. With probabilities 7/8ⁿ instead, the mean is 7/3, the second moment seven, and variance 14/9.

∣x∣≤1+x2⟹E[X2]<∞ ⟹ E[∣X∣]<∞|x|\le1+x^2\quad\Longrightarrow\quad E[X^2]<\infty\ \Longrightarrow\ E[|X|]<\infty

Finite second moment is thus a stronger requirement than integrability. For a variable measured in g, the first moment has units g while the second moment and variance have units g². Probabilities themselves are dimensionless.

학부 연결 · 선택Undergraduate bridge · optional

14. 밀도와 혼합법칙에서도 값에 질량을 곱해 쌓는다14. Integrate value against density and retain any atoms

이산 법칙의 Σxp(x)는 PDF가 있는 법칙에서 ∫xf(x)dx로 바뀝니다. 길이 dx에 들어 있는 확률을 f(x)dx로 표현하는 것입니다. 이 계산도 비음수 또는 적분 가능 조건 아래에서 정의합니다.

E[g(X)]=∫Rg(x)fX(x) dx,E[∣g(X)∣]<∞ for a finite expectationE[g(X)]=\int_{\mathbb R}g(x)f_X(x)\,dx,\qquad E[|g(X)|]<\infty\ \text{for a finite expectation}

가정한 U(0,1)의 평균은 ∫₀¹x dx=1/2, 두 번째 모멘트는 1/3입니다. 0에 질량 1/4를 두고 나머지 3/4를 U(0,1)로 펼친 혼합법칙의 평균은 (1/4)·0+(3/4)·(1/2)=3/8입니다. 연속부분만 적분하여 얻은 질량 3/4를 전체 PDF의 정규화 1로 착각하지 마세요.

원자·절대연속·특이연속 법칙을 모두 다루는 표기는 E[g(X)]=∫g dP_X입니다. 이 장의 실제 기록은 원자법칙이므로 원래 유한 합을 씁니다. 연속적으로 펼치는 모형을 도입하면 그 가정을 따로 표시합니다.

The discrete sum Σxp(x) becomes ∫xf(x)dx when a PDF exists. The factor f(x)dx describes probability over a small length. A nonnegative or integrable transformed variable justifies the expectation.

E[g(X)]=∫Rg(x)fX(x) dx,E[∣g(X)∣]<∞ for a finite expectationE[g(X)]=\int_{\mathbb R}g(x)f_X(x)\,dx,\qquad E[|g(X)|]<\infty\ \text{for a finite expectation}

An assumed U(0,1) has mean 1/2 and second moment 1/3. A mixture with mass 1/4 at zero and weight 3/4 on U(0,1) has mean 3/8. Its absolutely continuous component integrates to 3/4, not a full probability density of total mass one.

The general notation E[g(X)]=∫g dP_X covers atomic, absolutely continuous and singular-continuous laws. Actual recorded values here remain atoms and use finite sums. Any continuous spread is a separately labeled assumption.

기초Foundations

15. 분산은 평균에서 떨어진 제곱거리의 기대값이다15. Variance is expected squared distance from the mean

기대값이 1인 (0,1,1,2) 균등 법칙에서 평균과의 차이는 (−1,0,0,1)입니다. 부호 있는 차이의 평균은 0이므로 퍼짐을 재지 못합니다. 차이를 제곱하여 평균 내면 (1+0+0+1)/4=1/2입니다.

μ=E[X],Var⁡(X)=E[(X−μ)2],SD⁡(X)=Var⁡(X)\mu=E[X],\qquad \operatorname{Var}(X)=E[(X-\mu)^2],\qquad \operatorname{SD}(X)=\sqrt{\operatorname{Var}(X)}

유한 평균을 전제로 분산을 정의합니다. X가 적분 가능하되 제곱 적분 가능하지 않으면 이 비음수 기대값은 +∞일 수 있습니다. 이 장의 유한 표에서는 항상 유한합니다. 표준편차는 원래 단위로 돌아오지만 원래 값의 ‘평균 거리’인 평균절대편차와는 다릅니다.

분산이 0이면 X=μ가 확률 1로 성립합니다. 가능한 모든 이름표가 같은 값을 가져야 한다는 뜻은 아닙니다. 확률 0인 이름표의 값이 달라도 법칙의 분산에는 기여하지 않습니다. 양의 확률을 가진 이름표에서는 모두 같아야 합니다.

Uniform values (0,1,1,2) have mean one and deviations (−1,0,0,1). Signed deviations average to zero regardless of spread. Squaring first gives variance (1+0+0+1)/4=1/2.

μ=E[X],Var⁡(X)=E[(X−μ)2],SD⁡(X)=Var⁡(X)\mu=E[X],\qquad \operatorname{Var}(X)=E[(X-\mu)^2],\qquad \operatorname{SD}(X)=\sqrt{\operatorname{Var}(X)}

We define variance around a finite mean. An integrable variable without a finite second moment can have infinite variance. All finite tables here have finite variance. Standard deviation returns to the original unit but differs from the mean absolute deviation.

Variance zero means X=μ with probability one. A zero-probability ticket may carry a different value without affecting variance; all positive-probability tickets must share the mean.

기초Foundations

16. 두 번째 모멘트에서 평균의 제곱을 빼는 이유16. Why subtract the squared mean from the second moment?

μ=E[X]는 상수입니다. (X−μ)²를 X²−2μX+μ²로 펴고 선형성을 적용합니다. E[X²]<∞를 가정하면 모든 항이 유한하므로 빼기가 안전합니다.

Var⁡(X)=E[X2]−2μE[X]+μ2=E[X2]−μ2.\begin{aligned}\operatorname{Var}(X)&=E[X^2]-2\mu E[X]+\mu^2\\&=E[X^2]-\mu^2.\end{aligned}

균등 (0,1,1,2)에서는 E[X²]=1.5, μ²=1이므로 분산 0.5를 다시 얻습니다. 그러나 큰 공통 수준을 가진 자료에서 컴퓨터가 큰 두 수를 빼면 반올림 손실이 생길 수 있습니다. 정의의 중심편차 합이나 안정된 알고리즘으로 교차 확인하세요.

분산을 계산할 때 여기서는 확률이 합 1인 법칙을 이미 정했습니다. 따라서 Σpᵢ(xᵢ−μ)²를 쓰며, n−1로 자동 교체하지 않습니다. 표본으로 미지의 모집단 분산을 추정할 때의 불편 보정은 별도의 추론 모형에서 배웁니다.

The mean μ=E[X] is constant. Expand (X−μ)² and apply linearity. Assuming E[X²]<∞ makes every subtraction finite.

Var⁡(X)=E[X2]−2μE[X]+μ2=E[X2]−μ2.\begin{aligned}\operatorname{Var}(X)&=E[X^2]-2\mu E[X]+\mu^2\\&=E[X^2]-\mu^2.\end{aligned}

For uniform (0,1,1,2), second moment 1.5 minus squared mean one gives variance 0.5. Numerically subtracting two large nearby moments can lose precision. Cross-check with centered deviations or a stable algorithm.

Here the probability law is already defined, so variance uses Σpᵢ(xᵢ−μ)². Do not automatically replace a denominator by n−1. Unbiased estimation of an unknown population variance belongs to a separate inferential model.

기초Foundations

17. 단위가 바뀌면 평균은 한 번, 분산은 두 번 변한다17. Unit scaling acts once on means and twice on variances

Z=aX+b이면 평균은 aμ+b입니다. 평균을 뺀 차이는 Z−E[Z]=a(X−μ)가 됩니다. 평행이동 b는 차이에서 사라지고, 제곱할 때 a²가 남습니다.

E[aX+b]=aE[X]+b,Var⁡(aX+b)=a2Var⁡(X)E[aX+b]=aE[X]+b,\qquad \operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)

g를 kg로 바꾸면 a=1/1000입니다. 실제 펭귄 평균 약 4201.754386g은 4.201754386kg, 분산 약 641250.577101g²은 0.641250577101kg²입니다. 분산에 1000만 나누는 것은 단위 오류입니다. a가 음수여도 a² 때문에 분산은 음수가 되지 않습니다.

a=0이면 모든 반환값이 b인 상수이고 분산은 0입니다. 이미 정의된 법칙에서 상수로 바꾸는 일과, 총가중치가 0이라 법칙 자체가 없는 일은 다릅니다. 후자에서는 평균과 분산을 상수값으로 채우지 않습니다.

For Z=aX+b, its mean is aμ+b and its centered deviation is a(X−μ). The shift disappears; squaring leaves a².

E[aX+b]=aE[X]+b,Var⁡(aX+b)=a2Var⁡(X)E[aX+b]=aE[X]+b,\qquad \operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)

Converting g to kg uses a=1/1000. The actual mean changes from about 4201.754386 g to 4.201754386 kg, and variance from 641250.577101 g² to 0.641250577101 kg². Dividing variance by only 1000 is a unit error. Negative a still produces nonnegative a².

With a=0, a defined law becomes the constant b with zero variance. This differs from zero total weight, where no normalized law exists and its moments remain undefined.

기초Foundations

18. 분산 실습: 임의 중심의 제곱오차를 분해한다18. Variance lab: decompose squared error around any center

반환값을 Z=aX+b로 바꾼 뒤 임의의 예측 상수 c에서 제곱거리를 계산합니다. 평균에서 재는 분산과 다른 중심에서 재는 제곱오차를 나란히 보세요.

E[(Z−c)2]=Var⁡(Z)+(E[Z]−c)2E[(Z-c)^2]=\operatorname{Var}(Z)+(E[Z]-c)^2

기본 법칙의 평균은 1입니다. a=1,b=0,c=0이면 제곱오차 1.5는 분산 0.5와 중심 차이의 제곱 1로 나뉩니다. c=1이면 추가항이 0이 됩니다. 이 때문에 제곱오차 기준의 최적 상수 예측값은 기대값입니다.

다른 단위를 입력할 때 a,b,c의 단위를 함께 맞추세요. c를 바꾸는 것은 예측 기준을 바꾸는 일이며 원래 값의 분산 자체를 바꾸지 않습니다. 값을 새로 관측한 것이 아니라 주어진 값과 선택 법칙에 대한 계산입니다.

Transform values to Z=aX+b, then calculate expected squared distance from an arbitrary prediction c. Compare variance around the mean with squared error around another center.

E[(Z−c)2]=Var⁡(Z)+(E[Z]−c)2E[(Z-c)^2]=\operatorname{Var}(Z)+(E[Z]-c)^2

The default mean is one. For a=1, b=0, c=0, squared error 1.5 separates into variance 0.5 and squared mean offset one. At c=1, the extra term vanishes. Thus the mean is the best constant predictor under squared loss.

Keep scale, shift and prediction units consistent. Changing c changes a reference prediction, not the variance of Z. This calculation describes fixed values and a stated law rather than newly observed data.

학부 연결 · 선택Undergraduate bridge · optional

19. 합과 차이의 분산에는 교차항이 있다19. Variances of sums and differences contain a cross-term

제곱 적분 가능한 X,Y에서 공분산은 중심편차 곱의 기대값입니다. 두 변수의 단위가 다르면 공분산 단위는 두 단위의 곱입니다. |XY|≤(X²+Y²)/2를 적절한 수치 단위로 적용하면 필요한 곱의 적분 가능성도 확인할 수 있습니다.

Cov⁡(X,Y)=E[(X−E[X])(Y−E[Y])]=E[XY]−E[X]E[Y]\operatorname{Cov}(X,Y)=E[(X-E[X])(Y-E[Y])]=E[XY]-E[X]E[Y]
Var⁡(aX+bY)=a2Var⁡(X)+b2Var⁡(Y)+2abCov⁡(X,Y)\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)+2ab\operatorname{Cov}(X,Y)

이 공식은 중심화한 aX+bY의 제곱을 펴서 얻습니다. a=b=1이면 +2Cov, a=−1,b=1이면 −2Cov입니다. 두 해의 같은 품목 매출이 함께 큰 경우 공통 크기는 차이에서 많이 상쇄됩니다.

공분산이 0이면 분산이 더해지지만, 그것만으로 모든 사건의 독립성이 따라오지는 않습니다. 공분산이 정의되지 않는 무거운 꼬리에서는 ‘공분산이 0일 것’이라고 추측하기 전에 모멘트 조건부터 확인해야 합니다.

For square-integrable X, Y, covariance is the expectation of their centered product. Its unit is the product of the variable units. The bound |XY|≤(X²+Y²)/2, applied to numerical coordinates in stated units, ensures product integrability.

Cov⁡(X,Y)=E[(X−E[X])(Y−E[Y])]=E[XY]−E[X]E[Y]\operatorname{Cov}(X,Y)=E[(X-E[X])(Y-E[Y])]=E[XY]-E[X]E[Y]
Var⁡(aX+bY)=a2Var⁡(X)+b2Var⁡(Y)+2abCov⁡(X,Y)\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)+2ab\operatorname{Cov}(X,Y)

Expand the square of the centered linear combination. A sum has +2Cov, while Y−X has −2Cov. Common category size across two sales years can largely cancel in a difference.

Zero covariance permits adding variances but does not establish independence of all events. With heavy tails, check moment existence before even discussing covariance.

학부 연결 · 선택Undergraduate bridge · optional

20. 독립이면 곱이 분리되지만 역은 성립하지 않는다20. Independence factors products, but the converse fails

독립한 적분 가능 변수 X,Y에서는 E[|XY|]=E[|X|]E[|Y|]<∞이고 E[XY]=E[X]E[Y]입니다. 이산 법칙의 곱확률 p_X(x)p_Y(y)를 합에 대입하면 두 합으로 분리됩니다. 제곱 적분 가능하면 공분산도 0입니다.

역의 반례로 X가 −1,0,1을 각각 1/3로 반환하고 Y=X²라고 합시다. E[X]=0, E[XY]=E[X³]=0이므로 공분산은 0입니다. 하지만 X=0을 알면 Y=0이 확실하고, 원래 P(Y=0)=1/3이므로 독립이 아닙니다.

P(X=0,Y=0)=13≠13⋅13=P(X=0)P(Y=0)P(X=0,Y=0)=\frac13\ne\frac13\cdot\frac13=P(X=0)P(Y=0)

더 강하게 E[X|Y]=0도 이 예에서 성립합니다. Y=1일 때 X는 ±1을 같은 확률로 반환하고, Y=0이면 X=0이기 때문입니다. 조건부 평균이 변하지 않아도 조건부 분포는 바뀔 수 있습니다. 평균독립과 완전한 독립을 구별하는 입구입니다.

Independent integrable X, Y satisfy E[|XY|]=E[|X|]E[|Y|]<∞ and E[XY]=E[X]E[Y]. In the discrete case, substitute product probabilities and separate the two sums. Square-integrable independent variables have zero covariance.

The converse fails. Let X be uniform on −1,0,1 and Y=X². Both E[X] and E[XY]=E[X³] are zero, so covariance vanishes. Yet X=0 makes Y=0 certain, compared with unconditional probability 1/3.

P(X=0,Y=0)=13≠13⋅13=P(X=0)P(Y=0)P(X=0,Y=0)=\frac13\ne\frac13\cdot\frac13=P(X=0)P(Y=0)

Even E[X|Y]=0 holds: given Y=1, X is equally likely ±1; given Y=0, X is zero. A constant conditional mean need not imply an unchanged conditional distribution. This introduces the distinction between mean independence and full independence.

기초Foundations

21. 조건을 붙이면 그 안의 확률을 다시 정규화한다21. Conditioning renormalizes probabilities inside the event

균등한 네 이름표의 값이 (1,3,6,8)이고 앞 두 장이 A, 뒤 두 장이 B에 속한다고 합시다. A라는 정보를 받으면 가능한 이름표는 1과 3의 두 장입니다. 원래 각 확률 1/4를 P(A)=1/2로 나누어 각각 1/2를 얻고 평균 2를 계산합니다.

E[X∣A]=E[XIA]P(A),P(A)>0, E[∣X∣]<∞E[X\mid A]=\frac{E[X I_A]}{P(A)},\qquad P(A)>0,\ E[|X|]<\infty

전체 법칙에서 X·I_A는 (1,3,0,0)이므로 기대값 1입니다. 이것을 A의 확률 1/2로 나누면 2가 됩니다. A 밖 값을 0으로 만든 평균과 A 안에서만 다시 정규화한 평균은 다릅니다.

P(A)=0이면 위 비율은 정의되지 않습니다. 확률 0인 조건사건에 0이라는 평균을 자동 지정하지 마세요. 전체 법칙이 잘 정의되어 있어도 특정 조건사건의 비율은 미정의일 수 있습니다.

Four uniform tickets return (1,3,6,8). The first two belong to A and the others to B. Learning A restricts attention to values one and three. Divide each original probability 1/4 by P(A)=1/2, giving conditional probabilities 1/2 and mean two.

E[X∣A]=E[XIA]P(A),P(A)>0, E[∣X∣]<∞E[X\mid A]=\frac{E[X I_A]}{P(A)},\qquad P(A)>0,\ E[|X|]<\infty

The full-law variable X·I_A returns (1,3,0,0) and has expectation one. Dividing by 1/2 gives two. Zeroing values outside A differs from renormalizing inside A.

For P(A)=0, the ratio is undefined. Do not automatically assign mean zero to a null conditioning event. A valid overall law may still have undefined conditional ratios.

기초Foundations

22. 결합분포의 한 줄을 평균 낸다22. Average a conditional slice of a joint distribution

조건변수 G가 A 또는 B라는 그룹 이름을 반환한다고 합시다. P(G=g)>0이면 X의 조건부 질량 p(x|g)를 앞 장처럼 구한 뒤 xp(x|g)를 합칩니다. E[X|G=g]는 g를 고정한 하나의 숫자입니다.

E[X∣G=g]=∑xx pX∣G(x∣g),pG(g)>0E[X\mid G=g]=\sum_x x\,p_{X\mid G}(x\mid g),\qquad p_G(g)>0

X가 적분 가능하면 양의 확률을 가진 각 이산 그룹에서 조건부 평균도 유한합니다. 다만 무한히 많은 그룹 각각의 평균이 유한하다는 사실만으로 전체 평균이 유한한 것은 아닙니다. 11절의 X=2ⁿ을 G=n으로 완전히 구별하면 모든 그룹 평균은 유한해도 전체 기대값은 무한대입니다.

연속 조건에서는 P(G=g)=0일 수 있습니다. 그때는 이 비율을 그대로 쓰지 않고 적절한 조건부 밀도나 조건부 기대값의 버전을 사용합니다. 이 장의 첫 실습은 양의 질량을 가진 유한 그룹이며, 이 차이를 익힌 뒤 뒤의 심화 절로 갑니다.

Let G return a group label A or B. For P(G=g)>0, obtain the conditional PMF and sum xp(x|g). With g fixed, E[X|G=g] is a number.

E[X∣G=g]=∑xx pX∣G(x∣g),pG(g)>0E[X\mid G=g]=\sum_x x\,p_{X\mid G}(x\mid g),\qquad p_G(g)>0

Integrability of X ensures finite conditional means on every positive-probability discrete group. The converse can fail with infinitely many groups. In Section 11, revealing G=n gives a finite mean 2ⁿ in every group although the overall expectation is infinite.

Continuous conditioning can involve P(G=g)=0. One then uses an appropriate conditional-density or conditional-expectation version rather than this event ratio. Master positive-mass finite groups before taking that optional bridge.

기초Foundations

23. 조건부 평균 실습: 분모와 남은 이름표를 확인한다23. Conditional-mean lab: inspect the denominator and remaining tickets

각 이름표의 값·그룹 A/B·가중치를 바꾸고 어느 그룹을 알게 되었는지 선택합니다. 전체 평균과 조건부 평균, 원래 확률과 조건부 확률을 함께 보세요.

기본값에서 A의 평균은 2, B의 평균은 7, 전체 평균은 4.5입니다. A에 속한 값 중 하나만 바꾸면 A의 조건부 평균과 전체 평균이 함께 바뀌지만 B의 평균은 그대로입니다.

B의 가중치를 모두 0으로 만들어 보세요. 전체 질량이 양수라면 전체 평균은 여전히 정의되지만 B에 조건을 붙인 평균은 미정의입니다. 소수 가중치가 매우 작아 화면에서 0처럼 보일 때에는 정확한 분수 표시로 양의 질량인지 확인합니다. 표시 반올림과 정확한 영확률은 다릅니다.

Change each ticket’s value, A/B label and weight, then select the learned group. Compare overall and conditional means alongside original and conditional probabilities.

Defaults give mean two in A, seven in B and 4.5 overall. Changing one A value affects its conditional mean and the overall mean, but not the B mean.

Set all B weights to zero. If total weight remains positive, the overall mean exists while the B conditional mean is undefined. For a tiny positive weight rounded to zero on screen, inspect its exact fraction. Display rounding is not exact null probability.

기초Foundations

24. E[X|G]는 그룹 평균을 반환하는 확률변수다24. E[X|G] is a variable returning the selected group mean

E[X|G=A]=2는 숫자입니다. 하지만 아직 어느 그룹이 선택될지 모를 때 E[X|G]는 선택된 이름표의 그룹에 따라 2 또는 7을 반환합니다. ‘기대값’이라는 이름이 붙어도 안쪽 조건이 확률변수이면 결과 역시 확률변수일 수 있습니다.

m(G)=E[X∣G],(m(G(a)),m(G(b)),m(G(c)),m(G(d)))=(2,2,7,7)m(G)=E[X\mid G],\qquad (m(G(a)),m(G(b)),m(G(c)),m(G(d)))=(2,2,7,7)

원래 변수는 (1,3,6,8), 그룹 평균 변수는 (2,2,7,7)입니다. 같은 그룹의 서로 다른 값은 구별하지 못하지만 그룹 차이는 남깁니다. 실습에서 원래 값과 그룹 평균을 서로 다른 표시로 비교하는 이유입니다.

기본 법칙에서 m(G)=2와 7의 확률은 각각 1/2입니다. 이 새 변수의 평균을 다시 내면 4.5입니다. 안쪽 평균은 그룹 내부의 불확실성을 정리하고 바깥 평균은 어느 그룹을 선택했는지에 대한 불확실성을 정리합니다.

E[X|G=A]=2 is a number. Before the selected group is known, E[X|G] returns either two or seven according to that group. Despite the word expectation, the conditional object is itself a random variable.

m(G)=E[X∣G],(m(G(a)),m(G(b)),m(G(c)),m(G(d)))=(2,2,7,7)m(G)=E[X\mid G],\qquad (m(G(a)),m(G(b)),m(G(c)),m(G(d)))=(2,2,7,7)

The original variable returns (1,3,6,8), while the conditional-mean variable returns (2,2,7,7). It discards within-group differences while retaining group differences. Compare their separate marks in the lab.

Under the default law, m(G) equals two and seven with probabilities 1/2 each. Averaging this new variable gives 4.5. The inner average handles uncertainty within a group; the outer average handles which group was selected.

기초Foundations

25. 총기대 법칙은 나눈 합을 다시 합치는 항등식이다25. Total expectation recombines a partitioned sum

원래 기대값 Σxp(x,g)를 먼저 그룹별로 묶어 봅시다. 각 그룹의 공동확률은 조건부 확률에 그룹 확률을 곱한 것입니다. 따라서 그룹 안 평균을 구한 뒤 원래 그룹 확률로 다시 가중하면 전체 평균이 됩니다.

E[X]=∑g∑xx pX,G(x,g)=∑g:pG(g)>0pG(g)∑xx pX∣G(x∣g)=E[E[X∣G]].\begin{aligned}E[X]&=\sum_g\sum_x x\,p_{X,G}(x,g)\\&=\sum_{g:p_G(g)>0}p_G(g)\sum_x x\,p_{X\mid G}(x\mid g)\\&=E[E[X\mid G]].\end{aligned}

유한 표에서는 합의 묶음만 바뀌므로 정확합니다. 일반 법칙에서 X가 적분 가능하거나 비음수이면 적절한 의미로 성립합니다. 영질량 그룹의 비율을 0/0으로 계산할 필요가 없습니다. 그 그룹은 전체 평균의 적분에 기여하지 않습니다.

기본 예에서는 (1/2)·2+(1/2)·7=4.5입니다. 그룹 크기가 우연히 같아서 단순 평균도 맞습니다. 실제 펭귄처럼 그룹 수가 151,68,123으로 다르면 원래 기록 선택 확률로 가중해야 합니다.

Group the original joint sum by G. Each joint probability is a conditional probability times its group probability. Average within each group and then weight by the original group probabilities.

E[X]=∑g∑xx pX,G(x,g)=∑g:pG(g)>0pG(g)∑xx pX∣G(x∣g)=E[E[X∣G]].\begin{aligned}E[X]&=\sum_g\sum_x x\,p_{X,G}(x,g)\\&=\sum_{g:p_G(g)>0}p_G(g)\sum_x x\,p_{X\mid G}(x\mid g)\\&=E[E[X\mid G]].\end{aligned}

This is an exact regrouping for finite tables. For general laws it holds for integrable X, or nonnegative X in the extended sense. No 0/0 calculation is needed on null groups, which contribute no mass to the outer integral.

Defaults give (1/2)·2+(1/2)·7=4.5. A simple average works only because the group probabilities happen to match. Actual penguin group sizes 151,68,123 require the original record-selection weights.

기초Foundations

26. 그룹 평균을 똑같이 평균 내면 질문이 바뀐다26. Equal averaging of group means changes the selection law

가정한 이름표 (1,3,6,8)에서 A는 앞의 세 장, B는 마지막 한 장이라고 합시다. 균등 이름표 법칙의 그룹 확률은 3/4와 1/4이며 조건부 평균은 10/3과 8입니다. 총기대는 (3/4)·(10/3)+(1/4)·8=4.5입니다.

두 그룹 평균을 똑같이 평균 내면 (10/3+8)/2=17/3입니다. 산술 오류라기보다 다른 법칙을 계산한 것입니다. 그룹을 먼저 1/2씩 선택하고 그 안의 이름표를 균등하게 고르는 실험이라면 이 값이 맞습니다. 원래 균등 기록 법칙의 평균으로 보고하면 틀립니다.

실제 보고서에서 평균의 평균을 볼 때는 그룹을 만드는 기준, 각 그룹의 분모, 바깥 가중치를 함께 찾으세요. 기대수명 80년 기준도 이 장에서 고른 분류 조건이며, 그 경계에 인과적 의미를 부여하지 않습니다.

For assumed tickets (1,3,6,8), let A contain the first three and B the last. Uniform ticket selection gives group probabilities 3/4 and 1/4, with conditional means 10/3 and eight. Recombining gives 4.5.

Equally averaging the two group means gives 17/3 instead. That is correct for another law: select a group with probability 1/2, then a ticket uniformly within it. Reporting it as the original uniform-record mean is incorrect.

When reading an average of averages, identify the grouping rule, internal denominators and outer weights. The life-expectancy threshold of 80 years is a chosen classification, not a causal boundary.

기초Foundations

27. 조건부 분산도 그룹에 따라 달라지는 변수다27. Conditional variance also depends on the selected group

그룹 A 안에서는 전체 평균 4.5가 아니라 A 평균 2에서 거리를 잽니다. A의 값 1과 3은 차이가 ±1이므로 조건부 분산은 1입니다. B의 값 6과 8도 B 평균 7에서 조건부 분산 1을 가집니다.

Var⁡(X∣G)=E[(X−E[X∣G])2∣G]=E[X2∣G]−(E[X∣G])2\operatorname{Var}(X\mid G)=E[(X-E[X\mid G])^2\mid G]=E[X^2\mid G]-(E[X\mid G])^2

E[X²]<∞를 가정하면 이 조건부 변수는 거의 확실히 유한하며 기대값도 유한합니다. Var(X|G=g)는 g를 정했을 때의 숫자이고 Var(X|G)는 선택된 그룹에 따라 그 숫자를 반환하는 변수입니다.

한 그룹에 값이 하나뿐이면 그 선택 법칙 안의 조건부 분산은 0입니다. 실제 사업이나 개체가 미래에도 일정하거나 위험이 없다는 결론이 아닙니다. 영질량 그룹에서의 비율 미정의와 양의 질량을 가진 한 값의 분산 0도 구별해야 합니다.

Inside A, measure deviations from its mean two rather than overall mean 4.5. Values one and three have deviations ±1, giving conditional variance one. B values six and eight likewise have conditional variance one around seven.

Var⁡(X∣G)=E[(X−E[X∣G])2∣G]=E[X2∣G]−(E[X∣G])2\operatorname{Var}(X\mid G)=E[(X-E[X\mid G])^2\mid G]=E[X^2\mid G]-(E[X\mid G])^2

If E[X²]<∞, this variable is finite almost surely and integrable. Var(X|G=g) is a number for fixed g; Var(X|G) returns that number according to the selected group.

A positive-probability group containing one value has conditional variance zero. That does not make a real business or organism constant or risk-free over time. Also distinguish such a zero variance from an undefined ratio on a null group.

기초Foundations

28. 총분산은 그룹 안 분산과 그룹 평균의 분산의 합이다28. Total variance splits into within and between variation

전체 평균 μ에서 멀어진 이유를 두 단계로 나눕니다. 첫째는 자기 그룹 평균에서 떨어진 차이 X−m(G), 둘째는 그 그룹 평균이 전체 평균에서 떨어진 차이 m(G)−μ입니다. 이 둘을 합하면 X−μ입니다.

X−μ=X−m(G)⏟within+m(G)−μ⏟between,m(G)=E[X∣G]X-\mu=\underbrace{X-m(G)}_{\text{within}}+\underbrace{m(G)-\mu}_{\text{between}},\qquad m(G)=E[X\mid G]
Var⁡(X)=E[Var⁡(X∣G)]+Var⁡(E[X∣G]),E[X2]<∞\operatorname{Var}(X)=E[\operatorname{Var}(X\mid G)]+\operatorname{Var}(E[X\mid G]),\qquad E[X^2]<\infty

기본 예에서 그룹 안 분산의 평균은 1입니다. 그룹 평균 2와 7은 전체 평균 4.5에서 각각 −2.5와 2.5 떨어져 있으므로 그룹 평균의 분산은 6.25입니다. 합 7.25가 실제 네 값의 전체 분산입니다.

두 항을 모두 원래 법칙으로 가중해야 합니다. 첫 항은 그룹별 분산의 단순 평균이라고 일반화하지 말고, 둘째 항도 ‘그룹 평균값들의 가중 분산’임을 확인하세요. 두 항의 단위는 모두 X 단위의 제곱입니다.

Separate distance from the overall mean into distance from one’s group mean and distance of that group mean from the overall mean. The two signed deviations add to X−μ.

X−μ=X−m(G)⏟within+m(G)−μ⏟between,m(G)=E[X∣G]X-\mu=\underbrace{X-m(G)}_{\text{within}}+\underbrace{m(G)-\mu}_{\text{between}},\qquad m(G)=E[X\mid G]
Var⁡(X)=E[Var⁡(X∣G)]+Var⁡(E[X∣G]),E[X2]<∞\operatorname{Var}(X)=E[\operatorname{Var}(X\mid G)]+\operatorname{Var}(E[X\mid G]),\qquad E[X^2]<\infty

Defaults give within component one. Group means two and seven lie ±2.5 from 4.5, yielding between component 6.25. Their sum 7.25 is the variance of the four original values.

Both components use the original law’s group weights. Neither arbitrary unweighted averaging of variances nor an unweighted variance of group means gives the general formula. Both components carry squared units.

학부 연결 · 선택Undergraduate bridge · optional

29. 교차항이 사라지는 이유를 증명한다29. Prove why the cross-term vanishes

28절의 합을 제곱하면 두 제곱항 외에 2(X−m(G))(m(G)−μ)가 생깁니다. 이 항은 각 그룹 안에서 평균 낼 때 0이 됩니다. 그 그룹의 m(G)−μ는 상수이고 E[X−m(G)|G]=0이기 때문입니다.

E[(X−m(G))(m(G)−μ)]=E[(m(G)−μ)E[X−m(G)∣G]]=0.\begin{aligned}E[(X-m(G))(m(G)-\mu)]&=E[(m(G)-\mu)E[X-m(G)\mid G]]\\&=0.\end{aligned}

또 다른 유도는 Var(X)=E[X²]−μ²에 총기대를 적용하는 것입니다. E[X²|G]=Var(X|G)+m(G)²를 대입하면 그룹 안 항과 E[m(G)²]−μ²가 남습니다. 마지막 차이가 Var(m(G))입니다.

E[X2]−μ2=E[Var⁡(X∣G)]+E[m(G)2]−(E[m(G)])2E[X^2]-\mu^2=E[\operatorname{Var}(X\mid G)]+E[m(G)^2]-(E[m(G)])^2

이 증명은 그룹이나 기록이 서로 독립이라는 가정을 사용하지 않습니다. 이미 주어진 결합법칙과 유한 두 번째 모멘트만 사용했습니다. 교차항의 평균 0을 각 결과에서의 곱이 항상 0이라는 뜻으로 읽지 마세요.

Squaring the decomposition produces a cross-term 2(X−m(G))(m(G)−μ). Its conditional average is zero: the second factor is fixed within each group and E[X−m(G)|G]=0.

E[(X−m(G))(m(G)−μ)]=E[(m(G)−μ)E[X−m(G)∣G]]=0.\begin{aligned}E[(X-m(G))(m(G)-\mu)]&=E[(m(G)-\mu)E[X-m(G)\mid G]]\\&=0.\end{aligned}

Alternatively, apply total expectation to E[X²]. Substitute E[X²|G]=Var(X|G)+m(G)², then subtract μ². The remaining difference is Var(m(G)).

E[X2]−μ2=E[Var⁡(X∣G)]+E[m(G)2]−(E[m(G)])2E[X^2]-\mu^2=E[\operatorname{Var}(X\mid G)]+E[m(G)^2]-(E[m(G)])^2

Neither proof assumes groups or records independent. They use the stated joint law and finite second moments. A zero expected cross-term does not mean its value vanishes at every outcome.

기초Foundations

30. 총분산 실습: 두 종류의 퍼짐과 예측 손실을 비교한다30. Total-variance lab: compare two sources of spread and prediction loss

값·그룹·무게를 바꾸어 원래 값, 그룹 평균, 잔차를 비교합니다. 그룹별 예측값을 별도로 입력하면 최적 그룹 평균과의 차이 때문에 늘어난 제곱오차도 계산합니다.

기본값에서는 within=1, between=6.25, 전체 분산=7.25입니다. 각 그룹 안 두 값을 같게 만들면 within이 0이 됩니다. 반대로 두 그룹 평균을 같게 만들면 between이 0이 됩니다. 전체 퍼짐은 한쪽만으로도 존재할 수 있습니다.

예측값 (2,7)은 그룹 평균이므로 평균제곱오차가 1입니다. (0,0)으로 바꾸면 평균제곱오차 27.5가 within 1과 예측값 차이에 의한 추가 손실 26.5로 나뉩니다. 그룹 예측값을 바꾸어도 실제 원래 값과 법칙의 총분산은 그대로입니다.

Change values, groups and weights to compare original values, conditional means and residuals. Separate group predictions expose additional squared error from deviating from the optimal group means.

Defaults give within one, between 6.25 and total 7.25. Making each group internally constant removes within variation. Making the two group means equal removes between variation. Either source can create total spread by itself.

Predictions (2,7) give MSE one. Predictions (0,0) give MSE 27.5, comprising within one plus prediction penalty 26.5. Changing predictions leaves the original values, law and total variance unchanged.

학부 연결 · 선택Undergraduate bridge · optional

31. 조건부 평균은 허용된 정보로 만든 최적 제곱오차 예측이다31. Conditional means minimize squared error using the allowed information

그룹만 알 수 있는 예측자는 같은 그룹의 모든 이름표에 같은 값 h(G)를 반환해야 합니다. 실제 X를 미리 들여다보는 예측과 비교하는 것이 아닙니다. E[X²]<∞이고 h(G)도 제곱 적분 가능하다고 합시다.

E[(X−h(G))2]=E[(X−m(G))2]+E[(m(G)−h(G))2]≥E[(X−m(G))2],m(G)=E[X∣G].\begin{aligned}E[(X-h(G))^2]&=E[(X-m(G))^2]+E[(m(G)-h(G))^2]\\&\ge E[(X-m(G))^2],\qquad m(G)=E[X\mid G].\end{aligned}

다시 X−h=(X−m)+(m−h)로 나누어 제곱합니다. 교차항은 그룹 안 잔차의 평균이 0이라 사라집니다. 추가항이 음수가 될 수 없으므로 m(G)가 최소이며, 같아지려면 h(G)=m(G)가 거의 확실히 성립해야 합니다.

최적이라는 말은 지정한 법칙·정보·제곱손실 아래에서의 뜻입니다. 절대손실에는 조건부 중앙값, 다른 비대칭 손실에는 다른 요약이 적합할 수 있습니다. 실제 모집단의 조건부 평균을 모르는 상황에서 추정한 모형의 성능은 별도 검증이 필요합니다.

A predictor allowed to use only the group must return the same h(G) for every ticket in that group. It may not inspect X in advance. Assume X and h(G) are square-integrable.

E[(X−h(G))2]=E[(X−m(G))2]+E[(m(G)−h(G))2]≥E[(X−m(G))2],m(G)=E[X∣G].\begin{aligned}E[(X-h(G))^2]&=E[(X-m(G))^2]+E[(m(G)-h(G))^2]\\&\ge E[(X-m(G))^2],\qquad m(G)=E[X\mid G].\end{aligned}

Expand X−h=(X−m)+(m−h). Conditional residual averaging removes the cross-term. The added square is nonnegative, proving optimality and uniqueness up to almost-sure equality.

Optimality is relative to the stated law, allowed information and squared loss. Absolute loss favors conditional medians; asymmetric losses can favor other summaries. Estimating an unknown population conditional mean creates a separate validation problem.

학부 연결 · 선택Undergraduate bridge · optional

32. 더 자세한 정보는 이론적 최소 손실을 늘리지 않는다32. More information cannot increase the theoretical minimum loss

처음에는 아무 그룹 정보도 없이 상수 μ만 예측합니다. 다음에는 A/B 그룹을 알고 m(G)를 예측합니다. 가능한 예측의 집합이 넓어졌으므로 최솟값은 커질 수 없습니다. 실제 기본 예의 최소 손실은 7.25에서 1로 줄어듭니다.

E[(X−μ)2]−E[(X−m(G))2]=Var⁡(m(G))≥0E[(X-\mu)^2]-E[(X-m(G))^2]=\operatorname{Var}(m(G))\ge0

그룹을 더 잘게 나눈 정보 H가 G를 포함하면, 세부 조건부 평균 n(H)에 대한 잔차 손실은 다시 줄거나 같습니다. 감소량은 E[(n(H)−m(G))²]입니다. 세부 정보가 X값 전체를 알려 주면 조건부 평균은 X이고 이론적 손실은 0입니다.

그러나 한정된 표본에서 새 설명변수를 추가하여 추정하는 일은 다릅니다. 참 법칙을 아는 최적 예측과, 자료로 적합한 모형의 표본 밖 성능을 구별해야 합니다. 정보가 많다는 사실만으로 실제 학습 모형의 일반화 성능 향상을 보장하지 않습니다.

Without group information, use the optimal constant μ. Learning A/B permits m(G) and enlarges the predictor class, so its theoretical minimum loss cannot increase. The default minimum falls from 7.25 to one.

E[(X−μ)2]−E[(X−m(G))2]=Var⁡(m(G))≥0E[(X-\mu)^2]-E[(X-m(G))^2]=\operatorname{Var}(m(G))\ge0

If finer information H includes G, the conditional predictor n(H) cannot have larger residual loss. The reduction equals E[(n(H)−m(G))²]. Revealing X completely produces predictor X and zero theoretical loss.

This differs from fitting additional predictors with limited data. Optimal prediction under a known law is not the same as an estimated model’s out-of-sample performance. More inputs alone do not guarantee better generalization.

선택 심화Optional extension

33. 탑성질에는 정보의 포함 관계가 필요하다33. The tower property requires nested information

자세한 반 정보 H가 학생의 학년 정보 G를 포함한다고 생각합시다. 먼저 자세한 정보로 평균을 내고, 다시 학년 정보만 남겨 평균 내면 처음부터 학년만 알고 구한 평균과 같습니다. X가 적분 가능하고 정보 집합이 포함되어야 하는 정리입니다.

G⊆H,X∈L1⟹E[E[X∣H]∣G]=E[X∣G]\mathcal G\subseteq\mathcal H,\quad X\in L^1\quad\Longrightarrow\quad E[E[X\mid\mathcal H]\mid\mathcal G]=E[X\mid\mathcal G]

서로 겹치기만 하는 두 분할에서는 무조건 성립하지 않습니다. 균등한 a,b,c,d에서 X=(0,0,0,4), G={{a,b},{c,d}}, H={{a,c},{b,d}}로 둡니다. E[X|H]=(0,2,0,2)를 다시 G 안에서 평균 내면 (1,1,1,1)입니다. E[X|G]=(0,0,2,2)와 다릅니다.

맨 바깥에 아무 조건도 없는 E[E[X|H]]=E[X]는 여전히 맞습니다. ‘조건을 두 번 달면 안쪽 조건 하나를 지운다’는 식으로 외우지 말고 어떤 정보가 어떤 정보를 포함하는지 확인하세요.

Imagine detailed class information H containing coarser grade information G. Average using the detailed information, then retain only grades: the result matches conditioning on grades directly. The theorem requires integrable X and nested information.

G⊆H,X∈L1⟹E[E[X∣H]∣G]=E[X∣G]\mathcal G\subseteq\mathcal H,\quad X\in L^1\quad\Longrightarrow\quad E[E[X\mid\mathcal H]\mid\mathcal G]=E[X\mid\mathcal G]

Overlapping nonnested partitions do not suffice. On uniform a, b, c, d, take X=(0,0,0,4), G={{a, b},{c, d}} and H={{a, c},{b, d}}. E[X|H]=(0,2,0,2); conditioning this on G gives (1,1,1,1), unlike E[X|G]=(0,0,2,2).

Unconditional E[E[X|H]]=E[X] still holds. Do not memorize a rule that deletes any inner condition; verify which information contains which.

학부 연결 · 선택Undergraduate bridge · optional

34. 이미 아는 값은 조건부 평균 밖으로 꺼낼 수 있다34. A known factor can leave a conditional expectation

그룹 G를 알고 있다면 그 그룹에만 의존하는 g(G)도 알고 있습니다. 같은 그룹 안에서는 상수이므로 조건부 평균 밖으로 꺼낼 수 있습니다. 적분 가능한 X에 대해 g를 유계 가측함수로 두면 곱의 적분 가능성도 보장됩니다.

E[g(G)X∣G]=g(G)E[X∣G],E[aX+bY∣G]=aE[X∣G]+bE[Y∣G]E[g(G)X\mid G]=g(G)E[X\mid G],\qquad E[aX+bY\mid G]=aE[X\mid G]+bE[Y\mid G]

조건부 선형성 식에서는 X와 Y가 모두 적분 가능하고 a,b는 상수라고 가정합니다. 반면 그룹 안에서도 달라지는 X 자체를 상수처럼 꺼낼 수는 없습니다. E[X²|G]가 (E[X|G])²과 다른 이유입니다. 이미 아는 적분 가능 변수 h(G)에 대해서는 E[h(G)|G]=h(G)가 거의 확실히 성립합니다.

예를 들어 기본 A그룹에서 X는 1 또는 3이므로 E[X²|A]=5이고 (E[X|A])²=4입니다. 두 값의 차이 1이 조건부 분산입니다. 일반적으로 무한한 g를 밖으로 꺼낼 때는 추가 적분 조건을 확인해야 합니다.

Once G is known, any function g(G) is known and constant within that group. For integrable X and bounded measurable g, the product is integrable and the factor can leave the conditional average.

E[g(G)X∣G]=g(G)E[X∣G],E[aX+bY∣G]=aE[X∣G]+bE[Y∣G]E[g(G)X\mid G]=g(G)E[X\mid G],\qquad E[aX+bY\mid G]=aE[X\mid G]+bE[Y\mid G]

The linearity formula assumes both X and Y integrable and a, b constant. X itself can still vary within a group and cannot be pulled out as a known constant. This is why E[X²|G] differs from (E[X|G])². An already known integrable variable h(G) satisfies E[h(G)|G]=h(G) almost surely.

In default group A, E[X²|A]=5 while the squared conditional mean is four. Their difference one is conditional variance. Unbounded factors require additional integrability checks.

학부 연결 · 선택Undergraduate bridge · optional

35. 조건부 평균은 제곱 크기를 늘리지 않는다35. Conditional averaging does not increase mean square

E[X²]<∞라고 합시다. 각 그룹의 조건부 분산이 비음수이므로 m(G)²≤E[X²|G]가 거의 확실히 성립합니다. 양변에 전체 기대값을 적용하면 E[m(G)²]≤E[X²]를 얻습니다.

(E[X∣G])2≤E[X2∣G],E[(E[X∣G])2]≤E[X2](E[X\mid G])^2\le E[X^2\mid G],\qquad E[(E[X\mid G])^2]\le E[X^2]

이는 제곱함수에 대한 조건부 Jensen 부등식입니다. 절댓값의 버전은 |E[X|G]|≤E[|X||G]이며, 전체 평균을 내면 조건부 평균이 적분 가능하다는 사실도 확인됩니다.

정보를 평균으로 요약하면 그룹 내부의 차이는 사라집니다. 이 ‘수축’은 확률 가중 L² 크기에 관한 말이지, 모든 개별 결과에서 |m(G)|≤|X|라는 뜻이 아닙니다. A의 값 1인 이름표에서 그룹 평균 2는 원래 값보다 큽니다.

Assume E[X²]<∞. Nonnegative conditional variance gives m(G)²≤E[X²|G] almost surely. Taking full expectations yields E[m(G)²]≤E[X²].

(E[X∣G])2≤E[X2∣G],E[(E[X∣G])2]≤E[X2](E[X\mid G])^2\le E[X^2\mid G],\qquad E[(E[X\mid G])^2]\le E[X^2]

This is conditional Jensen for the square. The absolute-value version |E[X|G]|≤E[|X||G] also shows conditional means remain integrable after taking expectations.

The contraction concerns probability-weighted L² size, not the pointwise claim |m(G)|≤|X|. At the default A ticket returning one, its group mean two is larger than the original value.

선택 심화Optional extension

36. 삼각형 밀도의 조건부 평균을 적분으로 구한다36. Integrate a conditional mean in a triangular density model

앞 장의 가정 밀도 f_{X,Y}(x,y)=2, 0<y<x<1을 다시 사용합니다. 실제 기록을 새로 만든 것이 아니라 적분을 연습하는 연속모형입니다. X의 주변밀도는 f_X(x)=2x이고, 0<x<1에서 조건부 Y밀도는 1/x입니다.

E[Y∣X=x]=∫0xy1x dy=x2,E[Y2∣X=x]=x23,Var⁡(Y∣X=x)=x212.\begin{aligned}E[Y\mid X=x]&=\int_0^x y\frac1x\,dy=\frac{x}{2},\\E[Y^2\mid X=x]&=\frac{x^2}{3},\\\operatorname{Var}(Y\mid X=x)&=\frac{x^2}{12}.\end{aligned}

따라서 E[Y|X]=X/2입니다. E[X]=2/3, E[X²]=1/2이므로 E[Y]=1/3, 그룹 안 분산의 평균은 1/24입니다. Var(X)=1/18이므로 조건부 평균의 분산은 1/72입니다. 둘을 더한 Var(Y)=1/18은 직접 적분한 결과와 같습니다.

E[Var⁡(Y∣X)]+Var⁡(E[Y∣X])=124+172=118E[\operatorname{Var}(Y\mid X)]+\operatorname{Var}(E[Y\mid X])=\frac1{24}+\frac1{72}=\frac1{18}

X=x라는 한 점은 확률 0이지만 적절한 조건부 밀도 버전으로 평균을 정의했습니다. x=0에서 1/x를 대입할 필요는 없습니다. 그 끝점의 버전은 전체 적분 결과에 영향을 주지 않습니다.

Reuse the assumed density f_{X, Y}(x, y)=2 on 0< y< x<1. This is an integration model, not newly created observational data. The X marginal is 2x and the conditional Y density is 1/x for 0< x<1.

E[Y∣X=x]=∫0xy1x dy=x2,E[Y2∣X=x]=x23,Var⁡(Y∣X=x)=x212.\begin{aligned}E[Y\mid X=x]&=\int_0^x y\frac1x\,dy=\frac{x}{2},\\E[Y^2\mid X=x]&=\frac{x^2}{3},\\\operatorname{Var}(Y\mid X=x)&=\frac{x^2}{12}.\end{aligned}

Thus E[Y|X]=X/2. Since E[X]=2/3 and E[X²]=1/2, E[Y]=1/3 and expected conditional variance is 1/24. Var(X)=1/18 gives variance of the conditional mean 1/72. Adding gives Var(Y)=1/18, matching direct integration.

E[Var⁡(Y∣X)]+Var⁡(E[Y∣X])=124+172=118E[\operatorname{Var}(Y\mid X)]+\operatorname{Var}(E[Y\mid X])=\frac1{24}+\frac1{72}=\frac1{18}

Each event X=x has probability zero, but a suitable conditional-density version defines these means. Do not substitute x=0 into 1/x; its endpoint version has no effect on the overall integrals.

선택 심화Optional extension

37. 영확률 조건에서의 값은 버전과 비율을 구별한다37. Distinguish versions from ratios at null conditions

유한 표에서 P(G=B)=0이면 E[X|G=B]라는 비율은 미정의입니다. 다만 전체 확률변수 m(G)를 모든 이름표에 적으려면 영질량 그룹에 임의의 유한값을 적을 수 있습니다. 그 값은 어떤 관측 가능한 평균이나 적분에도 기여하지 않으며, 데이터가 결정한 조건부 평균이 아닙니다.

연속형에서도 조건부 기대값은 보통 거의 모든 조건값에 대해서만 고유합니다. 표준적인 실수값 변수에서는 적절한 조건부 법칙을 사용할 수 있지만, 한 점에 붙이는 버전 선택을 0/0의 직접 계산으로 해석하면 안 됩니다.

m1(G)=m2(G) a.s.⟹E[m1(G)]=E[m2(G)]when integrablem_1(G)=m_2(G)\ \text{a.s.}\quad\Longrightarrow\quad E[m_1(G)]=E[m_2(G)]\quad\text{when integrable}

실습은 영질량 그룹의 평균을 ‘—, 미정의’로 표시하고, 그 그룹의 가중 기여는 0으로 처리합니다. 미정의 평균 자체를 0이라고 주장하는 것은 아닙니다. 전혀 법칙이 없는 총가중치 0에서는 전체 평균도 미정의입니다.

In a finite table, P(G=B)=0 leaves the event ratio E[X|G=B] undefined. A full conditional-mean variable may assign any finite version value on that null group without changing an observable integral. That value is not a data-determined conditional ratio.

Continuous conditional expectations are likewise usually unique only for almost every conditioning value. Appropriate conditional laws exist for standard real-valued settings, but a chosen version at one point is not a direct 0/0 calculation.

m1(G)=m2(G) a.s.⟹E[m1(G)]=E[m2(G)]when integrablem_1(G)=m_2(G)\ \text{a.s.}\quad\Longrightarrow\quad E[m_1(G)]=E[m_2(G)]\quad\text{when integrable}

The lab displays null-group means as undefined and their weighted contributions as zero. It does not declare the undefined mean itself zero. Zero total weight leaves the entire law and all its moments undefined.

대학원 연결Graduate bridge

38. 정보 집합에 대한 조건부 기대값의 정의38. Define conditional expectation relative to an information set

대학원 연결에서는 그룹 이름 하나보다 일반적인 정보 집합 𝒢를 사용합니다. 𝒢는 우리가 구별할 수 있는 사건들의 σ대수입니다. 적분 가능한 X에 대해 Z=E[X|𝒢]는 두 조건을 만족하는 적분 가능 변수입니다.

Z is G-measurable,∫AZ dP=∫AX dPfor every A∈GZ\text{ is }\mathcal G\text{-measurable},\qquad \int_A Z\,dP=\int_A X\,dP\quad\text{for every }A\in\mathcal G

첫 조건은 Z가 허용된 정보만 사용한다는 뜻입니다. 둘째 조건은 그 정보로 구별할 수 있는 어떤 부분집합에서도 원래 X의 총합을 확률 적분의 의미로 보존한다는 뜻입니다. 유한 그룹에서는 그룹마다 평균을 반환하면 두 조건을 직접 확인할 수 있습니다.

𝒢=σ(G)는 G값을 알 때 구별할 수 있는 정보입니다. 이 경우 E[X|G]를 E[X|σ(G)]의 줄임말로 씁니다. 측도 공간의 사건·가측함수·적분을 배운 수리기초 24장과 연결하지만, 중학교 입구의 계산은 앞의 유한 그룹 평균으로 충분합니다.

The graduate bridge uses an information σ-algebra 𝒢: the events we can distinguish. For integrable X, a conditional expectation Z=E[X|𝒢] is integrable and satisfies two conditions.

Z is G-measurable,∫AZ dP=∫AX dPfor every A∈GZ\text{ is }\mathcal G\text{-measurable},\qquad \int_A Z\,dP=\int_A X\,dP\quad\text{for every }A\in\mathcal G

Measurability restricts Z to allowed information. The integral identity preserves the total of X over every event distinguishable using that information. Group means directly satisfy both requirements in finite partitions.

The notation σ(G) means information generated by knowing G, and E[X|G] abbreviates E[X|σ(G)]. This connects to Mathematical Foundations Chapter 24. The earlier finite-group computations remain the introductory route.

대학원 연결Graduate bridge

39. 조건부 기대값은 존재하며 거의 확실히 고유하다39. Conditional expectations exist and are unique almost surely

확률 공간과 부분 σ대수 𝒢에서 X가 적분 가능하면 38절의 Z가 존재합니다. 일반 존재정리는 Radon–Nikodym 정리 등 측도론의 결과에 의존하며, 이 장에서 몇 줄의 유한 합으로 일반 경우까지 증명했다고 주장하지 않습니다. 유한 분할의 구성은 이미 직접 만들었습니다.

고유성의 핵심은 비교할 수 있습니다. Z₁,Z₂가 두 버전이면 모든 A∈𝒢에서 ∫_A(Z₁−Z₂)dP=0입니다. A_n={Z₁−Z₂≥1/n}을 선택하면 그 적분은 적어도 P(A_n)/n이므로 P(A_n)=0입니다. 양의 차이 집합은 이 가산 합집합에 들어가 확률 0이며, 음의 차이에도 같은 논리를 적용합니다.

0=∫An(Z1−Z2) dP≥1nP(An)⟹P(Z1>Z2)=00=\int_{A_n}(Z_1-Z_2)\,dP\ge\frac1nP(A_n)\quad\Longrightarrow\quad P(Z_1>Z_2)=0

따라서 두 버전은 모든 점에서가 아니라 거의 확실히 같습니다. 유한 법칙에서 영질량 이름표의 자유와 같은 구조입니다. 확률 0의 예외가 있는 정리를 모든 결과의 동일성으로 강화하지 마세요.

For integrable X on a probability space and any sub-σ-algebra 𝒢, such a Z exists. General existence relies on measure-theoretic results such as Radon–Nikodym; a few finite sums do not prove it in full generality. Finite partitions were constructed explicitly above.

Uniqueness has an accessible argument. If Z₁, Z₂ satisfy the defining identities, their difference integrates to zero on every 𝒢-event. Choose A_n={Z₁−Z₂≥1/n}. Its integral is at least P(A_n)/n, forcing P(A_n)=0. The positive-difference event is their countable union; repeat for the negative difference.

0=∫An(Z1−Z2) dP≥1nP(An)⟹P(Z1>Z2)=00=\int_{A_n}(Z_1-Z_2)\,dP\ge\frac1nP(A_n)\quad\Longrightarrow\quad P(Z_1>Z_2)=0

The versions agree almost surely, not necessarily at every point. This is the same freedom as values on null tickets in finite laws. Do not strengthen an almost-sure statement into pointwise equality.

대학원 연결Graduate bridge

40. 조건부 평균과 선형 최소제곱은 언제 같은가40. When does conditional expectation equal a linear least-squares fit?

X∈L²이면 조건부 평균 m(G)는 허용 정보로 만든 제곱 적분 가능 변수들의 공간에 대한 직교 사영입니다. 잔차 X−m(G)는 그 정보에 의존하는 모든 L² 변수 h(G)와 내적 E[(X−m(G))h(G)]=0을 이룹니다. 이는 제곱오차 분해의 기하학입니다.

E[(X−m(G))h(G)]=0,h(G)∈L2E[(X-m(G))h(G)]=0,\qquad h(G)\in L^2

반면 선형 회귀 a+bG는 훨씬 작은 예측 집합에 제한됩니다. 참 조건부 평균이 비선형이면 최적 선형 예측과 참 조건부 평균이 다릅니다. 가정 예 G가 −1,0,1을 균등하게 반환하고 X=G²이면 조건부 평균은 G²이지만 최적 절편 포함 직선은 상수 2/3입니다.

수리기초 15장의 최소제곱은 유한 열공간에 대한 사영이었습니다. 여기서는 정보가 허용하는 함수 공간으로 넓어집니다. 실제 펭귄의 OLS 잔차가 선택한 설명변수와 직교하다는 사실만으로 참 조건부 평균이 일차함수이거나 잔차가 독립·정규라고 결론내리지 않습니다.

For X∈L², m(G) is the orthogonal projection onto square-integrable predictors measurable with the allowed information. Its residual is orthogonal to every L² function h(G), expressed by an expectation inner product.

E[(X−m(G))h(G)]=0,h(G)∈L2E[(X-m(G))h(G)]=0,\qquad h(G)\in L^2

Linear regression a+bG restricts prediction to a smaller class. If the true conditional mean is nonlinear, the best line differs from it. For uniform G on −1,0,1 and X=G², the conditional mean is G² while the best intercept-containing line is the constant 2/3.

Mathematical Foundations Chapter 15 projected onto a finite column space; here we broaden to a function space determined by information. Actual OLS residual orthogonality does not establish a linear population conditional mean or independent normal residuals.

대학원 연결Graduate bridge

41. 총공분산도 조건부 평균으로 분해할 수 있다41. Covariance also decomposes through conditional means

제곱 적분 가능한 X,Y를 같은 정보 G로 나누면 공분산에도 그룹 안과 그룹 사이 항이 생깁니다. 먼저 XY의 조건부 기대값을 조건부 공분산과 두 조건부 평균의 곱으로 나눕니다.

Cov⁡(X,Y)=E[Cov⁡(X,Y∣G)]+Cov⁡(E[X∣G],E[Y∣G])\operatorname{Cov}(X,Y)=E[\operatorname{Cov}(X,Y\mid G)]+\operatorname{Cov}(E[X\mid G],E[Y\mid G])

유도는 E[XY]=E[E[XY|G]]와 총기대 법칙을 사용합니다. X=Y를 대입하면 총분산 법칙이 됩니다. 그룹 안 관계와 그룹 평균 사이 관계가 반대 방향일 수 있어 전체 상관의 부호만으로 그룹 내부 관계를 알 수 없습니다.

이 식 자체는 인과 분해가 아닙니다. 어떤 정보를 조건에 넣었는지, 같은 선택 법칙과 같은 관측 단위를 유지했는지 먼저 확인해야 합니다. 실제 종이 섞인 펭귄 자료에서 큰 전체 공분산은 종 안과 종 사이 두 부분을 포함합니다.

Square-integrable X, Y conditioned on the same information G have a covariance decomposition. Split E[XY|G] into conditional covariance plus the product of conditional means.

Cov⁡(X,Y)=E[Cov⁡(X,Y∣G)]+Cov⁡(E[X∣G],E[Y∣G])\operatorname{Cov}(X,Y)=E[\operatorname{Cov}(X,Y\mid G)]+\operatorname{Cov}(E[X\mid G],E[Y\mid G])

Apply total expectation to XY and to the two means. Taking X=Y recovers total variance. Within-group and between-mean relationships can point in opposite directions, so overall correlation does not determine within-group correlation.

This identity is not itself a causal decomposition. State the conditioning information and retain the same selection law and observational unit. Pooled penguin covariance can contain both within-species and between-species components.

대학원 연결Graduate bridge

42. 변수의 극한과 기대값을 바꾸려면 조건이 필요하다42. Limits cannot pass through expectations without conditions

U가 (0,1)에서 균등하고 X_n=n·1{0<U<1/n}이라고 합시다. 거의 모든 U에서 결국 X_n=0이므로 X_n→0이지만 E[X_n]=1입니다. 점별 또는 거의 확실한 수렴만으로 기대값 수렴을 보장하지 않습니다.

Xn→0 a.s.,E[Xn]=1↛E[0]=0X_n\to0\ \text{a.s.},\qquad E[X_n]=1\not\to E[0]=0

0≤X_n↑X라면 단조수렴정리로 E[X_n]↑E[X]이며 +∞도 허용합니다. 적분 가능한 공통 지배변수 Y가 있어서 |X_n|≤Y이고 X_n→X가 거의 확실히 성립하면 지배수렴정리로 E[X_n]→E[X]입니다. 위 봉우리 예에는 이런 적분 가능한 공통 지배가 없습니다.

기대값이나 분산이 실제 관측의 단순 합으로 계산되는 경우와, 무한한 모형 수열의 극한을 다루는 경우를 구별하세요. 통계적 일치성·극한분포에서 이 교환 문제가 다시 중요해집니다.

Let U be uniform on (0,1) and X_n=n·1{0< U<1/n}. Eventually X_n is zero at almost every U, yet every expectation is one. Pointwise or almost-sure convergence alone does not guarantee convergence of expectations.

Xn→0 a.s.,E[Xn]=1↛E[0]=0X_n\to0\ \text{a.s.},\qquad E[X_n]=1\not\to E[0]=0

If 0≤X_n↑X, monotone convergence gives E[X_n]↑E[X], allowing infinity. If |X_n|≤Y for an integrable common dominator and X_n→X almost surely, dominated convergence gives convergence of expectations. The spike example has no such integrable dominator.

Distinguish finite sums over recorded values from limits of an infinite model sequence. These interchange conditions matter again for consistency and asymptotic inference.

기초Foundations

43. 실제 국가: 조건부 평균을 원래 국가 확률로 합친다43. Actual countries: recombine with the original country probabilities

2024년 실제 16국 이름표를 균등하게 고르고 X에 공표 실질 GDP/명을 넣습니다. 단위는 2015 USD/명이며 PPP가 아닙니다. E[X]≈31100.238572, Var(X)≈532020447.033472입니다. 고정 목록에 정의한 선택법칙의 모멘트이지 세계 모집단 추론이 아닙니다.

공표 기대수명 80년 이상과 미만은 각각 8국입니다. 조건부 평균은 약 47664.331759와 14536.145385입니다. 그룹 안 분산의 가중평균 약 257651263.931050과 그룹 평균의 분산 약 274369183.102422를 더하면 전체 분산이 됩니다.

12(47664.331759…)+12(14536.145385…)=31100.238572…\frac12(47664.331759\ldots)+\frac12(14536.145385\ldots)=31100.238572\ldots

국가 선택확률을 인구 비중으로 바꾸면 기대값은 약 15756.274457로 변합니다. 이는 ‘선택한 국가의 GDP/명’을 반환하는 다른 법칙입니다. 개인소득을 관측하거나 개인소득 분포를 복원한 것이 아닙니다. 그룹 분류와 가중치 변화도 인과적 정책효과로 해석하지 않습니다.

Uniformly select one of 16 actual 2024 country tickets and return reported real GDP per capita, measured in constant 2015 USD/person rather than PPP. The expectation is about 31100.238572 and variance 532020447.033472. These are moments of an explicitly selected fixed list, not inference to the world population.

The reported life-expectancy groups above and below 80 years each contain eight countries. Their conditional means are about 47664.331759 and 14536.145385. Expected within-group variance 257651263.931050 plus variance of the conditional means 274369183.102422 equals total variance.

12(47664.331759…)+12(14536.145385…)=31100.238572…\frac12(47664.331759\ldots)+\frac12(14536.145385\ldots)=31100.238572\ldots

Population-weighted country selection changes the expectation to about 15756.274457. It still returns country GDP per capita, not observed personal income. Neither classification nor reweighting establishes a causal policy effect.

기초Foundations

44. 실제 개체 기록: 종 먼저 선택하면 법칙이 바뀐다44. Actual measurement records: species-first selection changes the law

몸무게가 있는 실제 기록 342개 중 Adelie는 151개, Chinstrap은 68개, Gentoo는 123개입니다. 각 기록을 균등하게 선택하면 종의 확률은 각각 이 수를 342로 나눈 값입니다. 원자료의 행 번호는 고유 추적 개체 번호라는 뜻이 아닙니다.

E[X]=151342558800151+6834212692534+123342624350123=23950057 gE[X]=\frac{151}{342}\frac{558800}{151}+\frac{68}{342}\frac{126925}{34}+\frac{123}{342}\frac{624350}{123}=\frac{239500}{57}\ \mathrm g

세 종의 조건부 평균은 약 3700.662252g, 3733.088235g, 5076.016260g입니다. 원래 가중치로 합친 평균은 약 4201.754386g입니다. 종을 먼저 균등하게 고르는 법칙에서는 세 평균을 1/3씩 더하므로 약 4169.922249g으로 달라집니다.

원래 법칙의 분산 약 641250.577101g²은 그룹 안 약 211823.050330g²과 그룹 사이 약 429427.526771g²의 합입니다. 단위를 kg로 바꾸면 두 항과 전체 분산을 모두 백만으로 나눕니다. 종 사이 차이가 있다는 기술적 분해만으로 개별 원인이나 모집단 효과를 추정하지 않습니다.

Among 342 actual available mass records, species counts are 151 Adelie, 68 Chinstrap and 123 Gentoo. Uniform record selection gives these counts divided by 342 as species probabilities. A row number is not established as a unique lifelong individual identifier.

E[X]=151342558800151+6834212692534+123342624350123=23950057 gE[X]=\frac{151}{342}\frac{558800}{151}+\frac{68}{342}\frac{126925}{34}+\frac{123}{342}\frac{624350}{123}=\frac{239500}{57}\ \mathrm g

Conditional means are about 3700.662252, 3733.088235 and 5076.016260 g. Original record weights yield 4201.754386 g. Selecting species uniformly first instead averages these with weights 1/3 and yields about 4169.922249 g.

Original variance 641250.577101 g² separates into within 211823.050330 g² and between 429427.526771 g². Converting to kg divides every variance component by one million. This descriptive decomposition does not identify individual causes or population effects.

기초Foundations

45. 실제 기업: 차이의 기대값은 빼고 분산은 공분산까지 계산한다45. Actual company: subtract means but retain covariance in variance

Apple의 실제 5품목을 균등하게 하나 고릅니다. X는 그 품목의 FY2023 순매출, Y는 같은 품목의 FY2024 순매출이며 단위는 백만 USD입니다. E[X]=76657, E[Y]=78207이므로 E[Y−X]=1550입니다. 총매출 차이 7750을 5품목으로 나눈 평균이지 기업 전체 차이 자체가 아닙니다.

Var⁡(Y−X)=4424476344.4+4272289823.6−2(4336412641.4)=23940885.2\operatorname{Var}(Y-X)=4424476344.4+4272289823.6-2(4336412641.4)=23940885.2

두 해의 값은 같은 품목에 짝지어져 있습니다. 공분산을 빼먹고 독립을 가정하면 분산 8696766168을 얻어 전혀 다른 질문에 답합니다. 25개 품목 순서쌍을 독립하게 고르는 법칙은 가능하지만 같은 품목의 연간 변화 법칙이 아닙니다.

FY2024를 하드웨어 4품목과 Services 1품목으로 나누면 그룹 확률은 4/5와 1/5입니다. Services 안 분산 0은 한 개의 집계값을 고른 결과입니다. 실제 사업이 위험하지 않다는 뜻이 아닙니다. FY2023은 53주, FY2024는 52주라는 공시 기간 차이도 원자료 해석에서 남겨 둡니다.

Uniformly select one of five actual Apple categories. X returns its FY2023 net sales and Y the same category’s FY2024 sales, in million USD. Means 76657 and 78207 imply mean paired change 1550. This is total change 7750 divided among five categories, not the company-total change itself.

Var⁡(Y−X)=4424476344.4+4272289823.6−2(4336412641.4)=23940885.2\operatorname{Var}(Y-X)=4424476344.4+4272289823.6-2(4336412641.4)=23940885.2

Values are paired by category. Omitting covariance under an independence assumption gives 8696766168 and answers a different question. Independently selecting among 25 ordered category pairs does not preserve same-category annual change.

Grouping FY2024 into four hardware categories and one Services category gives probabilities 4/5 and 1/5. Zero conditional variance inside Services reflects one aggregate value, not a risk-free business. Retain the disclosed 53-week versus 52-week fiscal-period difference.

기초Foundations

46. 실제 자료 실습: 법칙·단위·분해를 한 표에서 검산한다46. Actual-data lab: audit laws, units and decompositions together

국가·펭귄 기록·기업 품목 중 자료를 고르고, 허용된 선택법칙을 바꿉니다. 각 그룹의 확률, 조건부 평균·분산, 총기대·총분산의 기여를 확인하세요. 실제 숫자는 보존하고 가중치 변화는 별도 법칙으로 표시합니다.

국가는 균등/인구가중, 펭귄은 기록 균등/종 먼저 균등, 기업은 품목 균등/매출가중을 비교합니다. 선택법칙이 바뀌면 그룹 내부의 가중치도 달라질 수 있으므로 이전 법칙의 그룹 평균을 무조건 재사용하지 않습니다. 펭귄의 두 법칙은 종 내부 균등 선택을 유지하여 내부 모멘트를 재사용할 수 있습니다.

펭귄 g/kg 전환에서 평균과 제곱 단위의 분산을 확인하세요. 기업의 짝지은 차이에는 현재 선택법칙의 공분산을 사용합니다. 바뀐 기대값이나 분산이 자료 오류·새 관측·인과효과를 뜻하는 것은 아닙니다.

Select country, penguin-record or company-category data, then change its allowed selection law. Inspect group probabilities, conditional moments and contributions to total expectation and variance. Actual values remain fixed; changed weights define another law.

Compare uniform versus population-weighted countries, uniform records versus species-first selection, and uniform versus sales-weighted categories. Reweighting can alter within-group moments, so do not blindly reuse them. Both penguin laws retain uniform selection within species and can reuse those internal moments.

Check g/kg scaling of means and squared variance units. Company paired differences use covariance under the currently selected law. Changed moments do not imply data errors, new observations or causal effects.

기초Foundations

47. 국가·개체 기록·기업의 세 가지 사례47. Three case studies: countries, measurement records and a company

국가 사례 · 전체 평균을 나눴다가 다시 합치기

책상에 실제 16개 국가 이름표가 한 장씩 있다고 생각해 봅시다. 한 장을 균등하게 뽑고, X에 그 국가의 2024년 GDP/명을 넣습니다. 어떤 나라가 뽑힐지는 모르지만 가능한 16개 숫자와 각각의 선택 확률 1/16은 알고 있습니다. 기대값은 이 법칙이 정한 수치의 무게중심입니다. 예측한 미래 GDP나 실제 주민 한 명의 소득을 뜻하지 않습니다. GDP 단위는 2015 USD/명이며 PPP가 아닙니다.

E[X]=∑i=116116xi≈31,100.238572175,Var⁡(X)=∑i=116116(xi−E[X])2E[X]=\sum_{i=1}^{16}\frac1{16}x_i\approx31,100.238572175,\qquad \operatorname{Var}(X)=\sum_{i=1}^{16}\frac1{16}(x_i-E[X])^2

기대값 31,100.238572은 실제 국가 목록의 한 숫자일 필요가 없습니다. 확률분포의 평균이라는 말은 “다음 추첨에서 반드시 이 값”이라는 말과 다릅니다. 선택확률을 인구 비중으로 바꾸면 같은 GDP 숫자에 붙는 무게가 달라져 기대값도 15,756.274457으로 달라집니다. 인구 가중은 별도로 지정한 국가 선택 법칙이며 개인소득 분포를 새로 관측했다는 뜻이 아닙니다.

1. 조건부 기대값은 같은 표를 좁혀 계산한 평균

Y를 “공표 기대수명이 80년 이상인가?”라는 두 값의 표식으로 정합니다. 80은 수업에서 선택한 분류 기준이며 인과 경계가 아닙니다. 출생 시 기대수명은 그 시점의 사망률 패턴을 바탕으로 계산한 집단 지표로, 특정 개인의 실제 수명을 예언하는 숫자가 아닙니다. 선택된 Y를 알면 해당하는 8개 이름표 안에서 X를 평균 냅니다. 각각의 조건부 확률은 1/8입니다.

실제 16국 값의 두 조건부 모멘트
조건 Y국가 수P(Y)E[X|Y] (2015 USD/명)Var(X|Y) ((2015 USD/명)²)
기대수명≥8081/247,664.331759112,522,545.567226
기대수명<8081/214,536.145385402,779,982.294873
먼저 생각한 뒤 풀이 보기: 조건부 평균 두 개를 어떻게 전체 평균으로 되돌리나요?
E[E[X∣Y]]=816E[X∣Y=1]+816E[X∣Y=0]=E[X]E[E[X\mid Y]]=\frac8{16}E[X\mid Y=1]+\frac8{16}E[X\mid Y=0]=E[X]

두 평균에 각 그룹의 선택 확률을 곱해 더합니다. 이 사례는 두 그룹 크기가 같아 두 평균의 단순 평균도 우연히 일치합니다. 그룹이 5개와 11개라면 1/2씩 주면 안 됩니다. 원래 법칙이 지정한 5/16, 11/16을 써야 합니다.

2. 분산은 그룹 안 차이와 그룹 평균 사이 차이의 합

Var⁡(X)=E[Var⁡(X∣Y)]⏟within+Var⁡(E[X∣Y])⏟between\operatorname{Var}(X)=\underbrace{E[\operatorname{Var}(X\mid Y)]}_{\rm within}+\underbrace{\operatorname{Var}(E[X\mid Y])}_{\rm between}
원 선택 법칙으로 가중한 분산 분해
항값 ((2015 USD/명)²)
그룹 안 분산의 가중평균257,651,263.931050
조건부 평균의 분산274,369,183.102422
합계 = 전체 분산532,020,447.033472

두 그룹의 평균이 같아도 그룹 내부가 넓게 퍼져 있으면 전체 분산은 큽니다. 반대로 각 그룹 내부가 한 값으로 모여 있어도 두 그룹 평균이 다르면 전체 분산이 생깁니다. 총분산 법칙은 이 두 종류를 빼먹지 않도록 하는 회계식처럼 읽을 수 있습니다. 모든 항은 제곱 단위이며 GDP/명 자체의 단위와 다릅니다.

먼저 생각한 뒤 풀이 보기: 이 항등식에 “나라들이 서로 독립”이라는 가정이 필요한가요?

필요하지 않습니다. 여기서는 고정된 16개 기록과 지정한 확률 법칙의 유한 합을 묶었다 푼 것입니다. 독립 국가 표본을 모집단에서 뽑았다는 모형을 도입하지 않았습니다. 이 정확한 분해에서 모형 밖의 인과효과나 추정의 표준오차가 자동으로 따라오지는 않습니다.

먼저 생각한 뒤 풀이 보기: 조건부 기대값 E[X|Y]는 숫자인가요, 확률변수인가요?

Y=1을 고정한 E[X|Y=1]은 숫자입니다. Y가 아직 정해지지 않은 E[X|Y]는 선택된 국가의 그룹에 따라 두 조건부 평균 중 하나를 돌려주는 확률변수입니다. 그래프는 실제 GDP와 그 국가가 속한 그룹 평균, 전체 평균을 같은 GDP 단위로 비교합니다. 이 구별이 반복기대값의 안쪽과 바깥쪽 E를 이해하는 출발점입니다.

자료: World Bank · 실제 GDP/명과 기대수명 · 실제 값·선택 법칙 CSV

개체 사례 · 세 종의 평균 몸무게를 똑같이 평균 내도 될까?

Palmer 자료의 344개 행 중 몸무게가 기록된 342개 행을 균등하게 한 장씩 선택한다고 정합니다. X는 선택 기록의 실제 몸무게(g), S는 종입니다. 원래 결측 두 행은 CSV에 보존하며 0 g으로 바꾸지 않습니다. 이 사례의 “개체”는 실제 펭귄 기록이며 사람의 신체 자료로 바꾸어 부르지 않습니다. 간단한 공개 표의 row_id는 행 위치이며 같은 개체의 추적 ID나 관측 독립성의 증거가 아닙니다.

실제 종별 조건부 질량 모멘트
종유효 행P(S)E[X|S] (g)Var(X|S) (g²)
Adelie151151/3423,700.662252208,890.289900
Chinstrap6834/1713,733.088235145,541.198097
Gentoo12341/1145,076.016260252,067.056646
먼저 생각한 뒤 풀이 보기: 세 종의 조건부 평균을 1/3씩 더하면 전체 평균인가요?
E[X]=151342μA+68342μC+123342μG=23950057≈4,201.754385965E[X]=\frac{151}{342}\mu_A+\frac{68}{342}\mu_C+\frac{123}{342}\mu_G=\frac{239500}{57}\approx4,201.754385965

원래 선택 법칙에서는 종별 유효 기록 수가 다릅니다. 세 평균을 똑같이 평균 내면 4,169.922249037 g으로, 원래 전체 평균 4,201.754385965 g과 다릅니다. 1/3씩 주는 계산은 틀린 산술이라기보다 “먼저 세 종을 균등하게 고르고 그 종 안에서 기록을 고르는” 다른 선택 법칙의 기대값입니다. 어떤 법칙의 질문인지 먼저 적어야 합니다.

조건부 평균은 가방 속 기록을 종별로 나누어 각 가방의 무게중심을 찾는 일입니다. 다시 합칠 때는 가방 이름 수가 아니라 원래 선택 법칙에서 각 가방이 차지하는 확률을 사용합니다. 그래프의 세 막대는 종별 조건부 평균이며 세 개의 새로운 실측 펭귄이 아닙니다. 표시된 전체 평균선과 막대 차이는 두 조건을 알 때 수치가 어떻게 달라지는지 보여줍니다.

1. 제곱을 먼저 평균 내는 것과 평균을 제곱하는 것은 다르다

Var⁡(X)=E[X2]−(E[X])2≈641,250.577101\operatorname{Var}(X)=E[X^2]-(E[X])^2\approx641,250.577101

오른쪽 수치는 표시를 위해 반올림했으므로 마지막 값은 근삿값입니다. 계산 CSV는 정확한 분수로 항등식을 보존합니다. 분산 정의의 분모 342는 이 유한 선택 법칙의 확률 1/342에서 나옵니다. 모집단 분산을 추정하려고 341로 나누는 표본분산과는 질문이 다릅니다. 분모를 바꾸려면 어떤 확률모형에서 무엇을 추정하는지 설명해야 합니다.

실제 342개 기록의 총분산
항값 (g²)
E[Var(X|S)]: 종 안211,823.050330124
Var(E[X|S]): 종 평균 사이429,427.526770523
Var(X): 전체641,250.577100646
먼저 생각한 뒤 풀이 보기: 종을 알면 각 기록의 몸무게를 정확히 알게 되나요?

아닙니다. 종 안의 분산 211,823.050330 g²가 남습니다. S만 알고 각 기록에 E[X|S]를 붙였을 때 평균 제곱 오차는 바로 E[Var(X|S)]입니다. 종별 평균은 이 고정 경험법칙에서 종만 사용하는 제곱오차 예측의 최적 상수이지만, 새로운 야생 개체에 대한 검증된 예측모형이라는 주장은 아닙니다.

먼저 생각한 뒤 풀이 보기: 왜 두 분산 항 사이에 교차항이 없나요?
X−μ=(X−μS)+(μS−μ),E[X−μS∣S]=0X-\mu=(X-\mu_S)+(\mu_S-\mu),\quad E[X-\mu_S\mid S]=0

제곱을 펼치면 교차항 2(X−μS)(μS−μ)가 생깁니다. 한 종 안에서는 두 번째 인자가 상수이고 첫 인자의 조건부 평균이 0이므로 그 종의 평균 교차항은 0입니다. 종별 확률로 다시 합쳐도 0입니다. “그냥 독립이라고 하자”가 아니라 조건부 평균의 정의로 증명합니다.

2. 곱의 기대값에는 실제 짝 정보가 필요하다

같은 실제 기록의 날개 길이를 L(mm), 몸무게를 X(g)로 놓습니다. E[LX]는 각 행에서 두 수를 먼저 곱한 뒤 평균 냅니다. E[L]E[X]는 각각 평균 낸 뒤 곱합니다. 이 실제 짝 법칙에서는 둘이 다릅니다.

같은 342행의 곱과 두 평균의 곱
양값 (mm·g)
E[LX]853,992.032163743
E[L]E[X]844,196.342464348
차이 = Cov(L,X)9,795.689699395
먼저 생각한 뒤 풀이 보기: 두 열의 기록을 서로 독립으로 뽑으면 같은 문제가 되나요?

아닙니다. 342²개의 날개 기록·몸무게 기록 순서쌍을 균등하게 뽑는 새 실험에서는 두 선택이 독립이므로 곱 기대값이 E[L]E[X]로 분해됩니다. 원래 한 행의 두 측정을 함께 뽑는 법칙을 바꾼 것입니다. 실제 한 펭귄의 측정 짝을 지워도 과학적 질문이 유지되는지 먼저 판단해야 합니다.

먼저 생각한 뒤 풀이 보기: g를 kg으로 바꾸면 평균과 분산은 어떻게 바뀌나요?
Y=X/1000,E[Y]=E[X]/1000,Var⁡(Y)=Var⁡(X)/106Y=X/1000,\qquad E[Y]=E[X]/1000,\qquad \operatorname{Var}(Y)=\operatorname{Var}(X)/10^6

평균은 4.201754386 kg, 분산은 0.641250577101 kg²입니다. 표준편차는 제곱근을 취해 1000으로 나뉩니다. 몸무게와 날개 길이를 단순히 더하는 것은 g와 mm가 달라 자연스러운 물리량이 아닙니다. 공분산의 단위 mm·g도 분산의 g²와 구별합니다.

먼저 생각한 뒤 풀이 보기: 이 자료의 모멘트가 유한하면 모든 확률모형도 그런가요?

아닙니다. 이 사례는 유한 개의 유한한 측정값이라 절댓값의 평균과 제곱의 평균이 존재합니다. 무한 지지집합에서는 기대값을 유한한 수로 다룰 때 E[|X|]<∞를 확인하고, 분산·공분산의 유한값을 쓰려면 해당 2차 모멘트 조건을 확인합니다. 조건 없이 발산하는 양을 빼서 0이나 유한 숫자를 만들면 안 됩니다.

자료: Horst·Hill·Gorman / Palmer LTER · 실제 기록 (CC0) · 실제 값·선택 법칙 CSV

기업 사례 · 매출 변화의 평균은 쉽지만 분산에는 짝이 필요하다

Apple의 실제 다섯 품목 이름표를 균등하게 하나 고릅니다. 같은 선택 품목의 FY2023 순매출을 X, FY2024 순매출을 Y로 둡니다. 단위는 백만 명목 USD이고 X와 Y는 동일한 품목의 두 공시 집계입니다. FY2023은 53주, FY2024는 52주입니다. 이 장에서는 주수를 통제한 성장률이나 미래 매출을 추정하지 않고, 공표된 두 수의 차이 D=Y−X를 계산합니다. 매출은 이익과 다릅니다.

실제 공시 품목의 짝 변화
품목FY2023: XFY2024: YD=Y−X선택 확률
iPhone200,583201,1836001/5
Mac29,35729,9846271/5
iPad28,30026,694-1,6061/5
웨어러블·홈·액세서리39,84537,005-2,8401/5
서비스85,20096,16910,9691/5

1. 기대값의 선형성은 독립을 요구하지 않는다

E[D]=E[Y−X]=E[Y]−E[X]=78207−76657=1550E[D]=E[Y-X]=E[Y]-E[X]=78207-76657=1550
먼저 생각한 뒤 풀이 보기: 차이 다섯 개를 직접 더해 확인해 보세요.
600+627−1606−2840+109695=77505=1550\frac{600+627-1606-2840+10969}{5}=\frac{7750}{5}=1550

서비스의 증가만 보는 대신 모든 품목의 변화를 포함했습니다. 품목 평균의 변화 1,550에 다섯 품목을 곱하면 공시 총매출 차이 7,750이 됩니다. 평균 품목의 변화는 회사 전체 매출 차이와 같은 수가 아닙니다. 이 등식에는 X와 Y의 독립이 필요하지 않습니다.

2. 분산은 선형이 아니다: 공분산 두 배를 빼야 한다

Var⁡(Y−X)=Var⁡(Y)+Var⁡(X)−2Cov⁡(X,Y)\operatorname{Var}(Y-X)=\operatorname{Var}(Y)+\operatorname{Var}(X)-2\operatorname{Cov}(X,Y)
같은 품목을 고르는 법칙의 2차 모멘트
항값 ((백만 USD)²)
Var(X)4,272,289,823.600
Var(Y)4,424,476,344.400
Cov(X,Y)4,336,412,641.400
정확한 Var(Y−X)23,940,885.200
독립으로 잘못 놓은 Var(X)+Var(Y)8,696,766,168.000
먼저 생각한 뒤 풀이 보기: 품목이 다섯 개라서 자동으로 두 연도가 독립인가요?

아닙니다. 같은 품목의 두 값을 함께 고릅니다. iPhone이 뽑히면 두 연도 모두 iPhone 매출이 나오므로 짝 구조가 있습니다. 실제 공분산 4,336,412,641.400은 0이 아닙니다. X와 Y를 별도 독립 선택하는 새 25개 순서쌍 실험이면 분산의 합이 맞지만, 그 차이는 같은 품목의 연간 변화가 아닙니다.

먼저 생각한 뒤 풀이 보기: 왜 차이의 분산에서 공분산 부호가 음수인가요?
[(Y−EY)−(X−EX)]2=(Y−EY)2+(X−EX)2−2(X−EX)(Y−EY)[(Y-EY)-(X-EX)]^2=(Y-EY)^2+(X-EX)^2-2(X-EX)(Y-EY)

차이를 제곱해 평균 내면 마지막 곱의 평균이 −2Cov(X,Y)입니다. 두 연도 모두 큰 품목은 차이를 낼 때 공통의 크기가 많이 상쇄됩니다. 이는 이 고정 품목 표의 산술 설명이며 매출 위험이 미래에도 이만큼이라는 추론은 아닙니다.

3. 하드웨어·서비스로 조건을 주고 다시 합치기

FY2024 실제 품목의 그룹 조건부 모멘트
그룹품목 수확률E[Y|그룹]Var(Y|그룹)
하드웨어44/573,716.5005,429,772,479.250
서비스11/596,169.0000.000
먼저 생각한 뒤 풀이 보기: 그룹 평균 73,716.5와 96,169의 단순 평균이 78,207인가요?
45(73716.5)+15(96169)=78207\frac45(73716.5)+\frac15(96169)=78207

하드웨어는 네 품목, 서비스는 한 품목이므로 원래 품목 균등 법칙의 그룹 확률은 4/5와 1/5입니다. 서비스 한 칸의 조건부 분산은 0이지만 회사의 서비스 사업이 현실에서 위험 없이 고정됐다는 뜻이 아닙니다. 이 유한 표 안에서 선택 가능한 값이 하나라는 뜻입니다.

먼저 생각한 뒤 풀이 보기: FY2024 분산도 그룹별로 분해해 보세요.
Var⁡(Y)=E[Var⁡(Y∣G)]+Var⁡(E[Y∣G])\operatorname{Var}(Y)=E[\operatorname{Var}(Y\mid G)]+\operatorname{Var}(E[Y\mid G])

그룹 안 항 4,343,817,983.400과 그룹 평균 사이 항 80,658,361.000을 더하면 4,424,476,344.400 ((백만 USD)²)입니다. 기대값을 합칠 때와 같은 그룹 확률을 사용합니다. 두 항의 단위를 맞추고 실제 값과 제곱값을 혼동하지 않습니다.

먼저 생각한 뒤 풀이 보기: 매출 비중으로 품목을 뽑으면 기대값이 그대로인가요?

아닙니다. 품목별 선택 확률을 FY2024 매출/391,035로 바꾸면 기대값은 Σs²/Σs=134,780.917225 백만 USD입니다. 큰 품목에 더 많은 선택 무게를 준 결과입니다. 두 법칙 모두 명시한 과거 집계 선택 실험이며 고객의 구매액, 미래 실적, 기업 가치 평가와 구분합니다.

자료: SEC EDGAR · 실제 Apple 품목 순매출 · 실제 값·선택 법칙 CSV

조건부 모멘트·총분산 항 CSV · 기대값·분산·공분산 정확 항등식 CSV · 출처·가공·해시 기록

Country case · Split an expectation, then put it back together

Imagine one ticket for each of sixteen actual countries. Select a ticket uniformly and let X return that country’s 2024 GDP/person. The selected country is unknown before the draw, but all sixteen possible values and their probabilities 1/16 are specified. Expectation is the numerical balance point of this law. It is not predicted future GDP or an actual resident’s income. Units are constant 2015 USD/person, not PPP.

E[X]=∑i=116116xi≈31,100.238572175,Var⁡(X)=∑i=116116(xi−E[X])2E[X]=\sum_{i=1}^{16}\frac1{16}x_i\approx31,100.238572175,\qquad \operatorname{Var}(X)=\sum_{i=1}^{16}\frac1{16}(x_i-E[X])^2

The expectation 31,100.238572 need not equal any single country’s value. A probability-law mean does not promise that the next draw equals it. Replacing uniform tickets with actual population weights changes the expectation to 15,756.274457 without changing the GDP values. This assigns another country-selection law; it does not observe a distribution of personal incomes.

1. Conditional expectation averages within a specified part of the table

Let Y indicate whether published life expectancy is at least 80 years. Eighty is a chosen classroom grouping threshold, not a causal boundary. Life expectancy at birth summarizes a population’s mortality pattern at that time; it does not predict an individual person’s lifespan. Given Y, average GDP over the eight qualifying tickets, with conditional probabilities 1/8.

Two conditional laws over sixteen actual country values
Condition YCountriesP(Y)E[X|Y] (2015 USD/person)Var(X|Y) ((2015 USD/person)²)
Life expectancy≥8081/247,664.331759112,522,545.567226
Life expectancy<8081/214,536.145385402,779,982.294873
Think first, then reveal: How do the two conditional means recover the overall mean?
E[E[X∣Y]]=816E[X∣Y=1]+816E[X∣Y=0]=E[X]E[E[X\mid Y]]=\frac8{16}E[X\mid Y=1]+\frac8{16}E[X\mid Y=0]=E[X]

Weight each conditional mean by its group probability. Here equal group sizes happen to make the simple average work too. With groups of five and eleven under the same ticket experiment, the correct weights would be 5/16 and 11/16, rather than one-half each.

2. Variance splits into within-group and between-mean variation

Var⁡(X)=E[Var⁡(X∣Y)]⏟within+Var⁡(E[X∣Y])⏟between\operatorname{Var}(X)=\underbrace{E[\operatorname{Var}(X\mid Y)]}_{\rm within}+\underbrace{\operatorname{Var}(E[X\mid Y])}_{\rm between}
Variance decomposition under the original ticket law
TermValue ((2015 USD/person)²)
Expected within-group variance257,651,263.931050
Variance of conditional means274,369,183.102422
Sum = overall variance532,020,447.033472

Even equal group means can coexist with large overall variation when values vary inside each group. Conversely, constant values inside each group can still produce overall variation when the group means differ. Total variance accounts for both sources. Every variance term has squared units, unlike GDP/person itself.

Think first, then reveal: Must countries be independent for this identity?

No. We regroup finite sums over sixteen fixed records under a defined law. We have not introduced an independent sample of countries from a population. Exact decomposition does not by itself yield policy causality or a sampling standard error.

Think first, then reveal: Is E[X|Y] a number or a random variable?

E[X|Y=1] is a number after fixing the condition. E[X|Y] is a random variable returning one of two conditional means depending on the selected country’s group. The chart compares actual GDP, its assigned group mean and the overall mean in matching GDP units. This distinction explains the inner and outer expectations in iterated expectation.

Source: World Bank · actual GDP/person and life expectancy · Actual values and selection-law CSV

Individual-observation case · Can three species means be averaged equally?

Specify uniform selection from the 342 of 344 Palmer records with observed body mass. X is actual mass in g and S is species. Both originally missing rows remain in the CSV and are not converted to zero grams. These are actual penguin observations, not human-body data. The added row_id locates a source row; it does not identify longitudinal individuals or establish independent observations.

Conditional mass moments by actual species
SpeciesValid rowsP(S)E[X|S] (g)Var(X|S) (g²)
Adelie151151/3423,700.662252208,890.289900
Chinstrap6834/1713,733.088235145,541.198097
Gentoo12341/1145,076.016260252,067.056646
Think first, then reveal: Does weighting all three conditional means by one-third give the overall mean?
E[X]=151342μA+68342μC+123342μG=23950057≈4,201.754385965E[X]=\frac{151}{342}\mu_A+\frac{68}{342}\mu_C+\frac{123}{342}\mu_G=\frac{239500}{57}\approx4,201.754385965

Species have unequal valid record counts. An equal average of species means gives 4,169.922249037 g, differing from the original overall mean 4,201.754385965 g. Equal species weighting instead answers a different experiment: select a species uniformly first, then select a record uniformly within it. State the probability law before judging the calculation.

Think of grouping records into three bags and finding each bag’s balance point. Recombine the bag means using the probability of each bag under the original law, rather than counting bag names. The chart’s three bars are conditional means, not three newly measured penguins. Their positions relative to the overall-mean reference show how the numeric summary changes when species is known.

1. Averaging squares differs from squaring the average

Var⁡(X)=E[X2]−(E[X])2≈641,250.577101\operatorname{Var}(X)=E[X^2]-(E[X])^2\approx641,250.577101

Displayed terms are rounded; the final value is approximate. The CSV preserves the identity with exact fractions. Denominator 342 comes from probabilities 1/342 in this finite law. Dividing by 341 instead computes a sample-variance statistic used for a different estimation question. Explain the sampling model and estimand before changing denominators.

Total variance of the actual 342-record law
TermValue (g²)
E[Var(X|S)]: within species211,823.050330124
Var(E[X|S]): between species means429,427.526770523
Var(X): overall641,250.577100646
Think first, then reveal: Does knowing species reveal each record’s exact mass?

No. Expected within-species variance 211,823.050330 g² remains. Assigning E[X|S] using only species leaves mean squared error E[Var(X|S)]. Under this fixed empirical law, the conditional mean minimizes squared error among species-only rules. This does not validate prediction for new wild animals.

Think first, then reveal: Why is there no cross-term between the two variance components?
X−μ=(X−μS)+(μS−μ),E[X−μS∣S]=0X-\mu=(X-\mu_S)+(\mu_S-\mu),\quad E[X-\mu_S\mid S]=0

Expanding the square yields 2(X−μS)(μS−μ). Within a species the second factor is constant and the first has conditional mean zero. Its conditional cross-term therefore averages to zero, and weighting across species keeps it zero. This follows from conditional means, without assuming independence.

2. The expectation of a product uses actual pairing

Let L be flipper length in mm and X mass in g from the same actual record. E[LX] multiplies within each row before averaging; E[L]E[X] averages each measurement first. They differ under this actual paired-record law.

Products from the same 342 paired records
QuantityValue (mm·g)
E[LX]853,992.032163743
E[L]E[X]844,196.342464348
Difference = Cov(L,X)9,795.689699395
Think first, then reveal: Would drawing the two columns independently answer the same question?

No. Uniform selection over 342² flipper-record/mass-record ordered pairs defines a new experiment whose product expectation factors. It replaces the original same-row pairing law. Decide whether erasing an animal’s actual measurement pairing still answers the scientific question.

Think first, then reveal: How do moments change from grams to kilograms?
Y=X/1000,E[Y]=E[X]/1000,Var⁡(Y)=Var⁡(X)/106Y=X/1000,\qquad E[Y]=E[X]/1000,\qquad \operatorname{Var}(Y)=\operatorname{Var}(X)/10^6

The mean becomes 4.201754386 kg and variance 0.641250577101 kg². Taking square roots divides standard deviation by 1000. Simply adding mass to flipper length mixes g and mm without defining a meaningful physical quantity. Covariance units mm·g also differ from mass-variance units g².

Think first, then reveal: Do finite moments here imply finite moments for every probability model?

No. A finite set of finite measurements has finite absolute and second moments. On infinite supports, finite-valued expectation requires integrability E[|X|]<∞; finite variance and the usual covariance algebra need suitable second-moment conditions. Do not subtract divergent quantities as though they were ordinary finite numbers.

Source: Horst, Hill, Gorman / Palmer LTER · actual records (CC0) · Actual values and selection-law CSV

Company case · Mean changes are linear; their variance needs pairing

Select one of Apple’s five actual category tickets uniformly. X is its FY2023 net sales and Y its FY2024 net sales, both in million nominal USD. These are paired disclosed aggregates for the same selected category. FY2023 spans 53 weeks and FY2024 spans 52. We calculate D=Y−X from the reported values, without estimating week-adjusted growth or future revenue. Net sales are not profit.

Actual paired changes in disclosed categories
CategoryFY2023: XFY2024: YD=Y−XTicket probability
iPhone200,583201,1836001/5
Mac29,35729,9846271/5
iPad28,30026,694-1,6061/5
Wearables, Home and Accessories39,84537,005-2,8401/5
Services85,20096,16910,9691/5

1. Linearity of expectation does not require independence

E[D]=E[Y−X]=E[Y]−E[X]=78207−76657=1550E[D]=E[Y-X]=E[Y]-E[X]=78207-76657=1550
Think first, then reveal: Verify by directly summing all five changes.
600+627−1606−2840+109695=77505=1550\frac{600+627-1606-2840+10969}{5}=\frac{7750}{5}=1550

Include every category rather than only the Services increase. Multiplying the mean category change 1550 by five yields the disclosed total-sales difference 7750. A mean category change is not itself a company-total change. None of this requires independence of X and Y.

2. Variance is not linear: subtract twice the covariance

Var⁡(Y−X)=Var⁡(Y)+Var⁡(X)−2Cov⁡(X,Y)\operatorname{Var}(Y-X)=\operatorname{Var}(Y)+\operatorname{Var}(X)-2\operatorname{Cov}(X,Y)
Second moments under same-category selection
TermValue ((million USD)²)
Var(X)4,272,289,823.600
Var(Y)4,424,476,344.400
Cov(X,Y)4,336,412,641.400
Correct Var(Y−X)23,940,885.200
Incorrect independence reference Var(X)+Var(Y)8,696,766,168.000
Think first, then reveal: Do five categories automatically make the two years independent?

No. The law selects both values for the same category. Selecting iPhone gives iPhone sales in both years, creating an explicit pairing structure. Actual covariance 4,336,412,641.400 is nonzero. Independently selecting X and Y from 25 ordered category pairs would make the variance sum applicable, but their difference would no longer be a same-category annual change.

Think first, then reveal: Why is covariance subtracted in the variance of a difference?
[(Y−EY)−(X−EX)]2=(Y−EY)2+(X−EX)2−2(X−EX)(Y−EY)[(Y-EY)-(X-EX)]^2=(Y-EY)^2+(X-EX)^2-2(X-EX)(Y-EY)

After averaging the expanded square, the cross-term becomes −2Cov(X,Y). Categories large in both years have much common size cancel when differenced. This explains arithmetic in a fixed table; it does not estimate future sales risk.

3. Condition on hardware versus Services, then recombine

Conditional moments of actual FY2024 categories
GroupCategoriesProbabilityE[Y|group]Var(Y|group)
hardware44/573,716.5005,429,772,479.250
services11/596,169.0000.000
Think first, then reveal: Does a simple average of 73716.5 and 96169 equal 78207?
45(73716.5)+15(96169)=78207\frac45(73716.5)+\frac15(96169)=78207

Hardware contains four category tickets and Services one, so the original group weights are 4/5 and 1/5. Services has conditional variance zero because that table slice contains one value. This does not imply that the real Services business is risk-free or constant over time.

Think first, then reveal: Decompose FY2024 variance by these groups.
Var⁡(Y)=E[Var⁡(Y∣G)]+Var⁡(E[Y∣G])\operatorname{Var}(Y)=E[\operatorname{Var}(Y\mid G)]+\operatorname{Var}(E[Y\mid G])

The within component 4,343,817,983.400 plus the between-means component 80,658,361.000 gives 4,424,476,344.400 (million USD)². Use the same group probabilities as in total expectation. Match squared units rather than mixing variances with sales values.

Think first, then reveal: Does sales-weighted category selection preserve the expectation?

No. Assigning selection probability s/391035 gives expectation Σs²/Σs=134,780.917225 million USD. Larger categories receive more selection weight. Both laws concern explicit selection of historical aggregates, distinct from customer purchase amounts, future performance or company valuation.

Source: SEC EDGAR · actual Apple category net sales · Actual values and selection-law CSV

Conditional moments and total-variance components CSV · Exact expectation, variance and covariance identities CSV · Sources, processing and hashes

기초Foundations

48. 스스로 점검하고 다음 이론으로 연결한다48. Audit your reasoning and connect to the next theory

계산을 보고할 때 ①선택한 결과와 법칙, ②반환변수·단위, ③기대값·분산의 존재 조건, ④조건 정보와 양의 분모, ⑤바깥 가중치, ⑥기술적 항등식과 추론·인과 주장의 차이를 적으세요. 수치는 먼저 정확한 분수로 검산하고 읽기 좋은 반올림값을 표시합니다.

영상에서는 총기대와 총분산을 식의 암기보다 ‘한 번 나누어 평균 내고 다시 합치는 과정’으로 따라가세요. 학자 소개는 조건부 평균을 정보와 연결한 확률론의 관점을 이해하는 데 사용합니다. 사람이 유명하다는 이유로 자료나 추론을 검증 없이 받아들이지는 않습니다.

다음 장에서는 구체적인 확률분포와 그 모멘트를 배워 이 도구들을 반복 사용합니다. 유한 실제 기록의 정확한 요약과, 미지의 생성분포를 가정하고 추정하는 문제를 계속 구별합니다.

Python · R · 원자료·단위·가공·출처

Report the selected outcomes and law; returned variable and units; moment-existence conditions; conditioning information and positive denominators; outer weights; and the difference between descriptive identities and inferential or causal claims. Audit with exact fractions before displaying rounded values.

Follow the video as a process of conditioning, averaging and recombining rather than memorizing equations. Scholar profiles connect conditional averages to the role of information in probability. Reputation does not replace checking a dataset or argument.

Next, concrete probability families let us reuse these tools. Continue distinguishing exact summaries of finite records from assumptions and estimation about an unknown generating distribution.

Python · R · Inputs, units, transformations and sources

Python·R 코드 실행 방법Run the Python/R companions

자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.Extract the bundle, keeping the scripts beside the data folder. In a terminal, enter the script folder and run the commands below. Beginners can complete hand calculations and browser labs first, returning to code after studying introductory data science.

python stat07-reproduce.py
Rscript --vanilla --encoding=UTF-8 stat07-reproduce.R

결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. CSV 원자료는 덮어쓰지 않습니다.Result files are saved in the result directory specified by each script; the input CSVs are not overwritten.

영상·학자·함께 읽기Videos, thinkers and guided reading

본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.

조건부 평균을 다시 평균 내기Conditional expectation and total expectation

MIT OCW · John Tsitsiklis, RES.6-012, 07.3

본문에서 강의를 보며 E[X|Y=y]라는 숫자와 E[X|Y]라는 확률변수를 구별합니다. 세 종 중 하나의 평균을 먼저 구한 뒤 원래 기록 비중으로 다시 평균 내는 과정과 연결합니다.Watch in the chapter and distinguish the number E[X|Y=y] from the random variable E[X|Y]. Connect this to averaging within species and recombining with original record weights.

교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.

보고 읽은 뒤 답하기Respond after watching/reading 조건부 평균을 합칠 때 왜 1/3씩 쓰면 안 되나요?Why not always average three conditional means with weights one-third?

생각을 점검하는 해설Check your reasoning

원래 법칙에서 각 종의 선택 확률이 151/342, 68/342, 123/342이기 때문입니다. 1/3씩 주면 다른 선택 실험이 됩니다.Original species probabilities are 151/342, 68/342 and 123/342. Equal thirds define a different selection experiment.

크리스티안 하위헌스 · 우연의 보상을 수량으로 생각하기Christiaan Huygens: reasoning quantitatively about chance rewards

University of St Andrews · MacTutor

네덜란드 수학자 하위헌스가 우연의 게임에 관한 De Ratiociniis in Ludo Aleae를 썼다는 대학 소개를 읽습니다. 한 번의 결과와 여러 가능성을 확률로 가중한 보상을 구별해 봅니다.Read the university account of Dutch mathematician Huygens and his De Ratiociniis in Ludo Aleae on games of chance. Separate one realized outcome from a probability-weighted reward.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 기대값이 가능한 실제 값 중 하나일 필요가 있나요?Must an expectation be one of the possible actual values?

생각을 점검하는 해설Check your reasoning

필요하지 않습니다. 분포의 무게중심인 기대값은 관측된 어떤 한 국가 GDP나 펭귄 질량과도 다를 수 있습니다.No. As a distribution’s balance point, it may differ from every individual recorded country GDP or penguin mass.

확률로 가중한 평균과 선형성Probability-weighted means and linearity

MIT OCW 18.05 · Reading 4b, §2 definition and §2.2

§2의 기대값 정의와 §2.2의 선형성을 읽고 실제 다섯 품목의 E[Y−X]=E[Y]−E[X]를 직접 재현합니다. 이 장의 유한 자료에서는 적분가능성이 자동이지만 일반 모형에서는 조건을 확인합니다.Read the definition in §2 and linearity in §2.2, then reproduce E[Y−X]=E[Y]−E[X] for five actual categories. Integrability is automatic for these finite data, but must be checked in general models.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 선형성에 X와 Y의 독립이 필요한가요?Does linearity require independence of X and Y?

생각을 점검하는 해설Check your reasoning

유한 기대값을 갖는 경우 필요하지 않습니다. 독립 조건을 기대값의 선형성과 곱의 분해에 뒤섞지 않습니다.No, when the relevant expectations are finite. Do not confuse linearity with factorizing expectations of products.

분산의 정의·단위·변환을 증명하기Prove variance definitions, units and transformations

MIT OCW 18.05 · Reading 5a, §3 definition, §3.3 and §3.5

분산의 정의와 제곱 단위, Var(aX+b)=a²Var(X), E[X²]−(EX)²의 증명을 읽습니다. g→kg 변환에 적용하고 두 변수 분산의 합에는 필요한 공분산 항을 보충합니다.Read the variance definition, squared units and proofs of Var(aX+b)=a²Var(X) and E[X²]−(EX)². Apply them to g→kg and retain the covariance term for a general two-variable sum or difference.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading Var(Y−X)=Var(Y)+Var(X)는 언제 맞나요?When is Var(Y−X)=Var(Y)+Var(X) valid?

생각을 점검하는 해설Check your reasoning

유한 2차 모멘트가 있는 경우 공분산이 0일 때 맞습니다. 독립은 충분조건이지만 필요조건은 아닙니다. 실제 품목 짝 법칙의 공분산은 0이 아닙니다.With finite second moments, it holds when covariance is zero. Independence is sufficient, but not necessary. Actual paired-category covariance here is nonzero.

연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof

먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.

1. 균등 이름표의 기대값Uniform ticket expectation

값 (0,1,1,2)의 네 이름표를 균등하게 하나 고릅니다. E[X]와 값 1의 확률을 각각 구하세요.

Select uniformly from four values (0,1,1,2). Find E[X] and P(X=1).

풀이와 확인할 이유Solution and explanation

각 이름표의 확률은 1/4입니다. 기대값은 (0+1+1+2)/4=1입니다. 값 1을 반환하는 이름표는 두 장이므로 P(X=1)=2/4=1/2입니다. 기대값이라는 숫자와 그 숫자에 모인 확률을 구별합니다.

Each ticket has probability 1/4, giving mean (0+1+1+2)/4=1. Two tickets return one, so P(X=1)=1/2. The expectation and the probability mass at that value are different objects.

2. 가중치의 정규화Normalize weights

X값이 (0,1,1,2), 가중치가 (1,2,3,4)입니다. 확률과 기대값을 구하세요.

Values are (0,1,1,2) with weights (1,2,3,4). Find probabilities and expectation.

풀이와 확인할 이유Solution and explanation

총가중치는 10이므로 확률은 (1/10,2/10,3/10,4/10)입니다. 기대값은 (0+2+3+8)/10=13/10입니다. 무게를 나누지 않은 합 13은 기대값이 아닙니다.

Total weight ten gives probabilities (1/10,2/10,3/10,4/10). The mean is (0+2+3+8)/10=13/10. The unnormalized weighted sum 13 is not the expectation.

3. 같은 법칙을 보존하는 배율Common weight scaling

값 (0,1,1,2)의 가중치를 (1,2,3,4)에서 (7,14,21,28)로 바꾸었습니다. 기대값은 바뀌나요? 이유를 쓰세요.

For values (0,1,1,2), replace weights (1,2,3,4) by (7,14,21,28). Does the mean change?

풀이와 확인할 이유Solution and explanation

바뀌지 않습니다. 총가중치도 7배가 되어 각 확률이 7wᵢ/(7Σwᵢ)=wᵢ/Σwᵢ로 같습니다. 기대값은 13/10을 유지합니다. 특정 이름표 한 장의 무게만 바꾼 경우와 다릅니다.

No. Numerator and total weight both scale by seven, leaving every probability and the mean 13/10 unchanged. Scaling only one weight would define a different law.

4. 상수와 빈 법칙A constant versus no law

값이 모두 5인 네 이름표에서 ①가중치 (1,0,0,0), ②가중치 (0,0,0,0)을 비교하세요. 기대값과 분산이 각각 무엇인가요?

All four values are five. Compare weights (1,0,0,0) with (0,0,0,0). Give the mean and variance.

풀이와 확인할 이유Solution and explanation

①은 첫 이름표를 확실히 선택하는 법칙으로 평균 5, 분산 0입니다. ②는 총가중치가 0이라 확률을 정규화할 수 없어 평균과 분산 모두 미정의입니다. 반환값이 상수라는 사실만으로 존재하지 않는 법칙을 채울 수 없습니다.

The first defines a constant-five law with variance zero. The second has no normalized probability law, so both moments are undefined. Constant input values do not repair zero total weight.

5. 같은 값끼리 모으기Group equal returned values

균등한 값 (0,1,1,2)의 서로 다른 값별 PMF를 쓰고, 이를 이용해 기대값을 다시 계산하세요.

Write the distinct-value PMF for uniform (0,1,1,2), then recompute E[X].

풀이와 확인할 이유Solution and explanation

PMF는 p(0)=1/4,p(1)=1/2,p(2)=1/4입니다. E[X]=0·1/4+1·1/2+2·1/4=1입니다. 이름표별 합과 값별 합이 같은 이유는 값이 같은 두 행의 확률을 합쳤기 때문입니다.

The masses are 1/4,1/2,1/4 at zero, one and two. Their probability-weighted sum is one. Grouping the two equal-valued tickets leaves the expectation unchanged.

6. 먼저 제곱하기Square before averaging

균등한 X=(0,1,1,2)에서 E[X²]와 (E[X])²을 구하고 차이를 설명하세요.

For uniform X=(0,1,1,2), compare E[X²] with (E[X])².

풀이와 확인할 이유Solution and explanation

변환값은 (0,1,1,4)이므로 E[X²]=6/4=3/2입니다. E[X]=1이므로 평균의 제곱은 1입니다. 차이 1/2은 분산입니다. 제곱과 기대값을 교환하면 퍼짐을 잃습니다.

Squared values (0,1,1,4) average to 3/2, whereas the squared mean is one. The difference 1/2 is variance. Interchanging square and expectation discards spread.

7. 지시함수는 볼록함수가 아니다An indicator is not convex

X가 0과 2를 각각 1/2로 반환합니다. g(x)=1{x≥1}에서 E[g(X)]와 g(E[X])를 비교하세요.

X returns zero and two with equal probabilities. For g(x)=1{x≥1}, compare E[g(X)] and g(E[X]).

풀이와 확인할 이유Solution and explanation

E[g(X)]=1/2입니다. 평균은 1이므로 g(E[X])=1입니다. 제곱함수에서와 같은 Jensen 방향을 이 지시함수에 자동 적용할 수 없습니다. 어떤 함수에 어떤 조건의 정리를 적용했는지 확인해야 합니다.

The transformed expectation is 1/2, but thresholding mean one gives one. The Jensen direction for convex squares cannot automatically be assigned to this indicator.

8. 기대값과 가능한 결과Mean versus attainable outcome

공정한 주사위의 기대값은 3.5입니다. 다음 결과가 3.5라는 뜻인가요? 0을 확률 .99,100을 확률 .01로 주는 가정 보상도 비교하세요.

A fair die has mean 3.5. Does it return 3.5 next? Compare a reward returning zero with probability .99 and 100 with probability .01.

풀이와 확인할 이유Solution and explanation

아닙니다. 주사위는 1부터 6만 반환합니다. 보상의 기대값은 1이지만 가능한 결과는 0과 100뿐이고 가장 흔한 값은 0입니다. 기대값은 확률적 무게중심이며 가능한 값·최빈값·한 번의 예측을 모두 대신하지 않습니다.

No die face is 3.5. The reward has mean one but only outcomes zero and 100, with mode zero. An expectation is a probability-weighted center rather than an attainable or most likely outcome.

9. 음의 계수도 선형성에 포함된다Linearity with negative coefficients

E[X]=2,E[Y]=5이고 X,Y는 적분 가능합니다. E[3X−2Y+4]를 구하세요. 독립이 필요한가요?

Integrable X, Y have means two and five. Find E[3X−2Y+4]. Is independence needed?

풀이와 확인할 이유Solution and explanation

3·2−2·5+4=0입니다. 유한 선형결합의 기대값에는 독립 가정이 필요하지 않습니다. 적분 가능성이 있어 각 항의 기대값과 뺄셈이 유한하다는 조건은 유지합니다.

The result is 3·2−2·5+4=0. Independence is unnecessary for a finite linear combination, while integrability ensures finite expectations and legitimate subtraction.

10. 완전히 반대인 두 변수의 합Opposed paired variables

같은 균등 이름표에서 X=(0,1,2,3),Y=(3,2,1,0)입니다. E[X+Y]와 Var(X+Y)를 구하세요.

On the same uniform tickets, X=(0,1,2,3), Y=(3,2,1,0). Find the mean and variance of X+Y.

풀이와 확인할 이유Solution and explanation

모든 이름표에서 합이 3이므로 기대값 3, 분산 0입니다. 각 평균 3/2를 더해도 3이 됩니다. 합의 분산 0을 두 변수 자체의 분산이 0이라는 뜻으로 읽지 않습니다.

Every sum is three, giving mean three and variance zero. Both marginal means are 3/2. Zero variance of their sum does not mean either variable is constant.

11. 곱의 기대값을 직접 구한다Compute the product expectation

균등하게 짝지은 X=(0,1,2,3),Y=(3,2,1,0)에서 E[XY],E[X]E[Y],Cov(X,Y)를 구하세요.

For uniform paired X=(0,1,2,3), Y=(3,2,1,0), find E[XY], E[X]E[Y] and covariance.

풀이와 확인할 이유Solution and explanation

곱은 (0,2,2,0)이므로 E[XY]=1입니다. 평균의 곱은 (3/2)²=9/4입니다. 따라서 공분산은 1−9/4=−5/4입니다. 선형성은 곱을 분리하는 정리가 아닙니다.

Products (0,2,2,0) average to one. The product of means is 9/4 and covariance is −5/4. Linearity does not factor products.

12. 독립 재선택의 새 법칙Independent reselection law

X용 값 (0,1,2,3)과 Y용 값 (3,2,1,0)을 각각 독립·균등하게 고릅니다. E[X+Y],Var(X+Y),E[XY]를 구하세요.

Independently select uniformly from X values (0,1,2,3) and Y values (3,2,1,0). Find E[X+Y], Var(X+Y), E[XY].

풀이와 확인할 이유Solution and explanation

각 분산은 5/4이고 독립이므로 공분산은 0입니다. 합의 평균은 3, 분산은 5/2, 곱의 기대값은 9/4입니다. 16개 순서쌍의 법칙이며 같은 이름표 네 쌍의 법칙과 다릅니다.

Each marginal variance is 5/4, and independence gives covariance zero. The sum has mean three and variance 5/2; E[XY]=9/4. This uses 16 ordered pairs rather than four same-ticket pairs.

13. 기대 개수에는 독립이 필요하지 않다Expected count without independence

세 사건의 확률이 .2,.4,.7입니다. 일어난 사건 수 N의 기대값을 구하세요. 서로 겹칠 수도 있습니다.

Three events have probabilities .2,.4,.7 and may overlap. Find the expected number N that occur.

풀이와 확인할 이유Solution and explanation

N=I₁+I₂+I₃이므로 E[N]=.2+.4+.7=1.3입니다. 서로 겹치거나 의존해도 유한 합의 선형성이 성립합니다. 이 정보만으로 N의 분산은 결정할 수 없습니다.

Write N as the sum of their indicators. Its expectation is 1.3 regardless of dependence. The given probabilities alone do not determine its variance.

14. 같은 사건을 두 번 세기Count one event twice

P(A)=1/2일 때 N=2I_A의 평균과 분산을 구하고, 독립한 Bernoulli(1/2) 두 개의 합과 비교하세요.

For P(A)=1/2, find the mean and variance of N=2I_A. Compare a sum of two independent Bernoulli(1/2) variables.

풀이와 확인할 이유Solution and explanation

I_A의 평균은 1/2, 분산은 1/4입니다. N의 평균은 1, 분산은 4·1/4=1입니다. 독립한 두 변수의 합은 같은 평균 1이지만 분산은 1/2입니다. 같은 평균이 같은 분포를 뜻하지 않습니다.

The indicator has mean 1/2 and variance 1/4, so N has mean one and variance one. The independent sum has the same mean but variance 1/2. Equal means do not determine a distribution.

15. 무한한 비음수 기대값Infinite nonnegative expectation

n≥1에서 P(X=2ⁿ)=2⁻ⁿ입니다. 확률의 합과 E[X]를 구하세요. 유한 시뮬레이션 평균으로 반박할 수 있나요?

Let P(X=2ⁿ)=2⁻ⁿ for n≥1. Check normalization and E[X]. Can a finite simulation mean refute it?

풀이와 확인할 이유Solution and explanation

확률의 기하급수 합은 1입니다. 각 기대값 항이 2ⁿ·2⁻ⁿ=1이므로 기대값은 +∞입니다. 유한 시뮬레이션에서는 아직 드문 큰 값을 보지 못할 수 있어 유한한 계산 평균이 나옵니다. 그것은 이론의 무한 꼬리를 반박하지 못합니다.

The geometric probabilities sum to one. Every expectation contribution equals one, so E[X]=+∞. A finite simulation may miss rare large values and cannot refute the infinite-tail calculation.

16. 절단과 단조수렴Truncation and monotone convergence

n≥1에서 P(X=2ⁿ)=2⁻ⁿ인 법칙과 양의 정수 N에 대해 X_N=2ⁿ·1{n≤N}으로 둡니다. E[X_N]와 그 극한을 구하세요. 확률을 다시 정규화한 조건부 법칙인가요?

Under P(X=2ⁿ)=2⁻ⁿ for n≥1 and a positive integer N, define X_N=2ⁿ·1{n≤N}. Find E[X_N] and its limit. Is this a renormalized conditional law?

풀이와 확인할 이유Solution and explanation

첫 N개 기여가 각각 1이므로 E[X_N]=N입니다. 변수는 X로 단조 증가하며 기대값은 +∞로 갑니다. 높은 번호의 결과값을 0으로 바꿨을 뿐 원래 확률은 그대로이므로 조건부 재정규화가 아닙니다.

The first N contributions are one each, giving expectation N and limit infinity. Values at higher indices become zero while their original probabilities remain, so this is not conditional renormalization.

17. 대칭이라고 평균이 0은 아니다Symmetry does not guarantee a zero mean

n≥1에서 X=+2ⁿ과 X=−2ⁿ 각각의 확률을 2⁻ⁿ⁻¹로 둡니다. 기대값이 0인지 양·음 부분을 사용해 판정하세요.

For n≥1, assign probability 2⁻ⁿ⁻¹ to each of +2ⁿ and −2ⁿ. Decide whether E[X]=0 using positive and negative parts.

풀이와 확인할 이유Solution and explanation

전체 확률은 1입니다. 양의 각 기여와 음의 크기 기여가 각각 1/2이므로 E[X⁺]=E[X⁻]=∞입니다. ∞−∞가 미정의이므로 기대값은 0이 아니라 미정의입니다. 대칭 절단의 0은 별도의 극한 방식입니다.

Total probability is one, but both positive and negative expected parts are infinite. Their difference is undefined, not zero. A symmetric-truncation limit is a different operation.

18. 평균은 유한하지만 분산은 무한Finite mean and infinite variance

P(X=2ⁿ)=3/4ⁿ,n≥1입니다. E[X]와 E[X²]를 구해 분산의 지위를 말하세요.

For P(X=2ⁿ)=3/4ⁿ, n≥1, find the first two moments and classify the variance.

풀이와 확인할 이유Solution and explanation

확률 합은 3·(1/4)/(1−1/4)=1입니다. E[X]=3Σ2⁻ⁿ=3이고 E[X²]=Σ3=∞입니다. X는 적분 가능하지만 제곱 적분 가능하지 않아 평균 주위의 분산은 +∞입니다.

The probabilities sum to one. E[X]=3Σ2⁻ⁿ=3, but E[X²]=Σ3=∞. The variable is integrable but not square-integrable, with infinite variance around its finite mean.

19. 두 모멘트가 모두 유한한 꼬리A tail with finite second moment

P(X=2ⁿ)=7/8ⁿ,n≥1입니다. 기대값·두 번째 모멘트·분산을 구하세요.

For P(X=2ⁿ)=7/8ⁿ, n≥1, find the mean, second moment and variance.

풀이와 확인할 이유Solution and explanation

확률은 합 1입니다. E[X]=7Σ(1/4)ⁿ=7/3, E[X²]=7Σ(1/2)ⁿ=7입니다. 분산은 7−49/9=14/9입니다. 꼬리 확률의 감소 속도를 바꾸면 모멘트 존재가 달라집니다.

Probabilities sum to one. The mean is 7Σ(1/4)ⁿ=7/3 and the second moment 7Σ(1/2)ⁿ=7. Variance is 14/9. Tail decay controls moment existence.

20. 균등밀도의 모멘트Uniform-density moments

가정한 U(0,1)에서 평균·두 번째 모멘트·분산을 적분으로 구하세요.

For an assumed U(0,1), derive the mean, second moment and variance by integration.

풀이와 확인할 이유Solution and explanation
E[X]=∫01x dx=12,E[X2]=∫01x2 dx=13,Var⁡(X)=13−14=112.\begin{aligned}E[X]&=\int_0^1x\,dx=\frac12,\\E[X^2]&=\int_0^1x^2\,dx=\frac13,\\\operatorname{Var}(X)&=\frac13-\frac14=\frac1{12}.\end{aligned}

PDF는 구간 안에서 1입니다. 각 점의 확률을 1로 둔 계산이 아니라 길이에 대해 밀도를 적분했습니다.

E[X]=∫01x dx=12,E[X2]=∫01x2 dx=13,Var⁡(X)=13−14=112.\begin{aligned}E[X]&=\int_0^1x\,dx=\frac12,\\E[X^2]&=\int_0^1x^2\,dx=\frac13,\\\operatorname{Var}(X)&=\frac13-\frac14=\frac1{12}.\end{aligned}

The density is one on the interval. This integrates mass per length rather than assigning probability one to each point.

21. 원자와 연속부분을 함께 평균 낸다Moments of a mixed law

0의 원자에 확률 1/4, U(0,1)에 혼합비중 3/4를 줍니다. 평균·두 번째 모멘트·분산을 구하세요.

A law assigns probability 1/4 to an atom at zero and mixture weight 3/4 to U(0,1). Find its mean, second moment and variance.

풀이와 확인할 이유Solution and explanation
E[X]=14(0)+34∫01x dx=38,E[X2]=34∫01x2 dx=14,Var⁡(X)=14−(38)2=764.\begin{aligned}E[X]&=\frac14(0)+\frac34\int_0^1x\,dx=\frac38,\\E[X^2]&=\frac34\int_0^1x^2\,dx=\frac14,\\\operatorname{Var}(X)&=\frac14-\left(\frac38\right)^2=\frac7{64}.\end{aligned}

원자의 0값 기여도 법칙에서 빼지 않습니다. 연속부분 밀도 3/4만을 전체 PDF라고 부르지 않습니다.

E[X]=14(0)+34∫01x dx=38,E[X2]=34∫01x2 dx=14,Var⁡(X)=14−(38)2=764.\begin{aligned}E[X]&=\frac14(0)+\frac34\int_0^1x\,dx=\frac38,\\E[X^2]&=\frac34\int_0^1x^2\,dx=\frac14,\\\operatorname{Var}(X)&=\frac14-\left(\frac38\right)^2=\frac7{64}.\end{aligned}

The zero-valued atom remains part of the law. Continuous density of total mass 3/4 is not a full PDF for the mixture.

22. 분산 정의와 모멘트식Two variance calculations

균등하게 (0,1,1,2)를 반환하는 X의 분산을 중심편차와 모멘트 차 두 방식으로 구하세요.

Compute variance of uniform (0,1,1,2) using centered deviations and the raw-moment identity.

풀이와 확인할 이유Solution and explanation

평균은 1입니다. 중심편차 제곱 평균은 (1+0+0+1)/4=1/2입니다. 또 E[X²]=3/2에서 평균 제곱 1을 빼도 1/2입니다. 두 계산은 같은 법칙을 다른 식으로 표현합니다.

The mean is one. Centered squares average to 1/2. The second moment 3/2 minus squared mean one also gives 1/2. Both describe the same law.

23. 임의 상수에서의 예측 손실Squared loss around a constant

평균 1, 분산 1/2인 X에 대해 E[(X−c)²]를 c=0,1,3에서 구하세요. 최적 상수는 무엇인가요?

X has mean one and variance 1/2. Find E[(X−c)²] for c=0,1,3 and identify the optimal constant.

풀이와 확인할 이유Solution and explanation

손실은 1/2+(1−c)²입니다. 세 값은 각각 3/2,1/2,9/2입니다. 최솟값은 c=1에서 달성합니다. c를 바꿔도 원래 X의 분산 1/2은 바뀌지 않습니다.

Use 1/2+(1−c)², giving 3/2,1/2,9/2. The optimum is c=1. The variance of X itself stays 1/2.

24. g에서 kg로 바꾸는 분산Scale variance from g to kg

실제 질량 기록 법칙의 평균이 239500/57g, 분산이 694474375/1083g²입니다. kg 단위의 평균과 분산을 구하세요.

An actual mass-record law has mean 239500/57 g and variance 694474375/1083 g². Convert both to kg units.

풀이와 확인할 이유Solution and explanation

평균은 1000으로 나누어 479/114kg입니다. 분산은 1000²으로 나누어 1111159/1732800kg²입니다. 대략 4.201754386kg과 0.641250577101kg²입니다. 표준편차는 1000으로 나눕니다.

The mean becomes 479/114 kg. Divide variance by one million to obtain 1111159/1732800 kg², about 0.641250577101 kg². Standard deviation, unlike variance, scales by 1/1000.

25. 분산 0과 영질량 이름표Zero variance and null tickets

값 (5,5,99,−3)에 확률 (1/2,1/2,0,0)을 줍니다. 평균과 분산을 구하세요. 모든 반환값이 같아야 하나요?

Values (5,5,99,−3) have probabilities (1/2,1/2,0,0). Find moments and decide whether every value must match.

풀이와 확인할 이유Solution and explanation

양의 확률에서 언제나 5이므로 평균 5, 분산 0입니다. 99와 −3은 영질량 결과라 기여하지 않습니다. 분산 0은 거의 확실한 상수이지 모든 점에서 같은 함수라는 뜻은 아닙니다.

The law returns five almost surely, giving mean five and variance zero. Values on null tickets do not contribute. Almost-sure constancy is weaker than pointwise constancy.

26. 큰 수준과 작은 퍼짐Large level and small spread

정확한 두 수 10000000000000000과 10000000000000002를 같은 확률로 선택합니다. 평균과 분산을 손으로 구하고 수치계산의 주의점을 쓰세요.

Select exactly 10000000000000000 and 10000000000000002 with equal probabilities. Find the exact mean and variance and explain a numerical caution.

풀이와 확인할 이유Solution and explanation

평균은 10000000000000001이고 편차는 ±1이므로 분산 1입니다. 이 정확한 평균은 일반 이진64 값으로 그대로 저장되지 않을 수 있습니다. 큰 두 원점 모멘트를 빼는 계산은 상쇄오차가 커질 수 있어 정확한 입력이나 안정된 중심 계산을 확인해야 합니다.

The exact mean is 10000000000000001 and deviations are ±1, so variance is one. The mean may not be representable in binary64. Subtracting large raw moments can lose the small variance; preserve exact inputs or use stable centered methods.

27. 선형결합의 교차항Covariance in a linear combination

균등한 X=(0,1,2,3),Y=(3,2,1,0)에서 Z=2X−Y의 평균과 분산을 공분산 공식으로 구하세요.

For uniform paired X=(0,1,2,3), Y=(3,2,1,0), find mean and variance of Z=2X−Y.

풀이와 확인할 이유Solution and explanation
E[Z]=2(32)−32=32,Var⁡(Z)=4(54)+54−4(−54)=454.\begin{aligned}E[Z]&=2\left(\frac32\right)-\frac32=\frac32,\\\operatorname{Var}(Z)&=4\left(\frac54\right)+\frac54-4\left(-\frac54\right)=\frac{45}{4}.\end{aligned}

Y=3−X이므로 Z=3X−3으로 직접 확인할 수도 있습니다. 음의 계수 때문에 공분산 교차항의 부호가 바뀝니다.

E[Z]=2(32)−32=32,Var⁡(Z)=4(54)+54−4(−54)=454.\begin{aligned}E[Z]&=2\left(\frac32\right)-\frac32=\frac32,\\\operatorname{Var}(Z)&=4\left(\frac54\right)+\frac54-4\left(-\frac54\right)=\frac{45}{4}.\end{aligned}

Check directly with Z=3X−3. A negative coefficient changes the covariance cross-term sign.

28. 무상관이지만 종속인 예Uncorrelated but dependent

X는 −1,0,1을 균등하게 반환하고 Y=X²입니다. 공분산이 0임을 보인 뒤 독립이 아님을 사건으로 보이세요.

X is uniform on −1,0,1 and Y=X². Show zero covariance and demonstrate dependence with an event.

풀이와 확인할 이유Solution and explanation

E[X]=E[X³]=0이라 Cov(X,Y)=0입니다. 그러나 P(X=0,Y=0)=1/3인 반면 P(X=0)P(Y=0)=1/9입니다. Y가 X로 결정되는 비선형 의존을 공분산 0이 배제하지 못합니다.

E[X]=E[X³]=0, so covariance is zero. Yet the joint zero event has probability 1/3 instead of the product 1/9. Covariance misses this nonlinear dependence.

29. 사건 내부의 평균Mean inside an event

균등한 (1,3,6,8)에서 A는 첫 두 이름표입니다. E[X|A]를 직접 평균과 E[XI_A]/P(A) 두 방식으로 구하세요.

For uniform (1,3,6,8), A contains the first two tickets. Calculate E[X|A] directly and through E[XI_A]/P(A).

풀이와 확인할 이유Solution and explanation

A 안에서 1과 3의 조건부 확률은 1/2씩이므로 평균은 2입니다. 또 XI_A=(1,3,0,0)의 전체 평균 1을 P(A)=1/2로 나누면 2입니다. A 밖 값을 0으로만 바꾼 평균 1과 혼동하지 않습니다.

Conditional values one and three each have probability 1/2, giving mean two. Alternatively E[XI_A]=1 and P(A)=1/2. Zeroing values outside A alone gives one, not the conditional mean.

30. 조건부 평균과 절단 기대값Conditional mean and truncated expectation

균등 (1,3,6,8)에서 B는 마지막 두 장입니다. P(B),E[XI_B],E[X|B]를 구해 관계를 확인하세요.

For uniform (1,3,6,8), B contains the last two tickets. Find P(B), E[XI_B], E[X|B].

풀이와 확인할 이유Solution and explanation

P(B)=1/2이고 E[XI_B]=(6+8)/4=7/2입니다. 이를 1/2로 나누면 E[X|B]=7입니다. 따라서 E[XI_B]=P(B)E[X|B]입니다. 조건부 평균 자체에 전체 사건의 확률을 곱하면 원래 법칙에 대한 기여가 됩니다.

The values are 1/2,7/2,7 respectively. Multiplying conditional mean seven by event probability 1/2 gives its contribution to the original expectation.

31. 영질량 조건을 0으로 채우지 않는다Do not fill null conditions with zero

값 (1,3,6,8), 그룹 A,A,B,B, 가중치 (1,1,0,0)입니다. 전체 평균, A 평균, B 평균의 지위를 말하세요.

Values (1,3,6,8), groups A, A, B, B have weights (1,1,0,0). State overall and conditional means.

풀이와 확인할 이유Solution and explanation

전체 법칙은 첫 두 값에 각각 1/2를 주므로 평균 2입니다. A의 조건부 평균도 2입니다. B는 확률 0이라 비율이 미정의입니다. 외부 적분에서 B의 기여 0과, B의 평균을 식별했다는 주장은 다릅니다.

The overall and A means are two. The B event has zero probability, so its conditional ratio is undefined. Its zero contribution to an outer integral does not identify its mean.

32. 가중 조건부 평균Weighted conditional means

값 (1,3,6,8), 그룹 A,A,B,B, 가중치 (1,3,2,4)입니다. 그룹 확률·평균과 총기대를 구하세요.

Values (1,3,6,8), groups A, A, B, B have weights (1,3,2,4). Find group probabilities, means and total expectation.

풀이와 확인할 이유Solution and explanation
P(A)=410,E[X∣A]=1+94=52,P(B)=610,E[X∣B]=12+326=223,E[X]=41052+610223=275.\begin{aligned}P(A)&=\frac4{10},&E[X\mid A]&=\frac{1+9}{4}=\frac52,\\P(B)&=\frac6{10},&E[X\mid B]&=\frac{12+32}{6}=\frac{22}{3},\\E[X]&=\frac4{10}\frac52+\frac6{10}\frac{22}{3}=\frac{27}{5}.\end{aligned}

그룹 안 무게도 원래 가중치를 조건부로 정규화합니다. 원래 이름표 수만으로 그룹 확률을 계산하지 않습니다.

P(A)=410,E[X∣A]=1+94=52,P(B)=610,E[X∣B]=12+326=223,E[X]=41052+610223=275.\begin{aligned}P(A)&=\frac4{10},&E[X\mid A]&=\frac{1+9}{4}=\frac52,\\P(B)&=\frac6{10},&E[X\mid B]&=\frac{12+32}{6}=\frac{22}{3},\\E[X]&=\frac4{10}\frac52+\frac6{10}\frac{22}{3}=\frac{27}{5}.\end{aligned}

Renormalize original weights within each group. Group probabilities are determined by weight, not just ticket counts.

33. 숫자와 확률변수의 차이A number versus a random variable

균등한 X=(1,3,6,8), 그룹 A,A,B,B에서 E[X|G=A]와 E[X|G]를 각각 쓰고 구별하세요.

For uniform X=(1,3,6,8), groups A, A, B, B, distinguish E[X|G=A] from E[X|G].

풀이와 확인할 이유Solution and explanation

첫째는 숫자 2입니다. 둘째는 이름표별로 (2,2,7,7)을 반환하는 변수이며 2와 7에 각각 확률 1/2를 둡니다. 바깥 기대값을 취하면 4.5입니다. 조건변수의 값을 고정했는지가 차이입니다.

The first is the number two. The second returns (2,2,7,7), taking two and seven with probabilities 1/2. Its expectation is 4.5. Fixing the group changes the type of object.

34. 총기대 법칙의 직접 확인Verify total expectation

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 E[E[X|G]]를 계산하고 원래 평균과 비교하세요.

For uniform X=(1,3,6,8), groups A, A, B, B, calculate E[E[X|G]] and compare with E[X].

풀이와 확인할 이유Solution and explanation

그룹 평균 2와 7에 원래 확률 1/2씩을 주어 (2+7)/2=4.5입니다. 원래 네 값의 평균 18/4도 4.5입니다. 나눈 합을 원래 무게로 합친 항등식이며 독립 가정이 필요하지 않습니다.

Average group means two and seven with probabilities 1/2 to obtain 4.5, matching 18/4. This regrouping uses no independence assumption.

35. 평균의 평균에서 틀린 가중치Wrong outer weights

균등한 값 (1,3,6,8)에서 A는 앞 세 장, B는 마지막 한 장입니다. 원래 평균과 두 그룹 평균의 단순 평균을 비교하세요.

For uniform (1,3,6,8), A contains the first three tickets and B the last. Compare the overall mean with an equal average of group means.

풀이와 확인할 이유Solution and explanation

원래 그룹 평균은 10/3과 8, 그룹 확률은 3/4와 1/4입니다. 총기대는 4.5입니다. 단순 평균은 17/3으로 다릅니다. 후자는 그룹 먼저 균등 선택하는 다른 법칙의 기대값입니다.

Group means 10/3 and eight with probabilities 3/4 and 1/4 give 4.5. Their unweighted mean 17/3 describes another, group-first-uniform law.

36. 조건부 분산의 중심Center conditional variances correctly

균등한 값 (1,3,6,8), 그룹 A,A,B,B입니다. 각 조건부 분산을 구하세요. 전체 평균 4.5를 중심으로 써도 되나요?

For uniform (1,3,6,8), groups A, A, B, B, calculate both conditional variances. Can you center at overall mean 4.5?

풀이와 확인할 이유Solution and explanation

A에서는 평균 2 주위의 제곱편차가 모두 1이므로 분산 1입니다. B도 평균 7 주위에서 분산 1입니다. 전체 평균을 사용하면 그룹 평균의 차이까지 섞여 조건부 분산이 아닙니다.

Center A at two and B at seven; each conditional variance is one. Centering at 4.5 includes between-group displacement and does not calculate conditional variance.

37. 총분산 세 항을 손으로 구한다Calculate total variance by hand

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 전체 분산, 내부 항, 사이 항을 구하세요.

For uniform X=(1,3,6,8), groups A, A, B, B, find total, within and between variances.

풀이와 확인할 이유Solution and explanation
Var⁡(X)=2(3.52+1.52)4=294,E[Var⁡(X∣G)]=1+12=1,Var⁡(E[X∣G])=2(2.52)2=254.\begin{aligned}\operatorname{Var}(X)&=\frac{2(3.5^2+1.5^2)}{4}\\&=\frac{29}{4},\\E[\operatorname{Var}(X\mid G)]&=\frac{1+1}{2}=1,\\\operatorname{Var}(E[X\mid G])&=\frac{2(2.5^2)}{2}\\&=\frac{25}{4}.\end{aligned}

1+25/4=29/4입니다. 내부와 사이 항은 모두 원래 법칙의 확률을 사용합니다.

Var⁡(X)=2(3.52+1.52)4=294,E[Var⁡(X∣G)]=1+12=1,Var⁡(E[X∣G])=2(2.52)2=254.\begin{aligned}\operatorname{Var}(X)&=\frac{2(3.5^2+1.5^2)}{4}\\&=\frac{29}{4},\\E[\operatorname{Var}(X\mid G)]&=\frac{1+1}{2}=1,\\\operatorname{Var}(E[X\mid G])&=\frac{2(2.5^2)}{2}\\&=\frac{25}{4}.\end{aligned}

Within one plus between 25/4 equals total 29/4, all under the original law.

38. 교차항은 각 점에서 0인가Is the cross-term pointwise zero?

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 (X−m(G))(m(G)−μ)를 이름표별로 계산하세요. 왜 기대값이 0인가요?

For uniform X=(1,3,6,8), groups A, A, B, B, list (X−m(G))(m(G)−μ) at each ticket and explain its zero expectation.

풀이와 확인할 이유Solution and explanation

잔차는 (−1,1,−1,1), 그룹 평균 차이는 (−2.5,−2.5,2.5,2.5)이므로 곱은 (2.5,−2.5,−2.5,2.5)입니다. 각 점에서는 0이 아니지만 균등 평균은 0입니다. 그룹 안에서 잔차 평균이 0이기 때문입니다.

Residuals (−1,1,−1,1) times group displacements (−2.5,−2.5,2.5,2.5) give (2.5,−2.5,−2.5,2.5). Their mean is zero though none is zero. Conditional residual averaging removes the cross-term.

39. 그룹 예측값을 모두 0으로 두면Predict zero in both groups

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 h(A)=h(B)=0으로 예측합니다. MSE를 최적 그룹 예측 손실과 추가항으로 나누세요.

For uniform X=(1,3,6,8), groups A, A, B, B, predict h(A)=h(B)=0. Decompose its MSE.

풀이와 확인할 이유Solution and explanation
E[(X−h(G))2]=1⏟optimal group MSE+12(2−0)2+12(7−0)2⏟53/2=552.E[(X-h(G))^2]=\underbrace{1}_{\text{optimal group MSE}}+\underbrace{\frac12(2-0)^2+\frac12(7-0)^2}_{53/2}=\frac{55}{2}.

직접 제곱 평균 (1+9+36+64)/4도 55/2입니다. 원래 그룹 평균 예측 (2,7)의 MSE는 1이며 추가항은 비음수입니다.

E[(X−h(G))2]=1⏟optimal group MSE+12(2−0)2+12(7−0)2⏟53/2=552.E[(X-h(G))^2]=\underbrace{1}_{\text{optimal group MSE}}+\underbrace{\frac12(2-0)^2+\frac12(7-0)^2}_{53/2}=\frac{55}{2}.

Directly averaging the four squares also gives 55/2. The optimal group MSE is one, and the added penalty is nonnegative.

40. 최적에서 한 단위씩 벗어난 예측One-unit errors in group predictions

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 h(A)=3,h(B)=6으로 예측합니다. MSE와 최적값의 차이를 구하세요.

For uniform X=(1,3,6,8), groups A, A, B, B, use h(A)=3, h(B)=6. Find its MSE and excess over the optimum.

풀이와 확인할 이유Solution and explanation

각 그룹 평균 2,7에서 한 단위씩 벗어나므로 추가 손실은 (1/2)·1+(1/2)·1=1입니다. 최적 그룹 손실 1에 더해 MSE는 2입니다. 직접 오차 제곱 (4,0,0,4)의 평균도 2입니다.

Both predictions differ from their group means by one, producing penalty one. Add optimal group MSE one to get total two, also the mean of squared errors (4,0,0,4).

41. 정보를 더 알면 생기는 감소량Reduction from more information

균등 X=(1,3,6,8)에서 무정보 상수 예측, A/A/B/B 그룹 예측, 정확한 이름표를 아는 예측의 최소 MSE를 구하세요.

For uniform X=(1,3,6,8), compare minimum MSE with no information, groups A/A/B/B, and the exact ticket.

풀이와 확인할 이유Solution and explanation

각각 전체 분산 29/4, 내부 분산 평균 1, 정확히 X를 반환하는 손실 0입니다. 첫 감소량은 사이 분산 25/4입니다. 이는 법칙을 정확히 아는 이론적 최적 예측이며 추정한 모형의 표본 밖 성능 보장은 아닙니다.

The minima are 29/4, one and zero. The first reduction is between variance 25/4. These are theoretical optima under the known law, not a guarantee for fitted out-of-sample models.

42. 포함되지 않은 정보의 탑성질 반례Nonnested information counterexample

균등 a,b,c,d에서 X=(0,0,0,4), G={{a,b},{c,d}}, H={{a,c},{b,d}}입니다. E[E[X|H]|G]와 E[X|G]를 비교하세요.

On uniform a, b, c, d, let X=(0,0,0,4), G={{a, b},{c, d}}, H={{a, c},{b, d}}. Compare E[E[X|H]|G] and E[X|G].

풀이와 확인할 이유Solution and explanation

E[X|H]=(0,2,0,2)입니다. G의 각 그룹 안 평균은 1이라 두 번 조건을 단 값은 (1,1,1,1)입니다. 반면 E[X|G]=(0,0,2,2)입니다. G와 H가 포함 관계가 아니므로 일반적인 탑성질 삭제를 적용할 수 없습니다.

The first conditional variable is (0,2,0,2), whose G averages give (1,1,1,1). Direct G conditioning gives (0,0,2,2). Nonnested information does not satisfy the tower simplification.

43. 아는 인자를 밖으로 꺼낸다Pull out a known factor

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 g(A)=2,g(B)=−1입니다. E[g(G)X|G]를 이름표별로 쓰세요.

For uniform X=(1,3,6,8), groups A, A, B, B, let g(A)=2, g(B)=−1. List E[g(G)X|G].

풀이와 확인할 이유Solution and explanation

그룹별로 g(G)E[X|G]를 계산하여 A에서 2·2=4, B에서 −1·7=−7입니다. 결과 변수는 (4,4,−7,−7)입니다. g는 그룹을 알면 고정되기 때문에 꺼낼 수 있으며 X 자체는 그룹 안에서 변합니다.

Within groups, multiply the known factor by the conditional mean: four in A and −7 in B. The variable is (4,4,−7,−7). X itself is not constant within groups.

44. 조건부 Jensen은 점별 절댓값 비교가 아니다Conditional Jensen is not pointwise shrinkage

균등 X=(1,3,6,8), 그룹 A,A,B,B에서 E[m(G)²]와 E[X²]를 구하세요. 모든 이름표에서 |m(G)|≤|X|인가요?

For uniform X=(1,3,6,8), groups A, A, B, B, calculate E[m(G)²] and E[X²]. Is |m(G)|≤|X| at every ticket?

풀이와 확인할 이유Solution and explanation

그룹 평균 제곱의 평균은 (4+49)/2=53/2이고 원래 제곱 평균은 55/2입니다. 앞쪽이 작습니다. 그러나 X=1인 이름표에서는 m(G)=2라 점별 비교는 거짓입니다. L² 크기의 평균적 부등식입니다.

The quantities are 53/2 and 55/2. Mean square decreases, but at X=1 its group mean is two. The contraction is in probability-weighted L², not pointwise absolute value.

45. 삼각형 밀도의 조건부 평균Conditional mean in a triangle

가정 결합밀도 2가 0<y<x<1에 놓입니다. E[Y|X=x]와 E[Y]를 구하세요.

The assumed joint density is two on 0< y< x<1. Find E[Y|X=x] and E[Y].

풀이와 확인할 이유Solution and explanation
fX(x)=2x,fY∣X(y∣x)=1x,E[Y∣X=x]=∫0xyx dy=x2,E[Y]=∫01x2(2x) dx=13.\begin{aligned}f_X(x)&=2x,\quad f_{Y\mid X}(y\mid x)=\frac1x,\\E[Y\mid X=x]&=\int_0^x\frac yx\,dy=\frac x2,\\E[Y]&=\int_0^1\frac x2(2x)\,dx=\frac13.\end{aligned}

0<x<1에서의 조건부 버전입니다. x=0에 1/x를 대입하지 않습니다.

fX(x)=2x,fY∣X(y∣x)=1x,E[Y∣X=x]=∫0xyx dy=x2,E[Y]=∫01x2(2x) dx=13.\begin{aligned}f_X(x)&=2x,\quad f_{Y\mid X}(y\mid x)=\frac1x,\\E[Y\mid X=x]&=\int_0^x\frac yx\,dy=\frac x2,\\E[Y]&=\int_0^1\frac x2(2x)\,dx=\frac13.\end{aligned}

This version applies for 0< x<1; do not substitute x=0 into 1/x.

46. 삼각형 밀도의 총분산Total variance in a triangle

밀도 2가 0<y<x<1에 놓이는 모형에서 E[X²]=1/2,Var(X)=1/18입니다. Var(Y|X=x)=x²/12임을 보이고 Var(Y)를 총분산으로 구하세요.

Density two lies on 0< y< x<1, with E[X²]=1/2 and Var(X)=1/18. Derive Var(Y|X=x)=x²/12 and use total variance for Var(Y).

풀이와 확인할 이유Solution and explanation
E[Y2∣X=x]=∫0xy2x dy=x23,Var⁡(Y∣X=x)=x23−x24=x212,Var⁡(Y)=112E[X2]+14Var⁡(X)=124+172=118.\begin{aligned}E[Y^2\mid X=x]&=\int_0^x\frac{y^2}{x}\,dy=\frac{x^2}{3},\\\operatorname{Var}(Y\mid X=x)&=\frac{x^2}{3}-\frac{x^2}{4}=\frac{x^2}{12},\\\operatorname{Var}(Y)&=\frac1{12}E[X^2]+\frac14\operatorname{Var}(X)\\&=\frac1{24}+\frac1{72}=\frac1{18}.\end{aligned}

조건부 평균 X/2의 분산에는 1/4를 곱합니다.

E[Y2∣X=x]=∫0xy2x dy=x23,Var⁡(Y∣X=x)=x23−x24=x212,Var⁡(Y)=112E[X2]+14Var⁡(X)=124+172=118.\begin{aligned}E[Y^2\mid X=x]&=\int_0^x\frac{y^2}{x}\,dy=\frac{x^2}{3},\\\operatorname{Var}(Y\mid X=x)&=\frac{x^2}{3}-\frac{x^2}{4}=\frac{x^2}{12},\\\operatorname{Var}(Y)&=\frac1{12}E[X^2]+\frac14\operatorname{Var}(X)\\&=\frac1{24}+\frac1{72}=\frac1{18}.\end{aligned}

Scaling the conditional mean X/2 scales its variance by 1/4.

47. 영집합의 버전 선택Versions on null sets

두 적분 가능 변수가 확률 0인 사건에서만 다른 값을 가집니다. 기대값이 같은 이유와 영조건사건의 비율이 결정되었다는 주장과의 차이를 쓰세요.

Two integrable variables differ only on a probability-zero event. Explain equal expectations and distinguish this from identifying a null-event conditional ratio.

풀이와 확인할 이유Solution and explanation

차이가 영집합에만 놓이면 그 차이의 적분은 0이라 두 기대값이 같습니다. 조건부 평균 변수의 버전도 이런 의미로 같을 수 있습니다. 그러나 확률 0인 사건에 대한 직접 비율 E[XI_A]/P(A)는 여전히 0/0으로 미정의입니다.

Their difference integrates to zero, so expectations agree. Conditional-mean versions can be equivalent this way. The direct null-event ratio remains undefined 0/0.

48. 거의 확실한 고유성의 핵심Core of almost-sure uniqueness

Z₁,Z₂가 같은 적분 가능 X와 같은 정보에 대한 두 조건부 기대값 버전이고 A_n={Z₁−Z₂≥1/n}입니다. ∫_{A_n}(Z₁−Z₂)dP=0에서 어떤 결론을 얻나요?

Z₁, Z₂ are two conditional-expectation versions of the same integrable X for the same information, and A_n={Z₁−Z₂≥1/n}. What follows from zero integral of their difference over A_n?

풀이와 확인할 이유Solution and explanation
0≥1nP(An)≥0⟹P(An)=0,{Z1>Z2}=⋃n≥1An.0\ge\frac1nP(A_n)\ge0\quad\Longrightarrow\quad P(A_n)=0,\qquad \{Z_1>Z_2\}=\bigcup_{n\ge1}A_n.

가산 합집합의 확률도 0입니다. 반대 차이에도 적용하여 Z₁=Z₂가 거의 확실히 성립합니다. 모든 점에서 같다는 결론은 아닙니다.

0≥1nP(An)≥0⟹P(An)=0,{Z1>Z2}=⋃n≥1An.0\ge\frac1nP(A_n)\ge0\quad\Longrightarrow\quad P(A_n)=0,\qquad \{Z_1>Z_2\}=\bigcup_{n\ge1}A_n.

The union is null. Apply the argument to the reverse difference to obtain almost-sure, not necessarily pointwise, equality.

49. 참 조건부 평균과 최적 직선Conditional mean versus best line

G는 −1,0,1을 균등하게 반환하고 X=G²입니다. E[X|G]와 최적 절편 포함 선형 예측 a+bG를 구하세요.

G is uniform on −1,0,1 and X=G². Find E[X|G] and the best linear predictor a+bG with an intercept.

풀이와 확인할 이유Solution and explanation

G를 알면 X가 결정되므로 조건부 평균은 G²입니다. 선형 예측에서는 Cov(G,X)=0,Var(G)=2/3이므로 b=0이고 a=E[X]=2/3입니다. 선형 잔차는 G와 직교하지만 참 조건부 평균을 그대로 재현하지 못합니다.

The conditional mean is G². Zero covariance and Var(G)=2/3 give slope zero and intercept 2/3. Linear residual orthogonality does not make the line equal the true conditional mean.

50. 총공분산에서 총분산으로Total covariance recovers total variance

총공분산 식 Cov(X,Y)=E[Cov(X,Y|G)]+Cov(E[X|G],E[Y|G])에 Y=X를 넣으세요. 필요한 모멘트 조건도 쓰세요.

Substitute Y=X in Cov(X, Y)=E[Cov(X, Y|G)]+Cov(E[X|G], E[Y|G]) and state a sufficient moment condition.

풀이와 확인할 이유Solution and explanation

Cov(X,X)=Var(X)이고 두 조건부 평균도 같아 총분산 식을 얻습니다. E[X²]<∞를 가정하면 모든 항이 유한하고 교차항과 적분을 안전하게 다룰 수 있습니다. 단순히 평균만 유한하다는 조건보다 강합니다.

Cov(X, X)=Var(X), and covariance of the two identical conditional means becomes their variance. E[X²]<∞ makes all components finite; a finite mean alone is weaker.

51. 거의 확실한 수렴과 기대값Almost-sure convergence versus expectations

U∼U(0,1),X_n=n·1{0<U<1/n}입니다. 거의 확실한 극한과 기대값의 극한을 비교하세요. 왜 지배수렴을 자동 적용할 수 없나요?

Let U∼U(0,1), X_n=n·1{0< U<1/n}. Compare almost-sure and expectation limits, and explain why dominated convergence is unavailable.

풀이와 확인할 이유Solution and explanation

고정된 U>0에서는 충분히 큰 n 뒤에 조건이 거짓이므로 X_n→0입니다. 그러나 E[X_n]=n·(1/n)=1입니다. 적분 가능한 공통 지배변수 조건이 성립하지 않아 극한과 기대값을 교환할 수 없습니다.

For each fixed U>0, eventually the indicator vanishes, so X_n→0. Yet E[X_n]=1. No integrable common dominator exists, so the exchange is unjustified.

52. 실제 국가의 기대값은 누구의 소득인가Whose income is a country expectation?

실제 2024년 16국을 균등하게 고르고 그 국가의 GDP/명을 반환합니다. 기대값 약 31100.238572의 단위와 모집단 해석을 설명하세요.

Uniformly select one of 16 actual 2024 countries and return its GDP per capita. Explain the units and scope of mean 31100.238572.

풀이와 확인할 이유Solution and explanation

단위는 2015 USD/명이며 선택한 국가의 공표 실질 GDP/명 평균입니다. PPP나 주민 개인소득 평균을 관측한 것이 아닙니다. 고정된 16국 선택법칙의 기대값을 세계 전체 국가나 모든 사람의 분포로 일반화하지 않습니다.

Its unit is constant 2015 USD/person and it averages reported country GDP per capita. It is neither PPP nor observed personal income, and the fixed 16-country law is not automatically the world-country or person distribution.

53. 실제 국가의 총분산 검산Audit country total variance

실제 16국의 균등법칙에서 내부 항은 약 257651263.931050, 사이 항은 약 274369183.102422입니다. 전체 분산과 단위를 쓰고, 기대수명 그룹의 인과 해석을 평가하세요.

Under uniform selection of 16 actual countries, within and between components are about 257651263.931050 and 274369183.102422. Give the total, units and causal scope.

풀이와 확인할 이유Solution and explanation

합은 약 532020447.033472 (2015 USD/명)²입니다. 그룹 안 분산과 그룹 평균 차이를 원래 확률로 나눈 기술적 항등식입니다. 기대수명 80년이라는 분류 기준이 GDP에 인과효과를 준다는 결론은 따라오지 않습니다.

The total is about 532020447.033472 (constant 2015 USD/person)². This is a descriptive decomposition under the original law, not a causal effect of crossing the 80-year classification threshold.

54. 실제 종별 평균의 올바른 가중Weight actual species means correctly

실제 종별 기록 수가 151,68,123이고 평균이 558800/151,126925/34,624350/123g입니다. 전체 342기록 균등법칙의 평균을 구하세요.

Actual species counts are 151,68,123, with means 558800/151,126925/34,624350/123 g. Find the uniform-342-record expectation.

풀이와 확인할 이유Solution and explanation
E[X]=151342558800151+6834212692534+123342624350123=1437000342=23950057 g.E[X]=\frac{151}{342}\frac{558800}{151}+\frac{68}{342}\frac{126925}{34}+\frac{123}{342}\frac{624350}{123}=\frac{1437000}{342}=\frac{239500}{57}\ \mathrm g.

약 4201.754386g입니다. 가운데 평균의 분모 34는 약분된 표현이며 실제 그룹 수는 68입니다.

E[X]=151342558800151+6834212692534+123342624350123=1437000342=23950057 g.E[X]=\frac{151}{342}\frac{558800}{151}+\frac{68}{342}\frac{126925}{34}+\frac{123}{342}\frac{624350}{123}=\frac{1437000}{342}=\frac{239500}{57}\ \mathrm g.

The result is about 4201.754386 g. Denominator 34 in the reduced Chinstrap mean does not change its actual count 68.

55. 실제 펭귄의 두 분산 성분Two actual penguin variance components

실제 균등 질량기록 법칙의 내부 분산이 약 211823.050330g², 사이 분산이 약 429427.526771g²입니다. 합을 구하고, 사이 항만을 전체 분산이라 부르면 무엇을 놓치나요?

Within variance is about 211823.050330 g² and between variance about 429427.526771 g² under uniform mass-record selection. Sum them and explain what between alone misses.

풀이와 확인할 이유Solution and explanation

전체 분산은 약 641250.577101g²입니다. 사이 항만 쓰면 같은 종 안에서도 기록값이 다른 내부 변동을 버립니다. 종 평균이 모든 개체 값을 결정하지 않으며, 이 기술적 분해는 원인별 효과의 분해도 아닙니다.

The total is about 641250.577101 g². Between alone discards variation of records within each species. Species means do not determine every record, and this identity is not a causal attribution.

56. 종 먼저 균등한 다른 기대값Another mean under species-first selection

세 실제 종의 평균을 같은 확률 1/3씩 평균 내면 약 4169.922249g입니다. 전체 기록 균등 평균 약 4201.754386g과 왜 다른가요?

Equally averaging the three actual species means gives about 4169.922249 g rather than the uniform-record mean 4201.754386 g. Why?

풀이와 확인할 이유Solution and explanation

종 먼저 균등법칙에서는 각 종에 1/3을 주고 그 안의 기록을 균등하게 고릅니다. 원래 기록법칙은 종에 151/342,68/342,123/342를 줍니다. 법칙이 다르므로 차이가 나며 어느 쪽이 원자료를 고친 것은 아닙니다.

Species-first selection uses group probabilities 1/3 instead of 151/342,68/342,123/342. The law changes while the observations remain fixed. Neither calculation corrects or replaces raw data.

57. 실제 품목 변화의 기대값Expectation of actual category changes

실제 5품목의 FY2024−FY2023 변화는 (600,627,−1606,−2840,10969)백만 USD입니다. 품목 균등법칙의 평균 변화와 회사 총차이를 구하세요.

Actual FY2024−FY2023 changes are (600,627,−1606,−2840,10969) million USD. Find the uniform-category mean and the company-total change.

풀이와 확인할 이유Solution and explanation

다섯 값을 모두 더하면 7750백만 USD입니다. 평균 변화는 이를 5로 나눈 1550백만 USD입니다. 큰 Services 증가만을 사용하거나 평균을 총차이와 혼동하지 않습니다. 기대값 선형성은 두 해 값의 독립을 요구하지 않습니다.

The total is 7750 million USD and the mean is 1550 million USD. Include every category and distinguish a category mean from a company total. Linearity needs no year independence.

58. 실제 연간 차이에서 공분산을 빼먹으면Do not omit covariance from actual paired changes

품목 균등법칙에서 X는 FY2023, Y는 FY2024의 같은 품목 순매출이며 단위는 백만 USD입니다. Var(X)=4272289823.6,Var(Y)=4424476344.4,Cov(X,Y)=4336412641.4입니다. Var(Y−X)를 구하고 독립 참조값과 비교하세요.

Uniformly select a category. Let X return its FY2023 net sales and Y its FY2024 net sales, in million USD. Var(X)=4272289823.6, Var(Y)=4424476344.4, Cov(X, Y)=4336412641.4. Find Var(Y−X) and compare the independence reference.

풀이와 확인할 이유Solution and explanation
Var⁡(Y−X)=4272289823.6+4424476344.4−2(4336412641.4)=23940885.2.\begin{aligned}\operatorname{Var}(Y-X)&=4272289823.6+4424476344.4\\&\quad-2(4336412641.4)\\&=23940885.2.\end{aligned}

단위는 (백만 USD)²입니다. 공분산을 버린 참조값 8696766168은 같은 품목 변화의 분산이 아닙니다. 독립 재선택이라는 다른 법칙에 해당합니다.

Var⁡(Y−X)=4272289823.6+4424476344.4−2(4336412641.4)=23940885.2.\begin{aligned}\operatorname{Var}(Y-X)&=4272289823.6+4424476344.4\\&\quad-2(4336412641.4)\\&=23940885.2.\end{aligned}

Units are (million USD)². Omitting covariance gives 8696766168 under a different independent-reselection law, not same-category change.

59. 기업의 한 품목 그룹 분산 0A singleton company group has zero variance

실제 FY2024 하드웨어 4품목 평균은 73716.5, Services 1품목 평균은 96169백만 USD입니다. 원래 5품목 균등 평균을 복원하고 Services 분산 0의 의미를 말하세요.

Actual FY2024 hardware mean across four categories is 73716.5 and the singleton Services mean is 96169 million USD. Recover the five-category mean and interpret zero Services conditional variance.

풀이와 확인할 이유Solution and explanation

(4/5)·73716.5+(1/5)·96169=78207백만 USD입니다. Services 그룹에는 한 개 집계값만 있어 그 선택조건 안의 분산은 0입니다. 실제 서비스 사업의 시간 변동이나 미래 위험이 0이라는 뜻은 아닙니다.

Weight by 4/5 and 1/5 to obtain 78207 million USD. One aggregate value creates zero variation within that selected group. It says nothing about time variation or future business risk.

60. 기대값 분석을 설계하는 짧은 보고서Design a short expectation audit

국가·펭귄·기업 중 하나를 골라 기대값과 총분산을 보고하려 합니다. 최소한 어떤 항목을 밝혀야 하나요? 평균 차이를 인과효과로 해석해도 되나요?

Choose a country, penguin or company dataset and plan an expectation/total-variance report. What must be specified, and may group-mean differences be called causal?

풀이와 확인할 이유Solution and explanation

선택할 결과 단위와 목록, 확률 법칙, 반환변수와 단위, 유효기록·결측 처리, 그룹 기준과 양의 분모, 원래 그룹 확률, 내부·사이·전체 항의 제곱 단위, 반올림 규칙과 출처를 명시합니다. 선택법칙이나 그룹 평균 차이만으로 인과효과를 식별하지 못합니다. 추론이 필요하다면 표집·생성·인과 모형을 별도로 제시해야 합니다.

State outcome units and frame, selection law, returned variable and units, valid records and missingness, grouping and positive denominators, original outer probabilities, squared units of all variance components, rounding and sources. Group differences or changed selection weights do not identify causal effects; inference requires an additional sampling, generating or causal model.

자료와 출처Data and sources

실제 자료 사례Actual-data cases · 원자료·단위·결측·변환·출처Inputs, units, missingness, transformations and sources

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms