ML-02 · MACHINE LEARNING

편향·분산·모형 복잡도Bias, variance and model complexity

다시 학습할 때의 변동에서 예측 위험의 조건까지From retraining variation to the conditions behind prediction risk

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

기초Foundations

1. 다시 학습하면 예측도 달라진다1. Predictions change when we train again

같은 학교의 내일 평균 점수를 예측한다고 가정합시다. 학습 표를 다시 뽑아 같은 규칙을 적용했더니 한 위치의 예측이 3, 5, 7로 달라졌습니다. 설명을 위해 이 세 학습 상황의 확률을 각각 1/3, 그 위치의 참 조건부 평균을 5라고 정합니다. 평균 예측은 정확히 5지만 한 번의 예측이 언제나 5인 것은 아닙니다.

반대로 어떤 규칙은 어느 학습 표에서도 4를 내놓습니다. 첫 규칙은 평균적으로 중심을 맞히지만 흔들리고, 둘째 규칙은 일정하게 1 낮습니다. 어느 쪽의 제곱오차가 작은지는 흔들림과 중심의 어긋남을 함께 계산해야 압니다. 이 이야기는 실제 학교에서 관측한 자료가 아니라 학습자가 선언한 작은 확률 모형입니다.

이 장에서는 먼저 한 위치의 편향과 분산을 계산하고, 작은 공동분포에서 가능한 학습 표를 모두 만듭니다. 이어 계단 평균의 복잡도, 고정 기준으로의 축소, 선형 평활기의 훈련오차와 독립 시험오차를 연결합니다. 마지막에는 실제 국가·개인·와인 기록으로 돌아와 무엇이 관측되었고 무엇이 추가 가정인지 따집니다.

Suppose we predict tomorrow’s average score at one school. Repeating a learning rule on different training tables gives predictions 3, 5 and 7 at one input. For this illustration, assign probability 1/3 to each training situation and set the true conditional mean at that input to 5. The mean prediction is exactly 5; each individual prediction need not be.

Another rule always returns 4, regardless of the training table. The first rule centers correctly but varies; the second stays one unit too low. Comparing squared error requires both variation and displacement from the target. These are declared teaching assumptions, not observed school measurements.

We begin at one input, then enumerate every training table under a small joint law. Stepwise means, shrinkage toward a fixed anchor and fixed linear smoothers connect model complexity to reused training and independent test errors. Actual country, person and wine records later clarify which quantities are observed and which require additional assumptions.

학부Undergraduate

2. 관측 한 번과 학습 규칙의 반복을 구별한다2. Separate one observation from repeated learning

학습 자료를 D, 그 자료로 만든 예측함수를 h_D라고 씁니다. 입력 x를 고정해도 D가 바뀌면 h_D(x)가 달라질 수 있습니다. 학습 알고리즘이 별도 난수를 쓰면 그 난수도 반복의 확률 공간에 포함해야 합니다. 이 장의 유한 반복 실습은 자료 추출만 무작위이며 적합 규칙 자체는 결정적입니다.

어느 기대값인지 먼저 물으세요. E_D는 학습 자료의 재추출에 대한 평균이고, E[Y|X=x]는 새 결과의 조건부 평균입니다. 한 학습 표 안의 행 평균이나 한 번 구한 잔차 평균과는 다른 대상입니다. 실제 관측 표 하나를 열었다는 사실만으로 학습 표들의 실제 모집단 법칙까지 주어지지는 않습니다.

반복 예측 세 개를 실제로 얻었더라도 그 경험 평균은 일반적으로 미지의 E_D[h_D(x)]를 추정한 값입니다. 우리가 세 값을 각각 확률 1/3인 완전한 유한 법칙으로 선언한 실습에서는 그 법칙의 기대값을 정확히 계산할 수 있습니다. 유한 목록의 정확한 계산과 원래 모집단에 대한 추정은 구별합니다.

Write D for training data and h_D for the fitted prediction function. Even at a fixed x, changing D can change h_D(x). If the algorithm uses randomization, include it in the repetition law. Our finite enumeration varies the training draws while keeping the fitting rule deterministic.

Ask which expectation is taken. E_D averages over training repetitions; E[Y|X=x] averages a new outcome conditional on its input. Neither is simply a row average or a residual average in one training table. Opening one actual dataset does not supply the true population law of all possible training datasets.

Three observed predictions would ordinarily give an empirical estimate of an unknown learning-rule expectation. When an exercise explicitly defines the three predictions as an entire equal-probability law, its expectation is exactly calculable. Exact arithmetic on a declared finite list remains distinct from population estimation.

학부Undergraduate

3. 참 조건부 평균은 무엇을 뜻하는가3. What the conditional-mean target means

제곱손실의 예측 표적을 f(x)=E[Y|X=x]로 둡니다. 조건부 평균은 주어진 정보 X에 의존합니다. 집의 면적만 쓰는 평균과 면적·위치·상태를 함께 쓰는 평균은 다른 함수일 수 있습니다. 따라서 어떤 정보에서 더는 예측하지 못한 변동이 다른 정보에서도 언제나 예측 불가능하다는 뜻은 아닙니다.

새 결과를 Y₀=f(x)+ε₀로 쓰면 E[ε₀|X₀=x]=0입니다. 이 표현은 조건부 평균의 정의에서 나오지만, ε₀와 학습 자료 D가 조건부로 독립이라는 사실까지 자동으로 주지는 않습니다. 뒤의 분해에는 어떤 독립·무상관 조건이 필요한지 따로 명시합니다.

공동분포를 직접 주는 유한 문제에서는 양의 확률을 가진 x마다 f(x)를 구할 수 있습니다. 확률 0인 조건에 임의의 관측 빈도나 평균을 만들어 넣지 않습니다. 실제 자료 사례에서는 가용 기록에 균등 질량을 붙인 별도 작업 법칙을 계산할 뿐, 실제 미지의 모집단 f를 알아냈다고 주장하지 않습니다.

Under squared loss, define the prediction target f(x)=E[Y|X=x]. The target depends on the supplied information. Using only floor area can give a different conditional mean from using area, location and condition. Variation unpredictable from one feature representation need not remain unpredictable after adding informative features.

Writing a new outcome as Y₀=f(x)+ε₀ gives E[ε₀|X₀=x]=0. That follows from the definition of f, but does not automatically make ε₀ independent of training data D conditional on x. We state the additional independence or zero-covariance premises when deriving the decomposition.

A supplied finite joint law determines f(x) at each positive-mass input. Do not invent a conditional mean at a zero-probability input. Actual-data cases instead define a separate uniform working law on available retained records; they do not identify the unknown population f.

학부Undergraduate

4. 편향·분산은 서로 다른 평균이다4. Bias and variance use different centers

고정 x에서 평균 예측을 m(x)=E_D[h_D(x)]로 둡니다. 편향은 m(x)−f(x), 분산은 E_D[(h_D(x)−m(x))²]입니다. 분산은 예측이 참값에서 떨어진 정도가 아니라 자기 평균에서 흔들리는 정도입니다. 편향은 양수·음수·0일 수 있고 제곱편향은 비음수입니다.

일반 확률 모형에서는 필요한 두 번째 모멘트가 유한해야 이들을 유한 수로 더할 수 있습니다. 고정 x에서 E_D[h_D(x)²]<∞와 E[Y₀²|X₀=x]<∞를 전제합니다. 유한한 값과 유한한 원자 수를 주는 이 장의 작은 실습에서는 자동으로 충족합니다.

한 번의 예측 h_D(x)와 참 평균의 차이를 그대로 학습 규칙의 편향이라고 부르지 않습니다. 또한 통계적 편향이라는 용어는 여기서 기대 예측의 오차를 뜻합니다. 집단 간 불공정이나 편견을 이 수치 하나로 판정하는 개념은 아닙니다.

m(x)=ED[hD(x)]b(x)=m(x)−f(x)v(x)=ED[(hD(x)−m(x))2]\begin{gathered}m(x)=E_D[h_D(x)]\\b(x)=m(x)-f(x)\\v(x)=E_D[(h_D(x)-m(x))^2]\end{gathered}

At fixed x, let m(x)=E_D[h_D(x)]. Bias is m(x)−f(x); variance is E_D[(h_D(x)−m(x))²]. Variance measures fluctuation around the rule’s own mean, not distance from truth. Bias can be positive, negative or zero, while squared bias is nonnegative.

For a general probability model, require the relevant second moments to be finite: E_D[h_D(x)²]<∞ and E[Y₀²|X₀=x]<∞. Our finite-support examples with finite values satisfy these conditions automatically.

A single realized error h_D(x)−f(x) is not the bias of a learning rule. Here statistical bias means an expectation error; it is not a complete measure of social unfairness or prejudice.

m(x)=ED[hD(x)]b(x)=m(x)−f(x)v(x)=ED[(hD(x)−m(x))2]\begin{gathered}m(x)=E_D[h_D(x)]\\b(x)=m(x)-f(x)\\v(x)=E_D[(h_D(x)-m(x))^2]\end{gathered}
학부Undergraduate

5. 세 예측을 제곱하고 평균한다5. Square and average the three predictions

가정 예측 3, 5, 7에 같은 질량 1/3을 붙이고 표적을 5로 둡니다. 평균 예측은 5, 편향은 0이며 분산은 (4+0+4)/3=8/3입니다. 이 값은 선언한 유한 법칙의 분산이므로 분모가 3입니다. 미지의 분산을 추정할 때의 표본 불편보정 3−1과 과제가 다릅니다.

일반적으로 h−f=(h−m)+(m−f)를 제곱해 평균합니다. 교차항은 2(m−f)E_D[h−m]=0이므로 표적 평균에 대한 MSE는 분산과 제곱편향의 합입니다. 이 부분은 새 결과의 잡음을 아직 더하지 않은 예측함수 자체의 오차입니다.

항상 4를 내는 규칙은 표적 5에 대한 편향 −1, 분산 0, MSE 1입니다. 평균이 맞는 첫 규칙의 MSE 8/3보다 작습니다. 편향을 무조건 0으로 만드는 목표와 제곱오차를 작게 만드는 목표가 같은 것은 아닙니다.

Lf(x)=ED[(hD(x)−f(x))2]Lf(x)=v(x)+b(x)2\begin{gathered}L_f(x)=E_D[(h_D(x)-f(x))^2]\\L_f(x)=v(x)+b(x)^2\end{gathered}

Assign equal mass 1/3 to predictions 3, 5 and 7, with target 5. Mean prediction is 5, bias is zero and variance is (4+0+4)/3=8/3. The denominator is three because this is the declared finite law, not an unbiased sample-variance estimator for an unknown repetition law.

Expand h−f=(h−m)+(m−f), then average its square. The cross term vanishes because E_D[h−m]=0. MSE for the conditional-mean target is therefore variance plus squared bias. This expression has not yet added the variability of a fresh response.

The constant rule 4 has bias −1, variance zero and target MSE one. It beats the centered rule’s MSE 8/3. Eliminating bias at every cost need not minimize squared error.

Lf(x)=ED[(hD(x)−f(x))2]Lf(x)=v(x)+b(x)2\begin{gathered}L_f(x)=E_D[(h_D(x)-f(x))^2]\\L_f(x)=v(x)+b(x)^2\end{gathered}
학부Undergraduate

6. 새 결과의 잡음을 언제 더하는가6. When fresh-response noise can be added

이제 새 결과 Y₀=f(x)+ε₀를 예측합니다. 조건부 잡음 평균이 0이고, 고정 x에서 학습 예측과 새 잡음의 공분산이 0이면 제곱오차는 제곱편향+분산+잡음분산으로 나뉩니다. 학습 표와 새 관측의 조건부 독립은 이 공분산 0을 보장하는 충분조건입니다.

세 예측 3, 5, 7의 법칙에 독립 잡음분산 1을 더하면 새 결과 위험은 8/3+1=11/3입니다. 항상 4인 규칙은 1+1=2입니다. 두 규칙을 비교할 때 같은 입력·새 결과 법칙·단위여야 공통 잡음 항을 같게 둘 수 있습니다.

학습에 쓴 Y를 다시 예측하면 공분산 항이 사라지지 않을 수 있습니다. 예를 들어 Y가 −1 또는 1을 각각 확률 1/2로 갖고 한 점을 외우는 h=Y라면 같은 점 오차는 0입니다. 독립인 새 Y₀에 대해서는 네 순서쌍을 계산하면 평균 제곱오차가 2입니다. 같은 관측을 재사용한 0을 독립 시험위험으로 바꾸지 않습니다.

R(x)=E[(Y0−hD(x))2]R(x)=b(x)2+v(x)+σ2(x)Cov⁡(hD(x),ε0∣x)=0\begin{gathered}R(x)=E[(Y_0-h_D(x))^2]\\R(x)=b(x)^2+v(x)+\sigma^2(x)\\\operatorname{Cov}(h_D(x),\varepsilon_0\mid x)=0\end{gathered}

Now predict Y₀=f(x)+ε₀. If conditional noise has mean zero and the learning prediction has zero conditional covariance with fresh noise at fixed x, expected squared error is squared bias plus variance plus noise variance. Conditional independence between training data and the fresh observation is a sufficient condition.

Adding independent noise variance one to the three-prediction law gives fresh-response risk 8/3+1=11/3. The constant rule 4 gives 1+1=2. A common noise term is comparable only when the input, fresh-outcome law and units match.

Reusing a training outcome can retain a covariance term. Let Y be −1 or 1 with equal probability and memorize its single value by h=Y. Reused error is zero. For an independent Y₀, the four ordered pairs give expected squared error two. The reused zero is not independent test risk.

R(x)=E[(Y0−hD(x))2]R(x)=b(x)2+v(x)+σ2(x)Cov⁡(hD(x),ε0∣x)=0\begin{gathered}R(x)=E[(Y_0-h_D(x))^2]\\R(x)=b(x)^2+v(x)+\sigma^2(x)\\\operatorname{Cov}(h_D(x),\varepsilon_0\mid x)=0\end{gathered}
학부Undergraduate

7. 단위와 제곱을 함께 읽는다7. Read units together with the square

시간당 임금을 USD/시간으로 예측하면 편향과 예측은 USD/시간, 분산·제곱편향·MSE는 (USD/시간)²입니다. 임금 액수와 MSE를 같은 세로축에 섞지 않습니다. 와인 품질 점수의 MSE는 선택한 숫자 점수의 제곱 단위이며 가격이나 효용 단위가 아닙니다.

결과·예측·표적을 같은 아핀 변환 y′=a+cy로 옮기고 c≠0이면 편향은 c배, 분산과 모든 제곱위험은 c²배입니다. 따라서 두 규칙의 MSE 순서는 바뀌지 않습니다. 원값만 단위를 바꾸거나 표적·사전 기준을 옛 단위로 남기면 이 결론을 쓸 수 없습니다.

센트를 달러로 바꾸면 c=1/100이므로 MSE는 1/10,000배입니다. 숫자가 작아졌다는 이유로 모형이 좋아졌다고 말하지 않습니다. 분산이 표시 범위에서 0으로 보이더라도 정확한 유리수가 양수이면 정확 0과 구별합니다.

For hourly wages predicted in USD/hour, bias and predictions have USD/hour units; variance, squared bias and MSE have squared USD/hour units. Do not mix outcome amounts and MSE on one axis. Wine-quality MSE uses squared chosen numerical score units, not price or utility units.

Apply the same affine transformation y′=a+cy, c≠0, to outcomes, predictions and targets. Bias scales by c, while variance and squared risks scale by c². MSE rankings are preserved. This conclusion fails if predictions or prior anchors are left in the old units.

Changing cents to dollars uses c=1/100 and divides MSE by 10,000. Smaller numerical error does not establish a better model. A positive exact rational displayed as zero remains distinct from exact zero.

기초Foundations

8. 실습 A · 중심과 흔들림을 따로 바꾼다8. Lab A · Change the center and spread separately

예측 목록 3, 5, 7과 가중치 1, 1, 1, 표적 5, 독립 새 잡음분산 1에서 시작하세요. 평균 5, 편향 0, 분산 8/3, 표적 MSE 8/3, 새 결과 위험 11/3을 확인합니다. 어느 기대값의 분모인지 설명하고, 표의 분산을 표본 불편분산으로 바꾸지 마세요.

예측을 모두 4로 바꾸고 새 위험 2를 비교합니다. 이어 표적만 4로 바꾸거나 잡음분산을 0으로 바꾸어 어느 항이 달라지는지 확인하세요. 가중치 합이 0이거나 양의 질량에 예측이 없으면 기대값을 계산할 수 없습니다. 빈칸을 0으로 채우지 않습니다.

학습자가 붙인 유한 반복 법칙과 독립 잡음 전제를 화면 아래에 남깁니다. 관측한 실제 자료에서 참 f와 잡음분산을 자동으로 추정했다는 뜻이 아닙니다.

Start with predictions 3, 5 and 7, weights 1, 1 and 1, target 5 and independent fresh-noise variance one. Check mean five, bias zero, variance 8/3, target MSE 8/3 and fresh-response risk 11/3. Explain the denominator rather than substituting an unbiased sample variance.

Replace all predictions by four and compare risk two. Then change only the target to four or only noise variance to zero. Identify the terms that change. Zero total weight or missing positive-mass predictions do not define the expectation; blanks must not become zeros.

The screen retains the declared finite repetition law and independent-noise premise. It does not automatically identify true f or noise variance from actual observations.

학부Undergraduate

9. 네 원자로 학습 세계를 정한다9. Specify a learning world with four atoms

다음 공동분포는 전부 가정입니다. (X,Y)=(A, 0), (A, 2), (B, 2), (B, 4)에 각각 확률 1/4을 줍니다. 두 입력의 확률은 각각 1/2이고 f(A)=1, f(B)=3입니다. 각 입력에서 결과는 평균에서 ±1 떨어지므로 조건부 잡음분산은 둘 다 1입니다.

입력을 무시한 Y의 평균은 2, 분산은 2입니다. 총분산으로도 확인할 수 있습니다. 집단 안 평균 분산은 1이고, 조건부 평균 1과 3의 분산은 1이므로 합은 2입니다. 분산 2를 조건부 잡음 1과 같은 것으로 쓰면 상수 학습 규칙의 분산 계산이 틀어집니다.

이 작은 법칙에서는 참 조건부 평균과 새 결과 위험을 압니다. 실제 관측 표에 이 법칙이 맞는다고 선언한 것은 아닙니다. 알고리즘과 표본 크기를 바꾸면서 정확한 기대값을 계산할 수 있도록 학습자가 만든 계산 환경입니다.

가정한 전체 공동법칙
XY확률
A01/4
A21/4
B21/4
B41/4

The following joint law is entirely assumed. Give probability 1/4 to each of (A, 0), (A, 2), (B, 2) and (B, 4). Each input has probability 1/2; f(A)=1 and f(B)=3. Outcomes lie one unit on either side of their conditional mean, so both conditional noise variances are one.

Ignoring X, Y has mean two and variance two. Total variance gives the same result: average within-group variance one plus variance one of conditional means one and three. Substituting marginal variance two for conditional noise one would confuse two distinct terms.

This law supplies true conditional means and fresh-outcome risks. It is a controlled environment for exact calculations, not an asserted population law for actual measurements. We can vary the learner and sample size while keeping the complete data-generating law explicit.

Entire assumed joint law
XYProbability
A01/4
A21/4
B21/4
B41/4
학부Undergraduate

10. 독립 복원 추출의 모든 학습 표10. Enumerate every iid training table

네 원자에서 독립적으로 두 번 복원 추출하면 순서 있는 학습 표는 4²=16개입니다. 각 표의 확률은 (1/4)²=1/16입니다. 같은 원자를 두 번 뽑는 경우도 포함합니다. n번이면 각 순서튜플 확률은 원자 확률들의 곱이며, 가능한 튜플을 전부 더한 질량은 1이어야 합니다.

표 안의 순서가 평균 적합을 바꾸지 않더라도 순서튜플을 곧바로 같은 확률의 서로 다른 평균값 목록으로 바꾸면 안 됩니다. 예를 들어 Y 표본평균 2는 평균 0보다 여러 원자 조합에서 발생합니다. 같은 통계량 값을 묶으려면 그 값으로 가는 모든 튜플의 확률을 합합니다.

독립 복원 추출은 이번 실험의 설계입니다. 유한 원자료에서 비복원 추출하거나 같은 집단·시점의 의존 기록을 뽑으면 다른 법칙입니다. 실제 원행에 동일한 추출 확률을 붙이는 것도 표적과 설계의 선택이며 원자료가 자동으로 보장한 대표성이 아닙니다.

Two independent draws with replacement from the four atoms yield 4²=16 ordered training tables, each with probability 1/16. Repeated draws of the same atom remain possible. For n draws, tuple probability is the product of its atom probabilities; total tuple mass must equal one.

Even if order does not affect a fitted mean, distinct sample means are not automatically equally probable. Mean two can arise from more atom combinations than mean zero. Coalescing a statistic requires summing the probabilities of every tuple producing that value.

Iid sampling with replacement is a declared experiment. Sampling without replacement or observing dependent records within a group or period gives another law. Uniform row sampling also does not establish representativeness of an actual source population.

학부Undergraduate

11. 원행과 합친 원자의 번호를 나눈다11. Separate original rows from coalesced atom coordinates

같은 (X,Y)를 가진 양의 질량 원행은 계산을 위해 하나의 원자로 합칠 수 있습니다. 확률을 합쳐도 예측·위험은 바뀌지 않지만 원래 어디에서 왔는지의 대응표는 필요합니다. 첫 원행의 질량이 0이라고 해서 합친 원자 0이 그 원행을 뜻하는 것은 아닙니다.

예를 들어 0번 원행은 (zero,미관측,가중치 0), 1번은 (B, −1, 2), 2번은 (A, 3, 1), 3번은 (B, −1, 3)이라고 선언합시다. 합친 원자 0은 B의 −1이며 원행 [1,3]에서 왔고 확률은 5/6입니다. 합친 원자 1은 A의 3으로 원행 [2], 확률 1/6입니다. 원래 0번은 0질량 목록에 따로 남습니다.

공개 결과는 원행 전체, 합친 원자 표, 원행 대응, 0질량 원행을 따로 보존합니다. 튜플의 coalescedAtomIndices는 0부터 시작하는 합친 원자 번호입니다. 이것을 원자료 sourceId나 실제 사람·기업의 식별자로 바꾸어 읽지 않습니다. 합치기는 계산 표현이며 자료 행의 임의 삭제가 아닙니다.

Positive-mass rows sharing the same (X,Y) can be coalesced for computation. Summing their weights preserves the law and risks, but the mapping back to original positions must remain explicit. A zero-weight first row need not be coalesced atom zero.

For example, let original row zero be (zero, unavailable, weight 0), row one (B, −1, 2), row two (A, 3, 1) and row three (B, −1, 3). Coalesced atom zero is B with outcome −1, probability 5/6 and original indices [1, 3]. Atom one is A with outcome three, probability 1/6 and original index [2]. Original row zero remains separately listed as zero mass.

The result retains all original rows, an atom table, lineage and zero-mass positions. Tuple coalescedAtomIndices are zero-based atom coordinates, not original source IDs or verified entity identifiers. Coalescing changes a computational representation; it does not arbitrarily delete observations.

학부Undergraduate

12. 전체 표본평균을 쓰는 규칙12. A rule that uses the pooled sample mean

네 원자 (A, 0), (A, 2), (B, 2), (B, 4)의 같은 확률 법칙에서 n=2로 둡니다. 상수 규칙은 두 Y의 평균을 모든 x에 똑같이 예측합니다. 표본평균은 0, 1, 2, 3, 4이고 확률은 차례대로 1/16, 1/4, 3/8, 1/4, 1/16입니다.

평균 예측은 2, 예측 분산은 Var(Y)/n=2/2=1입니다. A의 참 평균 1에는 편향 1, B의 참 평균 3에는 편향 −1입니다. 제곱편향은 둘 다 1이므로 각 위치의 새 결과 위험은 1+1+1=3입니다. 입력 확률로 평균해도 위험 3입니다.

재사용한 훈련 MSE의 기대값은 1입니다. 이는 같은 자료에서 상수를 적합하고 같은 두 점을 다시 점수 낸 값입니다. 16개 학습 표의 훈련오차 평균과 독립 시험위험 평균이 다르다는 사실을 확인하세요. 이 값 1을 모집단 잡음이나 제곱편향이라고 이름 붙이지 않습니다.

Use n=2 under the equal-probability four-atom law. The constant learner predicts the mean of both training outcomes at every x. Sample means 0, 1, 2, 3 and 4 have probabilities 1/16, 1/4, 3/8, 1/4 and 1/16.

Mean prediction is two and prediction variance is Var(Y)/n=2/2=1. Bias is one at A, whose target is one, and minus one at B, whose target is three. Squared bias is one at either input, giving fresh-response risk 1+1+1=3 at each input and overall.

Expected reused training MSE is one. It scores the same two outcomes used to fit the constant. Averaging training errors and independent test risks across the 16 tables gives different answers. The training average one is neither population noise nor squared bias.

학부Undergraduate

13. 표본에 집단이 없으면 규칙을 완성한다13. Complete the rule when a training group is empty

집단평균 규칙은 질의 x와 같은 집단의 학습 Y만 평균합니다. 그러나 n=2에서 A가 한 번도 나오지 않을 확률은 (1/2)²=1/4입니다. B도 같습니다. 빈 집단의 예측을 선언하지 않으면 전체 학습 법칙에서 예측함수가 정의되지 않습니다.

이번 규칙은 빈 집단에 고정 기준 2를 반환합니다. 표에 해당 집단이 있으면 그 집단의 평균을 반환합니다. 빈 집단 상황을 빼고 남은 학습 표들만 정규화하면 다른 학습 규칙의 조건부 성능을 계산하게 됩니다. 우리 계산은 그 확률 1/4도 포함합니다.

기준 2는 가정이며 미지의 조건부 평균을 알아냈다는 뜻이 아닙니다. 다른 기준을 정하면 빈 집단에서의 편향과 위험도 바뀝니다. 실제 자료의 관측되지 않은 집단을 0이나 전체 평균으로 채우는 선택 역시 자동으로 참값이 되지 않습니다.

A group-mean learner averages training outcomes in the query group. With n=2, group A is absent with probability (1/2)²=1/4; so is B. Without a declared prediction for empty groups, the learner is undefined on part of the training law.

Our rule returns fixed prior two for an empty group and the observed group mean otherwise. Dropping empty-group tables and renormalizing would evaluate a conditional procedure. We retain their probability 1/4 in the full learning experiment.

Two is an assumption, not an identified unknown conditional mean. A different fallback changes bias and risk when groups are absent. Filling an unobserved actual-data group with zero or an overall mean likewise does not establish its true target.

학부Undergraduate

14. 빈 집단까지 포함한 분해14. Decompose risk including empty-group mass

같은 네 원자 법칙과 n=2, 빈 집단 기준 2를 유지합니다. A의 학습 표 내 개수 K는 0, 1, 2를 확률 1/4, 1/2, 1/4로 갖습니다. K>0이면 집단평균의 조건부 평균은 1이고 조건부 분산은 1/K입니다. K=0이면 예측은 2입니다.

따라서 A의 평균 예측은 5/4, 편향은 1/4입니다. 예측 분산은 13/16이고 제곱편향은 1/16입니다. 새 잡음분산 1을 더하면 위험은 15/8입니다. B는 평균 예측 11/4, 편향 −1/4이며 나머지 제곱 항은 같습니다.

훈련 MSE의 기대값은 1/4입니다. 두 학습 입력이 다르면 두 점을 각각 맞힙니다. 입력이 같을 확률 1/2에서는 두 잡음 결과에 집단평균을 적합하므로 조건부 훈련 MSE 기대값이 1/2입니다. 곱하면 1/4입니다. 1/4와 새 위험 15/8은 서로 다른 기대값입니다.

n=2의 같은 가정 법칙 비교
규칙평균 예측 A제곱편향 A분산 A새 위험
상수2113
집단평균5/41/1613/1615/8

Keep the same law, n=2 and empty-group prior two. The count K of A observations is 0, 1 or 2 with probabilities 1/4, 1/2 and 1/4. When K>0, the group mean has conditional mean one and variance 1/K. At K=0, prediction is two.

Mean prediction at A is 5/4, bias 1/4, prediction variance 13/16 and squared bias 1/16. Adding noise variance one gives fresh risk 15/8. At B, mean prediction is 11/4 and bias −1/4; the squared components are the same.

Expected training MSE is 1/4. Different training inputs are fitted separately. With probability 1/2 both inputs coincide, and their conditional expected training MSE is 1/2. Their product gives 1/4. This reused-data expectation differs from fresh risk 15/8.

Same assumed law at n=2
RuleMean prediction ASquared bias AVariance AFresh risk
Constant2113
Group mean5/41/1613/1615/8
학부Undergraduate

15. 복잡도만으로 분산의 방향은 정해지지 않는다15. Complexity alone does not determine the variance direction

방금의 집단평균 규칙은 상수 규칙보다 입력별 예측을 더 자유롭게 바꿀 수 있습니다. 그런데 n=2에서 제곱편향은 1에서 1/16로, 예측 분산도 1에서 13/16로 작아졌습니다. 더 유연하면 언제나 분산이 커진다는 보편 명제의 반례입니다.

이 비교는 무작위 입력을 가진 유한 학습 법칙과 빈 집단 기준을 포함합니다. 나중에 볼 고정 설계·등분산 오차·중첩 직교투영에서는 분산이 투영 차원에 비례한다는 별도 정리를 증명할 수 있습니다. 서로 다른 전제를 가진 비교를 같은 구호로 합치지 않습니다.

그렇다고 복잡한 규칙이 언제나 낫다는 결론도 아닙니다. 신호가 상수이고 잡음이 큰 법칙, 다른 표본 크기, 다른 기준, 다른 입력 분포에서는 위험의 순서가 바뀔 수 있습니다. 학습 규칙과 법칙을 고정해 각 항을 계산해야 합니다.

The group rule permits more input-specific predictions than a shared constant. Yet at n=2 its squared bias falls from one to 1/16 and its variance also falls from one to 13/16. This is a counterexample to a universal claim that flexibility must increase variance.

The comparison includes random inputs and an empty-group fallback. Under separate premises—fixed design, homoscedastic errors and nested orthogonal projections—we can prove that variance scales with projection dimension. Do not replace these distinct experiments by one slogan.

Nor does the example prove that greater flexibility always wins. Constant signals, larger noise, different sample sizes, fallbacks or input laws can change the ranking. Specify the learner and law, then calculate the components.

기초Foundations

16. 실습 B · 모든 학습 표를 빠짐없이 센다16. Lab B · Count every training table

네 원자에 같은 가중치 1, n=2, 빈 집단 기준 2를 넣으세요. 상수와 집단평균의 새 위험 3과 15/8, 훈련 기대오차 1과 1/4를 확인합니다. 합친 원자 표와 원행 대응표를 먼저 읽고 튜플 확률의 합이 1인지 확인하세요.

n=0도 비교합니다. 학습 표는 비어 있는 한 경우뿐이고 모든 예측은 기준 2이므로 학습에 의한 분산은 0입니다. 재사용 훈련 MSE는 나눌 행이 없어 미정의지만 새 결과 위험은 정의됩니다. 작은 표본 실패 상황을 삭제하지 않습니다.

고정 축소 비율 α를 바꾸면 집단에 자료가 있을 때 α×집단평균+(1−α)×기준을 씁니다. 빈 집단은 여전히 기준을 씁니다. 학습 표가 많아질 때 계산 예산을 넘으면 정확한 전수 실험을 거절하며, 일부 튜플만 남겨 전수 결과라고 표시하지 않습니다.

Use four equal atom weights, n=2 and empty-group prior two. Check fresh risks three and 15/8, and expected training MSEs one and 1/4, for constant and group learners. Read atom-to-original-row mappings before the tuple table and verify total tuple probability one.

Compare n=0. There is one empty training table; every prediction equals prior two and training-induced variance is zero. Reused training MSE is undefined because no training rows exist, while fresh risk remains defined. No failure situations are deleted.

With fixed shrinkage α, a nonempty group predicts α×group mean+(1−α)×prior. Empty groups still return the prior. Exceeding the exact enumeration budget rejects the task rather than presenting a partial tuple list as exhaustive.

학부Undergraduate

17. 입력 구간마다 상수를 하나씩 둔다17. Put one constant in each input interval

복잡도를 손으로 셀 수 있도록 계단 모형을 사용합니다. 절단점 c₁<⋯<cₖ가 입력선을 k+1개 구간으로 나누고, 각 구간에서 같은 예측을 반환합니다. 이 장은 x가 절단점과 같으면 오른쪽, 즉 위 구간에 넣습니다. 예를 들어 절단점 0은 x<0과 x≥0을 나눕니다.

절단점이 없으면 모든 입력에 같은 상수를 쓰는 모형입니다. 절단점을 추가하면 구간별 상수를 다르게 정할 수 있습니다. 그러나 명목 구간 수와 실제 학습에 기여하는 구간 수는 다를 수 있습니다. 어떤 구간에 양의 가중치를 가진 완전행이 없으면 그 구간의 상수는 훈련 자료가 정하지 못합니다.

숫자 입력과 결과의 단위를 정해 두세요. 교육 연수로 나눈 시간당 임금 평균과 알코올 농도로 나눈 품질 점수 평균은 같은 형태의 계산이지만 같은 단위·관측 단위·표적이 아닙니다. 구간선 자체도 학습자가 사전에 고정한 모형 선택입니다.

Use stepwise constants so complexity can be counted by hand. Ordered cuts c₁<⋯<cₖ divide the input line into k+1 intervals, each with its own prediction. Equality enters the upper interval: a cut at zero separates x<0 from x≥0.

No cuts gives one constant everywhere. Adding cuts permits different constants in finer intervals. Nominal bin count can exceed the number supported by positive-weight complete training rows. An empty bin’s prediction is not determined by training data.

Keep input/output units explicit. Hourly wage means grouped by schooling and quality-score means grouped by alcohol share an algebraic form, not observation units or targets. The cut locations are predetermined modelling choices.

학부Undergraduate

18. 가중 구간 평균이 최소인 이유18. Why a weighted bin mean minimizes squared loss

한 구간의 유한 결과 yᵢ와 비음수 가중치 wᵢ를 주고 W=Σwᵢ>0이라고 합시다. 가중 평균 μ=Σwᵢyᵢ/W에서 가중 잔차 합은 0입니다. 임의의 상수 a에 대한 제곱합을 전개하면 최소 제곱합에 W(a−μ)²가 더해집니다. 따라서 평균은 유일한 최소 예측입니다.

각 구간의 상수가 따로 움직이므로 전체 훈련 목적함수는 구간별 목적함수의 합입니다. 양의 가용 질량이 있는 각 구간에서 평균을 택하면 전체 가용 훈련 손실도 최소입니다. 가중치 0인 행은 원행으로 보존하지만 적합에는 기여하지 않습니다.

W=0인 구간에서는 모든 실수 상수가 똑같은 훈련 손실 0을 줍니다. 해집합은 실수 전체입니다. 도구는 재현을 위해 고정 기준을 선택하지만 그것이 유일한 최소값이거나 그 구간의 참 평균이라고 주장하지 않습니다.

μ=∑iwiyiW,W>0∑iwi(yi−a)2=∑iwi(yi−μ)2+W(a−μ)2\begin{gathered}\mu=\frac{\sum_iw_iy_i}{W},\quad W>0\\\sum_iw_i(y_i-a)^2\\=\sum_iw_i(y_i-\mu)^2+W(a-\mu)^2\end{gathered}

For finite outcomes yᵢ and nonnegative weights wᵢ in one bin, let W=Σwᵢ>0. Their weighted mean μ has weighted residual sum zero. Expanding squared loss around μ adds W(a−μ)² to its minimum. Hence μ is the unique minimizing prediction.

Constants vary independently across bins, so total available training loss is a sum of bin objectives. Choosing each positive-mass mean minimizes the whole objective. Zero-weight positions remain documented but contribute no fitting mass.

At W=0, every real constant gives the same training contribution zero. The optimizer set is the entire real line. A fixed fallback supplies reproducible predictions; it does not become the unique optimizer or an identified true mean.

μ=∑iwiyiW,W>0∑iwi(yi−a)2=∑iwi(yi−μ)2+W(a−μ)2\begin{gathered}\mu=\frac{\sum_iw_iy_i}{W},\quad W>0\\\sum_iw_i(y_i-a)^2\\=\sum_iw_i(y_i-\mu)^2+W(a-\mu)^2\end{gathered}
학부Undergraduate

19. 네 점에서 훈련오차를 줄인다19. Reduce training loss on four points

가정 훈련 입력은 (−1,0,1,2), 결과는 (0,2,0,2), 가중치는 모두 1입니다. 상수 모형은 1을 예측하여 SSE 4, MSE 1을 줍니다. 절단점 0을 넣으면 왼쪽 평균은 0, 오른쪽 세 행의 평균은 4/3입니다. SSE는 8/3, MSE는 2/3입니다.

절단점 0, 1, 2를 넣으면 네 구간에 한 점씩 들어가므로 예측은 0, 2, 0, 2이고 훈련 MSE는 0입니다. 같은 행·가중치·결과에 더 많은 자유도를 준 결과입니다. 이 계산에는 새 결과의 법칙이나 관측 잡음이 0이라는 전제가 들어 있지 않습니다.

동일한 입력에 서로 다른 결과가 여러 번 있으면 한 입력의 결정적 함수가 모두를 동시에 맞힐 수는 없습니다. 예를 들어 x=0에 y=0과 y=2가 함께 있으면 최선 상수는 1, 그 두 행의 MSE는 1입니다. 큰 모형이 언제나 모든 표를 오차 0으로 외운다는 주장도 조건이 필요합니다.

같은 네 가정 행
절단점명목 구간훈련 MSE
없음11
022/3
0, 1, 240

Let training inputs be (−1,0,1,2), outputs (0,2,0,2), all weights one. A shared constant predicts one, giving SSE four and MSE one. A cut at zero gives means zero and 4/3; SSE is 8/3 and MSE 2/3.

Cuts at zero, one and two place one training point in each bin. Predictions 0, 2, 0 and 2 give zero training MSE. The extra freedom fits the same rows, weights and outcomes. It supplies no premise that fresh noise is zero.

Conflicting outcomes at an identical input cannot all be interpolated by a deterministic function. If x=0 has both y=0 and y=2, the best common prediction is one and their MSE is one. Even memorization claims require conditions.

Same four assumed training rows
CutsNominal binsTraining MSE
None11
022/3
0, 1, 240
학부Undergraduate

20. 중첩이면 같은 훈련 최소손실은 커지지 않는다20. Nested classes cannot increase the same training minimum

작은 모형집합 F₁이 큰 집합 F₂에 포함되면 F₂의 최소 훈련 손실은 F₁의 최소 손실보다 클 수 없습니다. F₁의 해를 F₂에서도 그대로 쓸 수 있기 때문입니다. 계단 모형에서는 모든 옛 절단점을 유지한 채 새 절단점을 넣으면 큰 집합이 작은 집합을 포함합니다.

이 정리는 같은 결과·가중치·완전행·목적함수를 비교합니다. 모형마다 결측 행을 다르게 버리거나 다른 단위의 결과·다른 손실로 바꾸면 이 포함 논리만으로 숫자 순서를 정할 수 없습니다. 도구는 동일한 원행들에서 공통 완전쌍을 사용합니다.

또한 최소 훈련 손실의 단조성은 시험손실이나 분산의 단조성 정리가 아닙니다. 절단점 집합이 서로 포함되지 않으면 이 도구는 중첩 보장을 붙이지 않습니다. 실제 계산에서 손실이 작아질 수도 있지만 별도 수치 결과입니다.

F1⊆F2Lj∗=inf⁡h∈FjLD(h)L2∗≤L1∗\begin{gathered}\mathcal F_1\subseteq\mathcal F_2\\L_j^*=\inf_{h\in\mathcal F_j}L_D(h)\\L_2^*\leq L_1^*\end{gathered}

If F₁ is contained in F₂, the minimum training loss over F₂ cannot exceed the minimum over F₁: the smaller model’s solution remains available. For step functions, retaining every old cut while adding new cuts gives this class inclusion.

The proof requires identical outcomes, weights, complete rows and objective. Dropping different missing rows, changing units or changing loss does not preserve the comparison. Our tool uses a common complete-pair subset for the same input records.

Training-minimum monotonicity is not a theorem about test loss or variance. Non-nested cut sets receive no refinement guarantee, even if their particular computed losses happen to decline.

F1⊆F2Lj∗=inf⁡h∈FjLD(h)L2∗≤L1∗\begin{gathered}\mathcal F_1\subseteq\mathcal F_2\\L_j^*=\inf_{h\in\mathcal F_j}L_D(h)\\L_2^*\leq L_1^*\end{gathered}
학부Undergraduate

21. 시험 표를 고정하면 순서가 달라질 수 있다21. A fixed evaluation table can reverse the ranking

훈련 X=(−1,0,1,2), Y=(0,2,0,2)를 유지하고 평가 입력 (−1/2,1/2,3/2,5/2)와 평가 결과 (1,1,1,1)을 별도로 가정합시다. 훈련만으로 적합한 상수 1은 평가 MSE 0입니다. 절단점 0인 두 평균은 평가 MSE 1/3, 네 구간 모형은 평가 MSE 1입니다.

훈련 MSE 1, 2/3, 0의 순서와 평가 MSE 0, 1/3, 1의 순서가 반대입니다. 이 네 평가 점은 설명용으로 직접 정한 표입니다. 그 한 표가 미지의 모집단 위험과 같다고 주장하는 것도 아닙니다. 모형이 고정되기 전에 평가 정답을 반복해 들여다보면 평가 표를 선택에 재사용하게 됩니다.

이번 실습은 후보마다 훈련 자료만으로 평균을 적합하고 같은 평가 표에 계산 결과를 나열합니다. 가장 작은 평가 손실을 자동으로 골라 최종 독립 성능이라고 발표하지 않습니다. 선택·검증·시험의 설계는 다음 장에서 더 자세히 다룹니다.

Keep training X=(−1,0,1,2), Y=(0,2,0,2), and separately assume evaluation inputs (−1/2,1/2,3/2,5/2), all with outcome one. The training-fitted constant one has evaluation MSE zero. The two-bin fit has MSE 1/3; the four-bin fit has MSE one.

Training MSEs 1, 2/3 and 0 decrease while evaluation MSEs 0, 1/3 and 1 increase. This evaluation table is explicitly constructed; it is not an identified population risk. Repeatedly inspecting its answers while choosing models would reuse it for selection.

The lab fits means from training only and lists each candidate on the same evaluation table. It does not automatically select the smallest evaluation loss and call that an independent final estimate. Selection and evaluation design continue in the next chapter.

학부Undergraduate

22. 빈 구간의 모든 최소해와 선택한 기준22. All optimizers and a chosen fallback for empty bins

훈련 행이 x=−1,y=0과 x=1,y=2이고 절단점이 0과 2라고 합시다. 구간 x≥2에는 훈련 행이 없습니다. 그 구간의 예측을 −100, 0, 3, 100으로 바꾸어도 훈련 손실은 바뀌지 않습니다. 자료가 정한 값이 아니라 학습 규칙을 완성하기 위한 선택입니다.

도구는 양의 가용 질량을 가진 구간의 유일한 평균, 빈 구간의 전체 실수 최소해집합, 별도로 선택한 고정 기준을 함께 보여 줍니다. 명목 구간 수가 3이어도 이 표에서 자료가 적합한 상수는 2개입니다. 빈 구간 예측을 관측된 평균이나 새로운 정보라고 부르지 않습니다.

평가점 x=3의 정답이 주어지면 선택한 기준으로 그 점의 오차를 계산할 수는 있습니다. 다만 그 정답을 보고 기준을 정한 뒤 같은 점을 독립 시험이라고 부를 수는 없습니다. 관측 지지집합 밖의 예측은 모형·사전 기준과 배포 표적을 함께 적어야 해석됩니다.

Suppose training records are (−1, 0) and (1,2), with cuts zero and two. No training observation lies at x≥2. Predictions −100, 0, 3 or 100 in that bin all give the same training loss. A fallback completes the rule; it is not learned from an empty bin.

The tool displays unique means for positive-mass bins, an all-real optimizer set for empty bins and the separately chosen fixed prediction. Three nominal bins may contain only two fitted constants. An empty-bin prediction is not an observed average or additional information.

If an evaluation label at x=3 is supplied, its error under the fixed fallback can be calculated. Choosing the fallback after seeing that label would prevent calling the same point an independent test. Off-support predictions require explicit modelling and deployment-target premises.

학부Undergraduate

23. 결측·0 가중치·분모를 보존한다23. Retain missingness, zero weights and denominators

다섯 원행 (x,y,w)를 (−1,0,1), (1,2,1), (미관측,100,1), (2,미관측,1), (3,999,0)으로 가정합시다. 비교 규약상 x와 y가 모두 가용한 양의 질량 행은 처음 두 개입니다. 전체 질량은 4, 가용 완전쌍 질량은 2, 불완전한 양의 질량은 2입니다.

상수 평균은 가용 완전쌍에서 1이고 MSE는 1입니다. 이를 전체 질량 4로 나누어 1/2이라고 하거나, 미관측 결과를 0으로 채워 전체 위험을 만든다면 다른 계산입니다. 이 규약은 모형들을 같은 완전쌍에서 비교하기 위한 것이며, 모든 특수 모형에서 미관측 입력이 논리적으로 항상 필요하다는 보편 주장은 아닙니다.

0 가중치 행의 결과 999는 적합·손실에 기여하지 않지만 원행으로 남습니다. 전체 질량이 0이면 위험 자체가 정의되지 않습니다. 가용 질량이 0이면 가용 MSE도 미정의이고, 양의 불완전 질량이 있으면 전체 프레임 위험은 여기서 식별되지 않습니다. 이 세 상태를 모두 숫자 0으로 바꾸지 않습니다.

Assume five (x,y,w) records: (−1,0,1), (1,2,1), (unavailable,100,1), (2,unavailable,1), (3,999,0). Under the common complete-pair convention, only the first two positive-mass records are scored. Total mass is four, complete available mass two and incomplete positive mass two.

The available constant mean and MSE are both one. Dividing its squared-loss numerator by four to report 1/2, or filling missing outcomes with zero, changes the task. The shared-subset convention supports model comparison; it is not a claim that every special predictor logically requires every missing input.

The zero-weight outcome 999 contributes no fitting or loss mass, yet its position remains. Zero total mass leaves risk undefined; zero available mass leaves available MSE undefined; positive incomplete mass leaves full-frame risk unidentified here. These states must not all become numerical zero.

기초Foundations

24. 실습 C · 같은 훈련 행과 다른 자유도24. Lab C · Same training rows and different flexibility

훈련 네 점 (−1, 0), (0, 2), (1, 0), (2, 2)와 평가 네 점 (−1/2,1), (1/2,1), (3/2,1), (5/2,1)을 입력하세요. 절단점 없음, 0, 그리고 0·1·2를 비교하면 훈련 MSE는 1, 2/3, 0이고 평가 MSE는 0, 1/3, 1입니다.

절단점과 같은 x가 위 구간으로 가는지 각 행을 확인합니다. 평가 정답을 바꾸어도 적합한 구간 평균이 바뀌면 안 됩니다. 훈련 행을 빼서 빈 구간을 만들고 전체 최소해집합과 선택 기준을 읽습니다. 이어 양의 가중치 행의 x 또는 y를 미관측으로 바꾸어 두 질량 분모를 비교하세요.

그림은 같은 단위의 점·계단 예측만 비교하고 MSE와 결과 수준은 다른 표·축에서 읽습니다. 낮은 훈련 손실은 복잡도의 효과를 보여 줄 수 있지만, 미지의 편향·분산이나 미래 성능을 그 표 하나로 분리하지 못합니다.

Enter training points (−1, 0), (0, 2), (1, 0), (2, 2), and evaluation points (−1/2,1), (1/2,1), (3/2,1), (5/2,1). Compare no cuts, cut zero, and cuts zero/one/two. Training MSEs are 1, 2/3, 0; evaluation MSEs are 0, 1/3, 1.

Check upper-bin membership at exact cut equality. Changing evaluation labels must not change training-fitted bin means. Remove a training row to create an empty bin and read its complete optimizer set and selected fallback. Then introduce a missing positive-mass input or outcome and compare the two mass denominators.

Plots compare outcomes and predictions in the same units, while MSE uses a separate table or axis. Falling training loss can display flexibility’s effect without identifying population bias, variance or future performance from one table.

학부Undergraduate

25. 평균 추정이라는 작은 실험25. A small experiment in estimating a mean

Y₁,…,Yₙ이 같은 법칙에서 독립 추출되며 n≥1, E[Yᵢ]=μ, Var(Yᵢ)=σ²<∞라고 가정합니다. 표본평균 Ȳ는 기대값 μ, 분산 σ²/n을 갖습니다. 이것은 독립이라는 전제를 쓰는 확률 계산이지 임의의 실제 행 평균에 자동으로 붙는 법칙이 아닙니다.

고정 기준 a와 표본평균을 섞어 δα=αȲ+(1−α)a, 0≤α≤1을 만듭니다. α=1이면 표본평균, α=0이면 자료를 쓰지 않는 기준 a입니다. 중간값은 표본평균의 변동을 줄이는 대신 기준이 μ와 다르면 편향을 만듭니다.

여기서 추정하려는 평균 μ와 새 개별 결과 Y₀는 다른 표적입니다. 평균 표적 MSE와 독립 새 결과의 예측 MSE는 잡음 σ²만큼 차이 납니다. 어느 쪽을 최적화하는지 적지 않고 두 위험을 섞지 않습니다.

δα=αYˉ+(1−α)a\delta_\alpha=\alpha\bar Y+(1-\alpha)a

Assume iid Y₁,…,Yₙ with n≥1, E[Yᵢ]=μ and finite variance σ². Their mean has expectation μ and variance σ²/n. Independence is a premise, not an automatic fact about arbitrary observed rows.

Mix the sample mean with fixed anchor a: δα=αȲ+(1−α)a, 0≤α≤1. At α=1 use the sample mean; at zero ignore it. Intermediate values reduce sampling variation but introduce bias when a differs from μ.

Estimating μ differs from predicting an independent individual outcome Y₀. Their MSEs differ by noise σ². State the target before comparing or optimizing risks.

δα=αYˉ+(1−α)a\delta_\alpha=\alpha\bar Y+(1-\alpha)a
학부Undergraduate

26. 고정 기준으로 축소할 때의 세 항26. Three components under shrinkage to a fixed anchor

a와 α가 반복 실험에서 고정되어 있으면 E[δα]−μ=(1−α)(a−μ)입니다. 기준이 틀린 방향과 편향의 부호가 같습니다. 분산은 α²σ²/n이며 평균 표적 MSE는 두 항의 합입니다. 잡음이 있는 새 독립 결과에는 σ²를 한 번 더합니다.

이 식은 a를 같은 학습 자료에서 임의로 골라도 그대로 성립하는 공식이 아닙니다. a가 무작위이면 그 분산과 Ȳ와의 공분산이 추가될 수 있습니다. α를 정답을 보고 고르는 경우도 고정 α의 위험과 다릅니다. 전제 없이 무작위로 선택한 값을 상수처럼 밖으로 꺼내지 않습니다.

분산을 줄였다는 사실만으로 위험도 줄었다고 결론내릴 수 없습니다. 기준이 크게 어긋나면 작은 분산과 큰 편향이 함께 나타납니다. 반대로 기준이 우연히 참 평균과 같다면 편향 없이 분산을 줄이는 계산도 가능합니다.

bα=(1−α)(a−μ)vα=α2σ2/nRμ(α)=bα2+vα\begin{gathered}b_\alpha=(1-\alpha)(a-\mu)\\v_\alpha=\alpha^2\sigma^2/n\\R_\mu(\alpha)=b_\alpha^2+v_\alpha\end{gathered}

For fixed a and α, bias is (1−α)(a−μ), with the anchor’s displacement determining its sign. Variance is α²σ²/n. Their sum gives mean-target MSE; add another σ² for an independent fresh outcome.

The formula does not automatically apply when a is selected from the same random training data. A random anchor can contribute its own variance and covariance with Ȳ. Choosing α after seeing answers also changes the risk calculation. Do not treat randomly selected quantities as fixed without a premise.

Lower variance alone need not lower total risk. A distant anchor can produce little variation and large bias. An anchor equal to the true mean can instead reduce variance without introducing bias.

bα=(1−α)(a−μ)vα=α2σ2/nRμ(α)=bα2+vα\begin{gathered}b_\alpha=(1-\alpha)(a-\mu)\\v_\alpha=\alpha^2\sigma^2/n\\R_\mu(\alpha)=b_\alpha^2+v_\alpha\end{gathered}
학부Undergraduate

27. 세 비율을 손으로 비교한다27. Compare three shrinkage weights by hand

가정 μ=2, σ²=4, n=4, 고정 a=0에서 α=0,1/2,1을 비교합니다. 평균 표적 위험은 각각 4, 5/4, 1입니다. α=1/2의 편향은 −1, 제곱편향은 1, 분산은 1/4입니다. 단순히 반만 섞는 규칙이 언제나 표본평균보다 좋지는 않습니다.

새 개별 결과 위험은 같은 세 값에 4를 더한 8, 21/4, 5입니다. 기준 0은 결과와 같은 단위입니다. μ=2가 실제 데이터에서 확인된 참 모집단 평균이라는 뜻은 아니며, 이 비교를 가능하게 하도록 직접 준 작업 모형의 값입니다.

표본평균의 위험 1은 분산 4/n입니다. 기준이 참값에서 2 떨어진다는 사실을 알고 선택하는 최적 비율은 이 세 후보 사이에 있을 수 있습니다. 다음 절은 후보 세 개만 비교하는 대신 허용 구간 전체를 풉니다.

고정 μ=2, σ²=4, n=4, a=0
α편향분산평균 표적 MSE새 결과 MSE
0−2048
1/2−11/45/421/4
10115

At assumed μ=2, σ²=4, n=4 and fixed a=0, compare α=0, 1/2 and 1. Mean-target risks are 4, 5/4 and 1. At one half, bias is −1, squared bias one and variance 1/4. A halfway mixture does not always beat the sample mean.

Fresh-response risks add four: 8, 21/4 and 5. Anchor zero has outcome units. The stated μ is a supplied working-model quantity, not an identified unknown population mean from actual records.

The sample mean’s risk one equals 4/n. Given the anchor’s known displacement, the best allowed weight may lie between these three candidates. We next solve the full interval rather than only the displayed grid.

Fixed μ=2, σ²=4, n=4, a=0
αBiasVarianceMean-target MSEFresh-response MSE
0−2048
1/2−11/45/421/4
10115
학부Undergraduate

28. 전체 최적 비율과 퇴화 경계28. The complete optimal-weight set and degenerate cases

B=(a−μ)²≥0, V=σ²/n≥0로 두면 평균 위험은 B(1−α)²+Vα²입니다. B+V>0이면 완전제곱으로 바꾸거나 미분하여 유일한 최소 α*=B/(B+V)를 얻습니다. 비율은 [0,1] 안에 있고 최소 위험은 BV/(B+V)입니다.

μ=2, σ²=4, n=4, a=0에서는 B=4, V=1이므로 α*=4/5, 최소 평균 위험 4/5입니다. 이때 제곱편향은 4/25, 분산은 16/25입니다. 각 항이 양수인 내부 최소입니다.

경계도 전체 해에 포함합니다. B=0,V>0이면 α*=0이고, B>0,V=0이면 α*=1입니다. B=V=0이면 위험이 모든 α에서 0이므로 최소해는 [0,1] 전체입니다. 하나의 임의 비율만 반환하거나 0/0을 계산하지 않습니다.

Rμ(α)=B(1−α)2+Vα2α∗=BB+V,B+V>0min⁡Rμ=BVB+V\begin{gathered}R_\mu(\alpha)=B(1-\alpha)^2+V\alpha^2\\\alpha^*=\frac{B}{B+V},\quad B+V>0\\\min R_\mu=\frac{BV}{B+V}\end{gathered}

Let B=(a−μ)²≥0 and V=σ²/n≥0. Mean risk is B(1−α)²+Vα². If B+V>0, completing the square or differentiating gives unique optimum α*=B/(B+V), inside [0,1], with minimum BV/(B+V).

For μ=2, σ²=4, n=4 and a=0, B=4 and V=1. Thus α*=4/5 and minimum mean risk 4/5, comprising squared bias 4/25 and variance 16/25.

The boundaries matter. B=0,V>0 gives zero weight; B>0,V=0 gives weight one. If both vanish, every α in [0,1] minimizes risk zero. Do not replace that full set by an arbitrary selected point or evaluate 0/0.

Rμ(α)=B(1−α)2+Vα2α∗=BB+V,B+V>0min⁡Rμ=BVB+V\begin{gathered}R_\mu(\alpha)=B(1-\alpha)^2+V\alpha^2\\\alpha^*=\frac{B}{B+V},\quad B+V>0\\\min R_\mu=\frac{BV}{B+V}\end{gathered}
학부Undergraduate

29. 최적 비율을 안다는 가정과 자료 선택29. An oracle weight is not a data-driven tuning rule

α*는 μ와 σ²를 알고 있는 작업 모형의 최적값입니다. 실제 문제에서 미지의 μ를 표본평균으로 대입하면 B도 무작위가 되고 새 규칙이 됩니다. 그 새 규칙의 위험은 고정 α 식에서 숫자 하나를 바꾼 것만으로 증명되지 않습니다.

분리한 검증 자료나 교차검증으로 비율을 고르는 일은 유용할 수 있지만, 선택에 쓴 점수를 최종 독립 시험점수처럼 보고하지 않습니다. 이 장은 알려진 작은 법칙에서 원래의 기대위험을 계산하고, 선택된 규칙의 평가 설계는 ML03 이후와 연결합니다.

전체 위험곡선을 본 뒤 가장 좋은 α를 골랐다면 어떤 정보를 미리 알았는지 명시하세요. 실제 국가·임금·품질 사례의 곡선은 고정된 가용 프레임에 새 복원 추출 법칙을 붙인 조건부 실험입니다. 미지의 실제 모집단에서 참 μ를 안다는 주장은 아닙니다.

The optimum α* is an oracle result inside a working model supplying μ and σ². Substituting a random sample mean for unknown μ makes B random and creates another procedure. Its risk is not proved by changing one number in a fixed-α formula.

A validation set or cross-validation can help tune weights, but a score used for selection is not an independent final test score. This chapter computes expected risks under known small laws; evaluation design for selected rules continues in ML03 and later chapters.

When choosing after viewing a full risk curve, disclose what information was supplied. Actual-data curves condition on a retained available frame and impose a new resampling law. They do not reveal a true unknown population μ.

학부Undergraduate

30. 표본 크기와 기준의 정확도를 바꾼다30. Vary sample size and anchor accuracy

B>0을 고정하면 n이 커질수록 V=σ²/n은 작아지고 α*=B/(B+V)는 1에 가까워집니다. 표본평균의 변동이 줄어 고정된 어긋난 기준에 덜 의존하는 계산입니다. μ=2,σ²=4,a=0에서 n=16이면 α*=16/17, 최소 평균 위험 4/17입니다.

하지만 a=μ라면 B=0입니다. σ²>0에서 최적 비율은 모든 유한 n에 대해 0입니다. 이는 자료를 버리라는 일반 처방이 아니라 표적을 이미 정확히 주었다는 오라클 가정의 결과입니다. σ²=0이면 표본평균도 흔들리지 않아 앞 절의 다른 경계가 적용됩니다.

편향·분산의 변화는 알고리즘, 표본 크기, 참 법칙, 고정 기준을 함께 정해야 읽을 수 있습니다. 같은 복잡도 이름만 남기고 이 조건들을 바꾸면 단순한 한 방향 규칙을 얻을 수 없습니다.

For fixed B>0, increasing n decreases V=σ²/n and moves α*=B/(B+V) toward one. A less variable sample mean needs less reliance on a fixed displaced anchor. At μ=2, σ²=4, a=0 and n=16, optimum is 16/17 and minimum mean risk 4/17.

If a=μ, however, B=0 and positive σ² gives optimum zero for every finite n. This is not a general instruction to discard data; it follows from already supplying the exact target. Zero variance yields the other boundary cases described earlier.

Interpret changes only after fixing the algorithm, sample size, truth and anchor together. A complexity label alone does not determine a universal direction.

학부Undergraduate

31. 원자료 전체를 알고도 재표집할 수 있다31. A fully observed frame can define a new resampling experiment

N을 양의 정수라고 합시다. 보관한 N개 값이 모두 알려져 있으면 그 유한 프레임의 평균 μ_F와 분산 v_F=Σ(yᵢ−μ_F)²/N은 고정된 계산값입니다. 이 값들에서 n번 독립 복원 추출한다고 추가로 선언하면 새 표본평균의 조건부 분산은 v_F/n입니다. 실제 원자료의 수집 설계가 iid였다는 주장은 아닙니다.

이 재표집 실험은 학습 규칙의 흔들림을 설명하는 데 쓸 수 있지만 이미 알고 있는 μ_F 자체에 실제 미관측 불확실성이 새로 생긴 것은 아닙니다. 가용 임금만 프레임으로 삼으면 표적도 가용 3,017행의 평균입니다. 미관측 596행을 포함한 전체 평균으로 자동 확대하지 않습니다.

비복원 표본평균은 다른 분산을 갖습니다. N≥2,1≤n≤N의 균등 비복원 추출에서는 v_F(N−n)/(n(N−1))입니다. n=N이면 변동은 0입니다. N=1은 이 분모 식을 쓰지 않고 유일 값만 추출하는 별도 상수 경우로 다룹니다. 실습의 복원 식과 바꾸어 쓰지 않습니다.

Let N be a positive integer. When all N retained values are known, their finite-frame mean μ_F and variance v_F=Σ(yᵢ−μ_F)²/N are fixed summaries. Adding n iid draws with replacement defines a new experiment whose conditional sample-mean variance is v_F/n. It does not establish iid original data collection.

Resampling can illustrate instability of a learning rule without creating new unobserved uncertainty in an already known μ_F. A wage frame restricted to 3,017 available records targets their mean, not automatically the mean including 596 unavailable outcomes.

Without-replacement sampling differs. For N≥2 and 1≤n≤N, a uniform sample mean has variance v_F(N−n)/(n(N−1)), zero at n=N. Handle N=1 as its separate constant case rather than evaluating that denominator. Do not substitute this law for the lab’s with-replacement experiment.

기초Foundations

32. 실습 D · 한 점이 아닌 전체 위험곡선32. Lab D · A risk curve and its complete optimum

μ=2,σ²=4,n=4,a=0에서 α를 바꾸어 평균 표적 위험의 최소가 4/5에서 나타나는지 확인하세요. α=1/2에서 위험 5/4와 α=1에서 위험 1을 먼저 손으로 확인합니다. 새 결과 위험곡선은 같은 곡선에 4를 더한 것이므로 최적 비율은 같습니다.

기준을 a=2로 바꾼 뒤, 분산을 0으로 바꾸어 최적 집합이 한 점에서 [0,1] 전체로 바뀌는 조건을 읽습니다. σ²=0만으로 모든 α가 최적이라는 뜻은 아닙니다. 기준과 표적도 같아야 합니다.

모든 입력은 같은 결과 단위를 쓰고 α는 무차원입니다. 미지의 μ를 알아냈다는 표현 없이 어느 작업 법칙에서 구한 곡선인지 남깁니다. 음의 분산, n=0 또는 [0,1] 밖의 비율에서는 이전 표·그림을 지우고 정의역을 확인합니다.

At μ=2, σ²=4, n=4 and a=0, vary α and verify the minimum at 4/5. First calculate risks 5/4 at one half and one at weight one. Fresh-response risk adds four to the same curve, so the minimizer is unchanged.

Set the anchor to two, then variance to zero, and identify when the optimizer becomes all of [0,1]. Zero variance alone is insufficient; the anchor must also equal the target.

Inputs share outcome units, while α is dimensionless. Label the working law rather than claiming to know an unknown μ. Negative variance, n=0 or weights outside [0,1] must clear stale results and show the domain condition.

학부 심화 · 선택Advanced undergraduate · optional

33. 고정한 선형 변환으로 예측한다33. Predict with a fixed linear smoother

이제 입력 위치 n개를 고정하고 결과벡터를 Y=f+ε로 둡니다. f는 그 위치들의 참 조건부 평균벡터, E[ε]=0, Cov(ε)=Ω는 유한한 대칭 양의 준정부호 행렬이라고 가정합니다. 예측은 고정 행렬 H를 써서 Ŷ=HY입니다. n은 양의 정수이며 H와 Ω는 n×n입니다.

H는 결과 잡음을 보기 전에 고정되어야 합니다. 고정 설계의 최소제곱 투영, 미리 정한 집단 평균, 지정한 선형 가중평균이 예입니다. 일반 H에 대칭·멱등을 자동으로 가정하지 않습니다. 그 성질이 필요해지는 정리는 따로 좁혀 씁니다.

이 표현은 알려진 작업 모형입니다. 실제 자료에서 구한 잔차 공분산을 아무 설명 없이 참 Ω로 바꾸거나, 결과를 본 뒤 선택한 H를 고정이라고 부르면 안 됩니다. 이번 화면은 확률 법칙의 전제를 입력으로 받는 수리 실험입니다.

Y=f+ε,E[ε]=0Cov⁡(ε)=Ω,Y^=HY\begin{gathered}Y=f+\varepsilon,\quad E[\varepsilon]=0\\\operatorname{Cov}(\varepsilon)=\Omega,\quad\widehat Y=HY\end{gathered}

Fix n input locations and write Y=f+ε. Let f be their true conditional-mean vector, E[ε]=0 and Ω=Cov(ε) a finite symmetric positive-semidefinite matrix. A fixed n×n matrix H predicts Ŷ=HY, with positive integer n.

H must be fixed before observing outcome noise. Examples include least-squares projection at fixed design, predetermined group means and specified linear averages. A general H need not be symmetric or idempotent; later results state those extra conditions explicitly.

This is a supplied working model. Estimated residual covariance cannot silently become true Ω, and an outcome-selected H cannot silently become fixed. The lab studies mathematical implications of declared premises.

Y=f+ε,E[ε]=0Cov⁡(ε)=Ω,Y^=HY\begin{gathered}Y=f+\varepsilon,\quad E[\varepsilon]=0\\\operatorname{Cov}(\varepsilon)=\Omega,\quad\widehat Y=HY\end{gathered}
학부 심화 · 선택Advanced undergraduate · optional

34. 행마다 편향과 공분산을 전달한다34. Propagate bias and covariance at each location

E[HY]=Hf이므로 편향벡터는 (H−I)f입니다. 예측 공분산은 HΩHᵀ입니다. i번째 예측의 분산은 이 행렬의 i번째 대각 원소입니다. Ω가 행 사이 의존을 담고 있으면 그 교차항도 계산에 포함합니다.

같은 고정 입력 위치에서 새 결과 Y′=f+ε′를 가정합니다. ε′는 학습 잡음 ε와 독립이고 평균 0, 공분산 Ω를 갖습니다. 그러면 i번째 새 제곱오차의 기대값은 bᵢ²+(HΩHᵀ)ᵢᵢ+Ωᵢᵢ입니다. n개 위치의 평균은 제곱노름과 trace를 써서 짧게 나타낼 수 있습니다.

여기서 평균하는 입력 위치는 이 고정 격자입니다. 다른 입력 분포의 미래 표적을 평가하려면 그 분포와 예측 함수를 추가해야 합니다. 이 벡터 공식만으로 관측 지지집합 밖의 일반화를 증명하지 않습니다.

b=(H−I)fRtest=∥b∥2n+tr⁡(HΩHT)n+tr⁡(Ω)n\begin{gathered}b=(H-I)f\\R_{\rm test}=\frac{\|b\|^2}{n}+\frac{\operatorname{tr}(H\Omega H^T)}n\\{}+\frac{\operatorname{tr}(\Omega)}n\end{gathered}

Since E[HY]=Hf, the bias vector is (H−I)f and prediction covariance is HΩHᵀ. Its i-th diagonal entry is prediction variance at location i. Cross-row dependence in Ω contributes through the matrix product.

Assume fresh outcomes Y′=f+ε′ at the same fixed locations, with ε′ independent of training noise, mean zero and covariance Ω. Expected squared error at i is bᵢ²+(HΩHᵀ)ᵢᵢ+Ωᵢᵢ. Averaging over the n locations yields a norm-and-trace expression.

The input target here is this fixed grid. Evaluating another future input distribution requires that distribution and an appropriate prediction function. The vector identity does not prove off-support generalization.

b=(H−I)fRtest=∥b∥2n+tr⁡(HΩHT)n+tr⁡(Ω)n\begin{gathered}b=(H-I)f\\R_{\rm test}=\frac{\|b\|^2}{n}+\frac{\operatorname{tr}(H\Omega H^T)}n\\{}+\frac{\operatorname{tr}(\Omega)}n\end{gathered}
학부 심화 · 선택Advanced undergraduate · optional

35. 같은 결과를 다시 쓰면 빠지는 항35. The term lost when scoring reused outcomes

같은 Y에 대한 잔차는 Y−HY=(I−H)f+(I−H)ε입니다. 기대 훈련 MSE는 편향 제곱 평균과 tr((I−H)Ω(I−H)ᵀ)/n의 합입니다. 독립 새 결과의 잡음을 이 잔차에 그대로 더하는 공식은 맞지 않습니다.

대칭 Ω에서 trace를 전개하면 새 결과 위험−기대 훈련 MSE=2tr(HΩ)/n입니다. H가 대칭이나 멱등일 필요는 없습니다. H가 직교투영이고 Ω가 양의 준정부호이면 이 차이는 비음수입니다. 그러나 임의의 H에서는 반드시 비음수인 것은 아닙니다.

예를 들어 H=−I, f=0, Ω=I라면 기대 훈련 MSE는 4, 새 결과 MSE는 2, 차이는 −2입니다. 역방향으로 예측하는 고정 규칙의 사례입니다. 이 결과를 일반적인 최소제곱의 훈련오차 낙관성과 혼동하지 않습니다.

Rtrain=∥b∥2n+tr⁡((I−H)Ω(I−H)T)nRtest−Rtrain=2tr⁡(HΩ)n\begin{gathered}R_{\rm train}=\frac{\|b\|^2}{n}\\{}+\frac{\operatorname{tr}((I-H)\Omega(I-H)^T)}n\\R_{\rm test}-R_{\rm train}=\frac{2\operatorname{tr}(H\Omega)}n\end{gathered}

Reused residuals are Y−HY=(I−H)f+(I−H)ε. Expected training MSE is average squared bias plus tr((I−H)Ω(I−H)ᵀ)/n. Adding independent-test noise directly to these reused residuals would be incorrect.

Expanding traces with symmetric Ω gives test risk minus expected training MSE equal to 2tr(HΩ)/n. No symmetry or idempotence of H is required for the identity. Orthogonal projections with PSD Ω give a nonnegative difference, but arbitrary H need not.

For H=−I, f=0 and Ω=I, training MSE has expectation four, fresh MSE two and the difference is −2. This reversed predictor is not ordinary least-squares optimism.

Rtrain=∥b∥2n+tr⁡((I−H)Ω(I−H)T)nRtest−Rtrain=2tr⁡(HΩ)n\begin{gathered}R_{\rm train}=\frac{\|b\|^2}{n}\\{}+\frac{\operatorname{tr}((I-H)\Omega(I-H)^T)}n\\R_{\rm test}-R_{\rm train}=\frac{2\operatorname{tr}(H\Omega)}n\end{gathered}
학부 심화 · 선택Advanced undergraduate · optional

36. 어떤 전제에서 분산이 차원에 비례하는가36. When variance is proportional to model dimension

고정 설계에서 H=P가 보통 유클리드 내적의 직교투영이고 Ω=σ²I, σ²≥0이라고 합시다. P=Pᵀ=P²이므로 평균 예측 분산은 σ²tr(P)/n=σ²rank(P)/n입니다. 이 조건에서는 투영 차원이 커질수록 분산이 작아지지 않습니다. σ²=0이면 모든 분산이 0일 수 있습니다.

중첩 공간 V₁⊂V₂의 투영 P₁,P₂에 대해서는 f−P₁f=(f−P₂f)+(P₂−P₁)f가 직교 분해입니다. 따라서 작은 공간의 제곱편향은 큰 공간의 제곱편향에 비음수 항을 더한 값입니다. 같은 고정 f와 설계에서 제곱편향은 커지지 않습니다.

이것은 명시한 조건의 정리입니다. 임의의 데이터 적응 규칙, 다른 입력 설계, 다른 Ω, 다른 가중 목적함수에 차원 공식만 그대로 적용하지 않습니다. 두 단조 항의 합이 모든 복잡도 순서에서 엄격한 U자 모양을 가진다는 결론까지도 정리가 보장하지 않습니다.

tr⁡(PΩPT)n=σ2rank⁡(P)n∥f−P1f∥2=∥f−P2f∥2+∥(P2−P1)f∥2\begin{gathered}\frac{\operatorname{tr}(P\Omega P^T)}n=\frac{\sigma^2\operatorname{rank}(P)}n\\\|f-P_1f\|^2=\|f-P_2f\|^2\\{}+\|(P_2-P_1)f\|^2\end{gathered}

At fixed design, let H=P be an orthogonal projection in the ordinary Euclidean inner product and Ω=σ²I, σ²≥0. Since P=Pᵀ=P², average prediction variance is σ²tr(P)/n=σ²rank(P)/n. Under these premises, increasing projection dimension cannot decrease variance; at zero noise it can remain zero.

For nested spaces V₁⊂V₂, the decomposition f−P₁f=(f−P₂f)+(P₂−P₁)f is orthogonal. The smaller space’s squared bias therefore equals the larger space’s squared bias plus a nonnegative term.

These are conditional results. Arbitrary adaptive rules, random designs, other covariance models or weighted losses require their own calculations. Even these two monotonic components do not force a strictly U-shaped sum for every complexity ordering.

tr⁡(PΩPT)n=σ2rank⁡(P)n∥f−P1f∥2=∥f−P2f∥2+∥(P2−P1)f∥2\begin{gathered}\frac{\operatorname{tr}(P\Omega P^T)}n=\frac{\sigma^2\operatorname{rank}(P)}n\\\|f-P_1f\|^2=\|f-P_2f\|^2\\{}+\|(P_2-P_1)f\|^2\end{gathered}
학부Undergraduate

37. 네 고정 위치의 세 모형37. Three models at four fixed locations

f=(0, 0, 2, 2), Ω=I₄를 가정합니다. H₁은 네 값을 모두 평균하는 행렬 J₄/4입니다. H₂는 앞 두 값과 뒤 두 값을 각각 평균하는 블록 행렬이고, H₄는 항등행렬입니다. 세 투영의 차원은 1, 2, 4입니다.

평균 제곱편향은 1, 0, 0이고 예측 분산은 1/4, 1/2, 1입니다. 새 잡음 평균은 모두 1이므로 새 위험은 9/4, 3/2, 2입니다. 기대 훈련 MSE는 7/4, 1/2, 0입니다. 가장 유연한 모형은 훈련을 완전히 맞히지만 이 가정 법칙에서는 중간 모형의 새 위험이 더 작습니다.

네 위치와 신호·공분산은 수업에서 고정한 값입니다. 실제 국가·임금·와인 기록에서 이 참 신호를 관측했다는 표시를 하지 않습니다. 표의 차원은 이 세 투영의 성질이지 모든 알고리즘의 복잡도에 적용되는 만능 지표가 아닙니다.

가정 f=(0, 0, 2, 2), Ω=I₄
차원제곱편향분산훈련 기대 MSE새 위험
111/47/49/4
201/21/23/2
40102

Assume f=(0, 0, 2, 2), Ω=I₄. H₁ averages all four observations, J₄/4. H₂ averages the first pair and last pair separately; H₄ is identity. Their projection dimensions are one, two and four.

Average squared biases are 1, 0 and 0; prediction variances 1/4, 1/2 and 1. Fresh noise averages one, giving test risks 9/4, 3/2 and 2. Expected training MSEs are 7/4, 1/2 and zero. The most flexible model fits training perfectly, but the middle model has smaller fresh risk under this law.

Locations, signal and covariance are declared teaching values, not observed true signals in country, wage or wine records. Dimension describes these projections; it is not a universal complexity measure for every learner.

Assumed f=(0, 0, 2, 2), Ω=I₄
DimensionSquared biasVarianceExpected training MSEFresh risk
111/47/49/4
201/21/23/2
40102
학부Undergraduate

38. 위험곡선은 가정과 함께 읽는다38. Read risk curves together with their premises

같은 세 투영에서 신호를 f=(0, 0, 0, 0)으로 바꾸고 Ω=I₄를 유지하면 새 위험은 5/4, 3/2, 2입니다. 이제 가장 단순한 모형이 좋고 중간에 내려갔다 올라가는 U자 모양이 아닙니다. 모형 목록이 같아도 참 함수가 달라져 순서가 달라졌습니다.

반대로 f=(0, 0, 2, 2)를 유지하고 Ω=0으로 바꾸면 새 위험은 1, 0, 0입니다. 두 큰 모형은 정확히 동률이며 어느 항도 반드시 엄격한 양수일 필요가 없습니다. 한 그림을 일반 정리처럼 외우지 말고 성분을 계산하세요.

운영 데이터에서 훈련·평가 차이가 크다는 사실도 편향과 분산을 각각 관측했다는 뜻이 아닙니다. 분포 변화, 다른 관측 단위, 정보 누출, 다른 평가 대상이 차이를 만들 수 있습니다. 더 많은 자료·특징·규제화가 도움이 될지는 그 원인과 실험 설계에 달려 있습니다.

Keep the same projections but set f=(0, 0, 0, 0), Ω=I₄. Fresh risks become 5/4, 3/2 and 2. The simplest model wins, without an interior U-shaped minimum. Changing the true function can change a ranking while leaving the candidate list fixed.

Alternatively keep f=(0, 0, 2, 2) and set Ω=0. Fresh risks are 1, 0 and 0, with an exact tie between the larger models. Components can be zero; no universal strict-positivity claim applies.

A large operational train/evaluation gap does not separately observe bias and variance. Distribution shifts, different units of observation, information leakage or different targets can contribute. The value of more data, features or regularization depends on causes and evaluation design.

학부Undergraduate

39. 결과를 보고 고른 행렬은 다르다39. An outcome-selected matrix is another procedure

H가 입력 X만으로 정해지고 잡음은 X에 조건부로 평균 0이면, X를 고정한 조건부 공식은 사용할 수 있습니다. 그러나 결과 Y를 보고 절단점·변수·모형을 선택하여 H=H(Y)가 되면 앞의 고정 H 기대값을 그대로 대입할 수 없습니다.

그 경우에도 학습 규칙 전체 h_D의 일반 편향·분산 분해는 유한 이차 모멘트와 독립 새 결과 조건에서 성립할 수 있습니다. 달라지는 것은 Hf와 HΩHᵀ만으로 반복 평균·공분산을 간단히 계산하는 단계입니다. 조건부 설계의 분산과 무작위 설계를 평균한 전체 분산도 구별합니다.

고정 선형 H, Ω=σ²I에서는 낙관 항이 2σ²tr(H)/n이어서 trace를 유효 자유도와 연결합니다. 임의의 H에서는 trace가 음수일 수도 있습니다. 실제 변수 수, 함수집합의 크기, 선택 후 유효 자유도를 같은 단어 하나로 바꾸지 않습니다.

If H is determined by X alone and noise has conditional mean zero given X, fixed-X formulas can apply conditionally. If outcomes choose cuts, variables or a model so that H=H(Y), those fixed-H expectations cannot simply be plugged in.

The general decomposition for the entire learning rule can still hold with finite second moments and independent fresh outcomes. What fails is the shortcut computing repetition means and covariances only as Hf and HΩHᵀ. Conditional fixed-design variance also differs from variance averaged over random designs.

For fixed linear H and Ω=σ²I, optimism 2σ²tr(H)/n motivates an effective-degrees-of-freedom interpretation. Arbitrary H can have negative trace. Parameter count, function-class capacity and post-selection effective degrees of freedom are different quantities.

학부 심화 · 선택Advanced undergraduate · optional

40. 실습 E · 같은 잡음에서 세 투영을 비교한다40. Lab E · Compare three projections under one noise law

고정 f=(0, 0, 2, 2), Ω=I₄에서 전체 평균·두 집단 평균·항등 예측을 비교하세요. 훈련 기대 MSE는 7/4, 1/2, 0이고 새 위험은 9/4, 3/2, 2입니다. 그림의 두 오차 계열은 같은 제곱 단위이고, 편향·분산·새 잡음은 표에서 따로 확인합니다.

Ω를 0 또는 양의 준정부호 상관 행렬로 바꾸어 일반 행렬 공식과 등분산 차원 공식을 구별합니다. 행렬이 비대칭이거나 양의 준정부호가 아니면 공분산으로 받지 않습니다. 대칭이라는 사실만으로 양의 준정부호가 되지는 않습니다.

고정 H=−I와 f=0, Ω=I를 넣어 낙관 차이 −2를 확인할 수도 있습니다. 화면은 임의 H의 대수 결과와 최소제곱 투영의 추가 성질을 나누어 표시합니다. 실제 데이터의 참 신호·참 공분산을 검증했다는 뜻은 아닙니다.

At fixed f=(0, 0, 2, 2), Ω=I₄, compare whole-sample averaging, two-group averaging and identity prediction. Expected training MSEs are 7/4, 1/2 and zero; fresh risks are 9/4, 3/2 and two. The two plotted error series share squared units, while bias, variance and new noise appear separately in the table.

Change Ω to zero or another PSD covariance to distinguish the general matrix identity from the homoscedastic dimension shortcut. Asymmetric or indefinite matrices are rejected: symmetry alone is insufficient for a covariance.

Try H=−I, f=0 and Ω=I to obtain optimism −2. The screen distinguishes arbitrary-H algebra from extra least-squares projection properties. It does not verify true signals or covariances in actual data.

학부Undergraduate

41. 국가 기록의 고정 평균과 가정 재표집41. Fixed country summaries and assumed resampling

이번 장은 World Bank 원 보관 JSON을 다시 읽어 16국의 2014년·2024년 1인당 실질 GDP와 기대수명을 선택했습니다. 공개 표는 32개 국가연도 행을 보존합니다. GDP는 2015년 불변 USD/명이며, 관측 연도와 공통 원본 보관일 2026년 10월 20일, 이번 장의 재추출·검토일을 구별합니다.

2024년 선택 16국 GDP 평균은 이 완전관측 프레임의 고정된 요약입니다. 2014년 같은 국가 평균을 고정 기준으로 삼고, 2024년 16개 값에서 독립 복원 추출한다고 새로 선언하면 평균 추정의 편향·분산을 계산할 수 있습니다. 원래 국가들이 iid 표본이거나 실제 GDP가 이 추출 때문에 불확실해졌다는 뜻이 아닙니다.

기대수명 절단점 80과 75·80·85로 나눈 GDP 계단 적합은 같은 16행의 기술적 비교입니다. 명목 네 구간 중 85 이상 구간에는 선택 관측이 없어 자료가 적합한 구간은 세 개입니다. 빈 구간 기준은 실제 국가 평균이나 GDP에 대한 기대수명의 인과효과가 아닙니다.

This chapter freshly rereads the retained World Bank JSON and selects 2014/2024 GDP per capita and life expectancy for 16 countries, preserving 32 country-year rows. GDP uses constant-2015 USD/person. Observation years, original retention on 20 October 2026 and this chapter’s extraction/review date remain distinct.

The 2024 mean is a fixed summary of a fully observed selected frame. We can fix the same-country 2014 mean as an anchor and separately assume iid resampling from the 16 retained 2024 values. This defines a mean-estimation experiment; it neither makes original countries iid nor creates actual uncertainty in already observed GDP.

GDP step fits at life-expectancy cuts 80 or 75/80/85 describe the same 16 records. The nominal fourth bin at 85 and above is empty, leaving three data-supported bins. Its fallback is neither an observed national average nor a causal effect of longevity on GDP.

학부Undergraduate

42. 원시급의 가용 3,017행을 표적으로 둔다42. Target the 3,017 available raw hourly-wage records

Card 원본 nls.dat의 사전을 읽어 1976년 교육 연수와 원 시간당 임금 센트를 새로 추출했습니다. 3,613개 원행을 모두 남기고 원시급 3,017행 가용·596행 미관측을 보존합니다. 이 장의 결과는 원시급/100인 1976년 USD/시간이며, 손질 로그임금 3,010행의 다른 선택을 복사한 것이 아닙니다.

첫 원행의 개인 코드는 2, 원시급은 548센트이므로 137/25=5.48 USD/시간입니다. 이 관측을 고정 기준으로 택하고 가용 임금 프레임의 새 복원 추출 실험을 계산합니다. 첫 기록이라는 이유로 그 시급이 모집단 평균이나 공정한 임금 기준이라고 주장하지 않습니다.

교육 연수의 경계 12.5 또는 9.5·12.5·15.5는 정수 교육 기록을 나누는 고정 규약입니다. 같은 가용 3,017행의 계단 적합 손실을 비교하고 미관측 행을 지우거나 0임금으로 만들지 않습니다. 교육 차이의 예측 연관을 교육 개입의 인과 수익으로 바꾸어 읽지 않습니다.

We newly extract schooling and raw 1976 hourly-wage cents from Card’s nls.dat using its dictionary. All 3,613 original positions remain: 3,017 raw wages are available and 596 unavailable. Outcomes are raw cents divided by 100, in historical USD/hour; they are not the different 3,010-row source-trimmed-log selection.

Original position one has person code two and wage 548 cents, or 137/25=5.48 USD/hour. That observation supplies a chosen fixed anchor for a separate resampling experiment on available wages. Being first does not establish a population mean or a fair-wage standard.

Cuts 12.5 or 9.5/12.5/15.5 partition integer schooling records by a fixed convention. Compare training losses on the same 3,017 available records without deleting missing source positions or replacing them by zero wages. Predictive schooling associations are not causal returns to an education intervention.

학부Undergraduate

43. 와인 품질 점수의 복잡도 비교43. Compare complexity for wine quality scores

UCI Wine Quality의 원 적포도주 파일 1,599행·12열을 새로 읽습니다. 관측 단위는 포르투갈 Vinho Verde 와인의 제품·실험실 측정 기록입니다. 생산기업·브랜드·가격을 식별하는 열이 없으므로 한 기업의 가격이나 기업 간 차이라고 쓰지 않습니다.

입력은 알코올 농도, 결과는 원 관능 품질 점수입니다. 원 사전은 적어도 세 평가자의 평가 중앙값인 0~10 점수로 설명합니다. 점수의 순서형 성격을 보존하면서, 이번 제곱손실 실습은 점수 간격을 같은 숫자 간격으로 취급한다고 명시합니다. 화학 성분을 조작했을 때 품질이 바뀌는 인과효과를 측정하지 않습니다.

절단점 10.5 또는 9.5·10.5·11.5를 사전에 고정해 같은 1,599행의 적합 손실을 비교합니다. 같은 12개 숫자 조합이 반복되어도 같은 병·기업·측정실험이라는 증거는 아닙니다. 분석 뒤 불편한 행을 임의로 삭제하지 않으며, 원 측정의 독립성이나 새 제품 일반화를 사실로 선언하지 않습니다.

Freshly read all 1,599 rows and 12 columns in UCI’s original red-wine file. Observations are Portuguese Vinho Verde product/laboratory records. No producer, brand or price column identifies a single firm or differences between firms.

Input is alcohol concentration; outcome is the original sensory quality score. The dictionary describes a 0–10 score, the median from at least three evaluators. We retain its ordinal interpretation while explicitly choosing equal numerical intervals for squared-loss exercises. The analysis does not measure the causal effect of manipulating a chemical ingredient.

Predetermined cuts 10.5 or 9.5/10.5/11.5 compare fits on the same 1,599 rows. Repeated 12-number patterns do not establish the same bottle, producer or repeated experiment. Records are not deleted after inspecting results, and independence or new-product generalization is not asserted.

학부Undergraduate

44. 원입력·가공표·Python/R를 함께 읽는다44. Read original inputs, derivatives and Python/R together

다운로드는 원 필드 선택 세 표와 가용 프레임 요약, 고정 재표집·축소 프로필, 구간별 적합 오차, 원행별 예측을 제공합니다. source_row_id는 보관 파일 안 위치입니다. 16국 계약은 GDP 원 API 위치를, 개인·와인은 각 원파일의 1부터 시작하는 행 위치를 보존합니다. 원 코드와 이 위치를 같은 열로 합치지 않습니다.

Python은 Fraction으로 평균·제곱합·가정 위험을 계산하고 base R은 별도로 같은 공개 입력에서 계산합니다. 재현 결과의 정확 분수와 R의 수치 근사를 구별하고, 코드·입력·출력 지문과 실행 환경을 기록합니다. 프로그램을 다운로드해 실행한 사실과 웹 화면의 JavaScript 계산은 다른 실행 경로입니다.

원 자료가 없는 다운로드 묶음에서도 선택 CSV만으로 주요 수치를 다시 계산할 수 있어야 합니다. 선택 숫자를 기존 case JSON에서 복사해 결과를 만드는 방식은 재현이 아닙니다. 새로운 원 다운로드를 수행하지 않은 보관본 재추출과 공식 소개 페이지를 새로 확인한 시점도 나누어 기록합니다.

Downloads contain three original-field selections, available-frame summaries, fixed resampling/shrinkage profiles, bin-fit losses and per-source-row predictions. source_row_id denotes a retained-file position. Country records retain GDP API positions; person/wine records use one-based original-file positions. Source codes and file coordinates remain separate.

Python uses Fraction for means, squared sums and assumed risks; base R computes separately from the same public inputs. Exact fractions differ from numerical approximations. Input/code/output hashes and runtime environments document each path. Downloaded-program execution is distinct from the page’s JavaScript calculation.

A public-only bundle should reproduce major values from selected CSVs even without original archives. Copying expected numbers from case JSON is not recalculation. Retained-data extraction dates also remain separate from fresh review dates of official contextual pages.

학부Undergraduate

45. 어떤 결론을 얻었는지 정확히 적는다45. State exactly which conclusions were obtained

보고서는 관측 단위·결과 단위·표적 프레임, 학습 표 법칙, 알고리즘과 빈 구간 규칙, 손실과 평가 대상을 먼저 적습니다. 다음으로 편향·분산·잡음이 실제로 알려진 가정 법칙의 값인지, 보관 표에서 정의한 경험 법칙의 값인지, 미지의 모집단에서 추정해야 할 값인지 구별합니다.

원자료·원행별 가용성·가중치·가정 기준을 그대로 보존하면 계산이 재현됩니다. 그러나 재현성만으로 모집단 대표성·독립성·인과효과·배포 성능이 생기지는 않습니다. 본문의 수리 검토, 원자료 검토, 독립 엔진 검토, 실제 브라우저와 영상 검증도 서로 다른 범위입니다.

“복잡하면 분산이 높다” 또는 “훈련오차가 낮으면 좋다” 대신 어느 같은 설계·법칙·함수집합에서 얻은 결과인지 씁니다. 0분산·0질량·빈 구간·전체 최소해집합을 숨기지 않고, 그래프가 그리는 유한 조회점과 수학적 전체 해도 구별합니다.

A report first states observation/outcome units, target frame, training law, learner, empty-bin rule, loss and evaluation target. Then distinguish quantities known under an assumed law, quantities defined by a retained empirical law and quantities requiring population estimation.

Preserved inputs, availability, weights and fixed anchors support reproducible arithmetic. Reproducibility alone establishes neither representativeness, independence, causal effects nor deployment performance. Manuscript, source, independent engine and actual-browser/media reviews are separate scopes.

Replace slogans with conditions: identify the common design, law and model class supporting a conclusion. Retain zero variance, zero mass, empty bins and complete optimizer sets. Distinguish finite plotted query points from a full mathematical solution.

기초Foundations

46. 실습 F · 같은 기록의 기술적 적합과 새 가정 법칙46. Lab F · Descriptive fits and a newly declared law

국가·개인·와인 자료를 선택하고 원행 수·가용 결과 수·단위를 먼저 읽습니다. α와 재표집 크기 n을 바꾸어도 원자료·가용 표지·고정 구간 적합값은 바뀌지 않아야 합니다. 바뀌는 것은 별도 균등 복원 추출 법칙에서 평균을 추정하는 규칙의 위험입니다.

국가의 고정 기준은 같은 국가의 2014년 GDP 평균, 개인은 첫 원행의 원시급 환산값, 와인은 첫 기록의 품질 점수입니다. 이 값은 새 재표집 실험에서 고정한 기준일 뿐 원래 모집단에서 독립인 참 사전정보라고 검증한 것이 아닙니다.

각 자료의 명목 1·2·4구간 훈련 MSE와 원행별 예측을 따로 확인합니다. 같은 데이터의 적합 결과이므로 독립 시험 성능으로 표시하지 않습니다. 개인의 전체 3,613행 표적은 미관측 결과 때문에 여기서 식별되지 않는다는 점도 화면에 남깁니다.

Select country, person or wine records and first read row counts, available outcomes and units. Changing α or resampling size n must not change observations, availability or predetermined bin-fit values. It changes the risk of a mean-estimation rule under a separate uniform with-replacement law.

The country anchor is the same-country 2014 GDP mean; the person anchor is the first raw-wage conversion; the wine anchor is the first quality score. Anchors are fixed in this new resampling experiment, not verified independent prior information about original populations.

Inspect nominal one/two/four-bin training MSEs and per-row predictions separately. Same-data fits are not independent test performance. Keep explicit that unavailable wages leave the full 3,613-row mean unidentified here.

기초Foundations

47. 세 실제 기록으로 범위를 다시 확인한다47. Revisit scope through three actual record sets

국가 · 알려진 프레임과 새 재표집 법칙

2026년 10월 20일 보관한 World Bank 다중 지표 JSON을 10월 27일 새로 읽어 16국의 2014·2024년을 선택했습니다. GDP는 NY.GDP.PCAP.KD, 단위는 2015년 불변 USD/명이며 기대수명은 SP.DYN.LE00.IN, 단위는 년입니다. 원본 보관일과 이번 재선택·검토일은 다르며 새 빈티지를 수집한 것으로 기록하지 않습니다. 자료사전에서 원행 위치와 지표 정의를 확인하고, 두 연도의 관측 단위와 금액 기준을 구별합니다.

관측 단위는 국가·연도입니다. 아래 표의 기대수명은 2024년 값이고 두 GDP 열은 같은 16국의 두 시점 값입니다. 선택국의 2024년 값 16개는 모두 가용하므로 이 고정 프레임의 평균은 알려진 요약입니다. 세계 국가를 무작위로 뽑았다는 설계, 국민 수에 비례한 평균, 한 나라의 시계열 오차 법칙은 여기서 확인하지 않았습니다.

실제 16국 · GDP는 2015 USD/명 · 소수 반올림
ISOGDP 2014GDP 2024기대수명 2024
AUS56,571.8161,486.3883.051
BRA9,338.349,566.7576.023
CAN43,643.2845,061.3982.108
CHN7,686.3713,119.1178.017
DEU41,602.4744,027.7680.793
FRA36,444.3939,683.4082.980
GBR44,628.5747,900.9781.387
IDN3,170.724,367.9571.288
IND1,484.322,366.8372.235
JPN34,996.8837,976.6484.036
KOR29,470.6737,048.4383.629
MEX9,862.4810,284.0375.264
SGP54,681.9368,129.7083.346
USA55,665.2466,856.5178.890
VNM2,439.294,012.5174.736
ZAF6,155.015,715.4866.312

가용 2024년 평균 μ_F는 약 31,100.238572이며, 같은 국가의 2014년 평균 a는 약 27,365.110912입니다. v_F는 2024년 제곱편차를 16으로 나눈 값입니다. 이 두 고정 요약을 바탕으로 새 실험을 선언합니다. 가용 16개 값에서 각 위치를 같은 확률 1/16로 네 번 독립 복원 추출하고, δα=αȲ+(1−α)a로 μ_F를 추정합니다. 이 추출 법칙은 실제 국가 자료가 iid였다는 진술이 아닙니다.

아래 편향·분산·평균 표적 MSE는 바로 그 새 법칙에 대한 정확 분수 계산의 반올림 표시입니다. 새 한 번의 독립 추출 결과 자체를 예측한다면 평균 표적 MSE에 v_F가 더해집니다. 그래프의 아홉 α 조회점은 평균 표적 MSE이며 새 결과 위험과 다른 단위가 아니라 같은 제곱금액 단위의 다른 표적입니다. α 격자의 최소와 연속 구간 [0,1]의 정확 최소를 혼동하지 않습니다.

B=(a−μF)2,V=vF/4Rμ(α)=(1−α)2B+α2Vα∗=BB+V(B+V>0)\begin{gathered}B=(a-\mu_F)^2,\quad V=v_F/4\\R_\mu(\alpha)=(1-\alpha)^2B+\alpha^2V\\\alpha_*={B\over B+V}\quad(B+V>0)\end{gathered}
보관 프레임의 기술적 요약 · 소수는 반올림
양값
전체 원행16
가용 결과16
미가용 결과0
가용 평균31,100.238572
N으로 나눈 분산532,020,447.033472
고정 기준 a27,365.110912
별도 가정 · 가용 값에서 iid 4회 복원 추출 · 소수 반올림
α편향편향²예측 분산평균 표적 MSE
0-3,735.12766013,951,178.6348350.00000013,951,178.634835
1/8-3,268.23670210,681,371.1422952,078,204.87122412,759,576.013520
1/4-2,801.3457457,847,537.9820948,312,819.48489816,160,357.466992
3/8-2,334.4547875,449,679.15423218,703,843.84102024,153,522.995253
1/2-1,867.5638303,487,794.65870933,251,277.93959236,739,072.598301
5/8-1,400.6728721,961,884.49552451,955,121.78061253,917,006.276136
3/4-933.781915871,948.66467774,815,375.36408275,687,324.028759
7/8-466.890957217,987.166169101,832,038.690000102,050,025.856170
10.0000000.000000133,005,111.758368133,005,111.758368
고정 구간의 같은 자료 적합 · 시험 점수 아님 · 소수 반올림
절단점명목 구간가용 구간같은 가용 행훈련 MSE
없음1116532,020,447.033472
802216257,651,263.931050
75, 80, 854316203,358,327.630591

고정 절단점 80 또는 75·80·85년으로 기대수명 구간을 만들고 각 구간의 같은 가용 GDP 평균을 적합합니다. 절단점과 같은 값은 위 구간에 속합니다. 마지막 ≥85년 구간은 이 선택 표에서 비어 명목 네 구간 중 가용 세 구간입니다. 빈 구간의 예측은 고정 a로 정했으며 그 값을 바꿔도 이 프레임의 훈련 MSE는 변하지 않습니다. 감소한 훈련 MSE는 기대수명을 조작한 인과효과나 미지의 모집단 편향 감소의 관측이 아닙니다.

편향이 계산되었으니 16국 평균을 모르는 상태였나요?

원 평균은 완전관측 고정값입니다. 계산한 편향은 새로 가정한 네 번 추출 추정량이 그 알려진 표적을 평균적으로 얼마나 벗어나는지입니다. 실제 미관측 불확실성이 생긴 것이 아닙니다.

연속 최적 α를 미래 국가 자료의 최적값이라고 할 수 있나요?

주어진 경험 법칙과 고정 기준 안에서의 oracle 해입니다. 실제 미래 법칙·대표성·의존·기준값 선택 효과는 별도로 확인해야 합니다.

명목 네 구간이면 네 평균이 모두 자료로 정해지나요?

아닙니다. 비어 있는 ≥85년 구간의 모든 실수 예측이 같은 훈련 손실을 냅니다. 고정 기준은 공개한 선택이며 그 구간의 참 조건부 평균은 이 표로 식별되지 않습니다.

다운로드: 원 선택 CSV · 가용 표 요약 · 가정 재표집 · 고정 구간 적합 · 모든 원행별 예측 · Python 재현 · R 재현

사람 · 원시급의 가용 분모와 구간 적합

Card의 보관 proximity.zip에서 nls.dat와 code_bk.txt를 직접 읽어 남성 코호트 3,613개 원행을 그대로 선택했습니다. 교육은 ed76, 결과는 1976년 원 시간당 임금 wage76이며 센트/시간입니다. 이 장은 센트를 100으로 나눈 과거 USD/시간을 사용합니다. 원자료 절단 로그 lwage76이나 현재 구매력 환산으로 결과를 바꾸지 않습니다.

원시급은 3,017개 가용, 596개 미가용입니다. 원 점(.) 표지는 공개 CSV에 남고 모델에서는 null입니다. 로그 가용 3,010개·미가용 603개와 다른 변수·다른 분모입니다. 원행 위치는 보관 위치이며 실제 개인 코드는 별도입니다. 행 위치가 iid 설계나 같은 사람의 시간 추적 근거가 되지 않습니다.

실제 원행 일부 · 점은 미관측 · 전체 3,613행 다운로드
원행개인 코드교육년원 센트USD/시간
1275485.480000
23124814.810000
34127217.210000
45112502.500000
56127297.290000
67125005.000000
171811.—
212410.—

가용 평균은 정확히 86903/15085, 약 5.760888 USD/시간입니다. 이는 3,017개 가용 값의 평균이지 전체 3,613개의 임금 평균을 알아냈다는 뜻이 아닙니다. 596개의 미관측을 0으로 채우면 원 표적과 자료가 달라집니다. 첫 원행의 548센트는 정확히 137/25=5.48 USD/시간이며 새 재표집 실험의 고정 기준 a로 사용합니다.

여기서도 재표집은 가용 값 3,017개를 균등하게 네 번 복원 추출하는 별도 법칙입니다. δα의 편향과 분산은 가용 경험 평균 μ_F에 대해 정의합니다. 실제 전체 남성 모집단이나 미관측 임금까지의 편향을 관측한 것이 아닙니다. 표의 제곱손실 단위는 (1976 USD/시간)²이며, 예측을 센트로 바꾸면 같은 손실 수치는 10,000배가 됩니다.

보관 프레임의 기술적 요약 · 소수는 반올림
양값
전체 원행3,613
가용 결과3,017
미가용 결과596
가용 평균5.760888
N으로 나눈 분산6.957787
고정 기준 a5.480000
별도 가정 · 가용 값에서 iid 4회 복원 추출 · 소수 반올림
α편향편향²예측 분산평균 표적 MSE
0-0.2808880.0788980.0000000.078898
1/8-0.2457770.0604060.0271790.087585
1/4-0.2106660.0443800.1087150.153096
3/8-0.1755550.0308200.2446100.275429
1/2-0.1404440.0197250.4348620.454586
5/8-0.1053330.0110950.6794710.690566
3/4-0.0702220.0049310.9784390.983370
7/8-0.0351110.0012331.3317641.332997
10.0000000.0000001.7394471.739447
고정 구간의 같은 자료 적합 · 시험 점수 아님 · 소수 반올림
절단점명목 구간가용 구간같은 가용 행훈련 MSE
없음113,0176.957787
25/2223,0176.658074
19/2, 25/2, 31/2443,0176.444315

교육년 절단점은 12.5 또는 9.5·12.5·15.5로 미리 정했습니다. 각 구간은 같은 가용 교육·임금 쌍에서 평균을 적합하고, 596개 임금 미가용 행도 공개 원행별 예측에 남습니다. 그 행의 교육이 있으면 예측은 계산할 수 있어도 제곱오차는 결과가 없어 미정의입니다. 세 훈련 MSE의 감소는 같은 자료에 적합한 결과이며 독립 시험 점수·교육 개입 수익률이 아닙니다.

미관측 임금 행의 예측이 있으면 오차도 0인가요?

결과가 없으므로 오차는 미정의입니다. 예측을 출력하는 것과 그 예측을 실제 결과로 평가하는 것을 구별합니다. 596행을 0오차로 더해 전체 분모를 쓰지 않습니다.

원시급 기준 5.48을 모집단 참 평균으로 썼나요?

아닙니다. 한 과거 원 관측을 새 가정 실험의 고정 기준으로 선택했습니다. 모집단 사전정보·독립 추정값이라고 주장하지 않으며 기준을 바꾸면 가정 위험도 바뀝니다.

더 많은 교육 구간은 언제나 더 좋은 미래 예측인가요?

같은 자료의 중첩 적합은 훈련 손실을 늘리지 않지만 실제 미래 위험의 단조성을 보장하지 않습니다. 법칙·복잡도·빈 구간·표본 크기와 독립 평가를 별도로 정해야 합니다.

다운로드: 원 선택 CSV · 가용 표 요약 · 가정 재표집 · 고정 구간 적합 · 모든 원행별 예측 · Python 재현 · R 재현

제품·실험실 기록 · 순서형 와인 점수와 복잡도

UCI Wine Quality의 원 winequality-red.csv에서 포르투갈 북부 Vinho Verde 적포도주 1,599개 기록과 열두 수치 필드를 모두 보존했습니다. 원 names는 품질이 적어도 세 전문가 평가의 중앙값이라고 설명하며 점수 범위는 0–10입니다. 원 메타 페이지의 4,898개는 백포도주 쪽 수와 연결되므로 이 적포도주 선택의 분모로 대신하지 않습니다.

관측은 제품·실험실 측정 기록이며 특정 생산기업 1,599곳이나 1,599명 고객이 아닙니다. 생산기업·브랜드·판매가격·병·배치 식별자가 제공되지 않아 같은 개체 반복이나 독립 관측 여부를 보장하지 않습니다. 실제 기업 식별 자료와 제품 실무 사례를 구별합니다. 원행 1과 5는 열두 수치가 같지만 같은 병의 중복 입력이라고 확정해 삭제하지 않습니다.

실제 원 기록 일부 · 전체 열두 필드 다운로드
원행알코올 · 원 척도품질 점수
19.45
29.85
39.85
49.86
59.45
69.45
79.45
8107

입력은 원 alcohol 열의 농도 수치이고 결과는 품질 점수의 숫자입니다. 점수의 순서형 성격은 숫자 간격을 같은 것으로 다루는 제곱손실 선택을 자동으로 정당화하지 않습니다. 이 장은 그 수치 모형을 명시하고, 원 척도의 평균·분산·MSE를 계산합니다. 보관 변수 메타의 개별 단위가 비어 있는 alcohol에 추가 단위 라벨을 만들어 붙이지 않습니다. 순서를 보존해 q²로 재부호화해도 손실 동률이 바뀔 수 있습니다.

전체 점수 평균은 정확히 3004/533, 약 5.636023이고 N 분산은 185158/284089입니다. 첫 기록 점수 5를 새 재표집 실험의 고정 기준으로 씁니다. 가용 기록 네 번의 iid 복원 추출은 계산용으로 추가한 법칙이며 실제 와인 행이 독립이라는 사실이나 새 생산 배치의 법칙으로 확인한 것이 아닙니다.

보관 프레임의 기술적 요약 · 소수는 반올림
양값
전체 원행1,599
가용 결과1,599
미가용 결과0
가용 평균5.636023
N으로 나눈 분산0.651761
고정 기준 a5.000000
별도 가정 · 가용 값에서 iid 4회 복원 추출 · 소수 반올림
α편향편향²예측 분산평균 표적 MSE
0-0.6360230.4045250.0000000.404525
1/8-0.5565200.3097140.0025460.312260
1/4-0.4770170.2275450.0101840.237729
3/8-0.3975140.1580170.0229130.180931
1/2-0.3180110.1011310.0407350.141866
5/8-0.2385080.0568860.0636480.120535
3/4-0.1590060.0252830.0916540.116937
7/8-0.0795030.0063210.1247510.131072
10.0000000.0000000.1629400.162940
고정 구간의 같은 자료 적합 · 시험 점수 아님 · 소수 반올림
절단점명목 구간가용 구간같은 가용 행훈련 MSE
없음111,5990.651761
21/2221,5990.538157
19/2, 21/2, 23/2441,5990.504053

농도 절단점은 10.5 또는 9.5·10.5·11.5입니다. 동일 1,599행에서 적합한 훈련 MSE는 약 0.651761, 0.538157, 0.504053으로 줄어듭니다. 이는 같은 자료를 더 잘 적합한 기술적 결과이며 미지의 모집단 편향과 분산을 별도로 측정한 것이 아닙니다. 농도를 바꾸어 점수를 높이는 인과적 처방도 이 연관에서 나오지 않습니다.

출처: Cortez, Cerdeira, Almeida, Matos, Reis (2009), Wine Quality, UCI Machine Learning Repository, DOI 10.24432/C56S3T. 공식 UCI 페이지의 CC BY 4.0을 확인했으며, 원 이름과 인용을 보존합니다. 가공한 내용은 원행 키·정확 분수·구간 평균/예측·가정 재표집 위험입니다. 원 측정값은 바꾸지 않았습니다.

훈련오차가 줄었으니 실제 편향도 줄었나요?

편향은 참 조건부 평균과 반복 학습 기대값의 차이입니다. 한 보관 표의 적합 오차만으로 이 둘을 각각 알아내지 못합니다. 알려진 가정 법칙의 계산과 실제 미지의 법칙에 대한 추론은 다른 단계입니다.

품질 4와 6은 실제 5에서 언제나 똑같이 먼가요?

숫자를 그대로 제곱손실에 쓰면 두 손실은 1입니다. q² 재부호화 뒤 손실은 81과 121이므로 순서 정보만으로 같은 간격이 정해지지 않습니다. 선택한 수치 척도와 손실을 공개해야 합니다.

같은 숫자 패턴을 합쳐도 새 병의 위험은 같나요?

그 결론은 원 자료가 보장하지 않습니다. 숫자 패턴은 같은 실물 식별자가 아니며, 가중치 없이 한 행을 없애면 보관 경험 법칙까지 달라집니다. 이 장은 모든 원행을 보존합니다.

다운로드: 원 선택 CSV · 가용 표 요약 · 가정 재표집 · 고정 구간 적합 · 모든 원행별 예측 · Python 재현 · R 재현

Countries · a known frame and a new resampling law

On 27 October 2026 we reread the World Bank multi-indicator JSON retained on 20 October, selecting 2014 and 2024 for sixteen countries. GDP indicator NY.GDP.PCAP.KD is in constant-2015 USD/person; longevity indicator SP.DYN.LE00.IN is in years. The retained-original date and this extraction/review date differ; this is not a new vintage collection. Use the data dictionary to check original positions and indicator definitions, distinguishing observation units and monetary reference years.

The observation unit is a country-year. Longevity below refers to 2024; the GDP columns refer to two years for the same countries. All sixteen 2024 outcomes are available, so their fixed-frame mean is known. A random selection of world countries, a population-weighted mean and a national time-series error law have not been established.

Actual sixteen countries · GDP in constant-2015 USD/person · rounded
ISOGDP 2014GDP 2024Longevity 2024
AUS56,571.8161,486.3883.051
BRA9,338.349,566.7576.023
CAN43,643.2845,061.3982.108
CHN7,686.3713,119.1178.017
DEU41,602.4744,027.7680.793
FRA36,444.3939,683.4082.980
GBR44,628.5747,900.9781.387
IDN3,170.724,367.9571.288
IND1,484.322,366.8372.235
JPN34,996.8837,976.6484.036
KOR29,470.6737,048.4383.629
MEX9,862.4810,284.0375.264
SGP54,681.9368,129.7083.346
USA55,665.2466,856.5178.890
VNM2,439.294,012.5174.736
ZAF6,155.015,715.4866.312

The available 2024 mean μ_F is approximately 31,100.238572; the same-country 2014 mean a is approximately 27,365.110912. Define v_F using divisor sixteen. Now declare a new experiment: draw four iid positions uniformly with replacement, each with probability 1/16, and estimate μ_F by δα=αȲ+(1−α)a. This newly specified law does not establish that actual national records were iid.

Bias, variance and mean-target MSE below are rounded displays of exact fractions under that law. Predicting one independent fresh draw instead adds v_F to mean-target MSE. The nine plotted α queries show mean-target MSE; fresh-outcome risk has the same squared monetary unit but a different target. A grid minimum differs from the exact continuous optimum over [0,1].

B=(a−μF)2,V=vF/4Rμ(α)=(1−α)2B+α2Vα∗=BB+V(B+V>0)\begin{gathered}B=(a-\mu_F)^2,\quad V=v_F/4\\R_\mu(\alpha)=(1-\alpha)^2B+\alpha^2V\\\alpha_*={B\over B+V}\quad(B+V>0)\end{gathered}
Descriptive retained-frame summaries · rounded decimals
QuantityValue
Original rows16
Available outcomes16
Unavailable outcomes0
Available mean31,100.238572
Variance divided by N532,020,447.033472
Fixed anchor a27,365.110912
Separate assumption · four iid replacement draws from available outcomes · rounded decimals
αBiasBias²Prediction varianceMean-target MSE
0-3,735.12766013,951,178.6348350.00000013,951,178.634835
1/8-3,268.23670210,681,371.1422952,078,204.87122412,759,576.013520
1/4-2,801.3457457,847,537.9820948,312,819.48489816,160,357.466992
3/8-2,334.4547875,449,679.15423218,703,843.84102024,153,522.995253
1/2-1,867.5638303,487,794.65870933,251,277.93959236,739,072.598301
5/8-1,400.6728721,961,884.49552451,955,121.78061253,917,006.276136
3/4-933.781915871,948.66467774,815,375.36408275,687,324.028759
7/8-466.890957217,987.166169101,832,038.690000102,050,025.856170
10.0000000.000000133,005,111.758368133,005,111.758368
Fixed-bin fits on the same data · not test scores · rounded decimals
CutsNominal binsOccupied binsSame available rowsTraining MSE
None1116532,020,447.033472
802216257,651,263.931050
75, 80, 854316203,358,327.630591

Predetermined longevity cuts at 80 or at 75, 80, 85 fit a same-data GDP mean within each bin. Equality goes to the upper bin. The final ≥85 bin is empty here: four nominal bins but three occupied. Its prediction uses fixed a; changing it leaves this frame’s training MSE unchanged. Declining training MSE neither identifies an effect of manipulating longevity nor observes reduced bias in an unknown population.

Does computed bias mean the sixteen-country mean was initially unknown?

The original mean is fixed and fully observed. Bias describes a newly assumed four-draw estimator relative to that known target; it does not create actual unobserved uncertainty.

Is the continuous optimal α optimal for future national data?

It is an oracle within the supplied empirical law and fixed anchor. Future laws, representativeness, dependence and anchor selection require separate evidence.

Do four nominal bins identify four fitted means?

No. Every real prediction in the empty ≥85 bin attains the same training loss. The fallback is a disclosed choice; this table does not identify the true conditional mean there.

Download: Selected source CSV · Available-frame summaries · Assumed resampling · Fixed bin fits · Every source-row prediction · Python replay · R replay

People · raw-wage availability and bin fitting

We read nls.dat and code_bk.txt in Card’s retained proximity.zip and preserve all 3,613 male-cohort source rows. Education is ed76; outcome wage76 is original 1976 hourly pay in cents/hour. Divide cents by one hundred to obtain historical USD/hour. Do not substitute source-trimmed lwage76 or present-day purchasing power.

Raw wages have 3,017 available and 596 unavailable positions. Original dot markers remain in the public CSV and become null in models. These differ from the log variable’s 3,010 available and 603 unavailable observations. Positional row keys and original person codes are separate; positions establish neither iid sampling nor repeated-person tracking.

Selected actual source positions · dot means unavailable · download all 3,613
Source rowPerson codeSchool yearsOriginal centsUSD/hour
1275485.480000
23124814.810000
34127217.210000
45112502.500000
56127297.290000
67125005.000000
171811.—
212410.—

The available mean is exactly 86903/15085, approximately 5.760888 USD/hour. It averages 3,017 available values rather than identifying a full 3,613-row wage mean. Filling 596 unavailable values with zero changes inputs and target. The first source wage, 548 cents, is exactly 137/25=5.48 USD/hour and supplies fixed anchor a in a new resampling experiment.

Resampling again means four independent uniform replacement draws from the 3,017 available outcomes. Bias and variance of δα are defined relative to their empirical mean μ_F, not observed bias for all men or missing wages. Squared-loss units are (1976 USD/hour)²; expressing wages in cents multiplies loss values by 10,000.

Descriptive retained-frame summaries · rounded decimals
QuantityValue
Original rows3,613
Available outcomes3,017
Unavailable outcomes596
Available mean5.760888
Variance divided by N6.957787
Fixed anchor a5.480000
Separate assumption · four iid replacement draws from available outcomes · rounded decimals
αBiasBias²Prediction varianceMean-target MSE
0-0.2808880.0788980.0000000.078898
1/8-0.2457770.0604060.0271790.087585
1/4-0.2106660.0443800.1087150.153096
3/8-0.1755550.0308200.2446100.275429
1/2-0.1404440.0197250.4348620.454586
5/8-0.1053330.0110950.6794710.690566
3/4-0.0702220.0049310.9784390.983370
7/8-0.0351110.0012331.3317641.332997
10.0000000.0000001.7394471.739447
Fixed-bin fits on the same data · not test scores · rounded decimals
CutsNominal binsOccupied binsSame available rowsTraining MSE
None113,0176.957787
25/2223,0176.658074
19/2, 25/2, 31/2443,0176.444315

Predetermine schooling cuts at 12.5 or at 9.5, 12.5, 15.5. Means use the same available schooling/wage pairs. All 596 unavailable-wage rows remain in per-row prediction downloads: available schooling may permit a prediction while squared error remains undefined without an outcome. Declining training MSEs are same-data fits, not independent test scores or causal schooling returns.

Does a prediction for an unavailable wage imply zero error?

Without the outcome, error is undefined. Producing a prediction differs from evaluating it against an outcome. Do not add 596 artificial zero errors to a full-row denominator.

Is anchor 5.48 a known population mean?

No. One historical observation was selected as a fixed anchor in a new assumed experiment. It is not verified population prior information or an independent estimate; changing it changes the working risk.

Do more schooling bins always improve future predictions?

Nested fitting cannot increase loss on the same data, but it does not guarantee monotone future risk. Specify the law, complexity, empty bins, sample size and independent evaluation separately.

Download: Selected source CSV · Available-frame summaries · Assumed resampling · Fixed bin fits · Every source-row prediction · Python replay · R replay

Product/laboratory records · ordinal wine scores and complexity

We preserve all 1,599 red Vinho Verde wine records and twelve numeric fields in UCI’s original winequality-red.csv. Original names describe quality as the median of at least three expert evaluations on a zero-to-ten scale. The metadata page’s 4,898 count corresponds to white wine and is not this red-wine denominator.

Units are product/laboratory records, not 1,599 identified producers or customers. Producer, brand, selling-price, bottle and batch identifiers are unavailable, so repeated identity and independence are unverified. A product-practice example differs from identified-company data. Rows one and five share all twelve numeric values; this alone does not justify declaring and deleting a duplicate bottle entry.

Actual source excerpts · download all twelve fields
Source rowAlcohol · source scaleQuality score
19.45
29.85
39.85
49.86
59.45
69.45
79.45
8107

The input is the source alcohol concentration value; the outcome is the numerical quality score. Ordinal order does not automatically justify treating score gaps as equal under squared loss. We declare that numerical model and compute its mean, variance and MSE. We do not invent an additional unit label for alcohol where the retained variable metadata leaves units unspecified. An order-preserving q² recoding can change loss ties.

The score mean is exactly 3004/533, approximately 5.636023, with divisor-N variance 185158/284089. The first score, five, anchors a new resampling experiment. Four iid replacement draws are a computationally specified law, not verified independence of actual rows or a known law for a new production batch.

Descriptive retained-frame summaries · rounded decimals
QuantityValue
Original rows1,599
Available outcomes1,599
Unavailable outcomes0
Available mean5.636023
Variance divided by N0.651761
Fixed anchor a5.000000
Separate assumption · four iid replacement draws from available outcomes · rounded decimals
αBiasBias²Prediction varianceMean-target MSE
0-0.6360230.4045250.0000000.404525
1/8-0.5565200.3097140.0025460.312260
1/4-0.4770170.2275450.0101840.237729
3/8-0.3975140.1580170.0229130.180931
1/2-0.3180110.1011310.0407350.141866
5/8-0.2385080.0568860.0636480.120535
3/4-0.1590060.0252830.0916540.116937
7/8-0.0795030.0063210.1247510.131072
10.0000000.0000000.1629400.162940
Fixed-bin fits on the same data · not test scores · rounded decimals
CutsNominal binsOccupied binsSame available rowsTraining MSE
None111,5990.651761
21/2221,5990.538157
19/2, 21/2, 23/2441,5990.504053

Concentration cuts are 10.5 or 9.5, 10.5, 11.5 on the source scale. Same-record training MSEs decline to approximately 0.651761, 0.538157, 0.504053. These describe fitting the same 1,599 records, not separately measured unknown-population bias and variance. Association also does not prescribe a causal score gain from altering alcohol concentration.

Credit: Cortez, Cerdeira, Almeida, Matos and Reis (2009), Wine Quality, UCI Machine Learning Repository, DOI 10.24432/C56S3T. The official UCI page identifies CC BY 4.0; original names and citation are retained. Added transformations comprise positional keys, exact fractions, bin means/predictions and assumed resampling risks; source measurements are unchanged.

Does lower training error establish lower actual bias?

Bias compares a true conditional mean with a retraining expectation. A fit error on one retained table identifies neither separately. Known working-law calculations and inference about an unknown real law are different steps.

Are scores four and six always equally far from observed five?

Under the chosen numerical squared loss both errors equal one. After q² recoding the losses become 81 and 121; ordinal information alone does not fix distances. Disclose the numerical scale and loss.

Does merging identical patterns preserve risk for a new bottle?

The source does not establish that conclusion. A value pattern is not a physical identifier; deleting a row without multiplicity weights changes even the retained empirical law. This chapter preserves all rows.

Download: Selected source CSV · Available-frame summaries · Assumed resampling · Fixed bin fits · Every source-row prediction · Python replay · R replay

기초Foundations

48. 공식 강의·인물·읽기로 다시 유도한다48. Re-derive with official lectures, profiles and readings

Cornell의 공식 편향·분산 강의와 분해식에서 학습 표·새 결과에 대한 서로 다른 기대값을 찾으세요. 단순한 모든 복잡도 진단 구호는 보편 정리로 옮기지 않습니다. Stanford STATS202의 지정 범위는 Prediction error와 Test vs. training error 두 절이며, 실제 모집단 법칙을 모를 때 위험과 훈련 점수가 다른 대상을 뜻한다는 부분을 읽습니다.

Trevor Hastie의 Stanford 기관 소개는 비모수 회귀·분류와 통계학습 교재의 연구 맥락을 제공합니다. 특정 인물의 권위가 우리의 표적·전제·공분산을 대신 확인해 주지는 않습니다. 영상은 공식 제작자 링크와 실제 재생 확인을 구별하여 기록하며, 출처의 식도 독립적으로 다시 유도합니다.

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

Use Cornell’s official bias-variance lecture and decomposition to identify expectations over training tables and fresh responses. Do not turn general complexity heuristics into universal theorems. The assigned Stanford STATS202 range is only Prediction error and Test vs. training error, distinguishing population risk from training scores when the true law is unknown.

Trevor Hastie’s Stanford institutional profile supplies research/textbook context in nonparametric regression and classification. Authority does not verify our targets, premises or covariances. Official video linkage and actual playback remain separate evidence; derive each mathematical statement independently.

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 ml02-reproduce.py
Rscript --vanilla --encoding=UTF-8 ml02-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.

편향·분산과 반복 학습의 기대값Bias, variance and expectations over retraining

Cornell University · CS 4780 · Fall 2018 · Lecture 12

공식 Lecture 12의 학습 표 D와 새 (X,Y)의 서로 다른 기대값 및 제곱손실 분해를 찾습니다. 무조건적인 복잡도 구호나 무한 자료 오차를 이 장의 편향 정의로 대신하지 않습니다. 최종 분해식에서 어느 기대값이 학습 자료에, 어느 기대값이 새 결과에 대한 것인지 표시해 보세요.Find separate expectations over training D and a fresh (X,Y), and the squared-loss decomposition. Do not replace our bias definition with unrestricted complexity slogans or infinite-data error. In the final decomposition, mark which expectations concern training data and which concern fresh outcomes.

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

보고 읽은 뒤 답하기Respond after watching/reading 같은 입력에서 반복 예측의 평균이 참 조건부 평균과 다르면 무엇인가요?What if mean retrained prediction differs from the true conditional mean at the same input?

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

차이는 부호 있는 편향입니다. 한 번의 잔차와 다르며, 참 법칙과 반복 학습 법칙이 있어야 정의한 값을 계산할 수 있습니다.Their signed difference is bias, distinct from one residual. Its calculation requires the true target and declared retraining law.

Trevor Hastie · 통계학습의 모형과 예측Trevor Hastie · models and prediction in statistical learning

Stanford University · official institutional profile

기관 소개의 비모수 회귀·분류 연구와 통계학습 교재 맥락만 읽습니다. 인물의 연구를 이 장의 새 원자료 분석이나 모든 복잡도 법칙의 증거로 귀속하지 않습니다.Read the institutional profile’s nonparametric regression/classification and textbook context only. Do not attribute our new source analyses or universal complexity claims to the researcher.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 더 유연한 함수집합이 같은 자료의 최소 훈련 손실을 줄이면 새 위험도 감소하나요?Does a larger class lowering minimum training loss also lower fresh risk?

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

같은 목적함수와 중첩 집합의 최소값 단조성은 성립하지만 새 위험의 단조성은 따르지 않습니다. 고정 설계·참 함수·잡음·적합 규칙을 함께 적어야 합니다.Nested sets give monotone training minima under the same objective, but not monotone fresh risk. Specify design, truth, noise and fitting rule.

학습 법칙과 새 결과를 분리한 제곱손실 유도A squared-loss derivation separating training and fresh outcomes

Cornell University · CS 4780 · official Lecture 12 notes

도입의 iid 가정·Expected Test Error 정의와 Decomposition of Expected Test Error의 최종 항등식까지만 지정합니다. 뒤의 편향=무한 자료 오차 풀이와 보편적인 복잡도 진단은 채택하지 않습니다. 교차항 0을 독립성·조건부 평균으로 직접 증명합니다.Assign the opening iid premise, Expected Test Error definitions and derivation through the final decomposition identity only. Exclude the later infinite-data bias gloss and universal complexity diagnostics. Prove vanishing cross terms from independence and conditional means.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 예측과 새 잡음의 공분산이 1/2이면 같은 분해인가요?Does the same decomposition apply if prediction and fresh noise have covariance 1/2?

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

일반 전개에는 −2Cov 항이 있습니다. 편향 0·두 분산 1이면 위험은 1이지 독립식을 쓴 2가 아닙니다.The general expansion includes −2Cov. With zero bias and two variances equal to one, risk is one rather than the independence value two.

훈련 MSE와 미지의 예측 위험Training MSE and unknown prediction risk

Stanford University · STATS 202 · official course notes

Prediction error와 Test vs. training error 중 위험·훈련 MSE·독립 시험 MSE 정의만 지정합니다. 뒤의 Key quantities 편향 요약이나 모든 곡선이 U자라는 해석은 지정하지 않습니다. 고정 평가 표의 계산과 미지의 모집단 위험을 구별합니다.Assign only risk, training-MSE and separate-test-MSE definitions in Prediction error and Test vs. training error. Exclude the later bias-summary table and universal U-shaped readings. Distinguish a fixed evaluation table from an unknown population risk.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 와인 훈련 MSE 0.504를 새 제품 위험이라고 보고해도 되나요?May wine training MSE 0.504 be reported as fresh-product risk?

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

같은 결과로 평균을 적합하고 그 결과로 점수 낸 훈련 평가입니다. 독립 시험 자료와 배포 법칙의 근거 없이는 새 제품 성능으로 바꾸어 부르지 않습니다.It fits and scores using the same outcomes. Without independent evaluation and evidence about the deployment law, it cannot be relabelled fresh-product performance.

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

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

1. 세 예측의 중심Center of three predictions

한 위치의 가정 학습 예측 3, 5, 7이 각각 확률 1/3입니다. 참 조건부 평균은 5입니다. 평균 예측, 편향, 예측 분산을 구하세요.

At one input, assumed training predictions 3, 5 and 7 each have probability 1/3. The true conditional mean is five. Find mean prediction, bias and variance.

풀이와 확인할 이유Solution and explanation

평균은 (3+5+7)/3=5이고 편향은 5−5=0입니다. 분산은 (4+0+4)/3=8/3입니다. 선언한 전체 유한 법칙의 분산이므로 분모는 3입니다.

Mean is five and bias zero. Variance is (4+0+4)/3=8/3. The denominator is three because the list defines the entire finite law.

2. 항상 낮게 예측하는 규칙A constant downward prediction

참 조건부 평균이 5인 위치에서 모든 학습 상황의 예측이 4입니다. 편향·제곱편향·분산·평균 표적 MSE를 구하세요.

At an input with true conditional mean five, every training situation predicts four. Find bias, squared bias, variance and mean-target MSE.

풀이와 확인할 이유Solution and explanation

편향은 −1, 제곱편향은 1, 분산은 0입니다. 평균 표적 MSE는 1+0=1입니다. 안정적인 규칙이라도 편향은 있을 수 있습니다.

Bias is −1, squared bias one, variance zero and target MSE one. Stability does not imply absence of bias.

3. 독립 잡음 더하기Add independent noise

고정 위치에서 편향 −1, 예측 분산 2이고 새 결과의 평균 0 잡음분산이 3입니다. 예측과 새 잡음은 독립입니다. 새 결과 MSE와 평균 표적 MSE를 구하세요.

At fixed input, bias is −1, prediction variance two and fresh mean-zero noise variance three. Prediction and new noise are independent. Find fresh-response and mean-target MSE.

풀이와 확인할 이유Solution and explanation

평균 표적 MSE는 (−1)²+2=3입니다. 새 결과 MSE는 3+3=6입니다. 잡음 3을 두 번 더하거나 편향 −1 자체를 더하지 않습니다.

Target MSE is (−1)²+2=3. Fresh-response MSE adds noise three, giving six. Add squared bias, not signed bias, and add fresh noise once.

4. 같은 평균의 다른 흔들림Same center, different spread

규칙 A는 예측 3, 5, 7을 각각 1/3로, 규칙 B는 예측 5를 확률 1로 냅니다. 표적 평균은 5, 두 규칙의 독립 새 잡음분산은 모두 1입니다. 새 위험을 비교하세요.

Rule A predicts 3, 5, 7 with equal probability; rule B always predicts five. Target mean is five; both have independent fresh-noise variance one. Compare fresh risks.

풀이와 확인할 이유Solution and explanation

A의 분산은 8/3이므로 위험 11/3입니다. B의 편향·분산은 0이므로 위험 1입니다. B의 위험도 잡음 때문에 0은 아닙니다.

A has variance 8/3 and risk 11/3. B has zero bias and prediction variance but risk one from new noise.

5. 가중 기대값A weighted expectation

예측 0과 4의 가중치는 1과 3입니다. 표적은 2이고 새 잡음분산은 0입니다. 가중치를 정규화하여 편향·분산·위험을 구하세요.

Predictions zero and four have weights one and three. Target is two and new noise variance zero. Normalize weights and find bias, variance and risk.

풀이와 확인할 이유Solution and explanation

확률은 1/4,3/4이고 평균은 3입니다. 편향 1, 분산 (1/4)×9+(3/4)×1=3입니다. 위험은 1+3=4이며 직접 평균한 두 제곱오차 4와 4도 같은 답을 줍니다.

Probabilities are 1/4 and 3/4, mean three and bias one. Variance is 9/4+3/4=3; risk is four. Directly averaging squared errors four and four agrees.

6. 재사용과 독립 결과Reused and independent outcomes

Y는 −1과 1을 각각 확률 1/2로 갖고 규칙은 h=Y로 외웁니다. 같은 Y의 훈련오차와 독립 동일법칙 Y₀의 평균 제곱오차를 구하세요.

Y is −1 or one with equal probability and the rule memorizes h=Y. Find reused training error and expected squared error for independent identically distributed Y₀.

풀이와 확인할 이유Solution and explanation

훈련오차는 항상 0입니다. 독립 두 값이 같을 확률 1/2에서는 오차 0, 다를 확률 1/2에서는 제곱오차 4이므로 새 위험은 2입니다. 훈련에서는 h와 원 잡음의 공분산을 무시할 수 없습니다.

Training error is always zero. Independent values agree with probability 1/2, giving zero loss, and disagree with probability 1/2, giving loss four. Fresh risk is two; training reuse retains a covariance term.

7. 센트에서 달러로From cents to dollars

같은 규칙의 임금 편향은 시간당 20센트, 예측 분산은 900(센트/시간)²입니다. 표적과 예측을 모두 USD/시간으로 환산하면 편향·분산은 얼마인가요?

A wage rule has bias 20 cents/hour and variance 900 squared cents/hour. Convert both targets and predictions to USD/hour. What are bias and variance?

풀이와 확인할 이유Solution and explanation

편향은 20/100=1/5 USD/시간입니다. 분산은 900/10000=9/100 (USD/시간)²입니다. 단위만 바뀌었으므로 다른 규칙 대비 MSE 순위가 개선된 것은 아닙니다.

Bias becomes 1/5 USD/hour and variance 9/100 squared USD/hour. Changing units does not improve the MSE ranking against other consistently converted rules.

8. 아핀 변환의 불변 순서Ranking under an affine transformation

두 규칙의 MSE는 같은 결과 단위에서 2와 5입니다. 결과·표적·예측에 모두 y′=7−3y를 적용합니다. 새 MSE와 순위는 무엇인가요?

Two rules have MSEs two and five in common units. Apply y′=7−3y to outcomes, targets and predictions. Find the new MSEs and ranking.

풀이와 확인할 이유Solution and explanation

오차는 −3배, 제곱오차는 9배이므로 MSE는 18과 45입니다. 첫 규칙이 여전히 작습니다. 평행이동 7은 일관되게 적용되어 오차에서 소거됩니다.

Errors scale by −3 and squared errors by nine, giving MSEs 18 and 45. The first remains better; the common offset cancels.

9. 정보에 따라 달라지는 잡음Noise depends on supplied information

Y=−1,1이 같은 확률입니다. 입력이 아무 정보도 주지 않는 경우와, 예측 전에 입력 X=Y를 안다고 가정하는 경우의 최선 제곱위험을 구하세요. 실제 운영에서 그런 입력이 있다고 주장하는 문제는 아닙니다.

Y is equally likely −1 or one. Compare optimal squared risk with no informative input against a hypothetical input X=Y known before prediction. This does not assert operational availability of such a feature.

풀이와 확인할 이유Solution and explanation

무정보 조건부 평균은 0이므로 최선 위험은 Var(Y)=1입니다. X=Y를 알면 조건부 평균은 X이고 잔여 위험은 0입니다. 한 정보집합의 불가피한 잡음이 모든 정보집합의 보편 하한은 아닙니다.

Without information, the best prediction is zero and risk one. Under the supplied perfect-information premise, conditional mean X predicts exactly and risk zero. An information-specific noise floor is not universal across representations.

10. 법칙의 분산과 표본 통계량Law variance versus a sample statistic

숫자 2,4에 각각 확률 1/2을 주는 완전한 유한 법칙의 분산을 구하세요. 같은 두 숫자로 n−1 분모의 표본분산 통계량을 계산하면 무엇이며 왜 다른가요?

Find variance of the complete finite law assigning probability 1/2 to two and four. What is the n−1 sample-variance statistic on the same numbers, and why does it differ?

풀이와 확인할 이유Solution and explanation

평균 3에서 두 제곱편차는 1,1이므로 법칙의 분산은 1입니다. 표본분산 통계량은 2/(2−1)=2입니다. 전자는 주어진 법칙의 기대값이고 후자는 다른 분모를 정의한 추정 통계량입니다. 후자의 불편성에는 별도 iid 표본 전제가 필요합니다.

The finite-law variance is (1+1)/2=1. The n−1 statistic is 2/(2−1)=2. These are different defined objects; an unbiasedness claim for the statistic requires a sampling premise.

11. 네 원자의 조건부 평균Conditional means of four atoms

(A, 0),(A, 2),(B, 2),(B, 4)에 각각 확률 1/4을 줍니다. P(A), f(A), f(B)와 각 집단의 잡음분산을 구하세요.

Give probability 1/4 to (A, 0), (A, 2), (B, 2), (B, 4). Find P(A), f(A), f(B) and each conditional noise variance.

풀이와 확인할 이유Solution and explanation

P(A)=1/2입니다. 조건부 두 값은 같은 확률이므로 f(A)=1, f(B)=3입니다. 각 집단의 편차는 ±1이라 두 잡음분산은 모두 1입니다.

P(A)=1/2. Each conditional pair is equiprobable, giving f(A)=1, f(B)=3 and both noise variances one.

12. 주변 결과 분산Marginal outcome variance

(A, 0),(A, 2),(B, 2),(B, 4)가 각각 1/4인 법칙에서 X를 무시한 Y의 평균·분산을 구하고 총분산으로 확인하세요.

For four equal atoms (A, 0), (A, 2), (B, 2), (B, 4), find marginal Y mean/variance and check total variance.

풀이와 확인할 이유Solution and explanation

Y 평균은 2이고 분산은 (4+0+0+4)/4=2입니다. 평균 조건부 분산 1과 조건부 평균 1,3의 분산 1을 더해도 2입니다.

Mean Y is two and variance (4+0+0+4)/4=2. Average conditional variance one plus variance one of conditional means also gives two.

13. 순서 표본과 평균의 확률Ordered samples and mean probabilities

(A, 0),(A, 2),(B, 2),(B, 4)가 각각 1/4이고 독립 복원 추출 n=2입니다. 순서 표 수와 Y 평균이 0 및 2일 확률을 구하세요.

Four atoms (A, 0), (A, 2), (B, 2), (B, 4) each have mass 1/4; draw n=2 iid with replacement. Count ordered tables and probabilities of sample means zero and two.

풀이와 확인할 이유Solution and explanation

표는 16개입니다. 평균 0은 두 번 모두 0인 한 경우로 1/16입니다. 평균 2는 (0,4),(4,0)의 두 원자쌍과 Y=2 원자 둘의 네 순서쌍이므로 6/16=3/8입니다. 서로 다른 평균이 균등하지 않습니다.

There are 16 tables. Mean zero has one pair and probability 1/16. Mean two comes from two 0/4 pairs and four pairs of the two distinct Y=2 atoms, giving 6/16=3/8. Distinct means are not equiprobable.

14. 상수 학습의 새 위험Fresh risk of pooled learning

네 같은 확률 원자 (A, 0),(A, 2),(B, 2),(B, 4)에서 두 번 iid 학습 후 전체 Y 평균을 모든 x에 예측합니다. A에서 편향·분산·독립 새 위험을 구하세요.

Draw two iid training observations from equal atoms (A, 0), (A, 2), (B, 2), (B, 4). Predict the pooled Y mean everywhere. At A find bias, variance and independent fresh risk.

풀이와 확인할 이유Solution and explanation

평균 예측 2와 f(A)=1의 차이는 1입니다. 예측 분산은 주변 Var(Y)/2=1이고 조건부 잡음은 1입니다. 따라서 새 위험은 1²+1+1=3입니다.

Mean prediction two differs from f(A)=1 by one. Prediction variance is marginal Var(Y)/2=1; conditional noise is one. Fresh risk is three.

15. 빈 집단의 질량Probability mass of an empty group

P(X=A)=P(X=B)=1/2에서 독립 복원 학습 n=2를 합니다. A가 비는 확률은 얼마인가요? 그 표를 버리고 성능을 계산하면 어떤 대상이 되나요?

With equal A/B input probabilities and two iid training draws, what is the probability of no A? What changes if those tables are discarded before scoring?

풀이와 확인할 이유Solution and explanation

확률은 (1/2)²=1/4입니다. 버리고 다시 정규화하면 A가 적어도 한 번 나온 사건에 조건부인 성능입니다. 전체 학습 법칙의 성능은 빈 경우의 선택 규칙까지 포함해야 합니다.

The probability is 1/4. Discarding and renormalizing gives performance conditional on observing A. Full-law performance must include the declared empty-group rule.

16. 학습 행이 0개일 때Zero training observations

네 원자 (A, 0),(A, 2),(B, 2),(B, 4)가 각각 1/4입니다. n=0이고 모든 입력에 고정 기준 2를 예측합니다. 예측 분산·전체 새 위험·훈련 MSE의 정의 여부를 구하세요.

Four atoms (A, 0), (A, 2), (B, 2), (B, 4) each have mass 1/4. With n=0, always predict prior two. Find prediction variance, overall fresh risk and whether training MSE is defined.

풀이와 확인할 이유Solution and explanation

예측은 고정되어 분산 0입니다. 각 집단에서 제곱편향 1과 잡음 1을 더해 새 위험은 2입니다. 훈련 평균의 분모는 0이므로 훈련 MSE는 미정의입니다. 이를 위험 0으로 표시하지 않습니다.

Prediction variance is zero. Each group has squared bias one and noise one, giving fresh risk two. Training MSE is undefined because its denominator is zero, not a valid zero-risk score.

17. 집단평균 A의 분해Decomposition for group A

네 같은 확률 원자 (A, 0),(A, 2),(B, 2),(B, 4), n=2 iid 학습에서 해당 집단의 Y 평균을 쓰고 빈 집단은 2를 예측합니다. A의 평균 예측·제곱편향·분산·새 위험을 구하세요.

Use equal atoms (A, 0), (A, 2), (B, 2), (B, 4), two iid training draws, within-group means and empty prior two. Find A’s mean prediction, squared bias, variance and fresh risk.

풀이와 확인할 이유Solution and explanation

K=0,1,2의 확률은 1/4, 1/2, 1/4입니다. 평균 예측은 2/4+3/4=5/4입니다. 제곱편향은 1/16, 분산은 13/16이고 잡음 1을 더한 위험은 15/8입니다. 빈 경우의 질량을 남겨 계산한 값입니다.

K=0,1,2 has probabilities 1/4, 1/2, 1/4. Mean prediction is 5/4, squared bias 1/16 and variance 13/16. Adding noise one gives 15/8, including all empty-group mass.

18. 집단평균의 훈련 점수Training score of group means

네 같은 확률 원자 (A, 0),(A, 2),(B, 2),(B, 4)에서 두 번 iid 학습 후 집단별 평균으로 같은 두 점을 평가합니다. 기대 훈련 MSE를 구하세요.

Draw twice iid from equal atoms (A, 0), (A, 2), (B, 2), (B, 4), fit group means and score the same two observations. Find expected training MSE.

풀이와 확인할 이유Solution and explanation

두 입력이 다를 확률 1/2에서는 각각 자기 값을 맞혀 오차 0입니다. 같을 확률 1/2에서는 집단 안 분산 1인 두 결과의 평균 적합 MSE 기대값이 1/2입니다. 전체 평균은 1/4입니다.

Different inputs occur with probability 1/2 and are fitted individually. Equal inputs occur with probability 1/2 and have expected fitted MSE 1/2 from conditional variance one. The overall expectation is 1/4.

19. 합친 원자의 원행 대응Lineage of a coalesced atom

0부터 번호를 붙인 원행이 (zero, null, 0),(B, −1, 2),(A, 3, 1),(B, −1, 3)이고 각 항은 (집단,결과,가중치)입니다. 양의 같은 원자는 처음 나타난 양의 질량 원행 순서로 합치고 번호를 붙입니다. 이때 원자 0·1의 확률과 원행 대응, 0질량 원행을 구하세요.

Zero-based original rows are (zero, null, 0), (B, −1, 2), (A, 3, 1), (B, −1, 3), denoting group/outcome/weight. Coalesce equal positive atoms in first-positive order. Give atom probabilities, original-row mappings and zero-mass positions.

풀이와 확인할 이유Solution and explanation

전체 양의 가중치는 6입니다. 원자 0은 (B,−1), 확률 5/6, 원행 [1,3]입니다. 원자 1은 (A,3), 확률 1/6, 원행 [2]입니다. 0질량 원행 [0]은 따로 남습니다. 원자 번호 0을 원행 0으로 읽지 않습니다.

Positive weight totals six. Atom zero is (B, −1), probability 5/6, original rows [1, 3]. Atom one is (A, 3), probability 1/6, row [2]. Original row [0] remains zero mass; atom zero is not original row zero.

20. 더 자유롭고 덜 흔들리는 반례A more flexible rule with smaller variance

같은 확률의 (A, 0),(A, 2),(B, 2),(B, 4)에서 n=2 iid 학습을 합니다. 상수 전체평균 규칙의 분산은 1, 빈 집단 기준 2인 집단평균 규칙의 분산은 각 x에서 13/16입니다. 이 값과 두 제곱편향 1,1/16으로 “복잡하면 항상 분산이 높다”를 평가하세요.

Under equal atoms (A, 0), (A, 2), (B, 2), (B, 4), train on two iid draws. Pooled-mean variance is one; group-mean variance with empty prior two is 13/16 at either input. Squared biases are one and 1/16. Evaluate “more complexity always means higher variance.”

풀이와 확인할 이유Solution and explanation

집단평균은 더 자유롭지만 분산이 1에서 13/16로 작아지고 제곱편향도 줄었습니다. 따라서 보편 명제는 거짓입니다. 고정 설계의 중첩 직교투영·등분산 같은 추가 조건에서 성립하는 차원별 분산 정리와 이 실험을 구별해야 합니다.

The more flexible group rule has both smaller variance and squared bias, so the universal claim is false. Distinguish this random-design experiment from the conditional variance theorem for fixed-design nested orthogonal projections with homoscedastic noise.

21. 상수의 최소 제곱손실Minimum constant squared loss

가정 훈련 결과는 0,2,0,2이고 가중치는 모두 1입니다. 모든 입력에 같은 상수를 쓸 때 최소 상수·SSE·MSE를 구하세요.

Training outcomes are 0, 2, 0, 2 with unit weights. Find the minimizing common constant, SSE and MSE.

풀이와 확인할 이유Solution and explanation

평균 1이 유일한 최소 상수입니다. 네 제곱잔차가 모두 1이므로 SSE 4, MSE 1입니다. 유일성은 전체 가중치 4가 양수여서 따릅니다.

The unique minimizing constant is mean one. Four squared residuals of one give SSE four and MSE one; uniqueness follows from positive total weight.

22. 절단점의 등호Equality at a cut

훈련 (x,y)=(-1,0),(0, 2),(1, 0),(2, 2), 같은 가중치에서 절단점 0을 씁니다. 등호는 위 구간입니다. 두 예측 상수와 전체 MSE를 구하세요.

Use training pairs (−1, 0), (0, 2), (1, 0), (2, 2), unit weights and cut zero. Equality enters the upper bin. Find both constants and overall MSE.

풀이와 확인할 이유Solution and explanation

x<0에는 결과 0 하나, x≥0에는 2,0,2가 있어 상수는 0과 4/3입니다. SSE는 8/3, MSE는 2/3입니다. x=0을 왼쪽으로 넣으면 다른 모형 규약입니다.

The lower bin contains outcome zero; the upper contains 2, 0, 2. Means are zero and 4/3, SSE 8/3 and MSE 2/3. Putting equality below the cut changes the rule.

23. 훈련을 모두 맞히기Fit each training input

훈련 (−1, 0),(0, 2),(1, 0),(2, 2)에 절단점 0,1,2를 쓰고 등호를 위 구간에 넣습니다. 예측과 MSE를 구하고 새 결과 오차도 0인지 설명하세요.

Fit pairs (−1, 0), (0, 2), (1, 0), (2, 2) with cuts zero, one, two and upper-bin equality. Find training predictions/MSE and decide whether fresh error must be zero.

풀이와 확인할 이유Solution and explanation

각 구간에 하나씩 들어가 예측 0,2,0,2와 훈련 MSE 0입니다. 새 결과의 법칙을 주지 않았으므로 새 오차가 0이라고 결론내릴 수 없습니다.

Each bin contains one point, giving training predictions 0, 2, 0, 2 and MSE zero. No fresh-outcome law was supplied, so future error need not vanish.

24. 같은 입력의 상충 결과Conflicting labels at one input

훈련 표의 두 행은 모두 x=0이고 결과는 0과 2, 가중치는 1입니다. 결정적 함수 h(x)가 두 결과를 동시에 맞힐 수 있나요? 최소 MSE도 구하세요.

Two training rows both have x=0 but outcomes zero and two, with unit weights. Can a deterministic function fit both exactly? Find minimum MSE.

풀이와 확인할 이유Solution and explanation

같은 입력에서 함수값은 하나여야 하므로 동시에 맞힐 수 없습니다. h(0)=1일 때 두 제곱오차는 1,1이며 최소 MSE는 1입니다. 복잡도 증가만으로 정보의 상충이 사라지지 않습니다.

A deterministic function has one value at zero, so cannot match both. At h(0)=1 both squared losses equal one; minimum MSE is one. More complexity does not remove conflicting outcomes.

25. 고정 평가표의 역전Reversal on a fixed evaluation table

훈련은 (−1, 0),(0, 2),(1, 0),(2, 2), 평가는 (−1/2,1),(1/2,1),(3/2,1),(5/2,1)입니다. 가중치는 모두 1이고 절단점과 같은 x는 위 구간에 넣습니다. 훈련 상수 1과 절단점 0,1,2의 네 평균을 평가표에서 비교하세요.

Training pairs are (−1, 0), (0, 2), (1, 0), (2, 2); evaluation pairs (−1/2,1), (1/2,1), (3/2,1), (5/2,1). Use unit weights and upper-bin equality at each cut. Compare the training-fitted constant one and four-bin fit at cuts zero/one/two.

풀이와 확인할 이유Solution and explanation

상수의 평가 MSE는 0입니다. 네 구간 예측은 0,2,0,2라 각 평가 제곱오차가 1이고 MSE는 1입니다. 훈련에서는 네 구간이 0으로 더 작지만 이 고정 평가표에서는 반대입니다.

The constant has evaluation MSE zero. Four-bin predictions 0, 2, 0, 2 each miss evaluation outcome one by one squared unit, giving MSE one. Its superior training score reverses on this fixed evaluation table.

26. 빈 구간 전체 최소해All minimizers for an empty bin

훈련 (−1, 0),(1,2)에 절단점 0,2를 둡니다. x≥2 구간의 훈련 최소 예측집합은 무엇인가요? 고정 기준 3을 택하면 참 평균도 3인가요?

Train on (−1, 0), (1,2) with cuts zero and two. What is the full minimizing prediction set in x≥2? Does choosing fallback three identify its true mean?

풀이와 확인할 이유Solution and explanation

그 구간의 훈련 질량은 0이므로 모든 실수가 최소입니다. 선택 기준 3은 재현 가능한 규칙 하나를 완성할 뿐 참 조건부 평균을 식별하지 않습니다.

The bin has zero training mass, so every real value minimizes its contribution. Fallback three completes a reproducible rule without identifying the true conditional mean.

27. 가중 평균의 전개Expand around a weighted mean

한 구간의 유한 yᵢ와 wᵢ≥0, W=Σwᵢ>0를 주고 μ=Σwᵢyᵢ/W로 둡니다. 임의 a에 대해 제곱합이 μ의 제곱합+W(a−μ)²임을 보이세요.

For finite yᵢ, weights wᵢ≥0 with W>0, let μ=Σwᵢyᵢ/W. Prove that squared loss at a equals loss at μ plus W(a−μ)².

풀이와 확인할 이유Solution and explanation

yᵢ−a=(yᵢ−μ)+(μ−a)를 제곱합니다. 교차항은 2(μ−a)Σwᵢ(yᵢ−μ)=0이고 마지막 항은 W(a−μ)²입니다. W>0이므로 최소는 a=μ 한 점입니다.

Expand yᵢ−a=(yᵢ−μ)+(μ−a). The cross term vanishes because the weighted residual sum is zero. The remaining increment W(a−μ)² is uniquely minimized at a=μ.

28. 중첩과 비중첩 절단점Nested and non-nested cut sets

같은 완전행·가중치·제곱손실에서 절단점 집합 {0}과 {−1,0,1}을 비교합니다. 최소 훈련손실의 방향을 증명하세요. {0}과 {1}에도 같은 포함 증명이 되나요?

On the same complete rows, weights and squared loss, compare cuts {0} and {−1,0,1}. Prove the training-minimum direction. Does the same inclusion proof apply to {0} and {1}?

풀이와 확인할 이유Solution and explanation

모든 옛 구간을 더 나눈 큰 모형은 작은 모형 예측을 그대로 재현할 수 있어 최소 훈련손실은 커지지 않습니다. {0}과 {1}은 일반적으로 서로의 함수집합을 포함하지 않아 그 증명을 적용할 수 없습니다.

The refined model can reproduce every old constant by assigning it to its sub-bins, so its minimum training loss cannot increase. Cuts {0} and {1} generally define non-nested classes; this inclusion proof does not apply.

29. 행을 바꾸면 정리의 분모도 바뀐다Changing rows changes the comparison

모형 A는 x=0의 두 결과 0,2에 상수를 적합합니다. 더 자유로운 두 구간 모형 B는 절단점 1을 쓰지만 x=0의 결과 0,2,100으로 다른 표를 적합합니다. 두 MSE를 구하고 중첩 단조 정리의 반례인지 설명하세요.

Model A fits a constant to two outcomes zero and two at x=0. More flexible model B has cut one but fits another table: outcomes 0, 2, 100, all at x=0. Find both MSEs and assess whether this refutes nested training monotonicity.

풀이와 확인할 이유Solution and explanation

A의 평균은 1, MSE 1입니다. B의 가용 구간 평균은 34이고 SSE는 6536, MSE는 6536/3입니다. 서로 다른 행·목적함수를 비교했으므로 같은 자료에서의 중첩 정리를 반박하지 않습니다.

A has mean one and MSE one. B’s occupied-bin mean is 34, SSE 6536 and MSE 6536/3. Different records mean different objectives; the same-data nested theorem is not contradicted.

30. 0 질량은 0 위험이 아니다Zero mass is not zero risk

두 원행의 결과 2,4와 가중치 0,0을 주었습니다. 가중 평균 위험 Σwᵢ(yᵢ−a)²/Σwᵢ를 0이라고 보고해도 되나요? 비정규화 제곱합과도 구별하세요.

Two records have outcomes two/four and weights zero/zero. May normalized weighted risk be reported as zero? Distinguish the unnormalized squared sum.

풀이와 확인할 이유Solution and explanation

분모가 0이므로 가중 평균 위험은 미정의입니다. 비정규화 합은 모든 a에서 0이지만, 그 사실이 0/0인 평균을 정의하지는 않습니다. 모든 원행은 0질량으로 남길 수 있습니다.

Normalized risk is undefined because total weight is zero. The unnormalized sum is zero for every a, but that does not define its 0/0 average. Preserve the zero-mass positions.

31. 표본평균의 전제Premises of a sample-mean variance

Y₁,…,Yₙ은 iid, n≥1, 평균 μ, 유한 분산 σ²입니다. E[Ȳ]와 Var(Ȳ)를 구하고 같은 집단의 의존 자료에 분산식을 바로 붙일 수 있는지 설명하세요.

Let Y₁,…,Yₙ be iid with n≥1, mean μ and finite variance σ². Find E[Ȳ], Var(Ȳ), and explain whether the variance formula automatically applies to dependent clustered records.

풀이와 확인할 이유Solution and explanation

선형성으로 기대값은 μ입니다. 독립 때문에 교차 공분산이 0이므로 분산은 nσ²/n²=σ²/n입니다. 의존 자료에는 공분산 항이 남을 수 있어 같은 식을 자동 적용하지 않습니다.

Linearity gives expectation μ. Independence removes cross-covariances, leaving variance σ²/n. Dependent records can retain covariance terms, so the shortcut is not automatic.

32. 축소 비율 절반의 오차Risk at one-half shrinkage

iid 평균 실험에서 μ=2,σ²=4,n=4,고정 a=0,α=1/2입니다. δα=αȲ+(1−α)a의 편향·분산·평균 표적 MSE를 구하세요.

In an iid mean experiment, μ=2, σ²=4, n=4, fixed a=0 and α=1/2. For δα=αȲ+(1−α)a find bias, variance and mean-target MSE.

풀이와 확인할 이유Solution and explanation

편향은 (1/2)(−2)=−1, 분산은 (1/4)(4/4)=1/4입니다. MSE는 1+1/4=5/4입니다.

Bias is −1, variance 1/4 and MSE 1+1/4=5/4.

33. 비율 전체를 최적화한다Optimize the entire weight interval

고정 α∈[0,1]에 대한 위험이 4(1−α)²+α²입니다. 전체 최소해와 최소값을 구하세요.

For fixed α∈[0,1], risk is 4(1−α)²+α². Find the entire minimizing set and minimum.

풀이와 확인할 이유Solution and explanation

5α²−8α+4=5(α−4/5)²+4/5입니다. 유일한 해는 {4/5}, 최소값은 4/5입니다. 유한한 조회격자의 최소와 연속 구간의 최소를 구별합니다.

Complete the square: 5(α−4/5)²+4/5. The unique optimizer is {4/5} and minimum 4/5. A finite query-grid minimum need not equal the continuous optimum.

34. 0 분산의 경계The zero-variance boundary

예측 규칙은 δα=αȲ+(1−α)a이며 a는 고정된 기준, α∈[0,1]입니다. iid 평균 실험에서 μ=2,a=0,σ²=0,n=4이고 α∈[0,1]입니다. 평균 표적 위험과 전체 최적 α를 구하세요.

In an iid mean experiment with sample size n, the prediction rule is δα=αȲ+(1−α)a, with fixed anchor a and α∈[0,1]. Let μ=2, fixed a=0, σ²=0, n=4 and α∈[0,1]. Find mean-target risk and its full optimizer set.

풀이와 확인할 이유Solution and explanation

위험은 4(1−α)²이므로 α=1만 최적이고 최소값 0입니다. 분산이 0이라는 사실만으로 모든 비율이 최적이 되지는 않습니다.

Risk is 4(1−α)², uniquely minimized at one with value zero. Zero variance alone does not make every weight optimal.

35. 정확한 기준의 경계An exactly correct anchor

예측 규칙은 δα=αȲ+(1−α)a이며 a는 고정된 기준, α∈[0,1]입니다. iid 평균 실험에서 μ=a=2,σ²=4,n=4,α∈[0,1]입니다. 평균 표적 위험과 최적 α를 구하고 현실의 무조건 처방인지 설명하세요.

The prediction rule is δα=αȲ+(1−α)a, with fixed anchor a and α∈[0,1]. In an iid mean experiment, μ=a=2, σ²=4, n=4, α∈[0,1]. Find mean-target risk and optimum, and interpret its scope.

풀이와 확인할 이유Solution and explanation

편향은 0이고 위험은 α²입니다. 최적은 0입니다. 표적을 이미 정확히 주었다는 가정의 결과이며, 일반적인 실제 문제에서 자료를 버리라는 처방이 아닙니다.

Bias is zero and risk α², minimized at zero. This assumes the exact target was supplied; it is not a general recommendation to discard data.

36. 새 결과를 예측할 때의 최적The optimum for a fresh response

예측 규칙은 δα=αȲ+(1−α)a이며 a는 고정된 기준, α∈[0,1]입니다. μ=2,σ²=4,n=4,a=0인 iid 평균 실험에서 새 결과는 학습과 독립이며 같은 평균·분산을 갖습니다. 평균 표적 최적 α=4/5를 새 결과 위험도 최소화하나요? 최소 위험도 구하세요.

In an iid mean experiment with sample size n, the prediction rule is δα=αȲ+(1−α)a, with fixed anchor a and α∈[0,1]. With μ=2, σ²=4, n=4, a=0, a fresh response is independent of training and has the same mean/variance. Does mean-optimal α=4/5 also minimize fresh-response risk? Find that minimum.

풀이와 확인할 이유Solution and explanation

새 위험은 평균 위험에 α와 무관한 4를 더합니다. 따라서 같은 4/5가 유일한 최적이고 최소 새 위험은 4/5+4=24/5입니다.

Fresh risk adds constant four, preserving the unique optimum 4/5. Minimum fresh risk is 24/5.

37. 표본 크기 증가Increasing the sample size

μ=2,σ²=4,a=0인 iid 평균 실험에서 n=16입니다. αȲ+(1−α)a의 최적 α와 최소 평균 위험을 구하세요.

For iid mean estimation with μ=2, σ²=4, a=0 and n=16, find optimal α and minimum mean-target risk.

풀이와 확인할 이유Solution and explanation

B=4,V=1/4이므로 α*=4/(17/4)=16/17입니다. 최소 위험은 BV/(B+V)=1/(17/4)=4/17입니다.

B=4 and V=1/4 give α*=16/17 and minimum BV/(B+V)=4/17.

38. 무작위 기준을 상수처럼 쓰면A random anchor cannot be treated as fixed

한 학습값 Y는 −1,1을 각각 확률 1/2로 갖습니다. μ=0,n=1,기준을 a=Y로 선택하고 α=1/2로 둡니다. δ의 분산을 구하고 고정 a 공식을 그대로 쓰면 왜 틀리는지 설명하세요.

One training value Y is equally likely −1 or one. Let μ=0, n=1, choose anchor a=Y and set α=1/2. Find variance of δ and explain why the fixed-anchor formula cannot be used unchanged.

풀이와 확인할 이유Solution and explanation

δ=Y/2+Y/2=Y이므로 분산은 1입니다. 기준이 같은 무작위 자료라 자체 분산·공분산이 남습니다. 이를 고정 기준처럼 처리해 α²Var(Y)=1/4만 보고하면 틀립니다.

δ=Y, so variance is one. The data-dependent anchor contributes variance and covariance. Reporting only α²Var(Y)=1/4 wrongly treats it as fixed.

39. 전체 구간이 최소일 때When the entire interval minimizes risk

예측 규칙은 δα=αȲ+(1−α)a이며 a는 고정된 기준, α∈[0,1]입니다. μ=a=3,σ²=0,n=5,α∈[0,1]인 iid 평균 실험입니다. 전체 최적 α집합과 최소 평균 위험을 구하세요.

The prediction rule is δα=αȲ+(1−α)a, with fixed anchor a and α∈[0,1]. Assume μ=a=3, σ²=0, n=5 and α∈[0,1] for iid mean estimation. Give the full optimizer set and minimum target risk.

풀이와 확인할 이유Solution and explanation

편향·분산이 모든 α에서 0이므로 전체 [0,1]이 최소해이며 최소값 0입니다. 0/0 공식을 계산하거나 임의로 α=1만 유일해라고 쓰지 않습니다.

Every α has zero bias and variance. The entire interval [0,1] minimizes risk zero. Do not evaluate 0/0 or label one selected endpoint unique.

40. 복원과 비복원은 다른 법칙With and without replacement differ

고정 프레임 값은 0,2,2,4입니다. 두 값을 균등 추출한 평균의 분산을 독립 복원과 균등 비복원에서 각각 구하세요. 표적은 고정 프레임 평균입니다.

A fixed frame contains 0, 2, 2, 4. Find variance of a two-draw sample mean under iid replacement and uniform sampling without replacement. Target the fixed frame mean.

풀이와 확인할 이유Solution and explanation

μ_F=2, v_F=2입니다. 복원은 v_F/n=1, 비복원은 2×(4−2)/(2×3)=2/3입니다. 서로 다른 설계이며 이 변동을 이미 완전관측한 프레임 평균 자체의 불확실성으로 바꾸지 않습니다.

Frame mean is two and variance v_F=2. With replacement gives one; without replacement gives 2(4−2)/(2×3)=2/3. These are different designs, not new uncertainty in the already observed frame mean.

41. 두 위치의 고정 평활기A fixed smoother at two locations

이 문항의 예측은 Ŷ=HY입니다. f=(1, 3), H의 모든 원소는 1/2, Ω=I₂입니다. Y=f+ε, Eε=0이고 H는 고정입니다. 평균 예측·편향·평균 예측 분산을 구하세요.

Use prediction Ŷ=HY. Let f=(1, 3), H have every entry 1/2 and Ω=I₂. Y=f+ε, Eε=0, with fixed H. Find mean prediction, bias and average prediction variance.

풀이와 확인할 이유Solution and explanation

Hf=(2, 2), 편향은 (1, −1)입니다. HΩHᵀ의 모든 원소는 1/2여서 평균 예측 분산은 1/2입니다. 서로 같은 평균을 내는 두 예측은 상관되어 있으므로 공분산도 1/2입니다.

Mean prediction is (2, 2), bias (1, −1). Every covariance entry is 1/2, so average prediction variance is 1/2. Their covariance is also 1/2 because both predictions are the same average.

42. 두 위치의 훈련과 새 결과Training and fresh outcomes at two locations

이 문항의 예측은 Ŷ=HY입니다. f=(1, 3), H의 모든 원소 1/2, Ω=I₂입니다. Y=f+ε이고 학습·새 잡음의 평균은 모두 0입니다. 같은 Y로 적합·평가하는 훈련 MSE 기대값과 독립 새 Y′=f+ε′, Cov(ε′)=I₂의 평균 MSE를 구하세요.

Use prediction Ŷ=HY. Take f=(1, 3), all entries of H equal 1/2 and Ω=I₂. Let Y=f+ε with both training and fresh noises mean-zero. Find expected reused training MSE and MSE for independent fresh Y′=f+ε′ with covariance I₂.

풀이와 확인할 이유Solution and explanation

평균 제곱편향은 1입니다. 훈련 잡음 항은 tr(I−H)/2=1/2여서 훈련 기대 MSE는 3/2입니다. 새 위험은 1+1/2+1=5/2입니다. 차이는 1로서 2tr(HΩ)/n과 같습니다.

Average squared bias is one. Training noise contributes 1/2, giving 3/2. Fresh risk is 1+1/2+1=5/2. Difference one equals 2tr(HΩ)/n.

43. 비대칭 H의 낙관 항Optimism for a nonsymmetric H

이 문항의 예측은 Ŷ=HY입니다. f=(0, 0), H=[[1,1],[0,0]], Ω=[[2,1],[1,2]]를 고정합니다. Y=f+ε와 독립 새 Y′=f+ε′에서 두 잡음의 평균은 0, 공분산은 모두 Ω라고 가정합니다. tr(HΩ), 새 위험, 훈련 기대 MSE와 차이를 구하세요.

Use prediction Ŷ=HY. Fix f=(0, 0), H=[[1,1],[0,0]], Ω=[[2,1],[1,2]]. Let Y=f+ε and independent fresh Y′=f+ε′ have mean-zero noises with the same covariance Ω. Find tr(HΩ), fresh risk, expected training MSE and their difference.

풀이와 확인할 이유Solution and explanation

HΩ=[[3,3],[0,0]]이므로 trace는 3입니다. HΩHᵀ의 trace는 6, Ω의 trace는 4여서 새 위험은 (6+4)/2=5입니다. (I−H)Ω(I−H)ᵀ의 trace는 4여서 훈련 기대값은 2, 차이는 3입니다. H의 대칭성이 없어도 일반 항등식은 맞습니다.

HΩ has trace three. Prediction covariance has trace six and Ω trace four, so fresh risk is five. Residual covariance has trace four, giving training expectation two and difference three. The general identity does not require symmetric H.

44. 임의 H에서 음수 차이A negative difference for arbitrary H

이 문항의 예측은 Ŷ=HY입니다. n=2, f=0, Ω=I₂, 고정 H=−I₂입니다. Y=f+ε와 독립 새 Y′=f+ε′의 두 잡음은 평균 0, 공분산 Ω입니다. 훈련·새 MSE와 낙관 차이를 구하세요.

Use prediction Ŷ=HY. Let n=2, f=0, Ω=I₂ and fixed H=−I₂. Let Y=f+ε and independent fresh Y′=f+ε′ have mean-zero noises with covariance Ω. Find expected training/test MSE and their difference.

풀이와 확인할 이유Solution and explanation

훈련 잔차는 2ε여서 기대 MSE 4입니다. 예측 분산 평균 1과 새 잡음 1을 더한 새 위험은 2입니다. 차이 −2=2tr(−I₂)/2입니다. 임의 선형 규칙의 대수이며 직교투영 최소제곱과 다릅니다.

Training residual is 2ε, giving MSE four. Prediction variance one plus new noise one gives fresh risk two. Difference −2 equals the trace identity; this arbitrary linear rule is not an orthogonal least-squares projection.

45. 투영 차원 정리Projection dimension identity

이 문항의 예측은 Ŷ=PY입니다. P=Pᵀ=P²인 n×n 고정 직교투영, Y=f+ε, Cov(ε)=Ω=σ²Iₙ, σ²≥0, n≥1입니다. 평균 예측 분산이 σ²rank(P)/n임을 증명하고 σ²=0 경계를 설명하세요.

Use prediction Ŷ=PY. Let P=Pᵀ=P² be a fixed n×n orthogonal projection with Y=f+ε, Cov(ε)=Ω=σ²Iₙ, σ²≥0 and n≥1. Prove average prediction variance σ²rank(P)/n and explain zero noise.

풀이와 확인할 이유Solution and explanation

PΩPᵀ=σ²P이고 투영 고유값은 0 또는 1이므로 trace(P)=rank(P)입니다. 대각 합을 n으로 나누면 결론입니다. σ²=0이면 차원과 무관하게 분산은 0이며 엄격한 증가를 주장할 수 없습니다.

PΩPᵀ=σ²P. Projection eigenvalues are zero/one, so trace equals rank. Divide by n. At zero noise all dimensions have variance zero; strict increase is not guaranteed.

46. 세 투영의 새 위험Fresh risks for three projections

이 문항의 예측은 Ŷ=HY입니다. f=(0, 0, 2, 2), Ω=I₄입니다. H₁은 모든 원소 1/4, H₂는 쌍 {1,2}·{3,4} 안 원소 1/2와 그밖의 0, H₄=I₄입니다. Y=f+ε와 독립 새 Y′=f+ε′의 두 잡음은 평균 0, 공분산 Ω입니다. 고정 H마다 평균 제곱편향·분산·새 위험을 구하세요.

Use prediction Ŷ=HY. Let f=(0, 0, 2, 2), Ω=I₄. H₁ has all entries 1/4; H₂ has 1/2 within pairs {1,2}/{3,4} and zero elsewhere; H₄=I₄. Let Y=f+ε and independent fresh Y′=f+ε′ have mean-zero noises with covariance Ω. Find average squared bias, prediction variance and fresh risk for each fixed H.

풀이와 확인할 이유Solution and explanation

차원은 1,2,4이며 제곱편향은 1, 0, 0입니다. 분산은 1/4, 1/2, 1이고 새 잡음은 모두 1입니다. 새 위험은 9/4, 3/2, 2이므로 중간 모형이 이 세 후보 중 작습니다.

Dimensions are 1, 2, 4; squared biases 1, 0, 0 and variances 1/4, 1/2, 1. Adding new noise one gives 9/4, 3/2, 2. The middle candidate wins under these premises.

47. 모형 목록은 같고 신호가 다를 때Same model list, different signal

이 문항의 예측은 Ŷ=HY입니다. f=(0, 0, 0, 0), Ω=I₄입니다. H₁은 전체 평균 J₄/4, H₂는 앞 두 행·뒤 두 행의 각각 평균, H₄=I₄입니다. Y=f+ε와 독립 새 Y′=f+ε′의 두 잡음은 평균 0, 공분산 Ω입니다. 새 위험을 비교하고 보편 U자 모양인지 답하세요.

Use prediction Ŷ=HY. Let f=(0, 0, 0, 0), Ω=I₄; H₁ averages all four, H₂ averages the first/last pair, H₄ is identity. Let Y=f+ε and independent fresh Y′=f+ε′ have mean-zero noises with covariance Ω. Compare fresh risks and assess a universal U shape.

풀이와 확인할 이유Solution and explanation

모든 편향은 0이고 분산 1/4, 1/2, 1에 잡음 1을 더해 5/4,3/2,2입니다. 이 목록에서는 계속 커집니다. 단순한 U자 그림은 모든 참 함수의 정리가 아닙니다.

All biases vanish. Variances 1/4, 1/2, 1 plus noise one give 5/4, 3/2, 2, an increasing sequence. One U-shaped illustration is not a theorem for every truth.

48. 잡음 없는 동률Exact ties with no noise

이 문항의 예측은 Ŷ=HY입니다. f=(0, 0, 2, 2), Ω=0입니다. H₁은 전체 평균 J₄/4, H₂는 앞 두 값·뒤 두 값의 각각 평균, H₄=I₄입니다. Y=f+ε와 독립 새 Y′=f+ε′의 두 잡음은 평균 0, 공분산 Ω입니다. 새 위험과 전체 최소 후보집합을 구하세요.

Use prediction Ŷ=HY. Let f=(0, 0, 2, 2), Ω=0; H₁ averages all four, H₂ averages each consecutive pair, H₄ is identity. Let Y=f+ε and independent fresh Y′=f+ε′ have mean-zero noises with covariance Ω. Find fresh risks and the complete minimizing candidate set.

풀이와 확인할 이유Solution and explanation

모든 분산·잡음이 0이므로 위험은 제곱편향 1, 0, 0입니다. 최소 후보는 {H₂,H₄} 전체이며 정확한 동률입니다. 표시 반올림 때문에 비슷해진 수가 아닙니다.

All variance/noise terms vanish, leaving risks 1, 0, 0. The complete minimizing set is {H₂,H₄}, an exact tie rather than a display-rounding coincidence.

49. 결과에 적응한 행렬An outcome-adaptive matrix

n=1, f=0이고 Y=ε=−1 또는 1이 같은 확률입니다. 결과를 보고 스칼라 H(Y)=Y로 정한 뒤 Ŷ=H(Y)Y로 예측합니다. E[Ŷ]와 고정 H 공식 Hf를 비교하세요.

Let n=1, f=0 and Y=ε be equally likely −1 or one. After seeing Y, choose scalar H(Y)=Y and predict H(Y)Y. Compare E[Ŷ] with the fixed-H shortcut Hf.

풀이와 확인할 이유Solution and explanation

Ŷ=Y²=1이므로 기대값은 1입니다. Hf는 f=0 때문에 0입니다. H가 잡음에 의존하므로 E[Hε]=0이라고 꺼낼 수 없으며 고정 H 평균 공식을 적용한 것이 잘못입니다.

Prediction equals Y²=1, so expectation is one; Hf is zero. H depends on noise, making E[Hε] nonzero. The fixed-H shortcut is inapplicable.

50. 고정 설계와 무작위 설계Fixed and random designs

n은 양의 정수이며 H(X)는 n×n 행렬입니다. Y=f(X)+ε, f(X)=E[Y|X], 예측 Ŷ=H(X)Y로 둡니다. 필요한 조건부 이차 모멘트와 E[‖Ŷ‖²]는 유한하다고 가정합니다. H가 입력 X만으로 정해지고 E[ε|X]=0, Cov(ε|X)=Ω(X)이며 새 잡음도 조건부 평균 0·공분산 Ω(X)이며 X에 조건부로 학습과 독립입니다. 고정-X 공식을 조건부로 쓸 수 있나요? X까지 평균한 분산은 무엇을 더 따져야 하나요?

Let n be a positive integer and H(X) an n×n matrix. Set Y=f(X)+ε, f(X)=E[Y|X] and prediction Ŷ=H(X)Y. Assume the required conditional second moments and E[‖Ŷ‖²] are finite. Suppose H depends only on X, E[ε|X]=0, Cov(ε|X)=Ω(X), and fresh noise also has conditional mean zero and covariance Ω(X), conditionally independent of training. Can fixed-X identities apply conditionally? What matters when averaging over X?

풀이와 확인할 이유Solution and explanation

X를 고정한 조건부 평균 H(X)f(X)와 공분산 H(X)Ω(X)H(X)ᵀ는 사용할 수 있습니다. X까지 무작위로 보면 평균 조건부 분산뿐 아니라 조건부 평균의 변동도 총분산에 들어갑니다. 서로 다른 반복의 확률 공간을 섞지 않습니다.

The conditional fixed-X mean and covariance formulas can apply. Averaging over random X also includes variation of the conditional mean through total variance, not just average conditional variance. Distinguish the repetition laws.

51. 미관측 임금이 남긴 표적 차이Different targets with unavailable wages

원임금 3,613행 중 가용 3,017행의 USD/시간 합은 86903/5이고 미관측은 596행입니다. 미관측 값을 모두 0 또는 모두 10으로 채운 두 가정 완성의 전체 평균을 쓰고, 실제 전체 평균이 식별되는지 답하세요.

Among 3,613 raw-wage positions, the 3,017 available USD/hour outcomes sum to 86903/5; 596 are unavailable. Write full-frame means under two hypothetical completions, all zero versus all ten, and assess identification.

풀이와 확인할 이유Solution and explanation

첫 평균은 86903/18065, 둘째는 116703/18065입니다. 두 값이 달라 관측만으로 전체 평균이 유일하게 정해지지 않습니다. 이 완성은 예시 가정이며 원 결측을 실제 0 또는 10으로 고쳤다는 뜻이 아닙니다.

The means are 86903/18065 and 116703/18065. Different compatible illustrative completions prevent unique identification. Neither completion is an observed correction of source missing values.

52. 첫 원시급의 기준 선택Choosing the first raw-wage anchor

1976년 첫 원행의 개인 코드는 2, 원시급은 548센트/시간입니다. USD/시간으로 환산하고, 이를 고정 재표집 기준으로 썼다고 실제 모집단 평균이나 현재 구매력이 알려지는지 설명하세요.

The first 1976 source row has person code two and raw wage 548 cents/hour. Convert to USD/hour, then explain whether using it as a fixed resampling anchor identifies population mean or current purchasing power.

풀이와 확인할 이유Solution and explanation

환산값은 137/25=5.48 USD/시간입니다. 같은 과거 관측의 단위 환산이며 물가 조정이나 모집단 평균 추정이 아닙니다. 새 조건부 재표집 실험에서 고정한 기준과 원 모집단의 독립 사전정보는 다릅니다.

The value is 137/25=5.48 historical USD/hour. It is a unit conversion, not price adjustment or population-mean identification. A fixed anchor in a new conditional resampling experiment is not verified independent prior information about the original population.

53. 완전관측 국가 평균A fully observed country mean

선택한 16국의 2024년 GDP 값이 모두 알려져 있습니다. v_F는 알려진 16개 값의 평균으로부터 제곱편차를 합해 16으로 나눈 프레임 분산입니다. 그 값에서 네 번 iid 복원 추출한 평균에 분산 v_F/4를 계산했습니다. 이것이 원래 16국 평균 자체의 실제 미관측 불확실성인가요?

All 2024 GDP values in a selected 16-country frame are known. Define v_F as the sum of squared deviations from the known frame mean divided by 16. A mean from four new iid replacement draws has variance v_F/4. Is this actual unobserved uncertainty in the original frame mean itself?

풀이와 확인할 이유Solution and explanation

아닙니다. 원 프레임 평균은 알려진 값의 고정 요약입니다. v_F/4는 별도로 선언한 추출 실험에서 새 평균 추정량이 흔들리는 정도입니다. 실제 국가의 표본 설계·대표성·시계열 불확실성은 별도 근거가 필요합니다.

No. The original frame mean is fixed and known. v_F/4 describes a newly declared sampling experiment, not verified national sampling, representativeness or time-series uncertainty.

54. 명목 네 구간과 실제 세 구간Four nominal bins, three observed bins

선택 국가의 기대수명은 모두 85년 미만이고 절단점은 75,80,85입니다. 앞 세 구간에는 각각 양의 질량을 가진 가용 관측이 하나 이상 있습니다. 마지막 구간의 기준을 0에서 100000으로 바꾸면 같은 원행의 훈련 MSE가 변하나요? x=90인 새 국가의 참 GDP 평균도 알 수 있나요?

All selected-country longevity values are below 85, with cuts 75, 80, 85. Each of the first three bins has at least one available positive-mass observation. If the final-bin fallback changes from zero to 100000, does same-row training MSE change? Is true GDP mean at a new x=90 identified?

풀이와 확인할 이유Solution and explanation

관측 마지막 구간의 질량이 0이므로 훈련 MSE는 변하지 않습니다. 명목 네 구간 중 자료가 적합한 구간은 세 개입니다. x=90의 참 평균은 이 프레임에서 주어지지 않았고 새 기준은 모형 선택일 뿐입니다.

Zero observed mass in the final bin leaves training MSE unchanged. Only three of four nominal bins are data-supported. The true mean at 90 is not supplied by this frame; a fallback remains a model choice.

55. 순서형 점수의 숫자 간격Numerical spacing of ordinal scores

품질 점수의 실제값이 5이고 두 예측이 4와 6입니다. 제곱손실을 비교하세요. 순서를 보존하는 재부호화 g(q)=q²를 실제값과 예측에 적용하면 동률이 유지되나요?

A quality score is five; predictions are four and six. Compare squared losses, then apply order-preserving recoding g(q)=q² to both outcomes and predictions. Is the tie preserved?

풀이와 확인할 이유Solution and explanation

원 척도에서는 두 손실이 모두 1입니다. 재부호화 뒤에는 실제 25와 예측 16,36이므로 손실 81과 121입니다. 순서만으로 같은 숫자 간격과 제곱손실의 의미가 보장되지는 않습니다. 이는 제곱손실을 금지하는 것이 아니라 선택한 척도를 명시하라는 뜻입니다.

Original losses are both one. Recoding gives truth 25, predictions 16/36 and losses 81/121. Ordinal order alone does not fix equal numerical spacing or squared-loss meaning. The lesson is to disclose the chosen scale, not prohibit a numerical model.

56. 반복 숫자와 관측 단위Repeated numbers and observation units

와인 원행 1과 5의 열두 측정 숫자가 같습니다. 생산기업·병·배치 식별자는 없습니다. 이 두 행이 같은 병의 중복 입력이라고 확정하고 한 행을 지워도 되나요?

Wine rows one and five share all 12 numeric fields, but no producer, bottle or batch identifier is supplied. May one be declared a duplicate entry of the same bottle and removed as a fact?

풀이와 확인할 이유Solution and explanation

같은 값 조합만으로 같은 실물 관측이라는 사실은 확인되지 않습니다. 원행을 보존하고 정확 반복 패턴이라는 확인 가능한 성질만 보고합니다. 실제 독립성·반복 측정 여부도 추가 자료 없이는 확정하지 않습니다.

Identical values do not establish the same physical observation. Preserve positions and report exact repeated patterns. Independence or repeated measurement also needs additional evidence.

57. 와인 적합 MSE의 감소Declining wine training MSE

같은 1,599개 와인 기록에서 고정 1·2·4구간의 제곱 점수 훈련 MSE가 약 0.652, 0.538, 0.504입니다. 이 세 값만으로 실제 모집단 편향·분산·새 제품 위험을 각각 알아냈나요?

On the same 1,599 wine records, predetermined one/two/four-bin training MSEs are approximately 0.652, 0.538, 0.504 in squared score units. Do these three values identify population bias, variance and fresh-product risk separately?

풀이와 확인할 이유Solution and explanation

같은 기록에서 더 자유로운 적합의 손실이 줄었다는 결과입니다. 참 함수·반복 학습 법칙·새 결과 분포를 모르므로 세 성분이나 미래 위험을 분리해 관측한 것은 아닙니다. 점수 척도·구간·평가 대상도 함께 보고해야 합니다.

They show reduced same-record fitting loss with greater flexibility. Without the true function, repetition law and fresh-outcome distribution, they do not separately observe bias, variance or future risk. Report score scale, bins and evaluation target.

58. 조회격자의 최소와 연속 최소Grid and continuous minima

α∈[0,1]에서 위험은 (1−α)²+4α²입니다. 조회점 0,1/2,1의 최소와 연속 구간의 전체 최소를 각각 구하세요.

Risk is (1−α)²+4α² on [0,1]. Find the minimum over query points 0, 1/2, 1 and the complete continuous optimum.

풀이와 확인할 이유Solution and explanation

조회 위험은 1,5/4,4여서 격자 최소는 α=0입니다. 전체 곡선은 5(α−1/5)²+4/5이므로 유일한 연속 최소는 α=1/5, 위험 4/5입니다. 그림의 조회점만으로 전체 최소를 정하지 않습니다.

Grid risks 1, 5/4, 4 select zero. Completing the square gives 5(α−1/5)²+4/5, so the continuous optimum is uniquely 1/5 with risk 4/5. A finite plot grid is not the complete optimizer.

59. 독립이 아닐 때의 교차항The covariance term without independence

고정 입력에서 예측 편향은 0, 예측 분산은 1, 평균 0의 새 잡음분산은 1이며 예측과 새 잡음의 공분산은 1/2입니다. 새 결과 제곱위험을 구하고 독립 공식과 비교하세요.

At fixed input, prediction bias is zero, prediction variance one, mean-zero fresh-noise variance one and their covariance 1/2. Find fresh-response risk and compare the independence formula.

풀이와 확인할 이유Solution and explanation

차의 제곱에 공분산 항 −2×(1/2)가 있어 위험은 1+1−1=1입니다. 공분산을 0으로 놓는 독립 공식의 값 2와 다릅니다. 필요한 조건을 빼면 항등식의 적용 대상이 달라집니다.

The squared difference includes −2Cov, giving 1+1−1=1 rather than the independence value two. Omitting the premise changes the applicable identity.

60. 계산 검증과 실증 결론Calculation checks versus empirical conclusions

가정 확률표의 편향·분산 항등식을 정확 분수로 검증했고 실제 선택 CSV의 모든 원필드·행 지문도 맞았습니다. 이것만으로 실제 자료의 iid·인과효과·새 환경 위험·영상 재생까지 검증했다고 보고해도 되나요?

Exact rational checks verify a declared-law decomposition and selected CSV fields/source hashes match. May this alone be reported as verifying actual iid sampling, causal effects, new-environment risk and video playback?

풀이와 확인할 이유Solution and explanation

수리 계산과 자료 대응을 검증한 범위만 보고합니다. iid·인과·새 환경에는 별도 설계·확률·정보 가정과 자료가 필요하고, 실제 화면·영상 재생은 별도 관찰입니다. 저자 검사와 독립 검토의 역할도 구분합니다.

Report the verified arithmetic and source correspondence. Actual iid sampling, causality and new environments need separate design, probability/information premises and evidence; live UI/media checks are separate observations. Author and independent-review roles also remain distinct.

자료와 출처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