METR-06 · ECONOMETRICS

함수 형태·제약 검정·오차와 진단Functional form, restrictions, errors and diagnostics

여섯 행의 휜 모양에서 공동 제약·같은 표본·행 삭제 진단까지From a six-row curve to joint restrictions, common samples and deletion diagnostics

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

기초Foundations

1. 같은 x에서 다른 y도 보존한다1. Keep different outcomes at the same x

설명용 여섯 행의 x는 −2, −1, 0, 0, 1, 2이고 y는 5, 2, 2, 0, 2, 5입니다. x=0인 두 행의 y는 2와 0입니다. 이를 평균 한 행으로 조용히 바꾸면 관측 수와 잔차의 분모가 달라집니다. 원래 여섯 행에서 시작합니다.

전부 가정한 여섯 행
행xy
1-25
2-12
302
400
512
625

왼쪽과 오른쪽이 높고 가운데가 낮으므로 직선 하나에는 없는 모양이 보입니다. 그렇다고 눈으로 본 U자만으로 모집단의 참 함수나 원인 관계를 확정할 수는 없습니다. 먼저 두 적합의 정확한 손실을 계산하고, 그다음 그 차이에 확률적 의미를 붙일 조건을 따집니다.

Our six assumed rows have x=−2, −1, 0, 0, 1, 2 and y=5, 2, 2, 0, 2, 5. The two x=0 rows have different outcomes, 2 and 0. Quietly replacing them by one average row changes the observation count and residual denominator. We retain all six rows.

Six wholly assumed observations
Rowxy
1-25
2-12
302
400
512
625

Both ends are high and the middle is low, suggesting a shape unavailable to a straight line. A visible U does not establish a population function or cause. First compute exact losses; then state assumptions needed to attach a sampling interpretation.

기초Foundations

2. 직선은 평균 8/3을 예측한다2. The straight line predicts the mean 8/3

여섯 y의 합은 16이고 평균은 8/3입니다. x의 합과 x·y의 합은 모두 0입니다. 절편과 x를 넣은 최소제곱 직선은 절편 8/3, 기울기 0을 갖습니다. 각 행의 잔차를 제곱해 더하면 58/3입니다. 이 값은 잔차 평균도 표준오차도 아닌 제곱합입니다.

y^i=8/3ei=yi−8/3SSER=∑iei2=58/3\begin{gathered}\hat y_i=8/3\\e_i=y_i-8/3\\SSE_R=\sum_i e_i^2=58/3\end{gathered}

같은 자료에서 다른 함수 모양과 비교할 기준선입니다. 상수 예측을 얻었다는 사실만으로 x가 아무 정보도 없다고 결론내리지 않습니다. 곡률이 있는 모양은 기울기 하나로 표현되지 않을 수 있습니다.

The six outcomes sum to 16, giving mean 8/3. Both the sum of x and the sum of xy are zero. Least squares with an intercept and x therefore gives intercept 8/3 and slope zero. Squaring and summing row residuals gives 58/3, a sum of squares rather than a mean residual or standard error.

y^i=8/3ei=yi−8/3SSER=∑iei2=58/3\begin{gathered}\hat y_i=8/3\\e_i=y_i-8/3\\SSE_R=\sum_i e_i^2=58/3\end{gathered}

This is a baseline on the same data. A zero fitted linear slope does not show that x contains no information: one slope may miss a curved relationship.

기초Foundations

3. 제곱 열을 더하면 잔차는 두 행에 남는다3. A squared column leaves residuals on two rows

열 1, x, x²를 넣으면 적합식은 1+x²입니다. 여섯 예측은 5, 2, 1, 1, 2, 5이고 잔차는 0, 0, 1, −1, 0, 0입니다. 그러므로 잔차 제곱합은 2입니다. 두 x=0 행을 그대로 남겼기에 완벽 적합이라고 하지 않습니다.

β^U=(1,0,1)TSSEU=12+(−1)2=2SSER−SSEU=52/3\begin{gathered}\hat\beta_U=(1,0,1)^T\\SSE_U=1^2+(-1)^2=2\\SSE_R-SSE_U=52/3\end{gathered}

예측이 x에 대해 휘어도 미지 계수에 대해서는 선형입니다. 그래서 다항식도 설계행렬 X를 만든 뒤 선형 최소제곱으로 계산할 수 있습니다. X의 열들이 독립이어야 계수의 유일한 값을 말할 수 있습니다.

Using columns 1, x and x² gives the fitted function 1+x². Predictions are 5, 2, 1, 1, 2, 5; residuals are 0, 0, 1, −1, 0, 0. The residual sum of squares is 2. Preserving the two x=0 rows prevents a false claim of perfect fit.

β^U=(1,0,1)TSSEU=12+(−1)2=2SSER−SSEU=52/3\begin{gathered}\hat\beta_U=(1,0,1)^T\\SSE_U=1^2+(-1)^2=2\\SSE_R-SSE_U=52/3\end{gathered}

A polynomial can curve in x while remaining linear in unknown coefficients. Build the design matrix and use linear least squares. Independent columns are needed for a unique coefficient vector.

기초Foundations

4. 기울기와 한 칸 변화는 다르다4. A derivative differs from a one-step contrast

f(x)=1+x²에서 x=0→1의 변화는 1이고 x=1→2는 3입니다. x=1의 미분계수는 2이지만 한 칸 변화는 3입니다. 순간 기울기에 큰 변화를 그냥 곱하지 않습니다. 일반 이차식은 제곱을 전개해 유한 차이를 바로 구할 수 있습니다.

f(x)=b0+b1x+b2x2f(x+h)−f(x)=b1h+b2(2xh+h2)f′(x)=b1+2b2x\begin{gathered}f(x)=b_0+b_1x+b_2x^2\\f(x+h)-f(x)=b_1h+b_2(2xh+h^2)\\f^{\prime}(x)=b_1+2b_2x\end{gathered}

x²는 같은 x에서 만든 열이므로 x를 바꾸며 x²를 고정한다는 비교는 이 함수의 변화가 아닙니다. 관측 범위 밖에 식을 연장하는 계산은 가능해도 그 예측의 실증적 신뢰성은 별도 문제입니다.

For f(x)=1+x², the change from 0 to 1 is 1, while the change from 1 to 2 is 3. The derivative at 1 is 2, not the one-step contrast 3. Expand the square to compute a finite difference exactly.

f(x)=b0+b1x+b2x2f(x+h)−f(x)=b1h+b2(2xh+h2)f′(x)=b1+2b2x\begin{gathered}f(x)=b_0+b_1x+b_2x^2\\f(x+h)-f(x)=b_1h+b_2(2xh+h^2)\\f^{\prime}(x)=b_1+2b_2x\end{gathered}

The squared column comes from the same x. Changing x while holding x² fixed does not describe this function. Extrapolation can be computed algebraically without establishing its empirical reliability.

기초Foundations

5. 중심을 옮겨도 같은 곡선을 쓸 수 있다5. Centering can describe the same curve

z=x−1로 놓으면 x=z+1입니다. 원식 1+x²를 전개하면 2+2z+z²입니다. 계수는 달라졌지만 원래 x에서의 예측은 같습니다. 절편만 보고 두 모형의 평균이 달라졌다고 하지 않습니다.

z=x−cb0+b1x+b2x2=a0+a1z+a2z2a0=b0+b1c+b2c2a1=b1+2b2ca2=b2\begin{gathered}z=x-c\\b_0+b_1x+b_2x^2=a_0+a_1z+a_2z^2\\a_0=b_0+b_1c+b_2c^2\\a_1=b_1+2b_2c\\a_2=b_2\end{gathered}

절편·일차·이차 열을 모두 유지한 가역 좌표변환에서는 같은 열공간이 됩니다. 한 열을 빼거나 다른 표본을 고르면 이 결론을 그대로 쓸 수 없습니다. 제약도 새 좌표에 맞춰 변환해야 같은 가설을 묻습니다.

Let z=x−1, so x=z+1. Expanding 1+x² gives 2+2z+z². Coefficients change while predictions at each original x remain identical. Different intercepts alone do not establish different fitted relationships.

z=x−cb0+b1x+b2x2=a0+a1z+a2z2a0=b0+b1c+b2c2a1=b1+2b2ca2=b2\begin{gathered}z=x-c\\b_0+b_1x+b_2x^2=a_0+a_1z+a_2z^2\\a_0=b_0+b_1c+b_2c^2\\a_1=b_1+2b_2c\\a_2=b_2\end{gathered}

Keeping the intercept and all powers under an invertible coordinate change preserves the column space. Dropping a column or changing the sample does not. Transform restrictions as well to ask the same hypothesis.

기초Foundations

6. 단위와 열의 수를 명시한다6. State units and count independent columns

u=(x−c)/s에서 s>0로 둡니다. x를 1,000단위로 바꾸면 일차 계수는 1,000배, 이차 계수는 1,000²배로 조정되어 같은 예측을 만들 수 있습니다. 큰 계수 자체가 큰 실질 효과의 증거는 아닙니다. 단위와 평가한 x를 함께 보고합니다.

차수 d의 원시 다항식은 절편을 포함하면 d+1열입니다. 그러나 서로 다른 x값이 적으면 이 열들이 독립이지 않을 수 있습니다. 여섯 행이 있어도 x가 두 값뿐이면 절편·x·x²의 세 계수를 유일하게 구할 수 없습니다. 이 장 엔진은 독립 열만 받아 모호한 계수를 임의로 선택하지 않습니다.

Define u=(x−c)/s with s>0. Changing x into units of 1,000 changes the first-power coefficient by 1,000 and the second-power coefficient by 1,000² to preserve predictions. Coefficient magnitude alone does not measure substantive importance; report units and the x at which a contrast is evaluated.

A degree-d raw polynomial has d+1 columns when it includes an intercept. Too few distinct x values can make them dependent. Six rows with only two distinct x values cannot identify three separate coefficients on 1, x and x². Our engine requires independent columns rather than silently choosing among ambiguous coefficients.

기초Foundations

7. 로그 차이는 원단위 평균 차이가 아니다7. A log contrast is not an arithmetic mean contrast

적합 로그가 6.0에서 6.1로 바뀌면 차이는 0.1입니다. 지수화한 두 적합 수준의 비는 exp(0.1)≈1.10517이므로 약 10.517% 높습니다. 10%라는 말은 작은 변화의 근사입니다. exp는 선형이 아니므로 로그를 평균낸 뒤 지수화한 값은 원금액 평균과 보통 다릅니다.

log⁡y=m(X)+uE[y∣X]=em(X)E[eu∣X]\begin{gathered}\log y=m(X)+u\\E[y\mid X]=e^{m(X)}E[e^u\mid X]\end{gathered}

오른쪽 기대값이 존재한다는 조건 아래의 식입니다. 로그 모형에 평균 0 오차를 넣는 것만으로 E[exp(u)|X]=1이 되지 않습니다. 실제 개인 사례는 원문에서 다듬은 로그 임금을 그대로 쓰며 원임금의 결측·이상값 처리와 동일시하지 않습니다.

A fitted log changing from 6.0 to 6.1 differs by 0.1. Exponentiated fitted levels have ratio exp(0.1)≈1.10517, about 10.517% higher. Calling it 10% is a small-change approximation. Because exponentiation is nonlinear, exponentiating a mean log generally does not yield the arithmetic mean amount.

log⁡y=m(X)+uE[y∣X]=em(X)E[eu∣X]\begin{gathered}\log y=m(X)+u\\E[y\mid X]=e^{m(X)}E[e^u\mid X]\end{gathered}

This identity requires the displayed conditional expectation to exist. Mean-zero log errors alone do not make E[exp(u)|X]=1. Our actual person example uses source-trimmed log wages as recorded, without equating their availability with raw-wage availability.

기초Foundations

8. 실습 A · 같은 x로 제곱 열을 만든다8. Lab A · Construct powers of the same x

먼저 여섯 기본 x에서 1, x, x²를 확인합니다. 중심을 1로 바꾸면 각 z=x−1과 제곱 열이 어떻게 바뀌는지 손으로 대조하세요. 양수 배율만 허용하며 미관측 값은 결측 행으로 남깁니다. 차수를 늘린 열이 자동으로 독립이거나 예측에 유용하다고 말하지 않습니다.

Inspect columns 1, x and x² for the six defaults. Move the center to 1 and check z=x−1 and its powers by hand. The scale must be positive and unavailable values remain unavailable rows. Extra powers are not automatically independent or predictively useful.

기초Foundations

9. 곡률을 0으로 둔다는 약속9. The promise of zero curvature

이차 모형의 계수 순서를 (절편, 일차, 이차)로 고정합니다. “직선”이라는 말은 셋째 계수를 0으로 두는 약속입니다. 따라서 행 R=(0, 0, 1), 목표 r=0으로 씁니다. 목표를 1로 바꾸면 이차 계수를 1에 고정하는 전혀 다른 가설입니다.

Rβ=rR=(0,0,1)r=0\begin{gathered}R\beta=r\\R=(0,0,1)\\r=0\end{gathered}

여러 행을 쌓으면 여러 선형 제약을 동시에 나타냅니다. R은 계수에 곱하는 행렬이지 원자료 X를 대체하는 자료가 아닙니다. 각 열의 의미와 계수 순서를 먼저 써야 엉뚱한 계수를 검사하지 않습니다.

Fix coefficient order as intercept, linear term, quadratic term. A straight line sets the third coefficient to zero: R=(0, 0, 1), target r=0. Setting the target to 1 would fix curvature at 1 and ask a different hypothesis.

Rβ=rR=(0,0,1)r=0\begin{gathered}R\beta=r\\R=(0,0,1)\\r=0\end{gathered}

Stack rows to impose several linear restrictions jointly. R acts on coefficients; it is not a replacement for the data matrix X. Define coefficient order before selecting the hypothesis.

기초Foundations

10. 같은 약속을 두 번 세지 않는다10. Do not count the same promise twice

b₂=0과 2b₂=0을 함께 적어도 새 조건은 하나입니다. F 통계량의 분자 자유도에 행 수 2를 넣으면 잘못된 분모를 만듭니다. 독립 제약의 수 q는 R의 랭크입니다. 영행 0·β=0도 추가 조건이 아닙니다.

q=rank⁡(R)R=(001002)q=1\begin{gathered}q=\operatorname{rank}(R)\\R=\begin{pmatrix}0&0&1\\0&0&2\end{pmatrix}\\q=1\end{gathered}

연립 제약을 행 소거하여 같은 해집합을 갖는 독립 행으로 바꿉니다. 계수와 목표를 같은 행 연산으로 함께 바꿔야 합니다. 행렬만 바꾸고 목표를 그대로 두면 원래 가설을 보존하지 못할 수 있습니다.

Writing b₂=0 and 2b₂=0 still imposes only one condition. Using two numerator degrees of freedom would miscount the hypothesis. Independent restriction count q is rank(R); a zero row with target zero adds nothing.

q=rank⁡(R)R=(001002)q=1\begin{gathered}q=\operatorname{rank}(R)\\R=\begin{pmatrix}0&0&1\\0&0&2\end{pmatrix}\\q=1\end{gathered}

Row reduction replaces the system by independent rows with the same solution set. Apply each row operation to targets too. Transforming R without r can change the hypothesis.

기초Foundations

11. 서로 모순된 약속에는 적합이 없다11. Contradictory promises have no restricted fit

b₂=0과 b₂=1을 동시에 만족하는 계수는 없습니다. 소거하면 0=1이라는 행이 남습니다. 이 경우 제한 적합이 존재하지 않아 SSE나 F를 계산하지 않습니다. 큰 F를 출력하는 것과 빈 가설을 지적하는 것은 다른 일입니다.

rank⁡([R∣r])>rank⁡(R){β:Rβ=r}=∅\begin{gathered}\operatorname{rank}([R\mid r])>\operatorname{rank}(R)\\\{\beta:R\beta=r\}=\varnothing\end{gathered}

반대로 R에 효과 있는 행이 없고 목표도 모두 0이면 제한이 전혀 없습니다. 제한 적합은 원적합과 같지만 q=0이므로 제약 검정 통계량은 미정의입니다. 두 경우를 숫자 0 하나로 합치지 않습니다.

No coefficient can satisfy b₂=0 and b₂=1 simultaneously. Elimination leaves 0=1. There is no restricted fit, hence no restricted SSE or F. An empty hypothesis is different from a large test statistic.

rank⁡([R∣r])>rank⁡(R){β:Rβ=r}=∅\begin{gathered}\operatorname{rank}([R\mid r])>\operatorname{rank}(R)\\\{\beta:R\beta=r\}=\varnothing\end{gathered}

If every effective restriction vanishes and every target is zero, there is no restriction at all. The fit remains unchanged, but q=0 leaves a restriction-test statistic undefined. Neither case is silently replaced by numeric zero.

대학원 입구Graduate bridge

12. 같은 자료에서 허용 계수만 고른다12. Minimize over permitted coefficients on the same data

X가 열 전랭크이면 G=XᵀX는 양의 정부호입니다. 일관된 Rβ=r의 허용집합 위에서 잔차 제곱합을 최소화하면 유일한 제한 계수 β̂_R가 있습니다. 원 자료는 바뀌지 않고 계수의 허용집합만 좁아집니다.

G=XTXβ^U=G−1XTymin⁡Rβ=r∥y−Xβ∥2\begin{gathered}G=X^TX\\\hat\beta_U=G^{-1}X^Ty\\\min_{R\beta=r}\|y-X\beta\|^2\end{gathered}

q≥1개의 독립 R행을 사용하고 d=Rβ̂_U−r, K=RG⁻¹Rᵀ라고 정의하면 K도 양의 정부호입니다. 아래 식은 원 추정에서 제약 위반을 필요한 만큼만 되돌립니다.

d=Rβ^U−rK=RG−1RTβ^R=β^U−G−1RTK−1d\begin{gathered}d=R\hat\beta_U-r\\K=RG^{-1}R^T\\\hat\beta_R=\hat\beta_U-G^{-1}R^TK^{-1}d\end{gathered}

For full-column-rank X, G=XᵀX is positive definite. A consistent affine set Rβ=r has a unique least-squares minimizer β̂_R. The data stay fixed; only permitted coefficients are restricted.

G=XTXβ^U=G−1XTymin⁡Rβ=r∥y−Xβ∥2\begin{gathered}G=X^TX\\\hat\beta_U=G^{-1}X^Ty\\\min_{R\beta=r}\|y-X\beta\|^2\end{gathered}

Use q≥1 independent rows of R, define d=Rβ̂_U−r and K=RG⁻¹Rᵀ. Then K is positive definite too. The formula corrects the unrestricted estimate just enough to satisfy the restrictions.

d=Rβ^U−rK=RG−1RTβ^R=β^U−G−1RTK−1d\begin{gathered}d=R\hat\beta_U-r\\K=RG^{-1}R^T\\\hat\beta_R=\hat\beta_U-G^{-1}R^TK^{-1}d\end{gathered}
심화Extension

13. 제약은 훈련 제곱합을 낮출 수 없다13. Restrictions cannot reduce training SSE

원 최소제곱 잔차 e_U는 X의 모든 열에 직교합니다. 제한 계수와 원 계수의 차이를 v라고 쓰면 새 잔차는 e_U−Xv입니다. 제곱을 전개할 때 교차항이 0이므로 원 제곱합에 비음수 항만 더해집니다.

v=β^R−β^UXTeU=0SSER=SSEU+vTGvSSER−SSEU=dTK−1d\begin{gathered}v=\hat\beta_R-\hat\beta_U\\X^Te_U=0\\SSE_R=SSE_U+v^TGv\\SSE_R-SSE_U=d^TK^{-1}d\end{gathered}

G가 양의 정부호이므로 손실이 0일 필요충분조건은 두 계수가 같은 것, 곧 원 추정이 이미 모든 제약을 만족하는 것입니다. 이는 표본의 기하학적 항등식입니다. 모집단 귀무가설이 참인지와 같다고 말하지 않습니다.

The unrestricted residual is orthogonal to every column of X. Write v for restricted minus unrestricted coefficients. Expanding the new squared residual e_U−Xv cancels the cross term, leaving only a nonnegative addition.

v=β^R−β^UXTeU=0SSER=SSEU+vTGvSSER−SSEU=dTK−1d\begin{gathered}v=\hat\beta_R-\hat\beta_U\\X^Te_U=0\\SSE_R=SSE_U+v^TGv\\SSE_R-SSE_U=d^TK^{-1}d\end{gathered}

Positive definiteness makes the loss zero exactly when both coefficient vectors agree, equivalently when the unrestricted estimate already satisfies the restrictions. This is sample geometry, not proof that a population null is true.

기초Foundations

14. 분자 52/3을 분모 2/3과 비교한다14. Compare 52/3 with the residual scale 2/3

여섯 행의 원 모형은 절편까지 p=3열이므로 잔차 자유도는 6−3=3입니다. 원 SSE=2를 3으로 나누면 s²=2/3입니다. 곡률 0이라는 독립 제약은 q=1개이며 그 손실 52/3을 q로 나눈 뒤 s²로 나누면 26입니다.

s2=SSEU/(n−p)F=(SSER−SSEU)/qs2F=52/32/3=26\begin{gathered}s^2=SSE_U/(n-p)\\F=\frac{(SSE_R-SSE_U)/q}{s^2}\\F=\frac{52/3}{2/3}=26\end{gathered}

값이 크다는 것은 선택한 오차 규모에 비해 제약 손실이 크다는 뜻입니다. 이것을 F₁,₃ 기준과 비교할 근거는 아직 별도입니다. 엔진의 임계값 4는 사용자가 준 작업 기준일 뿐 이 자료에서 계산한 정확 5% 분위수라고 부르지 않습니다.

The unrestricted six-row model has p=3 columns including the intercept, leaving 6−3=3 residual degrees of freedom. Divide SSE=2 by 3 to get s²=2/3. One independent curvature restriction has loss 52/3, so dividing its loss per restriction by s² gives 26.

s2=SSEU/(n−p)F=(SSER−SSEU)/qs2F=52/32/3=26\begin{gathered}s^2=SSE_U/(n-p)\\F=\frac{(SSE_R-SSE_U)/q}{s^2}\\F=\frac{52/3}{2/3}=26\end{gathered}

A large value means restriction loss is large relative to the chosen residual scale. Justification for an F₁,₃ reference comes separately. A supplied cutoff of 4 is a working input, not a computed exact 5% quantile.

기초Foundations

15. 0 이외 목표와 자유도의 경계15. Nonzero targets and degree-of-freedom boundaries

절편을 2로 고정하는 가설도 선형입니다. R=(1, 0, 0), r=2이며 원식에서 항 하나를 그냥 지우는 방식과 같지 않습니다. 원래 결과에서 2를 먼저 빼고 절편 없는 나머지 모형을 풀 수 있지만 결과 해석을 원 좌표로 되돌려야 합니다.

q는 독립 제약 수, p는 원 설계의 독립 열 수, n은 같은 완전행 수입니다. n=p이면 유일 계수는 구할 수 있어도 잔차 분산의 분모가 0입니다. n>p라도 SSE_U=0이면 양의 오차 규모로 나누는 보통 F가 미정의입니다. 제한 손실이 양수여도 0 분모에서는 보통 F가 미정의입니다. 화면의 무한대 표시가 그 통계량을 정의해 주지는 않습니다.

Fixing the intercept at 2 is a linear restriction: R=(1, 0, 0), r=2. It is not equivalent to simply deleting that term. One may subtract 2 from the outcome and fit remaining columns without an intercept, then translate predictions back.

Count q as independent restrictions, p as unrestricted design columns and n as common complete rows. With n=p, unique coefficients may exist but the residual-variance denominator is zero. Even when n>p, SSE_U=0 leaves the usual finite F undefined. Positive restriction loss with a zero denominator still leaves ordinary F undefined; a displayed infinity does not supply that statistic.

기초Foundations

16. 실습 B · 모순·중복·곡률을 비교한다16. Lab B · Compare curvature, redundancy and inconsistency

기본 여섯 행과 R=(0, 0, 1), r=0에서 β̂_U=(1, 0, 1), β̂_R=(8/3, 0, 0), SSE 2와 58/3, F=26을 확인합니다. 같은 제한을 두 배로 한 행을 더해도 q=1이어야 합니다. 목표가 충돌하는 행을 더하면 빈 허용집합을 표시해야 합니다. 작업 임계값을 바꿔도 계수나 SSE는 바뀌지 않습니다.

With the six defaults and R=(0, 0, 1), r=0, verify β̂_U=(1, 0, 1), β̂_R=(8/3, 0, 0), SSE values 2 and 58/3, and F=26. Add a doubled restriction: q must remain 1. Add a contradictory target: the feasible restriction set must be empty. Changing a working cutoff changes neither fit nor SSE.

기초Foundations

17. 한 계수의 오차와 공동 오차를 나눈다17. Separate one coefficient’s uncertainty from joint uncertainty

두 계수 추정이 각각 1과 2이고 작업 공분산을 대각행렬 diag(1, 4)로 준다고 가정합니다. 첫 계수는 자기 분산 1로, 둘째는 자기 분산 4로 척도를 맞춥니다. 둘을 동시에 0이라고 할 때 이차형은 1²/1+2²/4=2입니다. 두 개별 통계량의 최댓값 1과 다릅니다.

d=Rβ^−rΩ=RVRTW=dTΩ−1d\begin{gathered}d=R\hat\beta-r\\\Omega=RVR^T\\W=d^T\Omega^{-1}d\end{gathered}

여기서 V는 주어진 계수 공분산 또는 추정 작업 행렬입니다. Ω가 가역일 때 위 이차형을 계산합니다. 계산에 쓰인 V가 참 공분산인지, 추정 오차가 작은지, W에 어떤 기준분포를 붙일지는 아직 별도 질문입니다.

Assume coefficient estimates 1 and 2 and working covariance diag(1, 4). Scale each coordinate by its variance. Testing both zero gives 1²/1+2²/4=2, different from the maximum individual squared statistic, which is 1.

d=Rβ^−rΩ=RVRTW=dTΩ−1d\begin{gathered}d=R\hat\beta-r\\\Omega=RVR^T\\W=d^T\Omega^{-1}d\end{gathered}

V may be a supplied coefficient covariance or an estimated working matrix. Compute the quadratic form when Ω is invertible. Whether V is correct, its estimation is adequate, and W has a reference distribution are separate questions.

기초Foundations

18. 같이 움직이는 두 추정은 축별로만 볼 수 없다18. Correlated estimates cannot be assessed axis by axis

작업 V=[[1, 9/10], [9/10, 1]]를 가정합니다. 두 추정의 차이가 d=(1, 1)이면 W=20/19이지만 d=(1, −1)이면 W=20입니다. 각 계수의 절댓값과 분산은 같아도 공동 방향이 다릅니다. 양의 상관에서는 반대 방향 변화가 작은 분산 방향일 수 있습니다.

공동 검정은 계수별 검정을 모두 따로 한 뒤 결과를 읽는 절차와 일반적으로 같지 않습니다. 여러 개별 검정의 가족오류를 제어하려면 별도 다중검정 설계가 필요합니다. 공동 W를 계산했다고 각 성분이 따로 유의하다고 결론내리지 않습니다.

Assume V=[[1, 9/10], [9/10, 1]]. For d=(1, 1), W=20/19; for d=(1, −1), W=20. Marginal magnitudes and variances are identical, but the joint directions differ. With positive correlation, an opposite-direction change can lie along a low-variance direction.

A joint test is generally different from running separate tests and reading their outcomes. Familywise error control for multiple marginal tests requires another design. A large joint W does not establish that every component is individually significant.

기초Foundations

19. 분산 행렬이 특이하면 역행렬을 만들지 않는다19. Do not invent an inverse for singular covariance

V=diag(1, 0), R=I를 주면 둘째 방향의 작업 분산은 0입니다. d=(1, 0)은 V의 열공간 안에 있지만 V 전체의 역행렬은 없습니다. d=(1, 1)은 열공간 밖입니다. 엔진은 두 상태를 구별하고 보통의 가역 Ω Wald 값을 미정의로 둡니다.

rank⁡(Ω)<qd∈col⁡(Ω)ord∉col⁡(Ω)\begin{gathered}\operatorname{rank}(\Omega)<q\\d\in\operatorname{col}(\Omega)\quad\text{or}\quad d\notin\operatorname{col}(\Omega)\end{gathered}

일반화 역행렬을 선택해 숫자를 출력하는 방법은 추가 정의를 필요로 합니다. Ω=0이고 d=0인 경우에도 0/0이라는 보통 이차형을 0으로 대체하지 않습니다. 추정 공분산이 0이라는 사실을 실제 모집단 불확실성이 0이라고 읽지도 않습니다.

With V=diag(1, 0) and R=I, the second working variance is zero. The gap d=(1, 0) lies in V’s column space, while d=(1, 1) lies outside it. Neither makes V invertible. The engine reports the range distinction and leaves the ordinary inverse-based Wald undefined.

rank⁡(Ω)<qd∈col⁡(Ω)ord∉col⁡(Ω)\begin{gathered}\operatorname{rank}(\Omega)<q\\d\in\operatorname{col}(\Omega)\quad\text{or}\quad d\notin\operatorname{col}(\Omega)\end{gathered}

A generalized-inverse statistic requires an additional definition. Even Ω=0 and d=0 does not make an ordinary 0/0 form zero. A zero estimated covariance also does not prove zero population uncertainty.

기초Foundations

20. 공분산이라고 부르려면 이차형이 음수가 아니어야 한다20. A covariance must give nonnegative quadratic forms

대각 원소가 모두 1이어도 [[1, 2], [2, 1]]은 공분산일 수 없습니다. 방향 a=(1, −1)에 대해 aᵀVa=−2가 되어 분산이 음수이기 때문입니다. 대칭과 대각 원소만 확인해서는 충분하지 않습니다.

V=VTaTVa≥0for every a\begin{gathered}V=V^T\\a^TVa\geq0\quad\text{for every }a\end{gathered}

이를 양의 준정부호라고 합니다. 엔진은 정확 유리수 소거로 대칭·준정부호·랭크를 확인합니다. 주어진 행렬의 이러한 기하 조건이 통과해도 실제 자료의 참 공분산이라는 증거가 되지는 않습니다.

Even with unit diagonal, [[1, 2], [2, 1]] cannot be a covariance: a=(1, −1) gives aᵀVa=−2. A negative variance is impossible. Symmetry and nonnegative diagonal entries alone are insufficient.

V=VTaTVa≥0for every a\begin{gathered}V=V^T\\a^TVa\geq0\quad\text{for every }a\end{gathered}

This condition is positive semidefiniteness. The engine checks symmetry, semidefiniteness and rank using exact rational elimination. Passing these geometric conditions does not prove the supplied matrix is the true covariance of actual data.

기초Foundations

21. 계산한 값과 기준값의 출처를 분리한다21. Keep a statistic separate from the source of its cutoff

W=2이고 사용자가 임계값 1을 주면 엄격 비교 2>1은 참입니다. 임계값 2이면 2>2는 거짓입니다. 이것은 정확한 숫자 비교입니다. “유의수준 5%”라는 해석은 임계값을 어떤 귀무분포에서 골랐는지 알아야 가능합니다.

귀무가설 아래 d=Rβ̂−r가 평균 0 정규이고 참 Ω=RVRᵀ가 알려진 양의 정부호 q×q(q≥1)이면 W는 카이제곱 q를 따릅니다. 일관된 샌드위치 추정과 적절한 점근 정규성이라면 큰 표본의 근사 기준을 쓸 수 있습니다. 이 두 경우의 전제를 실제 표본 크기라는 숫자 하나로 대신하지 않습니다. 엔진은 분위수나 p값을 만들어 내지 않습니다.

If W=2 and a supplied cutoff is 1, the strict comparison 2>1 is true. With cutoff 2, 2>2 is false. This exact comparison does not itself establish a 5% test. That interpretation requires the source and null distribution of the cutoff.

Under the null, if d=Rβ̂−r is mean-zero Gaussian with known true positive-definite covariance Ω=RVRᵀ of dimension q≥1, then W has a chi-square-q law. A consistent sandwich covariance and suitable asymptotic normality can support a large-sample approximation. Sample size alone establishes neither set of premises. The engine does not generate quantiles or p-values.

기초Foundations

22. 같은 제약에 다른 작업 공분산을 쓸 수 있다22. The same restrictions can use different working covariances

고전 작업 행렬은 s²(XᵀX)⁻¹입니다. HC1은 행별 잔차 제곱과 설계의 기여를 모아 이분산을 허용하는 작업 행렬을 만듭니다. 계수·제약·표본을 고정해도 이 선택에 따라 W는 달라질 수 있습니다. 이는 둘 중 유리한 숫자를 골라도 된다는 뜻이 아닙니다.

Vclassical=s2G−1ui=G−1xiVHC1=nn−p∑iei2uiuiT\begin{gathered}V_{\rm classical}=s^2G^{-1}\\u_i=G^{-1}x_i\\V_{HC1}=\frac{n}{n-p}\sum_i e_i^2u_iu_i^T\end{gathered}

HC1의 실제 점근 해석에는 독립성 또는 적절한 의존 구조와 모멘트·레버리지 조건 등이 필요합니다. 군집·시간 의존은 이전 장의 별도 문제입니다. 이 장의 실제 화면에서는 작업 행렬을 명시하고 실제 표본분포를 확인했다고 표시하지 않습니다.

The classical working matrix is s²(XᵀX)⁻¹. HC1 aggregates row residual squares and design influences to allow a heteroskedastic working recipe. W can change even with fixed coefficients, restrictions and sample. This does not license choosing whichever result is convenient.

Vclassical=s2G−1ui=G−1xiVHC1=nn−p∑iei2uiuiT\begin{gathered}V_{\rm classical}=s^2G^{-1}\\u_i=G^{-1}x_i\\V_{HC1}=\frac{n}{n-p}\sum_i e_i^2u_iu_i^T\end{gathered}

Actual HC1 asymptotics need independence or a suitable dependence structure plus moment and leverage conditions. Cluster and temporal dependence remain the previous chapter’s distinct issues. Our actual-data display labels working matrices without certifying a sampling law.

심화Extension

23. 같은 가설의 좌표를 바꾸면 이차형은 같다23. Changing coordinates of the same hypothesis preserves its form

독립 제약의 잔차 d와 가역 공분산 Ω에 가역 q×q 행렬 A를 곱해 같은 가설을 다른 단위로 씁니다. 새 잔차는 Ad이고 새 공분산은 AΩAᵀ입니다. 역행렬을 전개하면 양쪽 A가 소거되어 W가 같습니다. 목표 r에도 A를 함께 곱해야 합니다.

d~=AdΩ~=AΩATd~TΩ~−1d~=W\begin{gathered}\tilde d=Ad\\\tilde\Omega=A\Omega A^T\\\tilde d^T\tilde\Omega^{-1}\tilde d=W\end{gathered}

행을 두 배로 하고 목표도 두 배로 하면 그 가설이 갑자기 더 강해지지 않습니다. 비가역 변환으로 일부 제약을 잃거나 제약과 목표를 다르게 바꾸면 이 보존 증명을 쓸 수 없습니다.

For invertible Ω, an invertible q×q matrix A expresses the same independent restrictions in new coordinates. The gap becomes Ad and its covariance AΩAᵀ. Expanding the inverse cancels A and preserves W. Apply A to the target r as well.

d~=AdΩ~=AΩATd~TΩ~−1d~=W\begin{gathered}\tilde d=Ad\\\tilde\Omega=A\Omega A^T\\\tilde d^T\tilde\Omega^{-1}\tilde d=W\end{gathered}

Doubling a row and its target does not strengthen the hypothesis. A noninvertible transformation that discards conditions, or a mismatched target transformation, falls outside this argument.

기초Foundations

24. 실습 C · 상관과 특이 방향을 바꾼다24. Lab C · Change correlation and singular directions

두 계수 (1, 2), V=diag(1, 4), R=I, r=0에서 W=2부터 확인합니다. 상관을 넣어 같은 계수 방향의 척도가 어떻게 달라지는지 봅니다. 분산을 0으로 바꾸면 가역성·잔차의 열공간 소속을 함께 확인하세요. 정의되지 않은 W를 임계값과 비교하지 않습니다.

Start with coefficients (1, 2), V=diag(1, 4), R=I and r=0 to obtain W=2. Add correlation to change directional scaling. With a zero variance, inspect invertibility and whether the gap lies in the covariance range. Do not compare an undefined W with a cutoff.

기초Foundations

25. 작은 모형의 모든 예측을 큰 모형도 만들 수 있는가25. Can the larger model reproduce every smaller-model prediction?

절편·x는 절편·x·x² 안에 들어갑니다. 작은 모형의 계수 (a, b)는 큰 모형에서 (a, b, 0)으로 표현됩니다. 이것이 열공간 중첩입니다. 단지 큰 모형에 열이 하나 더 있다는 이유만으로 중첩이라고 부르지 않습니다.

col⁡(XR)⊆col⁡(XU)pR≤pUq=pU−pR\begin{gathered}\operatorname{col}(X_R)\subseteq\operatorname{col}(X_U)\\p_R\leq p_U\\q=p_U-p_R\end{gathered}

두 행렬은 같은 y의 같은 행 순서를 사용해야 합니다. 같은 열공간을 다른 가역 좌표로 쓴 경우에는 p_R=p_U이고 실질 추가 제약이 없습니다. 열 이름이나 표시된 계수 수가 아니라 독립 예측 방향을 셉니다.

Columns 1 and x lie within columns 1, x and x². Any smaller-model coefficient (a, b) becomes (a, b, 0) in the larger model. This is column-space nesting. Merely having an extra column does not establish it.

col⁡(XR)⊆col⁡(XU)pR≤pUq=pU−pR\begin{gathered}\operatorname{col}(X_R)\subseteq\operatorname{col}(X_U)\\p_R\leq p_U\\q=p_U-p_R\end{gathered}

Use the same outcome rows in the same order. Different invertible coordinates for the same space have p_R=p_U and no additional restriction. Count independent prediction directions rather than variable names.

기초Foundations

26. 자료가 없는 행을 양쪽에서 함께 제외한다26. Exclude unavailable rows jointly from both fits

큰 모형은 100행, 작은 모형은 120행에서 적합한 SSE를 비교하면 모형 모양과 표본 차이가 섞입니다. 새 제곱 열에 결측이 있어도 작은 모형을 그대로 120행에 남겨 두지 않습니다. 결과와 두 설계에 필요한 모든 값이 있는 원위치의 교집합을 먼저 고릅니다.

엔진은 원 행 수·가용 수·제외 위치·식별자를 반환합니다. 0은 숫자로 보존하고 명시한 null만 결측으로 읽습니다. 자료를 다듬어 행 수를 맞췄다는 것만으로 두 표본이 같은 것은 아닙니다. 원위치와 순서가 실제로 같아야 합니다.

Comparing a large-model SSE from 100 rows with a small-model SSE from 120 mixes shape and sample changes. Missing values in a new column do not justify leaving the smaller fit on extra rows. First intersect original positions with complete outcome and both designs.

The engine returns original count, complete count, excluded positions and identifiers. Numeric zero stays numeric; explicit null denotes unavailability. Equal row counts alone do not prove equal samples: positions and order must agree.

심화Extension

27. 큰 공간으로 옮긴 예측의 길이를 센다27. Measure the fitted movement into a larger space

중첩한 두 설계의 직교 투영행렬을 H_U, H_R라고 씁니다. 큰 공간에 새로 추가된 방향의 투영은 H_U−H_R입니다. 원공간의 잔차와 이 추가 방향은 직교하므로 아래 제곱합 분해가 성립합니다.

y^U=HUyy^R=HRySSER−SSEU=∥(HU−HR)y∥2\begin{gathered}\hat y_U=H_Uy\\\hat y_R=H_Ry\\SSE_R-SSE_U=\|(H_U-H_R)y\|^2\end{gathered}

H_U−H_R는 대칭·멱등이며 랭크가 q=p_U−p_R입니다. 중첩이 없으면 차이가 투영행렬이라는 결론이 성립하지 않습니다. 같은 행렬 차이에 수식을 적었다고 그 모형들이 중첩하게 되는 것은 아닙니다.

Write H_U and H_R for orthogonal projectors onto nested design spaces. The newly available directions have projector H_U−H_R. They are orthogonal to the unrestricted residual, giving the squared-loss decomposition.

y^U=HUyy^R=HRySSER−SSEU=∥(HU−HR)y∥2\begin{gathered}\hat y_U=H_Uy\\\hat y_R=H_Ry\\SSE_R-SSE_U=\|(H_U-H_R)y\|^2\end{gathered}

H_U−H_R is symmetric and idempotent with rank q=p_U−p_R. Without nesting, the difference need not be a projector. Writing a familiar formula does not establish nesting.

대학원 입구Graduate bridge

28. F 기준이 생기는 추가 가정을 밝힌다28. State the additional assumptions behind an F reference

고정 X_U가 전랭크이고 n>p_U, q>0이며 귀무가설 아래 평균 μ가 작은 공간 안에 있다고 가정합니다. 오차는 공동 정규 N(0, σ²I), σ²>0입니다. 두 직교 방향의 정규 투영은 독립이므로 제약 손실과 원 잔차 제곱합을 서로 독립인 카이제곱으로 나눌 수 있습니다.

A=HU−HRB=I−HUAB=0yTAy/σ2∼χq2yTBy/σ2∼χn−pU2\begin{gathered}A=H_U-H_R\\B=I-H_U\\AB=0\\y^TAy/\sigma^2\sim\chi_q^2\\y^TBy/\sigma^2\sim\chi_{n-p_U}^2\end{gathered}

각 제곱합을 해당 자유도로 나눈 비는 F(q, n−p_U)입니다. 비영 목표의 일관된 선형 제약도 귀무 평균을 빼서 같은 잔차 방향 논리를 적용할 수 있습니다. 실제 자료에 이 분포가 맞는지는 화면 숫자가 아니라 가정과 조사 설계의 문제입니다.

Assume fixed full-rank X_U, n>p_U, q>0, and a null mean μ in the smaller space. Errors are jointly Gaussian N(0, σ²I), σ²>0. Orthogonal Gaussian projections are independent, so the loss and unrestricted residual sum of squares become independent chi-squares after division by σ².

A=HU−HRB=I−HUAB=0yTAy/σ2∼χq2yTBy/σ2∼χn−pU2\begin{gathered}A=H_U-H_R\\B=I-H_U\\AB=0\\y^TAy/\sigma^2\sim\chi_q^2\\y^TBy/\sigma^2\sim\chi_{n-p_U}^2\end{gathered}

Their ratio after division by respective ranks is F(q, n−p_U). Consistent nonzero affine targets admit the same argument after subtracting a null mean. Whether this law describes actual observations depends on assumptions and design, not the displayed statistic.

기초Foundations

29. 직교만으로 정규 분포를 얻지는 못한다29. Orthogonality alone does not create Gaussian independence

Z가 −1, 0, 1을 같은 확률로 갖는다고 합시다. Z와 Z²−2/3의 공분산은 0이지만 둘째 값은 첫째 값의 함수이므로 독립이 아닙니다. 한 값을 알면 다른 값에 대한 정보가 생깁니다. 공분산 0과 독립은 다릅니다.

최소제곱의 표본 직교식 Xᵀe=0은 정규성 없이도 성립합니다. 그러나 그것만으로 표준화 통계량이 t 또는 F를 따른다고 결론낼 수 없습니다. 이분산·의존·평균 오지정이 있으면 각각 그에 맞는 문제와 추가 조건을 검토해야 합니다.

Let Z take −1, 0 and 1 with equal probabilities. Z and Z²−2/3 have zero covariance, yet the latter is a function of the former and they are not independent. Knowing one provides information about the other.

The sample normal equations Xᵀe=0 hold without Gaussianity. They do not alone give t or F reference laws. Heteroskedasticity, dependence and mean misspecification each raise distinct questions and require suitable conditions.

기초Foundations

30. 한 제약에서는 t의 제곱과 일치한다30. For one restriction the classical squared t agrees

독립 제약이 한 개이며 s²>0, n>p라고 합시다. 제약 잔차 d는 스칼라이고 그 고전 작업 분산은 s²K입니다. t=d/√(s²K)로 정의하면 t²=d²/(s²K)이며 제약 SSE 손실 식으로 얻은 F와 같습니다.

q=1t2=d2/(s2K)F=t2\begin{gathered}q=1\\t^2=d^2/(s^2K)\\F=t^2\end{gathered}

부호 있는 t와 비음수 F가 같다는 뜻은 아닙니다. q>1이면 개별 t 하나로 공동 F를 대신할 수 없습니다. HC 행렬로 만든 Wald/q에 무조건 같은 유한 표본 F 분포를 붙이는 결론도 여기서 나오지 않습니다.

For one independent restriction with s²>0 and n>p, the scalar gap d has classical working variance s²K. Defining t=d/√(s²K) gives t²=d²/(s²K), equal to the SSE-loss F.

q=1t2=d2/(s2K)F=t2\begin{gathered}q=1\\t^2=d^2/(s^2K)\\F=t^2\end{gathered}

This equates squared t with nonnegative F, not signed t with F. One marginal t cannot replace a joint F when q>1. Nor does this prove a finite-sample F law for an arbitrary HC-based Wald/q.

기초Foundations

31. 빈 분모와 비중첩을 따로 표시한다31. Distinguish empty denominators from nonnested designs

모든 y를 큰 설계가 정확히 맞추면 SSE_U=0입니다. 작은 설계도 정확하면 손실도 0이지만 보통 F는 0/0입니다. 작은 설계의 손실이 양수이면 0으로 나눠야 합니다. 둘 다 유한한 보통 F를 정의하지 않습니다. n=p_U도 잔차 자유도가 0이라 별도 경계입니다.

직선 1, x와 다른 모양 1, x²는 같은 행 수·열 수라도 일반적으로 서로 중첩하지 않습니다. 어느 쪽 SSE가 작다는 기술 비교는 할 수 있지만 중첩 F의 자유도 차 q=0을 넣어 검정할 수는 없습니다. 실제 모델 선택에는 사전 질문과 표본 밖 검증 등 추가 설계가 필요합니다.

If the unrestricted design fits y exactly, SSE_U=0. If the restricted fit is also perfect, the usual F is 0/0; if it has positive loss, the denominator is still zero. Neither is a finite ordinary F. A separate n=p_U boundary leaves zero residual degrees of freedom.

Columns 1, x and 1, x² are generally nonnested despite matching row and column counts. One may describe which SSE is smaller, but cannot insert q=0 into a nested F test. Model selection also needs a declared question and potentially out-of-sample validation.

기초Foundations

32. 실습 D · 같은 행과 같은 공간을 확인한다32. Lab D · Check common rows and nested spaces

기본 작은 설계 1, x와 큰 설계 1, x, x²에서 q=1, F=26을 확인합니다. 작은 설계의 한 행만 null로 바꾸면 양쪽 적합 모두 그 행을 제외해야 합니다. 가역 변환으로 같은 공간을 주면 q=0입니다. 비중첩 설계에서는 비교 상태를 표시하고 중첩 F를 만들지 않습니다.

Compare default columns 1, x with 1, x, x² to obtain q=1 and F=26. Make one smaller-design entry null: both fits must exclude that row. An invertible change describing the same space has q=0. A nonnested pair reports that status without a nested F.

기초Foundations

33. 알 수 없는 오차와 계산한 잔차를 구별한다33. Distinguish an unobserved error from a fitted residual

관측 y=2에서 예측이 1이면 잔차는 1입니다. 그러나 참 평균이 얼마인지는 이 계산만으로 알 수 없습니다. 참 모형 y=Xβ+ε의 ε와 적합 잔차 e는 서로 다릅니다. β를 자료로 추정했기 때문에 잔차에는 Xᵀe=0 같은 제약이 생깁니다.

e=y−Xβ^H=X(XTX)−1XTe=(I−H)y\begin{gathered}e=y-X\hat\beta\\H=X(X^TX)^{-1}X^T\\e=(I-H)y\end{gathered}

올바른 선형 평균 모형이라면 e=(I−H)ε입니다. 이 식도 오차 각각을 관측했다는 뜻이 아닙니다. 잔차 그림은 빠뜨린 모양이나 분산 차이를 묻는 도구이며, 잔차가 0 부근이라는 사실만으로 외생성·독립성·인과성을 증명하지 않습니다.

If an observation is 2 and its prediction is 1, its residual is 1. That calculation does not reveal the true conditional mean. An error ε in y=Xβ+ε differs from the fitted residual e. Estimating β imposes constraints such as Xᵀe=0.

e=y−Xβ^H=X(XTX)−1XTe=(I−H)y\begin{gathered}e=y-X\hat\beta\\H=X(X^TX)^{-1}X^T\\e=(I-H)y\end{gathered}

Under the correct linear mean model, e=(I−H)ε. This still does not observe each true error. Residual plots raise questions about shape and spread; residuals near zero do not prove exogeneity, independence or causality.

기초Foundations

34. 레버리지는 결과가 아닌 설계의 위치다34. Leverage describes the design, not the outcome

절편만 있는 n행 모형에서는 모든 예측이 y의 평균이고 각 행 레버리지는 1/n입니다. 어떤 행의 y만 크게 바꿔도 X가 같으면 레버리지는 같습니다. 설명변수 공간에서 그 행이 갖는 기하학적 비중입니다.

hi=xiTG−1xi0≤hi≤1∑ihi=p\begin{gathered}h_i=x_i^TG^{-1}x_i\\0\leq h_i\leq1\\\sum_i h_i=p\end{gathered}

X가 전랭크일 때 H는 랭크 p의 직교 투영이라 대각합이 p입니다. 높은 h와 큰 잔차는 다른 특성입니다. 레버리지가 높다는 이유만으로 관측을 오류라고 지우지 않습니다. 단위의 가역 변경만으로 같은 열공간의 레버리지가 달라져서도 안 됩니다.

In an intercept-only n-row model, every prediction is the outcome mean and each leverage is 1/n. Changing only one y does not change leverage because X is unchanged. Leverage describes geometric weight in explanatory-variable space.

hi=xiTG−1xi0≤hi≤1∑ihi=p\begin{gathered}h_i=x_i^TG^{-1}x_i\\0\leq h_i\leq1\\\sum_i h_i=p\end{gathered}

For full-rank X, H is a rank-p orthogonal projector and its diagonal sums to p. High leverage and a large residual differ. High leverage alone is not grounds to delete a record, and an invertible coordinate change preserving the same space must preserve leverage.

기초Foundations

35. h=1인 행을 빼면 한 방향을 잃는다35. Deleting a unit-leverage row loses a design direction

X의 세 행을 (1, 0), (1, 0), (0, 1)로 줍니다. 마지막 행만 둘째 계수에 대한 정보를 줍니다. 그 행의 레버리지는 1이고 삭제하면 둘째 열이 전부 0이 됩니다. 삭제 후 전랭크 적합이 없습니다.

G(−i)=G−xixiTdet⁡G(−i)=det⁡G (1−hi)\begin{gathered}G_{(-i)}=G-x_ix_i^T\\\det G_{(-i)}=\det G\,(1-h_i)\end{gathered}

전랭크 원 설계에서 삭제 후 랭크 손실과 h_i=1은 동치입니다. 그런 행의 원 잔차는 0이지만 이를 영향이 없다는 뜻으로 읽지 않습니다. 0/(1−1)은 미정의입니다. 삭제 예측·표준화·Cook 값을 0으로 채우지 않습니다.

Take design rows (1, 0), (1, 0), (0, 1). Only the last row informs the second coefficient. Its leverage is 1; deleting it makes the second column zero and destroys a full-rank deletion fit.

G(−i)=G−xixiTdet⁡G(−i)=det⁡G (1−hi)\begin{gathered}G_{(-i)}=G-x_ix_i^T\\\det G_{(-i)}=\det G\,(1-h_i)\end{gathered}

With full-rank original X, delete-one rank loss is equivalent to h_i=1. Such a row has zero original residual, but that is not zero influence. The ratio 0/(1−1) is undefined. Do not fill deletion predictions, standardized residuals or Cook distance with zero.

기초Foundations

36. 한 행을 빼고 그 행을 예측한다36. Remove a row before predicting it

절편만 있고 y=(0, 1, 2)이면 원 평균은 1입니다. 첫 행을 빼면 남은 평균은 1.5라 첫 행의 삭제 예측 잔차는 −1.5입니다. 원 잔차 −1과 h=1/3을 써도 −1/(2/3)=−1.5를 얻습니다. 이처럼 자기 행을 학습에서 뺀 예측은 훈련 잔차와 다릅니다.

hi<1ei,(−i)=ei/(1−hi)PRESS=∑iei,(−i)2\begin{gathered}h_i<1\\e_{i,(-i)}=e_i/(1-h_i)\\PRESS=\sum_i e_{i,(-i)}^2\end{gathered}

삭제 후 같은 열 정의로 전랭크 적합이 존재할 때의 항등식입니다. 모든 행에서 성립해야 전체 PRESS를 정의합니다. 행을 뺐을 때 전처리나 변수 선택을 다시 하는 전체 학습 파이프라인의 교차검증과는 계산 범위가 다를 수 있습니다.

For an intercept-only fit to y=(0, 1, 2), the original mean is 1. Deleting the first row leaves mean 1.5, hence deletion residual −1.5 at that row. The formula also gives −1/(1−1/3)=−1.5. A prediction that excludes its own row differs from a training residual.

hi<1ei,(−i)=ei/(1−hi)PRESS=∑iei,(−i)2\begin{gathered}h_i<1\\e_{i,(-i)}=e_i/(1-h_i)\\PRESS=\sum_i e_{i,(-i)}^2\end{gathered}

This identity requires a full-rank deletion fit with the same column definitions. Every row must permit deletion to define full PRESS. It may differ from cross-validating an entire learning pipeline that refits preprocessing or variable selection.

기초Foundations

37. 표준화와 Cook은 분모 조건이 필요하다37. Standardization and Cook distance need valid denominators

같은 잔차 1이라도 원 잔차 규모와 레버리지가 다르면 비교할 척도가 다릅니다. n>p, s²>0, h_i<1에서 내부 표준화 잔차의 제곱과 Cook 거리를 계산합니다. p는 절편까지 포함한 원 설계 열 수입니다.

ri2=ei2s2(1−hi)Di=ei2hip s2(1−hi)2\begin{gathered}r_i^2=\frac{e_i^2}{s^2(1-h_i)}\\D_i=\frac{e_i^2h_i}{p\,s^2(1-h_i)^2}\end{gathered}

표준화 잔차의 부호는 원 e_i의 부호를 따로 보존합니다. Cook은 삭제로 계수가 얼마나 움직이는지 원 설계의 이차형 척도로 잰 값입니다. 특정 경고선은 선별 규칙이지 관측 삭제의 자동 명령이 아닙니다. 이 내부 표준화 값에 독립 t 분포를 무조건 붙이지 않습니다.

A residual of 1 has different scale when residual variance or leverage changes. For n>p, s²>0 and h_i<1, compute squared internally standardized residuals and Cook distance. Here p counts all original design columns, including any intercept.

ri2=ei2s2(1−hi)Di=ei2hip s2(1−hi)2\begin{gathered}r_i^2=\frac{e_i^2}{s^2(1-h_i)}\\D_i=\frac{e_i^2h_i}{p\,s^2(1-h_i)^2}\end{gathered}

Keep the residual sign separately from its square. Cook distance measures coefficient movement after deletion in the original-design quadratic metric. A threshold is a screening rule, not an automatic deletion command. Internally standardized residuals do not automatically have independent t distributions.

기초Foundations

38. 잔차 제곱을 다시 설명해 본다38. Regress squared residuals as a diagnostic

잔차의 부호가 섞여도 큰 잔차가 한 구간에 몰릴 수 있습니다. e_i²를 결과로 삼고 원 X에 보조 회귀를 맞춰 봅니다. 상수가 X의 열공간 안에 있고 e_i²가 상수가 아니면 중심화 TSS와 R²를 정의할 수 있습니다.

zi=ei2TSSz=∑i(zi−zˉ)2LMwork=nRz2\begin{gathered}z_i=e_i^2\\TSS_z=\sum_i(z_i-\bar z)^2\\LM_{\rm work}=nR_z^2\end{gathered}

엔진은 이를 작업 보조진단이라고 부릅니다. 모든 e_i²가 같으면 TSS_z=0이므로 R²와 nR²는 미정의입니다. 상수 열공간이 없을 때도 이 중심화 공식을 억지로 쓰지 않습니다. 적절한 이분산 검정의 카이제곱 근사는 오차 모형·표본 조건에 관한 추가 정리가 필요합니다.

Mixed residual signs can hide large magnitudes concentrated in one region. Use z_i=e_i² as an auxiliary outcome and regress it on original X. A centered TSS and R² are available when the constant lies in the column space and squared residuals are nonconstant.

zi=ei2TSSz=∑i(zi−zˉ)2LMwork=nRz2\begin{gathered}z_i=e_i^2\\TSS_z=\sum_i(z_i-\bar z)^2\\LM_{\rm work}=nR_z^2\end{gathered}

The engine labels nR² a working auxiliary diagnostic. Constant squared residuals give TSS_z=0 and undefined R². Without a constant in the span, it does not force this centered formula. A chi-square approximation for an appropriate heteroskedasticity test needs additional error and sampling assumptions.

기초Foundations

39. 적합값 제곱을 넣어도 모형 진실을 인증하지 않는다39. Fitted-power augmentation does not certify a true model

원 X에 ŷ²나 ŷ², ŷ³를 더해 손실이 얼마나 줄어드는지 볼 수 있습니다. 이것은 RESET 형태의 함수 모양 진단입니다. ŷ가 상수이면 그 제곱도 기존 절편과 겹칩니다. 새 열이 독립이지 않으면 추가 열 수를 그대로 q로 세지 않습니다.

증강 열은 y로 계산한 ŷ에서 만들어져 자료에 의존합니다. 앞의 고정 설계 정규 F 증명을 아무 조건 없이 그대로 적용할 수 없습니다. 엔진은 독립 증강일 때 중첩 손실 비를 계산하되 실제 기준분포를 인증하지 않습니다. 진단이 신호를 보여도 어느 누락 변수나 어떤 인과 방향이 원인인지는 알려 주지 않습니다.

Add ŷ², or ŷ² and ŷ³, to original X and inspect loss reduction: a RESET-style shape diagnostic. If fitted values are constant, their powers duplicate the intercept. Dependent added columns cannot be counted as independent restrictions.

These augmented columns are generated from ŷ, which depends on y. The earlier fixed-design Gaussian F proof cannot be imported without further conditions. The engine computes nested loss geometry when augmentation has full rank but certifies no actual reference law. A flag does not identify the omitted variable or causal direction.

기초Foundations

40. 실습 E · 높은 비중과 큰 오차를 따로 본다40. Lab E · Separate leverage from residual magnitude

여섯 행의 잔차·레버리지·삭제 잔차·Cook을 표와 그림에서 대조합니다. y만 바꿀 때 h는 그대로이고 잔차는 달라져야 합니다. h=1 예제를 고르면 삭제 랭크 손실을 표시해야 합니다. 반환 행 수를 줄여도 전체 PRESS는 모든 가용행으로 계산합니다. 진단을 관측 삭제의 자동 명령으로 사용하지 않습니다.

Compare residuals, leverage, deletion residuals and Cook distance for the six rows. Changing only y must preserve h while changing residuals. A unit-leverage example must report deletion rank loss. Limiting displayed rows does not truncate the full-row PRESS calculation. Diagnostic flags are not automatic deletion commands.

기초Foundations

41. 실제 국가 · 곡률 질문의 단위를 고정한다41. Actual countries · fix units before asking about curvature

새 선택은 2024년 같은 국가의 GDP/사람과 출생시 기대수명 16쌍입니다. GDP는 2015년 불변 USD, 기대수명은 년입니다. GDP/10,000을 g로 놓고 절편·g·g²를 넣습니다. 곡률을 0으로 고정하면 원 SSE 약 82.546713이 제한 SSE 약 160.991443으로 늘어납니다.

두 값 모두 같은 16행입니다. 작업 F는 약 12.353993입니다. “통계가 있으니 GDP의 수명 효과를 식별했다”고 읽지 않습니다. 실제 표본 선택·공표 측정·외생성·분산·의존을 별도 검토해야 하며 이 장은 그런 실증 인증을 하지 않습니다. 원토큰과 각 나라 원위치를 공개 입력표에 남깁니다.

The new selection matches 16 country pairs for GDP per person and life expectancy at birth in 2024. GDP uses constant 2015 USD and life expectancy uses years. With g=GDP/10,000, fit columns 1, g, g². Setting curvature to zero raises SSE from about 82.546713 to 160.991443.

Both values use the same 16 rows; working F is about 12.353993. A statistic does not establish a causal GDP effect on lifespan. Selection, published measurement, exogeneity, variance and dependence need separate investigation. Original tokens and source positions remain in the public input.

기초Foundations

42. 실제 개인 · 원로그 3,010행을 그대로 쓴다42. Actual persons · retain the 3,010 recorded log outcomes

원 3,613행을 보존한 뒤 원문 로그·교육·나이가 함께 가용한 3,010행을 선택합니다. 교육 −12, 그 제곱, 나이 −30과 절편을 사용하며 제곱항 0을 비교합니다. 두 SSE는 약 482.246512와 485.182514입니다. 표본을 바꿔 얻은 변화가 아닙니다.

학력 1년의 적합 로그 차이는 출발 학력에 따라 달라집니다. 로그 차이를 원단위 산술평균 임금의 변화로 옮기려면 재변환 조건이 필요합니다. 원로그는 이상값을 다듬은 변수이므로 가용 원임금 3,017행을 새로 로그 취하는 계산과 구별합니다. 실제 교육의 인과수익률을 추정했다고 하지 않습니다.

Preserve all 3,613 original rows, then select 3,010 with recorded log outcome, schooling and age jointly available. Use an intercept, schooling−12, its square and age−30, comparing the squared-term coefficient with zero. SSE values are about 482.246512 and 485.182514 on identical rows.

A one-year fitted log contrast depends on starting schooling. Converting it to an arithmetic mean wage effect needs retransformation assumptions. Source-trimmed log outcomes are distinct from newly logging the 3,017 available raw wages. This descriptive specification does not estimate a causal schooling return.

기초Foundations

43. 실제 점포 · 두 선의 절편과 기울기를 함께 비교한다43. Actual stores · compare both line intercepts and slopes

전후 FTE 성분이 모두 가용한 같은 384점포에서 이후 FTE를 설명합니다. 이전 FTE−20을 z로 두고 1, z, NJ, z×NJ를 씁니다. NJ의 절편·기울기 차이를 함께 0으로 두면 공동 직선이 됩니다. 이 독립 제약 두 개의 작업 F는 약 5.499501입니다.

FTE는 FT+PT/2+관리자라는 명시한 환산이며 실제 사람 수가 아닙니다. 원 코드 407의 두 원위치 42·168은 보존합니다. 이 모형은 전후 차이 결과변수나 무작위 정책 배정을 사용하지 않습니다. 두 선 차이는 정책 인과효과라고 부르지 않고 기술 적합·제약 비교로 보고합니다.

Use the same 384 stores with complete before/after FTE components. Model after FTE using 1, z, NJ, z×NJ, with z=before FTE−20. Setting both NJ intercept and slope differences to zero imposes one common line. The two-restriction working F is about 5.499501.

FTE is the declared FT+PT/2+managers conversion, not headcount. Both original code-407 positions, 42 and 168, remain. The specification uses neither an outcome difference nor randomized policy assignment. Report line differences as descriptive fits and restrictions, not causal policy effects.

기초Foundations

44. 새 목적의 원필드와 두 언어 재현을 연결한다44. Connect newly selected original fields to two-language reproduction

입력 3CSV는 원필드와 새 기저를, 진단 3CSV는 원위치별 적합·잔차·레버리지·삭제 계산을 담습니다. 요약·공동 제약·가정 여섯 행 CSV를 합쳐 공개 CSV는 9개입니다. Python은 표준 Fraction으로 104지표를, R은 base QR 적합으로 같은 104지표를 계산합니다. R 결과를 정확 분수라고 부르지 않습니다.

원 ZIP 없이 공개 CSV만 둔 폴더에서도 Python과 R을 새로 실행했습니다. native 두 실행과 public-only 두 실행을 구별해 총 네 성공 프로세스를 기록했고 최대 규모 보정 오차는 약 6.43×10⁻¹³입니다. 이 재현은 계산을 확인하며 실제 표본추론의 타당성은 인증하지 않습니다. 20일 원수집과 27일 새 목적 재독은 같은 원 SHA에 연결합니다.

Three input CSVs retain original fields and new bases; three diagnostic CSVs retain source-position fits, residuals, leverage and deletion calculations. Together with summary, joint-restriction and six-row toy files, there are nine public CSVs. Standard-library Python Fraction computes 104 metrics; independently written base-R QR calculations compute the same 104. R results are not labelled exact fractions.

Both programs also ran afresh in a folder containing public CSVs without original ZIPs. The ledger distinguishes two native and two public-only successful processes. Maximum scale-adjusted disagreement is about 6.43×10⁻¹³. Reproduction verifies arithmetic, not actual inferential validity. Original retrieval on the 20th and new-purpose rereading on the 27th are bound by the same raw hashes.

기초Foundations

45. 결론을 쓸 때 다섯 질문을 남긴다45. Leave five questions visible in a conclusion

첫째 어떤 행이 가용했고 양쪽 비교에 같은 행을 썼는가? 둘째 어떤 열과 단위·목표를 썼는가? 셋째 제약은 일관되고 독립 수가 얼마인가? 넷째 작업 공분산과 통계값의 분모가 정의되는가? 다섯째 실제 기준분포·표본 밖 예측·인과 해석 중 무엇을 뒷받침하는 증거가 있는가?

State five things: which original rows contribute to both fits; which columns, units and targets define the question; whether restrictions are consistent and how many are independent; whether covariance and statistic denominators are defined; and which evidence supports a reference distribution, out-of-sample prediction or causal interpretation.

기초Foundations

46. 실습 F · 같은 원행의 제한과 진단을 읽는다46. Lab F · Read restrictions and diagnostics on original rows

국가·개인·점포를 바꿔 원 행 수와 가용 수부터 읽습니다. 기본 제약은 국가·개인의 제곱항 0, 점포의 NJ 절편·상호작용 0입니다. 실제행을 수정하지 않고 작업 임계값과 반환 행 수를 바꿉니다. 고전 공동값·HC1 공동값·제한 SSE·PRESS의 역할을 구별합니다. 원 CSV 다운로드와 재현 코드의 단위도 같은지 확인하세요.

Switch among country, person and store cases and read original and complete counts first. Default restrictions set curvature to zero for country/person and both NJ intercept/interaction to zero for stores. Change working cutoffs or display limits without editing source rows. Separate classical/HC1 joint forms, restricted SSE and PRESS, and check units against public CSVs and reproduction code.

기초Foundations

47. 실제 세 사례를 원표와 함께 읽는다47. Read the three actual cases with their source fields

국가 · 곡률을 0으로 고정하면?

소득이 1만 달러 더 큰 나라의 기대수명이 늘 같은 만큼 길다고 가정해야 할까요? 직선은 증가분을 일정하게 두지만 이차식은 출발점에 따라 증가분이 달라집니다. 실제 같은 연도의 나라 자료에 두 식을 맞추고, 곡률을 0으로 고정했을 때 잔차 제곱합이 얼마나 늘어나는지 비교합니다.

원자료는 2026년 10월 20일 보관한 World Bank 응답입니다. 보관 원문과 manifest의 SHA를 다시 확인하고 2024년의 같은 국가 코드에서 1인당 GDP(2015년 불변 USD)와 출생시 기대수명(년)을 새로 짝지었습니다. 16개 국가의 두 값이 모두 가용합니다. 소득 지표를 10,000으로 나눈 g와 g²를 쓰고 절편을 포함합니다. 현재 달러나 한 사람의 실제 생존 나이로 바꾸지 않습니다.

설명 모형은 y=b₀+b₁g+b₂g²입니다. 제한식 b₂=0은 같은 16행에서 직선을 맞춘다는 뜻입니다. 아래 값은 원토큰의 정확분수 계산을 읽기 쉽게 반올림한 값입니다. 실제 관측점과 두 적합값을 별도 계열로 표시하며 나라 사이를 시간 경로로 연결하지 않습니다.

같은 완전행의 작업 계산 · 표시는 근사
npq제한 없는 SSE제한 SSE기하학적 FHC1 Wald
163182.546713160.99144312.35399315.922537
계수 · 표시는 근사
열제한 없음제한 적용
069.90750672.970869
15.4088921.739588
2-0.5568310

g=2에서 g=3으로 옮기는 예측 변화는 b₁+5b₂이고, g=4에서 g=5이면 b₁+9b₂입니다. 이차항 계수 하나만을 “GDP 효과”라고 읽지 않습니다. 국가 표본의 선택, 건강·제도·측정과 다른 누락 변수 때문에 이 적합은 인과효과가 아닙니다.

F 작업값은 약 12.353993이지만 정상·등분산·외생 오차와 고정 설계 조건을 이 자료에서 확인한 것이 아닙니다. HC1 Wald 15.922537도 같은 곡률 질문에 다른 작업 공분산을 쓴 이차형입니다. 특정 F 또는 카이제곱 기준분포와 실제 유의수준을 자동으로 인증하지 않습니다. GDP 제곱 열을 제거해 얻는 SSE는 두 다른 표본의 SSE 차이가 아닙니다.

개인 · 같은 행에서 교육 제곱항 비교

학력이 12년에서 13년으로 늘 때와 16년에서 17년으로 늘 때 로그 임금의 예측 차이가 같아야 할까요? 교육을 12에서 중심화한 z와 z²를 함께 쓰면 두 구간의 차이를 따로 계산할 수 있습니다. 나이는 30에서 중심화해 같은 값에 고정합니다.

새 원문 파서는 원 proximity.zip의 nls.dat와 code_bk.txt를 읽습니다. 원순서 3,613행을 모두 공개 선택표에 보존하고 ed76(18–19열), age76(24–25열), 원문에서 이상값을 다듬은 lwage76(86–97열)을 사용합니다. 세 변수가 함께 가용한 행은 3,010개입니다. 결측 기호 점을 0으로 바꾸지 않습니다. raw wage 가용 3,017개를 새로 로그 취해 3,010개 원로그와 같다고 하지 않습니다.

열은 1, z=교육−12, z², a=나이−30입니다. 출력 y는 원자료의 1976년 시간당 센트 임금에 대한 로그입니다. 제한은 z²의 계수 0입니다. 양쪽 모형 모두 같은 3,010행을 사용하므로 결측 표본 차이가 곡률 차이로 섞이지 않습니다.

같은 완전행의 작업 계산 · 표시는 근사
npq제한 없는 SSE제한 SSE기하학적 FHC1 Wald
301041482.246512485.18251418.30105815.611493
계수 · 표시는 근사
열제한 없음제한 적용
06.2931216.271939
10.0581410.052511
2-0.0029470
30.0419750.040657

교육 z에서 z+1로 옮기는 적합 로그 차이는 b₁+b₂(2z+1)입니다. 그 차이를 d라고 쓰면 지수화한 적합 수준의 비는 exp(d)입니다. 이는 산술 평균 임금의 비가 아니며, E[exp(u)|X]에 관한 추가 조건 없이 로그 적합을 단순 지수화해 평균임금이라고 부르지 않습니다. 교육 변화가 이 차이를 원인으로 만든다는 결론도 내리지 않습니다.

그림은 같은 가용행을 교육연수별로 묶은 관측 로그 평균·각 행 적합값 평균·제한 적합값 평균입니다. 나이 구성은 집단마다 달라서 고정 나이에서의 순수 교육 곡선이 아닙니다. 가용수가 0인 교육집단의 평균은 미정의로 두고 점을 만들지 않습니다. 모든 원행과 가용 플래그는 CSV에서 확인할 수 있습니다.

점포 · 두 집단의 같은 선 가설

두 집단에 직선을 하나만 맞출지, 출발 높이와 기울기를 따로 둘지 비교합니다. 예를 들어 NJ=0이면 b₀+b₁z, NJ=1이면 (b₀+b₂)+(b₁+b₃)z입니다. 그래서 두 선이 같은지는 b₂=0과 b₃=0을 함께 묻는 두 제약입니다.

원 njmin.zip의 codebook과 public.dat를 새로 읽었습니다. 공개 선택표는 410행과 원위치를 유지합니다. FTE는 각 파의 FT+PT/2+관리자이며, 필요한 성분 중 하나라도 없으면 그 파의 FTE는 미정의입니다. 이전·이후 FTE가 함께 가용한 384행을 사용합니다. 원 코드 407은 원위치 42와 168의 두 행에 실제로 반복되므로 코드만으로 합치거나 하나를 지우지 않습니다.

y는 이후 FTE, z는 이전 FTE−20이며 NJ는 원 코드 1, PA는 0입니다. 설계열은 1, z, NJ, z×NJ입니다. 제한 모형은 NJ의 절편·기울기 차이를 동시에 0으로 둔 공동 직선입니다. 아래 p=4는 절편까지 센 열 수이고 q=2는 독립 제약 수입니다.

같은 완전행의 작업 계산 · 표시는 근사
npq제한 없는 SSE제한 SSE기하학적 FHC1 Wald
3844221,765.57319422,395.5721395.49950112.130397
계수 · 표시는 근사
열제한 없음제한 적용
019.96487420.417719
10.334850.515058
20.6750470
30.2627790

공동 직선의 SSE에서 두 직선의 SSE를 뺀 손실은 약 629.998945입니다. 고전 작업 Wald는 약 10.999003로 qF와 일치하고, HC1 작업 Wald는 12.130397입니다. HC1은 같은 표본의 이분산 작업 보정일 뿐 점포·체인 사이 독립성이나 소수 집단 추론의 타당성을 보장하지 않습니다.

이 그래프는 384개의 같은 점포 전후 짝과 두 적합을 보여 주며 선으로 연결하지 않습니다. 이 식은 전후 차이를 결과변수로 삼는 DID 설계가 아니고 무작위 정책 배정도 아닙니다. NJ 계수·상호작용을 최저임금의 인과효과라고 읽지 않습니다. 최대 레버리지 0.221332도 나쁜 자료라는 판정이 아니라 해당 설계에서 한 행이 갖는 기하학적 비중입니다.

Country · fixing curvature at zero

Must an extra 10,000 dollars of GDP per person always accompany the same difference in life expectancy? A straight line imposes a constant increment; a quadratic allows it to depend on the starting point. Fit both to the same-year country records and ask how much residual sum of squares increases when curvature is fixed at zero.

We reread the World Bank response retained October 20, 2026 and checked its hash against the original manifest. For 2024 we newly match constant-2015-USD GDP per person and life expectancy at birth in years by the same country code. Both fields are available in all 16 selected countries. Define g as GDP per person divided by 10,000 and use the explicit columns 1, g and g². These units are neither current dollars nor an individual’s realized age at death.

The descriptive model is y=b₀+b₁g+b₂g². The restriction b₂=0 fits a line on exactly the same 16 rows. Displayed values below round exact rational arithmetic on the source tokens. Observations and two fitted projections are separate series; countries are not joined into a time path.

Same complete rows · approximate working calculations
npqSSE unrestrictedSSE restrictedF geometryHC1 Wald
163182.546713160.99144312.35399315.922537
Coefficients · approximate values
ColumnUnrestrictedRestricted
069.90750672.970869
15.4088921.739588
2-0.5568310

The fitted difference from g=2 to g=3 is b₁+5b₂; from g=4 to g=5 it is b₁+9b₂. The quadratic coefficient alone is not a GDP effect. Country selection, health, institutions, measurement and omitted variables prevent a causal interpretation of this descriptive fit.

The working F value is about 12.353993, without verification of fixed design, exogeneity, Gaussian errors or common positive variance in the actual countries. HC1 Wald 15.922537 uses a different working covariance for the same curvature question. Neither number certifies an actual F/chi-square reference or test size. The SSE comparison uses the same sample throughout.

Person · schooling curvature on the same rows

Should the predicted log-wage difference from 12 to 13 years of schooling equal the difference from 16 to 17? Using z=schooling−12 and z² lets us calculate the two contrasts separately. Recorded age is centered at 30 and held fixed for a conditional contrast.

The new parser reads nls.dat and code_bk.txt from the retained proximity.zip. The public input preserves all 3,613 original positions and reads ed76 from columns 18–19, age76 from 24–25, and original outlier-trimmed lwage76 from 86–97. The three fields are jointly available on 3,010 rows. A dot is unavailable, not zero. Taking a new log of the 3,017 available raw wages would not reproduce the original 3,010 trimmed log observations.

The columns are 1, z=schooling−12, z² and a=age−30. The outcome is the source-recorded log of hourly wage in cents in 1976. The restriction sets the z² coefficient to zero. Both fits use the same 3,010 complete rows so a sample change cannot masquerade as a curvature change.

Same complete rows · approximate working calculations
npqSSE unrestrictedSSE restrictedF geometryHC1 Wald
301041482.246512485.18251418.30105815.611493
Coefficients · approximate values
ColumnUnrestrictedRestricted
06.2931216.271939
10.0581410.052511
2-0.0029470
30.0419750.040657

Moving from z to z+1 changes the fitted log by d=b₁+b₂(2z+1). Exponentiated fitted levels have ratio exp(d). This is not automatically a ratio of arithmetic mean wages: retransformation requires information about E[exp(u)|X]. The association also does not establish the causal return to schooling.

The plot groups the same available records by schooling years and reports mean observed log wage, mean unrestricted row prediction and mean restricted row prediction. Age composition varies across groups; the plot is not a curve holding age fixed. A schooling group with zero available outcomes has an undefined mean and no plotted point. Original rows and availability remain in the public CSV.

Stores · a common-line restriction

Compare one common line with two lines whose intercepts and slopes may differ. For NJ=0 the prediction is b₀+b₁z; for NJ=1 it is (b₀+b₂)+(b₁+b₃)z. Equal lines therefore impose the two restrictions b₂=0 and b₃=0 jointly.

We newly read codebook and public.dat from the original njmin.zip. All 410 positions remain in the selected input. Each wave’s FTE is FT+PT/2+managers, unavailable if any required component is missing. The same 384 rows have both before and after FTE. Original code 407 occurs at positions 42 and 168; it is not a unique row key and neither occurrence is merged or deleted.

The outcome is after FTE, z=before FTE−20, and the original NJ indicator is 1 for NJ and 0 for PA. Columns are 1, z, NJ and z×NJ. The restricted model sets both group intercept and slope differences to zero. Here p=4 includes the intercept and q=2 counts independent restrictions.

Same complete rows · approximate working calculations
npqSSE unrestrictedSSE restrictedF geometryHC1 Wald
3844221,765.57319422,395.5721395.49950112.130397
Coefficients · approximate values
ColumnUnrestrictedRestricted
019.96487420.417719
10.334850.515058
20.6750470
30.2627790

The common-line SSE exceeds the two-line SSE by about 629.998945. The classical working Wald is 10.999003, equal to qF; HC1 working Wald is 12.130397. HC1 addresses a working heteroskedastic covariance recipe, without verifying independence across stores/chains or the validity of few-group inference.

The plot shows the 384 paired stores and both fits without joining points. This is not a difference-in-differences outcome model or randomized policy assignment. NJ and its interaction are not estimated causal minimum-wage effects. Maximum leverage 0.221332 describes geometric weight in this design, not a verdict that a row is bad data.

기초Foundations

48. 공식 강의·학자·읽기를 질문에 연결한다48. Connect official lectures, a scholar and readings to questions

공식 MIT 강의의 정규 오차·직교 투영 설명, Princeton의 2001년 Gregory Chow 소개, Econometrics with R의 다항식 유한 차이, NIST의 잔차 진단을 읽습니다. 각 읽기에서 한 질문을 먼저 써 보세요. 직교와 독립은 언제 연결되는지, 두 선이 같다는 제약은 몇 개인지, x가 변하면 x²도 어떻게 바뀌는지, 잔차 그림으로 무엇을 물을 수 있는지 답을 연결합니다.

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

Use the official MIT discussion of Gaussian errors and orthogonal projection, Princeton’s historical May 2001 Gregory Chow biography, finite polynomial contrasts in Econometrics with R, and NIST residual diagnostics. Begin each reading with a question: when does orthogonality imply independence, how many restrictions equate two lines, how does x² change with x, and what can a residual plot ask? Connect your answers to the calculations in this chapter.

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

회귀 오차와 정규 추론Regression errors and Gaussian inference

MIT OCW · Philippe Rigollet · 18.650 · Fall 2016 · Lecture 15

공식 전사 첫 두 PDF쪽의 고정 설계·정규 오차·직교 투영과 독립성 설명을 읽습니다. 이후 단일 계수 t 논의와 이번 공동 F 증명은 구별합니다. 실제 세 자료의 가정을 입증한 영상은 아닙니다.Read the first two official transcript pages on fixed design, Gaussian errors, orthogonal projections and independence. Distinguish the subsequent single-coefficient t discussion from our joint F proof; the lecture does not verify assumptions in these three actual sources.

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

보고 읽은 뒤 답하기Respond after watching/reading 직교한 투영이 항상 독립인가요?Are orthogonal projections always independent?

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

공분산이 0이라는 기하와 독립은 다릅니다. 공동 정규 오차라는 추가 모형에서 해당 투영들이 독립입니다.Zero covariance and independence differ. Under the additional joint Gaussian error model, the relevant orthogonal projections are independent.

Gregory Chow와 계수 안정성Gregory Chow and coefficient stability

Princeton University · Ben Bernanke biography · May 2001

2001년 소개의 첫 문단과 회귀계수의 안정성 검정을 개발한 배경 문단을 읽습니다. 이 장의 두 집단 직선 모형에서 절편 차이와 기울기 차이를 함께 묻는 이유를 연결해 보세요.Read the opening May 2001 biography and the paragraph explaining how regression-coefficient stability testing developed. Connect that question to jointly testing intercept and slope differences in this chapter.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 두 집단의 선이 같은지는 한 계수만 검사하면 되나요?Does equality of two group lines require only one coefficient?

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

절편과 기울기를 모두 자유롭게 뒀다면 두 차이를 함께 0으로 둡니다. 표본·분산·정규성 조건 없이 실제 F 분포가 따르는 것은 아닙니다.With both intercept and slope differences, impose both restrictions jointly. Actual F inference still requires its sampling and variance assumptions.

다항식의 유한 예측 차이Finite predicted contrasts for polynomials

Introduction to Econometrics with R · §8.2 · Key Concept 8.1

다항식의 정의와 Key Concept 8.1의 두 예측값 차이를 읽습니다. x가 바뀌면 x²도 함께 바뀐다는 점을 이용해, 같은 변화량이라도 출발점에 따라 예측 차이가 달라지는 이유를 계산해 보세요.Read the polynomial definition and Key Concept 8.1 on differences of two predictions. Let x and its square change together, then calculate why the same increment can produce different fitted contrasts at different starting values.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 이차식에서 x를 바꾸며 x²는 고정할 수 있나요?Can x change while its square stays fixed in a quadratic contrast?

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

같은 x의 제곱 열이므로 함께 바뀝니다. 유한 차이는 b₁h+b₂(2xh+h²)로 계산합니다.The squared column changes with the same x. The finite contrast is b₁h+b₂(2xh+h²).

잔차 그림이 묻는 것Questions raised by residual plots

NIST/SEMATECH e-Handbook · §4.4.4

R²만으로 충분하지 않다는 도입·잔차 정의·그림의 역할 문단을 읽습니다. 원오차를 관측했다거나 그림으로 외생성을 증명했다는 뜻으로 확대하지 않습니다.Read the opening warning about R², the residual definition and the role of graphical analysis. Do not extend them into observing true errors or proving exogeneity from a plot.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 잔차가 작으면 모형이 참인가요?Does a small residual establish a true model?

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

아닙니다. 잔차는 적합에 사용한 자료와 모형의 차이입니다. 누락·의존·인과 방향·표본 밖 예측은 별도 질문입니다.No. A residual compares a fitted model with the data used to fit it. Omission, dependence, causal direction and prediction outside the sample remain separate questions.

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

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

1. 직선의 원자료 합Original sums for a line

설명용 여섯 행은 x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5)이고 열 순서는 (1, x, x²)입니다. 절편과 x만 사용한 직선의 두 계수와 SSE를 구하세요.

Six assumed rows have x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5), with column order (1, x, x²). Find the intercept, slope and SSE of the intercept-plus-x fit.

풀이와 확인할 이유Solution and explanation

Σy=16, Σx=0, Σxy=0, Σx²=10입니다. 평균 y는 8/3이고 중심화 교차합이 0이므로 기울기는 0입니다. 각 잔차는 y_i−8/3이며 제곱을 더하면 58/3입니다. 원래 두 x=0행도 각자 한 번씩 셉니다.

The sums are Σy=16, Σx=0, Σxy=0 and Σx²=10. Mean y is 8/3 and the centered cross-product is zero, so the slope is zero. Squaring each y_i−8/3 and summing gives 58/3. Both x=0 rows contribute separately.

2. 곡선의 잔차Residuals for the curve

설명용 여섯 행은 x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5)이고 열 순서는 (1, x, x²)입니다. β=(1, 0, 1)의 예측과 잔차를 구하고 이것이 최소제곱인지 확인하세요.

Six assumed rows have x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5), with column order (1, x, x²). Find predictions and residuals for β=(1, 0, 1), and verify least squares.

풀이와 확인할 이유Solution and explanation

예측은 1+x²=(5, 2, 1, 1, 2, 5), 잔차는 (0, 0, 1, −1, 0, 0)입니다. 잔차 합은 0이고 x·e와 x²·e 합도 0이므로 Xᵀe=0입니다. 서로 다른 x가 충분해 X가 전랭크이므로 이 해는 유일합니다. SSE=1+1=2입니다.

Predictions 1+x² are (5, 2, 1, 1, 2, 5), leaving (0, 0, 1, −1, 0, 0). The sums of e, xe and x²e all vanish, giving Xᵀe=0. Full column rank makes this solution unique. SSE=1+1=2.

3. 미분과 유한 차이Derivative versus finite change

f(x)=1+2x+3x²에서 x=0→2의 변화와 f′(0)×2를 구하고 차이를 설명하세요.

For f(x)=1+2x+3x², compare the change from x=0 to 2 with f′(0)×2.

풀이와 확인할 이유Solution and explanation

f(0)=1, f(2)=17이므로 유한 차이는 16입니다. f′(0)=2이므로 미분 근사는 4입니다. 빠진 항은 3h²=12입니다. 한 점의 순간 기울기는 두 칸 전체 구간의 평균 기울기가 아닙니다.

The levels are f(0)=1 and f(2)=17, giving finite change 16. The derivative at zero is 2, so its two-step linear approximation is 4. The omitted quadratic term is 3h²=12. A local slope is not the average slope across a finite interval.

4. 중심 이동Changing the center

f(x)=1+2x+3x²를 z=x−1로 나타내고 x=2에서 예측을 대조하세요.

Rewrite f(x)=1+2x+3x² using z=x−1 and compare predictions at x=2.

풀이와 확인할 이유Solution and explanation

x=z+1을 대입하면 1+2(z+1)+3(z+1)²=6+8z+3z²입니다. x=2는 z=1이므로 새 식도 6+8+3=17입니다. 계수 변화는 좌표 변화이며 적합값 차이가 아닙니다.

Substitute x=z+1 to obtain 6+8z+3z². At x=2, z=1 and the new expression gives 6+8+3=17. Coefficients changed because coordinates changed, while the prediction did not.

5. 단위 배율Unit scaling

f(x)=1+2x+3x²이고 x=100u일 때 u의 계수들을 구하세요. 두 모형의 열공간이 같은 조건도 쓰세요.

For f(x)=1+2x+3x² with x=100u, find coefficients in u and state why the column spaces agree.

풀이와 확인할 이유Solution and explanation

대입하면 f=1+200u+30,000u²입니다. 100은 0이 아닌 상수이고 절편·일차·이차 열을 모두 보존하므로 대응은 가역입니다. 같은 행에서 같은 차수 열을 유지해야 같은 열공간이라는 결론이 성립합니다.

Substitution gives f=1+200u+30,000u². The nonzero scaling and retained intercept and both powers give an invertible correspondence. The conclusion uses the same rows and all the corresponding basis columns.

6. 행이 많아도 랭크가 부족할 수 있다Many rows can still lack rank

여섯 행의 x가 모두 0 또는 1이고 둘 다 관측됩니다. X=(1, x, x²)의 랭크와 계수 유일성을 설명하세요.

Six rows use only x=0 or 1, with both values present. Find rank of X=(1, x, x²) and discuss unique coefficients.

풀이와 확인할 이유Solution and explanation

각 행에서 x²=x이므로 둘째·셋째 열이 같습니다. 절편과 x는 독립이어서 랭크는 2입니다. β₁에 t를 더하고 β₂에서 t를 빼도 예측은 같으므로 세 계수는 유일하지 않습니다. 이 장 엔진은 이런 설계를 전랭크 위반으로 거절합니다.

Because x²=x, the last two columns coincide. The intercept and x are independent, so rank is 2. Adding t to β₁ and subtracting t from β₂ preserves all predictions. Three coefficients are not uniquely determined, and this engine rejects the design as lacking full column rank.

7. 로그의 정확한 비An exact ratio from a log contrast

두 적합 로그의 차이가 d=ln(1.1)일 때 지수화한 수준의 비와 증가율을 구하세요. d=0.1과도 구별하세요.

Two fitted logs differ by d=ln(1.1). Find the ratio and percentage change of exponentiated levels, distinguishing d=0.1.

풀이와 확인할 이유Solution and explanation

비는 exp(d)=1.1이므로 증가율은 정확히 10%입니다. d=0.1이라면 비는 exp(0.1)≈1.10517로 약 10.517%입니다. 이 두 수준은 적합 로그의 지수화이며 산술 조건부 평균이라는 추가 결론은 포함하지 않습니다.

The ratio is exp(d)=1.1, exactly a 10% increase. If d=0.1 instead, the ratio is exp(0.1)≈1.10517, about 10.517%. These are exponentiated fitted levels; they are not automatically arithmetic conditional means.

8. 평균 0 로그 오차Mean-zero log errors

로그 모형 log y=m+u에서 u가 ln 2와 −ln 2를 각 확률 1/2로 갖습니다. E[u]와 E[y]를 구하세요.

In log y=m+u, u takes ln 2 and −ln 2 with equal probability. Compute E[u] and E[y].

풀이와 확인할 이유Solution and explanation

오차 평균은 0입니다. 그러나 exp(u)는 2와 1/2이므로 그 평균은 5/4입니다. 따라서 E[y]=(5/4)exp(m)이며 exp(m)과 다릅니다. 로그 평균 0만으로 재변환 인자가 1이라는 주장은 성립하지 않습니다.

Mean u is zero. But exp(u) takes 2 and 1/2, with mean 5/4. Hence E[y]=(5/4)exp(m), not exp(m). Mean-zero log errors alone do not make the retransformation factor equal to one.

9. 가설 행렬 쓰기Writing a hypothesis matrix

β=(절편, 일차, 이차) 순서에서 이차 계수 0과 절편 2를 동시에 고정하는 R과 r를 쓰세요.

With coefficient order intercept, linear, quadratic, write R and r fixing curvature at zero and the intercept at 2.

풀이와 확인할 이유Solution and explanation

R의 행을 (0, 0, 1), (1, 0, 0)으로 놓고 r=(0, 2)ᵀ로 둡니다. 행 순서를 바꾸면 목표도 같은 순서로 바꿔야 합니다. 두 행은 독립이므로 q=2입니다.

Use rows (0, 0, 1) and (1, 0, 0), with r=(0, 2)ᵀ. Reordering rows requires reordering targets too. The rows are independent, so q=2.

10. 중복 제약의 자유도Degrees of freedom with duplicate restrictions

R의 두 행은 (0, 0, 1), (0, 0, 2), r=(0, 0)입니다. 유효 제약 수와 β₂=0 한 행만 썼을 때와의 관계를 설명하세요.

R has rows (0, 0, 1), (0, 0, 2) and targets (0, 0). Count effective restrictions and compare with one row imposing β₂=0.

풀이와 확인할 이유Solution and explanation

둘째 행은 첫째의 두 배이고 목표도 맞게 두 배입니다. 허용집합은 β₂=0 하나와 같으며 q=1입니다. 같은 전랭크 원 설계에서는 제한 계수·SSE가 같고, 보통 F가 정의되는 경우 유효 자유도를 쓴 F도 같습니다. 행 수 2를 q로 쓰지 않습니다.

The second row and target are twice the first. The feasible set is exactly β₂=0 and q=1. For the same full-rank design, the restricted coefficients and SSE are unchanged; when ordinary F is defined, F using effective degrees of freedom is unchanged too. The raw row count 2 is not q.

11. 모순을 검정값으로 채우지 않는다Do not turn inconsistency into a statistic

R의 행 (0, 0, 1), (0, 0, 2)에 r=(0, 1)을 줍니다. 가설의 일관성과 제한 F를 설명하세요.

For rows (0, 0, 1), (0, 0, 2), set targets (0, 1). Discuss consistency and restricted F.

풀이와 확인할 이유Solution and explanation

첫째는 β₂=0인데 둘째는 2β₂=1을 요구합니다. 두 배한 첫째를 둘째에서 빼면 0=1이므로 해집합이 비어 있습니다. 제한 적합·제한 SSE·F가 없으며 임의 큰 통계량이나 0으로 채우지 않습니다.

The first restriction gives β₂=0, while the second requires 2β₂=1. Subtraction yields 0=1, so the feasible set is empty. There is no restricted fit, SSE or F to replace by a large number or zero.

12. 비영 절편 제약A nonzero intercept restriction

설명용 여섯 행은 x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5)이고 열 순서는 (1, x, x²)입니다. 절편을 2로 고정할 때 나머지 두 계수와 SSE를 구하세요.

Six assumed rows have x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5), with column order (1, x, x²). Fix the intercept at 2 and find the other coefficients and SSE.

풀이와 확인할 이유Solution and explanation

대칭성으로 일차 계수는 0입니다. 이차 계수는 Σx²(y−2)/Σx⁴=24/34=12/17입니다. 잔차는 x=±2에서 3/17, x=±1에서 −12/17, 두 x=0에서 0과 −2입니다. 제곱합은 2(9+144)/289+4=86/17입니다. 원 SSE=2보다 52/17 큽니다.

Symmetry makes the linear coefficient zero. The quadratic coefficient is Σx²(y−2)/Σx⁴=24/34=12/17. Residuals are 3/17 at ±2, −12/17 at ±1, and 0 and −2 at the two zero rows. Their squared sum is 86/17, exceeding unrestricted SSE=2 by 52/17.

13. 제약 해의 정상 조건Normal conditions for a restricted solution

X는 전랭크이고 G=XᵀX, R은 독립 행, Rβ=r는 일관됩니다. 제한해가 Gβ_R+Rᵀλ=Xᵀy와 Rβ_R=r를 만족하는 이유와 유일성을 설명하세요.

Assume full-rank X, G=XᵀX, independent rows of R and a consistent Rβ=r. Explain the equations Gβ_R+Rᵀλ=Xᵀy, Rβ_R=r, and uniqueness.

풀이와 확인할 이유Solution and explanation

잔차 제곱합의 절반과 λᵀ(Rβ−r)를 합한 목적을 β와 λ로 미분하면 두 식이 나옵니다. G는 양의 정부호이므로 목적은 β에 엄격 볼록합니다. 비어 있지 않은 닫힌 아핀 집합에서 강제성이 있는 이 이차함수는 최소값을 가지며, 두 다른 최소해의 중점은 엄격히 더 작아질 것이므로 해는 유일합니다.

Differentiate half the squared residual norm plus λᵀ(Rβ−r) in β and λ. Positive-definite G makes the objective strictly convex and coercive. It attains a minimum on the nonempty closed affine set. Two distinct minima would have a strictly better midpoint, so the minimizing coefficient vector is unique.

14. 제약 손실의 비음수 증명Proving nonnegative restriction loss

X가 전랭크이고 β_U는 원 OLS입니다. 임의 허용 β_R에 대해 v=β_R−β_U라고 할 때 SSE_R−SSE_U=vᵀXᵀXv를 증명하세요.

For full-rank X and unrestricted OLS β_U, let v=β_R−β_U for any feasible β_R. Prove SSE_R−SSE_U=vᵀXᵀXv.

풀이와 확인할 이유Solution and explanation

e_R=e_U−Xv를 제곱하면 e_Uᵀe_U−2vᵀXᵀe_U+vᵀXᵀXv입니다. OLS 정상식 Xᵀe_U=0으로 교차항이 사라집니다. 남은 이차형은 비음수이고 전랭크에서는 0일 때 v=0입니다. 통계 분포 가정 없이 성립하는 표본 항등식입니다.

Expand (e_U−Xv)ᵀ(e_U−Xv). The cross term is −2vᵀXᵀe_U, which vanishes by the normal equations. The remaining quadratic form is nonnegative and, under full rank, zero only for v=0. This sample identity needs no distributional assumptions.

15. 여섯 행의 FThe six-row F geometry

설명용 여섯 행은 x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5)이고 열 순서는 (1, x, x²)입니다. 원 OLS의 SSE=2, 곡률 0 제한 SSE=58/3입니다. q와 잔차 자유도·s²·F를 구하세요.

Six assumed rows have x=(−2, −1, 0, 0, 1, 2), y=(5, 2, 2, 0, 2, 5), with column order (1, x, x²). Unrestricted SSE is 2 and zero-curvature SSE is 58/3. Find q, residual degrees of freedom, s² and F.

풀이와 확인할 이유Solution and explanation

독립 제한은 하나여서 q=1이고 p=3, n−p=3입니다. s²=2/3, 제약 손실은 52/3이므로 F=(52/3)/(2/3)=26입니다. 이 숫자에 실제 F₁,₃ 분포를 붙이려면 고정 설계·귀무 평균·외생 등분산 양의 정규 오차 조건을 따로 둬야 합니다.

There is one independent restriction, q=1. With p=3, residual degrees of freedom are 3 and s²=2/3. The loss 52/3 gives F=26. An actual F₁,₃ reference additionally needs the fixed-design null mean and exogenous, homoskedastic, positive-variance Gaussian errors.

16. n=p의 경계The n=p boundary

X의 행은 (1, 0), (1, 1), y=(1, 2), 제한은 둘째 계수 0입니다. 계수는 유일한가요? 보통 F는 정의되나요?

Rows of X are (1, 0), (1, 1), y=(1, 2), and the second coefficient is restricted to zero. Are coefficients unique, and is ordinary F defined?

풀이와 확인할 이유Solution and explanation

원 X는 가역이므로 β_U=(1, 1)이 유일하며 SSE_U=0입니다. 그러나 n=p=2라 잔차 자유도는 0입니다. 제한 fit은 계산할 수 있어도 s²와 보통 유한 F의 분모를 정의할 수 없습니다.

The invertible design gives unique β_U=(1, 1) and zero SSE. But n=p=2 leaves zero residual degrees of freedom. A restricted fit can be computed while s² and the ordinary finite F denominator remain undefined.

17. 완벽 적합의 경계Perfect-fit boundary

x=(−2, −1, 0, 0, 1, 2), y=1+x²이고 원 X=(1, x, x²), 제한 β₂=0입니다. n>p일 때도 F가 미정의인 이유를 설명하세요.

Take x=(−2, −1, 0, 0, 1, 2), y=1+x², full X=(1, x, x²), restriction β₂=0. Why is F undefined despite n>p?

풀이와 확인할 이유Solution and explanation

원 모형은 y를 정확히 재현해 SSE_U=0입니다. 제한 직선은 상수 8/3이고 SSE_R=52/3>0입니다. 분자는 양수여도 분모 SSE_U/(6−3)=0입니다. 이는 양의 잔차 분산을 쓰는 보통 유한 F의 범위 밖이며 숫자 0으로 바꾸지 않습니다.

The full design reproduces y exactly, so SSE_U=0. The restricted line is constant 8/3 with SSE_R=52/3>0. A positive numerator still has denominator SSE_U/(6−3)=0. The ordinary finite F requiring positive residual scale is undefined, not zero.

18. 실질 제약이 없을 때No effective restriction

전랭크 X에 R의 모든 행이 영행이고 r=0입니다. 제한 적합·손실·F를 설명하세요.

For full-rank X, all rows of R and all targets are zero. Describe the restricted fit, loss and F.

풀이와 확인할 이유Solution and explanation

모든 β가 제약을 만족하므로 원 OLS가 그대로 제한 최소해입니다. 두 SSE가 같고 손실은 0입니다. 그러나 q=0이므로 손실을 q로 나누는 F는 미정의입니다. 빈 제약을 검사했다고 유의성 결론을 만들지 않습니다.

Every coefficient vector is feasible, so restricted and unrestricted minima coincide. SSE loss is zero. But q=0 makes division by the number of restrictions undefined; there is no meaningful restriction-test conclusion.

19. 등식과 부등식의 범위Equality versus inequality restrictions

이 장 API가 Rβ=r만 지원합니다. β₂≥0을 R=(0, 0, 1), r=0으로 넣으면 같은 제약인가요?

The API supports Rβ=r. Is entering R=(0, 0, 1), r=0 equivalent to β₂≥0?

풀이와 확인할 이유Solution and explanation

아닙니다. 입력은 β₂=0이라는 경계 한 점만 허용하지만 부등식은 양수 곡률도 허용합니다. 부등식 최소제곱은 활동 제약과 경계 분포가 별도 문제입니다. 지원하지 않는 조건을 등식으로 바꾸어 같은 분석이라고 부르지 않습니다.

No. The input fixes β₂ exactly at zero, while the inequality permits positive curvature too. Inequality-constrained least squares needs a separate treatment of active constraints and boundary inference. Replacing an unsupported inequality by equality changes the question.

20. 제한식이 이미 맞으면When the estimate already satisfies the restriction

X 전랭크, R은 q≥1개의 독립·일관 제약, n>p, SSE_U>0이고 Rβ_U=r입니다. 제한해·손실·F를 구하고 모집단 해석을 설명하세요.

Assume full-rank X, q≥1 independent consistent restrictions R, n>p, SSE_U>0 and Rβ_U=r. Find the restricted fit, loss and F and discuss the population conclusion.

풀이와 확인할 이유Solution and explanation

원 추정이 이미 허용집합에 있어 제한해도 같습니다. 손실 0, q>0일 때 F=0입니다. 이는 그 표본의 추정이 제약과 정확히 맞는다는 뜻입니다. 모집단 제약이 참이라는 증명이나 반대 가설의 확률 0이라는 결론은 아닙니다.

The unrestricted minimizer is already feasible, so the restricted fit is identical. Loss is zero and F=0 for q>0. This describes exact agreement in this sample, not proof that the population null is true or that alternatives have probability zero.

21. 대각 공동 이차형A diagonal joint form

추정 계수는 (1, 2), 작업 공분산 V=diag(1, 4), R=I₂, r=(0, 0)입니다. W와 W/q를 구하세요.

Estimated coefficients are (1, 2), working V=diag(1, 4), R=I₂ and r=(0, 0). Find W and W/q.

풀이와 확인할 이유Solution and explanation

독립 제약은 q=2입니다. 역행렬은 diag(1, 1/4)이므로 W=1²+2²/4=2, W/q=1입니다. 이 수치만으로 실제 카이제곱 또는 F 분포가 확인되는 것은 아닙니다.

There are q=2 independent restrictions. The inverse is diag(1, 1/4), giving W=1²+2²/4=2 and W/q=1. These computations alone verify neither an actual chi-square nor an F reference.

22. 상관된 두 방향Two correlated directions

V=[[1, 9/10], [9/10, 1]]이고 R=I₂입니다. d=(1, 1)과 (1, −1)의 W를 각각 구하세요.

For V=[[1, 9/10], [9/10, 1]] and R=I₂, compute W for d=(1, 1) and d=(1, −1).

풀이와 확인할 이유Solution and explanation

행렬식은 19/100이고 역행렬은 (100/19)[[1, −9/10], [−9/10, 1]]입니다. 같은 방향은 분자가 1/5라 W=20/19, 반대 방향은 19/5라 W=20입니다. 대각 분산만 같다고 공동 검정이 같아지는 것은 아닙니다.

The determinant is 19/100 and inverse is (100/19)[[1, −9/10], [−9/10, 1]]. The unscaled quadratic numerators are 1/5 and 19/5, giving W=20/19 and 20. Matching marginal variances does not imply matching joint assessment.

23. 제약 단위 바꾸기Rescaling a restriction

β̂=(2, 1), V=diag(4, 1)에서 β₀+β₁=1의 W를 구하세요. 같은 조건을 3β₀+3β₁=3으로 쓰면 어떻게 되나요?

With β̂=(2, 1), V=diag(4, 1), find W for β₀+β₁=1. Compare with 3β₀+3β₁=3.

풀이와 확인할 이유Solution and explanation

원 잔차 d=2, 분산 Ω=5이므로 W=4/5입니다. 세 배한 조건은 d=6, Ω=45이므로 36/45=4/5입니다. 목표도 함께 세 배한 것이 핵심입니다.

The original gap is 2 and variance is 5, giving W=4/5. Scaling the restriction and target by 3 gives gap 6 and variance 45, hence 36/45=4/5. The target must be rescaled too.

24. 특이 공분산의 열공간The range of a singular covariance

Ω=diag(1, 0)에서 d=(1, 0)과 d=(1, 1)의 열공간 소속과 보통 역행렬 Wald의 정의 여부를 답하세요.

For Ω=diag(1, 0), classify d=(1, 0) and d=(1, 1) by column-space membership and ordinary inverse-based Wald availability.

풀이와 확인할 이유Solution and explanation

열공간은 (a, 0) 꼴이므로 첫째는 안에, 둘째는 밖에 있습니다. Ω는 두 경우 모두 특이여서 보통 역행렬 Wald는 미정의입니다. 첫째가 열공간 안에 있다는 사실만으로 역행렬이 생기지는 않습니다. 일반화 역행렬을 쓰는 다른 정의는 따로 선언해야 합니다.

The range consists of (a, 0), so the first gap lies inside and the second outside. Ω remains singular in both cases; ordinary inverse-based Wald is undefined. Range membership does not create an inverse. A generalized-inverse alternative needs a separate definition.

25. 대각 원소만으로는 부족하다Diagonal entries are insufficient

V=[[1, 2], [2, 1]]가 공분산일 수 없는 이유를 한 벡터로 보이세요.

Use one vector to show why V=[[1, 2], [2, 1]] cannot be a covariance.

풀이와 확인할 이유Solution and explanation

a=(1, −1)로 두면 Va=(−1, 1), aᵀVa=−2입니다. 선형결합의 분산이 음수가 되므로 양의 준정부호가 아닙니다. 대칭이고 대각 원소가 양수인 것만으로 공분산의 요건이 충족되지 않습니다.

Take a=(1, −1). Then Va=(−1, 1) and aᵀVa=−2. A linear combination cannot have negative variance, so the matrix is not positive semidefinite despite symmetry and positive diagonal entries.

26. 알려진 공분산의 정규 이차형A Gaussian form with known covariance

R은 독립 q행이고 Ω=RVRᵀ가 양의 정부호입니다. 귀무가설 아래 d=Rβ̂−r∼N(0, Ω)라고 가정합니다. W의 분포와 필요한 추가 정보가 무엇인지 쓰세요.

R has q independent rows and Ω=RVRᵀ is positive definite. Under the null assume d=Rβ̂−r∼N(0, Ω). Give the law of W and identify the assumption beyond arithmetic.

풀이와 확인할 이유Solution and explanation

Ω⁻¹/²d는 q차원 표준 정규이므로 그 성분 제곱합 W는 χ²_q입니다. 이는 d의 공동 정규 분포와 참 Ω를 가정한 결과입니다. 숫자 행렬이 준정부호라는 검사나 공분산 추정값 하나로 그 가정을 증명한 것은 아닙니다.

Whitening gives Ω⁻¹/²d∼N(0, I_q); its squared norm W is χ²_q. This uses the assumed joint Gaussian null and true Ω. A semidefiniteness check or an estimated covariance by itself does not establish those premises.

27. 엄격 임계값 비교Strict cutoff comparison

W=4이고 작업 기준이 각각 3, 4, 5입니다. API가 W>기준으로 비교할 때 결과와 5% 해석의 조건을 쓰세요.

Let W=4 and supplied cutoffs be 3, 4, 5. Under strict W>cutoff, give the decisions and explain what a 5% interpretation additionally requires.

풀이와 확인할 이유Solution and explanation

비교는 참, 거짓, 거짓입니다. 같은 값에서 엄격 부등호는 거짓입니다. 이것은 숫자 비교이며 기준이 유효한 귀무분포의 95% 분위수라는 별도 근거가 있어야 5% 규칙이라고 부를 수 있습니다.

The comparisons are true, false and false. Equality does not satisfy a strict inequality. A 5% interpretation further requires a justified null reference whose 95th quantile supplied the cutoff.

28. 작업 F와 WaldWorking F and Wald

독립 제약 q=2이고 고전 작업 공분산을 사용한 W=10.999002734641026입니다. 동일한 s²·같은 행의 제약 SSE F를 구하세요. HC1 W=12.130397402990884를 그 F와 같다고 할 수 있나요?

There are q=2 independent restrictions and classical working W=10.999002734641026. Find the same-sample SSE F using the same s². Is HC1 W=12.130397402990884 the same F?

풀이와 확인할 이유Solution and explanation

고전 행렬 s²G⁻¹에서는 W=qF이므로 F≈5.499501367320513입니다. HC1은 다른 공분산이므로 그 W를 q로 나눈 값도 이 SSE F와 일반적으로 다릅니다. 고전 F 분포의 실제 유효성은 이 대수 관계와 별도입니다.

With s²G⁻¹, W=qF, giving F≈5.499501367320513. HC1 uses a different covariance, so even HC1 W/q generally differs from the SSE F. Actual validity of a classical F law is separate from this algebraic identity.

29. 한 방향만 검사한다Testing one direction

β̂=(2, 1), V=diag(4, 1), R=(1, 1), r=0일 때 q와 W를 구하세요. 두 계수 각각 0이라는 공동 가설과 구별하세요.

For β̂=(2, 1), V=diag(4, 1), R=(1, 1), r=0, find q and W. Distinguish the joint null that both coefficients are zero.

풀이와 확인할 이유Solution and explanation

q=1, d=3, Ω=5라 W=9/5입니다. β₀+β₁=0은 두 계수가 반대 부호로 상쇄되는 경우도 허용합니다. 두 계수 각각 0은 R=I₂인 q=2 가설로 허용집합 자체가 더 작습니다.

Here q=1, d=3 and Ω=5, so W=9/5. The sum-zero null allows opposite-signed coefficients to cancel. Setting both individually to zero uses R=I₂ and q=2, a smaller feasible null set.

30. 중복 행의 특이 행렬을 그대로 뒤집지 않는다Reduce redundant rows before inversion

β̂=(1, 2), V=I₂에서 R의 행을 (1, 0), (0, 1), (1, 1), 목표를 모두 0으로 줍니다. 독립 제약 수와 W를 구하세요.

For β̂=(1, 2), V=I₂, let R have rows (1, 0), (0, 1), (1, 1), all targets zero. Find effective q and W.

풀이와 확인할 이유Solution and explanation

셋째 행은 앞 둘의 합이므로 q=2입니다. 원 3×3 RVRᵀ는 특이하지만 독립 두 제약으로 줄이면 Ω=I₂입니다. W=1²+2²=5입니다. 세 행 수로 나누거나 특이 3×3 역행렬을 만들지 않습니다.

The third row sums the first two, so q=2. The raw 3×3 RVRᵀ is singular, but reduction to two independent conditions gives Ω=I₂ and W=1²+2²=5. Do not count three effective restrictions or invent a 3×3 inverse.

31. 중첩 방향의 확인Verifying a nested space

같은 n행에서 X_U=(1, x, x²), X_R=(1, x)이고 X_U가 전랭크입니다. 중첩과 q를 보이세요.

On the same n rows, X_U=(1, x, x²), X_R=(1, x), with X_U full rank. Show nesting and find q.

풀이와 확인할 이유Solution and explanation

작은 모형의 예측 a+bx는 큰 모형의 계수 (a, b, 0)으로 모두 표현됩니다. 따라서 작은 열공간이 큰 공간 안에 있고 p_U=3, p_R=2라 q=1입니다. 두 설계와 y가 같은 원위치의 완전행을 사용해야 합니다.

Every prediction a+bx is represented by full-model coefficients (a, b, 0). Thus the smaller space is contained in the larger and q=3−2=1. Both designs and the outcome must use the same complete original positions.

32. 같은 공간의 다른 열Different columns, same space

x가 둘 이상 서로 다른 값을 갖고 X_U=(1, x), X_R=(2, 3x)입니다. 열공간·q·중첩 F를 설명하세요.

With at least two distinct x values, take X_U=(1, x), X_R=(2, 3x). Discuss their spaces, q and nested F.

풀이와 확인할 이유Solution and explanation

각 열은 0이 아닌 배율만 달라 두 열공간이 같습니다. 두 설계는 전랭크 2이고 q=0입니다. 예측과 SSE가 같아도 실질 추가 제약이 없어서 중첩 F는 미정의입니다.

Only nonzero column scales differ, so the spaces coincide. Both have rank 2 and q=0. Predictions and SSE agree, but there is no effective additional restriction and no nested F.

33. 같은 크기의 비중첩Equal dimensions without nesting

x=(−1, 0, 1), A=(1, x), B=(1, x²)입니다. 두 공간이 같은지와 일반 중첩 F 사용 여부를 설명하세요.

For x=(−1, 0, 1), A=(1, x), B=(1, x²), determine whether the spaces agree and whether a nested F comparison applies.

풀이와 확인할 이유Solution and explanation

x²=(1, 0, 1)을 a+bx로 표현하려면 양끝에서 b=0, a=1이어야 하지만 가운데는 1이 되어 0과 맞지 않습니다. 두 공간은 각각 차원 2지만 같지 않아 어느 쪽도 다른 쪽 안에 들지 않습니다. 중첩 F가 아니라 별도 모형 비교 문제입니다.

Representing x²=(1, 0, 1) by a+bx forces b=0, a=1 at the two ends, contradicting the middle value zero. Both spaces have dimension 2 but differ, so neither contains the other. A nested F is unavailable.

34. 같은 완전행 교집합Intersecting complete original rows

원위치 A–E의 y는 모두 가용합니다. 큰 설계는 B만 결측, 작은 설계는 D만 결측이며 나머지는 전부 가용합니다. 두 적합의 비교 표본과 개수를 쓰세요.

Outcomes at original positions A–E are available. Only B is unavailable in the full design and only D in the restricted design. State the common comparison sample.

풀이와 확인할 이유Solution and explanation

두 설계와 y가 함께 완전한 원위치는 A, C, E의 3개입니다. 큰 모형에 D를 남기거나 작은 모형에 B를 남겨 각각 4행을 맞추면 같은 표본 비교가 아닙니다. 이 세 행에서 각 설계가 전랭크인지도 별도로 확인해야 합니다.

The intersection is A, C, E: three rows. Fitting four rows separately by retaining D only in the full design and B only in the restricted design does not give a common-sample comparison. Each design must still be checked for rank on the three retained rows.

35. 일반 SSE 비 계산A general SSE ratio

동일 10행의 중첩 모형에서 p_U=3, p_R=1, SSE_U=14, SSE_R=42입니다. 작업 F와 두 자유도를 구하세요.

On the same 10 rows, nested fits have p_U=3, p_R=1, SSE_U=14, SSE_R=42. Find the working F and its two degrees of freedom.

풀이와 확인할 이유Solution and explanation

q=3−1=2, 잔차 자유도는 10−3=7입니다. 손실은 28, 제약당 손실은 14, 잔차규모는 14/7=2입니다. 따라서 F=14/2=7입니다. 분포 전제를 추가로 확인해야 F₂,₇ 기준 해석이 가능합니다.

The numerator count is q=2 and residual degrees of freedom are 7. Loss is 28, loss per restriction is 14, and residual scale is 14/7=2. Thus F=7. An F₂,₇ reference requires the additional sampling assumptions.

36. 정규 F의 독립성Independence in the Gaussian F proof

고정 전랭크 중첩 X_R⊂X_U, q=p_U−p_R>0, n>p_U를 가정합니다. 귀무 평균은 col(X_R), 오차는 N(0, σ²I), σ²>0입니다. 두 제곱합이 독립인 이유를 설명하세요.

Assume fixed full-rank nested designs, q=p_U−p_R>0, n>p_U, a null mean in col(X_R), and errors N(0, σ²I), σ²>0. Why are the two sums of squares independent?

풀이와 확인할 이유Solution and explanation

A=H_U−H_R와 B=I−H_U는 직교한 투영이라 AB=0입니다. Aε와 Bε의 교차 공분산은 σ²AB=0이며 공동 정규이므로 독립입니다. 각 제곱길이는 해당 랭크 q와 n−p_U의 카이제곱에 σ²를 곱한 값입니다. 자유도로 나눈 비가 F입니다.

A=H_U−H_R and B=I−H_U are orthogonal projectors with AB=0. Their Gaussian projected errors have cross-covariance σ²AB=0, hence are independent. Squared norms divided by σ² are chi-squares with ranks q and n−p_U. Dividing each by its rank and taking the ratio gives F.

37. 0 공분산의 반례A zero-covariance counterexample

Z는 −1, 0, 1을 같은 확률로 갖습니다. U=Z²−2/3일 때 Cov(Z, U)=0이지만 독립이 아님을 보이세요.

Z is uniform on −1, 0, 1. With U=Z²−2/3, show zero covariance but dependence.

풀이와 확인할 이유Solution and explanation

E[Z]=0, E[U]=0이고 E[ZU]=E[Z³]−(2/3)E[Z]=0입니다. 그러나 Z=0이면 U=−2/3이 확실하고, 그 무조건 확률은 1/3뿐입니다. 조건부 확률이 달라 독립이 아닙니다.

Both means vanish and E[ZU]=E[Z³]−(2/3)E[Z]=0. Yet Z=0 forces U=−2/3 with probability one, whereas its unconditional probability is only 1/3. Thus the variables are dependent.

38. t의 부호와 FThe sign of t and F

독립 제약 하나에 고전 작업 t=−3이 정의되어 있습니다. 같은 SSE F를 구하고 F의 부호가 주는 정보를 설명하세요.

One independent restriction has defined classical working t=−3. Find the same SSE F and discuss sign information.

풀이와 확인할 이유Solution and explanation

F=t²=9입니다. F는 제곱 방향을 재므로 t가 음수였는지 양수였는지 보존하지 않습니다. 부호 있는 효과의 방향은 추정계수와 제약잔차에서 따로 읽어야 합니다. 임의 다른 작업 공분산의 t와 이 F를 섞지 않습니다.

F=t²=9. Squaring discards whether t was positive or negative. Read direction from coefficients and the restriction gap separately. Do not mix a t based on another working covariance with this SSE F.

39. 완벽한 작은 모형A perfect smaller fit

전랭크 동일행 중첩 모형에서 SSE_R=0입니다. SSE_U와 제약 F를 설명하세요.

Full-rank same-sample models are nested and SSE_R=0. What follows for SSE_U and restriction F?

풀이와 확인할 이유Solution and explanation

0≤SSE_U≤SSE_R=0이므로 SSE_U=0입니다. 제약 손실도 0이지만 잔차 분산 분모가 0이라 보통 F는 미정의입니다. 양쪽이 완벽히 맞는다는 표본 사실은 유한한 F=0과 구별합니다.

Since 0≤SSE_U≤SSE_R=0, the unrestricted SSE is also zero. Loss is zero, but the residual-scale denominator vanishes. Ordinary F is undefined; a perfect pair of fits is not a finite F=0.

40. 결과 단위와 F 불변Outcome units and F invariance

같은 전랭크 X와 동차 제약 Rβ=0에서 y를 양수 a배합니다. n>p, q>0, SSE_U>0일 때 계수·SSE·F가 어떻게 바뀌나요?

With fixed full-rank X and homogeneous restrictions Rβ=0, multiply y by a>0. Assume n>p, q>0, SSE_U>0. How do coefficients, SSE and F change?

풀이와 확인할 이유Solution and explanation

원·제한 계수와 잔차는 모두 a배, 두 SSE와 손실은 a²배입니다. F의 분자와 분모에 a²가 함께 붙어 소거됩니다. 비영 목표 r를 그대로 둔 경우에는 제한집합이 같은 단위로 변환되지 않으므로 이 결론을 그대로 적용할 수 없습니다.

Unrestricted/restricted coefficients and residuals scale by a; both SSE values and their loss scale by a². The factor cancels in F. If a nonzero target r stays numerically fixed, the restriction has not been transformed with the outcome units and the same argument does not apply.

41. 절편 모형의 PRESSPRESS for an intercept model

y=(0, 1, 2)에 절편만 적합합니다. 원 평균·각 레버리지·세 삭제 예측·PRESS를 구하세요.

Fit only an intercept to y=(0, 1, 2). Find the mean, each leverage, all deletion predictions and PRESS.

풀이와 확인할 이유Solution and explanation

원 평균은 1이고 각 h=1/3입니다. 첫째·둘째·셋째 행을 빼고 얻는 평균은 각각 3/2, 1, 1/2입니다. 삭제 잔차는 −3/2, 0, 3/2라 PRESS=9/4+9/4=9/2입니다. 원 훈련 SSE=2와 다르며 모든 삭제 설계는 절편 전랭크를 유지합니다.

The full mean is 1 and each h=1/3. Deleting the first, second and third rows gives predictions 3/2, 1, 1/2. Deletion residuals are −3/2, 0, 3/2, so PRESS=9/2, different from training SSE=2. Every deleted design still has a full-rank intercept.

42. 잔차 0이 삭제 영향 0은 아니다A zero residual need not mean no deletion problem

X의 행은 (1, 0), (1, 0), (0, 1), y=(0, 1, 2)입니다. 계수와 셋째 행의 레버리지·잔차·삭제 상태를 구하세요.

X has rows (1, 0), (1, 0), (0, 1), y=(0, 1, 2). Find coefficients and the third row’s leverage, residual and deletion status.

풀이와 확인할 이유Solution and explanation

G=diag(2, 1)이므로 β=(1/2, 2)입니다. 셋째 예측은 2로 잔차 0, 레버리지는 1입니다. 삭제하면 둘째 계수를 정할 열 정보가 사라져 랭크가 1이 됩니다. 삭제 예측은 유일하지 않아 PRESS와 그 행의 Cook은 미정의입니다.

G=diag(2, 1) gives β=(1/2, 2). The third row predicts 2 with residual zero and leverage one. Deleting it removes all information about the second coefficient and reduces rank to one. Its deletion prediction is not unique, so full PRESS and its Cook distance are undefined.

43. 삭제 잔차 확대Deletion residual amplification

전랭크 OLS의 한 행에서 e_i=2, h_i=1/2이며 삭제 후에도 전랭크입니다. 삭제 잔차와 관측 y_i=7일 때 삭제 예측을 구하세요.

A full-rank OLS row has e_i=2, h_i=1/2 and retains full rank after deletion. Find its deletion residual and deletion prediction if y_i=7.

풀이와 확인할 이유Solution and explanation

삭제 잔차는 2/(1−1/2)=4입니다. 삭제 예측은 7−4=3입니다. 원 예측 7−2=5와 구별합니다. 삭제는 자기 행이 추정에 준 기여를 빼므로 같은 원잔차를 그대로 시험 오차라고 읽지 않습니다.

The deletion residual is 2/(1−1/2)=4 and its prediction is 7−4=3. The original prediction was 7−2=5. Removing the row’s contribution changes its prediction; a training residual is not its deletion error.

44. Cook의 분모Cook distance denominators

한 행의 e=2, h=1/2이고 전랭크 설계 열 수 p=2, 잔차규모 s²=4입니다. 내부 표준화 잔차 제곱과 Cook 거리를 구하세요.

A row has e=2, h=1/2, design-column count p=2 and residual scale s²=4. Compute squared internal standardization and Cook distance.

풀이와 확인할 이유Solution and explanation

표준화 제곱은 4/[4(1/2)]=2입니다. Cook은 4(1/2)/[2·4·(1/2)²]=1입니다. 분모 p와 1−h의 제곱을 빠뜨리지 않습니다. 이 값만으로 해당 관측이 잘못됐다고 판정하거나 지우지 않습니다.

Squared standardization is 4/[4(1/2)]=2. Cook distance is 4(1/2)/[2·4·(1/2)²]=1. Retain both p and the squared leverage gap in the denominator. The result alone does not establish that the observation is wrong or should be deleted.

45. 설계 좌표와 레버리지Design coordinates and leverage

X는 전랭크이고 A는 같은 열 수의 가역 정사각행렬입니다. X̃=XA의 투영행렬과 레버리지가 X와 같음을 보이세요.

X has full column rank and A is an invertible square matrix of the same column dimension. Show that X̃=XA has the same projector and leverages.

풀이와 확인할 이유Solution and explanation

X̃ᵀX̃=AᵀGA이므로 그 역행렬은 A⁻¹G⁻¹(Aᵀ)⁻¹입니다. 투영식에 넣으면 A와 그 역이 소거됩니다.

H~=XA(ATGA)−1ATXT=H\tilde H=XA(A^TGA)^{-1}A^TX^T=H

따라서 모든 대각 원소 h_i도 같습니다. 가역 중심·단위 변경으로 높은 레버리지가 사라졌다는 주장은 같은 행과 같은 열공간에서는 맞지 않습니다.

The new Gram matrix is AᵀGA, whose inverse is A⁻¹G⁻¹(Aᵀ)⁻¹. Substitution cancels the coordinate transformations.

H~=XA(ATGA)−1ATXT=H\tilde H=XA(A^TGA)^{-1}A^TX^T=H

Every diagonal leverage is unchanged. An invertible centering or unit change cannot remove leverage while preserving the same rows and column space.

46. 상수 잔차 제곱Constant squared residuals

y=(−1, 1)에 절편만 적합하고 e²를 같은 절편에 보조회귀합니다. R²와 nR²를 정의할 수 있나요?

Fit an intercept to y=(−1, 1), then regress squared residuals on the same intercept. Are centered R² and nR² defined?

풀이와 확인할 이유Solution and explanation

원 평균 0, 잔차(−1, 1)이므로 e²=(1, 1)입니다. 보조 결과의 중심화 TSS는 0입니다. 보조 SSE도 0이지만 R²=1−0/0은 미정의입니다. 완벽 적합이라는 이유로 R²=1 또는 nR²=2라고 강제로 채우지 않습니다.

The fitted mean is zero and squared residuals are (1, 1). Their centered TSS is zero. Auxiliary SSE is also zero, but R²=1−0/0 is undefined. Perfect fit does not justify filling R² with one or nR² with two.

47. 잔차 진단의 한계Limits of residual diagnostics

미지 고정 계수 β를 둔 모집단 식 y=Xβ+ε에서 ε를 정의합니다. OLS 잔차 그림이 0 부근이고 Xᵀe=0입니다. 이것으로 E[ε|X]=0과 오차 독립성을 증명했다고 할 수 있나요? 표본 항등식과 모집단 조건을 구별하세요.

Define ε by the population equation y=Xβ+ε with unknown fixed β. An OLS residual plot is near zero and Xᵀe=0. Does this prove E[ε|X]=0 and independent errors? Distinguish sample identities from population premises.

풀이와 확인할 이유Solution and explanation

아닙니다. Xᵀe=0은 사용한 X에 최소제곱으로 적합했기 때문에 성립하는 정상식입니다. ε는 명시한 모집단 식 y=Xβ+ε의 오차이고 적합 잔차 e와 다릅니다. 그림은 모양·분산·의존에 대한 질문을 제기하지만 표본에서 놓친 관계나 선택·인과 방향까지 증명하지 않습니다.

No. Xᵀe=0 is a normal equation imposed by least squares on the chosen X. The unobserved error in the declared population equation differs from the fitted residual e. A plot can raise questions about shape, spread or dependence without proving the absence of omitted relations, selection or causal ambiguity.

48. 국가 이차식의 유한 차이A finite country-polynomial contrast

설명용 반올림 계수는 b₁=5.408891776253278, b₂=−0.5568306760166316입니다. g=GDP/10,000이고 적합은 b₀+b₁g+b₂g²입니다. g=2→3의 적합 기대수명 차이를 구하세요.

Use displayed rounded coefficients b₁=5.408891776253278, b₂=−0.5568306760166316 in b₀+b₁g+b₂g², with g=GDP/10,000. Find the fitted life-expectancy contrast from g=2 to 3.

풀이와 확인할 이유Solution and explanation

제곱 차이는 9−4=5여서 변화는 b₁+5b₂≈2.62473839617012년입니다. b₀는 차분에서 소거됩니다. 이는 제시한 반올림 식의 기술 예측 차이이며 GDP를 실제로 늘렸을 때의 수명 인과효과가 아닙니다.

The squared term changes by 9−4=5, giving b₁+5b₂≈2.62473839617012 years. The intercept cancels. This is a descriptive contrast from the supplied rounded equation, not a causal lifespan effect of actually increasing GDP.

49. 학력의 조건부 로그 차이A conditional schooling log contrast

설명용 반올림 식은 log적합=b₀+0.058140750690002636z−0.0029472159000539415z²+b₃a입니다. z=교육 −12, a=나이 −30입니다. 나이를 고정해 교육 12→13의 로그 차이와 지수화 비를 쓰세요.

A displayed rounded fit is b₀+0.058140750690002636z−0.0029472159000539415z²+b₃a, with z=schooling−12, a=age−30. Holding age fixed, find the 12-to-13 log contrast and exponentiated ratio.

풀이와 확인할 이유Solution and explanation

z=0→1이므로 차이 d≈0.0551935347899486945입니다. 지수화 적합 수준의 비는 exp(d)로 약 1.057입니다. b₃a와 절편은 소거됩니다. 원단위 산술평균 임금의 비를 알려면 조건부 재변환 인자가 같은지 등의 추가 조건이 필요합니다.

Moving z from zero to one gives d≈0.0551935347899486945. The ratio of exponentiated fitted levels is exp(d), about 1.057. Intercept and age terms cancel. An arithmetic mean wage ratio additionally depends on conditional retransformation factors.

50. 집단 상호작용의 뜻Meaning of a group interaction

전부 가정한 적합은 y=20+0.3z+1·NJ+0.2z·NJ이고 z=이전FTE−20입니다. NJ 지표는 PA에서 0, NJ에서 1입니다. PA와 NJ의 선, 이전FTE 20과 30에서 두 예측 차이를 구하세요.

An entirely assumed fit is y=20+0.3z+1·NJ+0.2z·NJ, z=beforeFTE−20. The NJ indicator is 0 for PA and 1 for NJ. Find PA/NJ lines and their differences at beforeFTE 20 and 30.

풀이와 확인할 이유Solution and explanation

PA는 NJ=0이라 20+0.3z, NJ는 21+0.5z입니다. 차이는 1+0.2z로 이전FTE 20(z=0)에서 1, 30(z=10)에서 3입니다. “같은 두 선”은 절편 차이와 상호작용 계수를 함께 0으로 두는 두 제약입니다. 숫자는 가정이며 실제 정책 효과가 아닙니다.

PA has 20+0.3z and NJ has 21+0.5z. Their difference is 1+0.2z, equal to 1 at beforeFTE 20 and 3 at 30. Equality of the lines jointly sets the intercept difference and interaction to zero. These are assumed numbers, not actual policy effects.

51. 가용 개수만으로 교집합을 알 수 없다Availability counts do not determine overlap

총 3,613행에서 raw임금 가용 3,017, 원로그 가용 3,010이라는 개수만 주어졌습니다. raw만 가용한 행이 정확히 7개라고 결론낼 수 있나요? 가능한 교집합 범위도 구하세요.

Among 3,613 rows, raw wage is available on 3,017 and recorded log wage on 3,010. From counts alone, must exactly 7 rows have raw-only availability? Find sharp overlap bounds.

풀이와 확인할 이유Solution and explanation

교집합은 최소 3,017+3,010−3,613=2,414, 최대 3,010입니다. 따라서 raw만 가용한 수는 3,017−교집합으로 7부터 603까지 가능합니다. 실제 7이라는 결론에는 원행별 가용성 대조로 로그 가용행이 raw 가용행 안에 든다는 추가 정보가 필요합니다.

Overlap ranges from 3,017+3,010−3,613=2,414 to 3,010. Raw-only availability therefore ranges from 7 to 603. Concluding that the actual count is 7 requires row-level information, such as verifying that all available log outcomes are included among available raw outcomes.

52. 원위치와 FTE 단위Source positions and FTE units

FT=2, PT=4, 관리자=1이고 FTE=FT+PT/2+관리자라는 가정 환산을 씁니다. FTE와 사람 수를 비교하세요. 또 원코드 407이 위치 42, 168에 있으면 코드를 유일키로 써도 되나요?

Use FT=2, PT=4, managers=1 and the declared FTE=FT+PT/2+managers conversion. Compare FTE with headcount. If code 407 occurs at positions 42 and 168, is code a unique key?

풀이와 확인할 이유Solution and explanation

FTE=2+2+1=5이며 단순 사람 수는 2+4+1=7입니다. 단위가 달라 같은 숫자일 필요가 없습니다. 코드 407은 두 행에 반복되므로 유일키가 아닙니다. 원위치와 코드를 함께 보존하고 두 행을 임의로 합치거나 삭제하지 않습니다.

FTE is 2+2+1=5 while the simple person count is 2+4+1=7. Different units need not agree. Code 407 is repeated and is not a unique key. Preserve both original positions and their codes rather than merging or deleting a row.

53. Cook의 계수 이동 증명Cook distance as coefficient movement

G=XᵀX, x_i는 i행의 전치, h_i=x_iᵀG⁻¹x_i로 둡니다. 전랭크 X, n>p, s²>0, h_i<1에서 삭제 계수차가 v=β̂_(−i)−β̂=−G⁻¹x_i e_i/(1−h_i)입니다. vᵀGv/(p s²)가 Cook 공식임을 보이세요.

Let G=XᵀX, let x_i be row i transposed, and let h_i=x_iᵀG⁻¹x_i. With full-rank X, n>p, s²>0, h_i<1, let v=β̂_(−i)−β̂=−G⁻¹x_i e_i/(1−h_i). Show that vᵀGv/(p s²) equals Cook distance.

풀이와 확인할 이유Solution and explanation

v를 양쪽에 넣으면 두 음수 부호가 소거되고 G⁻¹GG⁻¹=G⁻¹이 남습니다.

vTGv=ei2(1−hi)2xiTG−1xiDi=ei2hips2(1−hi)2\begin{gathered}v^TGv=\frac{e_i^2}{(1-h_i)^2}x_i^TG^{-1}x_i\\D_i=\frac{e_i^2h_i}{p s^2(1-h_i)^2}\end{gathered}

분모 조건을 모두 사용했습니다. h_i=1이면 삭제 계수가 유일하지 않을 수 있어 이 유도에 넣을 수 없습니다.

Substitute v on both sides. The two signs cancel and G⁻¹GG⁻¹ leaves G⁻¹.

vTGv=ei2(1−hi)2xiTG−1xiDi=ei2hips2(1−hi)2\begin{gathered}v^TGv=\frac{e_i^2}{(1-h_i)^2}x_i^TG^{-1}x_i\\D_i=\frac{e_i^2h_i}{p s^2(1-h_i)^2}\end{gathered}

Every stated denominator condition is used. At h_i=1 the deletion coefficient may cease to be unique, so this derivation is unavailable.

54. 삭제 잔차 항등식 증명Deriving the deletion-residual identity

G=XᵀX, x_i는 i행의 전치, h_i=x_iᵀG⁻¹x_i로 둡니다. 전랭크 X에서 h_i<1이고 β̂_(−i)=β̂−G⁻¹x_i e_i/(1−h_i)입니다. 삭제 예측과 삭제 잔차 식을 유도하세요.

Let G=XᵀX, let x_i be row i transposed, and let h_i=x_iᵀG⁻¹x_i. For full-rank X, h_i<1, assume β̂_(−i)=β̂−G⁻¹x_i e_i/(1−h_i). Derive the deletion prediction and residual.

풀이와 확인할 이유Solution and explanation

x_iᵀ를 곱하면 삭제 예측은 ŷ_i−h_i e_i/(1−h_i)입니다. y_i에서 이를 빼면 e_i+h_i e_i/(1−h_i)=e_i/(1−h_i)입니다. 모든 행의 삭제가 정의될 때 이 값들의 제곱합이 PRESS입니다. 분모 0인 행은 미정의로 남깁니다.

Premultiplying by x_iᵀ gives deletion prediction ŷ_i−h_i e_i/(1−h_i). Subtracting from y_i yields e_i+h_i e_i/(1−h_i)=e_i/(1−h_i). If deletion is defined for every row, squared sums give PRESS. A zero denominator remains undefined.

55. 비영 목표 아래 정규 제약A Gaussian restriction with nonzero target

X 전랭크, n>p, R 독립 q>0이고 Rβ=r는 일관됩니다. 귀무하 y=Xβ₀+ε, Rβ₀=r, ε∼N(0, σ²I), σ²>0입니다. r≠0이어도 고전 F 논리를 적용할 수 있는 이유를 설명하세요.

Assume full-rank X, n>p, independent R with q>0 and consistent Rβ=r. Under the null y=Xβ₀+ε, Rβ₀=r, ε∼N(0, σ²I), σ²>0. Explain the classical F argument when r≠0.

풀이와 확인할 이유Solution and explanation

y에서 Xβ₀를 빼면 결과는 ε이고 계수 차이 θ=β−β₀의 제약은 Rθ=0입니다. 원·제한 잔차 제곱합은 이 이동으로 바뀌지 않습니다. 이제 kerR의 예측공간과 원 X공간 사이 직교 추가방향 q개와 원잔차방향 n−p개에 정규 투영을 적용해 독립 카이제곱 비를 얻습니다.

Subtract Xβ₀ and write θ=β−β₀, turning the constraint into Rθ=0 without changing restricted or unrestricted residual sums of squares. Orthogonal Gaussian projections onto q added prediction directions and n−p residual directions yield independent chi-squares and their F ratio.

56. 공동 이차형의 좌표 보존 증명Proving joint-form coordinate invariance

Ω는 양의 정부호 q×q, A는 가역 q×q입니다. d̃=Ad, Ω̃=AΩAᵀ일 때 d̃ᵀΩ̃⁻¹d̃=dᵀΩ⁻¹d를 증명하세요.

Let Ω be positive definite and A invertible, both q×q. With d̃=Ad and Ω̃=AΩAᵀ, prove d̃ᵀΩ̃⁻¹d̃=dᵀΩ⁻¹d.

풀이와 확인할 이유Solution and explanation

Ω̃⁻¹=(Aᵀ)⁻¹Ω⁻¹A⁻¹입니다. 따라서 dᵀAᵀ(Aᵀ)⁻¹Ω⁻¹A⁻¹Ad=dᵀΩ⁻¹d입니다. 가역성은 제약 방향을 잃지 않는다는 조건이며, 비가역 A에는 같은 역행렬 증명이 없습니다.

Use Ω̃⁻¹=(Aᵀ)⁻¹Ω⁻¹A⁻¹. Substitution cancels Aᵀ with its inverse and A with its inverse, leaving dᵀΩ⁻¹d. Invertibility preserves all restriction directions; the same inverse argument is unavailable for singular A.

57. RESET의 생성 열Generated columns in RESET

원 OLS의 ŷ²를 X에 추가하고 독립 열임을 확인했습니다. 이 사실만으로 증강 손실 비가 고정 설계 정규 F를 정확히 따른다고 할 수 있나요?

An OLS fitted-square column ŷ² is added to X and is linearly independent of existing columns. Does that alone establish an exact fixed-design Gaussian F law for the augmented loss ratio?

풀이와 확인할 이유Solution and explanation

아닙니다. 새 열은 관측 결과 y에서 얻은 ŷ의 함수여서 고정된 외생 설계라는 앞 증명의 전제를 자동으로 만족하지 않습니다. 전랭크와 중첩 손실의 대수는 확인했지만 진단의 실제 기준분포에는 별도 이론과 조건이 필요합니다. 신호가 있어도 어느 누락 원인이 참인지 밝혀 주지 않습니다.

No. The added column depends on ŷ computed from the observed y, so full rank does not establish the earlier fixed exogenous design premise. Algebraic nesting and loss can be verified while the diagnostic reference requires additional theory. A flag also does not identify which omitted cause is responsible.

58. 한 결과의 여러 분해Several decompositions of one outcome

한 관측벡터 y만 주고 참 평균 μ나 확률법칙을 주지 않았습니다. y=μ+ε에서 ε를 유일하게 복원할 수 없는 이유를 두 분해로 보이세요.

Only one vector y is supplied, with no true mean μ or probability law. Show with two decompositions why ε in y=μ+ε cannot be uniquely recovered.

풀이와 확인할 이유Solution and explanation

μ=0, ε=y로도, μ=y, ε=0으로도 같은 관측식이 성립합니다. 이 예는 두 확률모형의 외생성을 증명하는 것이 아니라 한 관측식만으로 참 평균과 오차를 구별할 수 없음을 보입니다. OLS가 택한 적합 μ̂와 잔차는 추가 추정 규칙의 결과입니다.

Both μ=0, ε=y and μ=y, ε=0 reproduce the observed vector. This does not certify exogeneity for two stochastic models; it shows that the observed equation alone does not identify its mean/error decomposition. OLS fitted values and residuals arise from an additional estimation rule.

59. 훈련 손실 감소의 반례A counterexample to a prediction guarantee

가정 훈련점 (x, y)=(0, 0), (1, 1)에서 절편만인 모형과 절편·x 모형을 적합합니다. 별도 평가점 (2, 0)에서 제곱손실을 비교하세요.

Use assumed training pairs (0, 0), (1, 1). Fit an intercept-only and an intercept-plus-x model, then compare squared loss on a separate supplied evaluation pair (2, 0).

풀이와 확인할 이유Solution and explanation

절편만의 예측은 1/2로 훈련 SSE=1/2입니다. 직선은 ŷ=x라 훈련 SSE=0입니다. 그러나 평가점에서 직선 손실은(0−2)²=4, 절편 손실은(0−1/2)²=1/4입니다. 중첩 모형의 훈련 손실 감소가 모든 새 점의 개선을 보장하지 않음을 구성적으로 보였습니다.

The intercept prediction is 1/2 with training SSE 1/2. The line ŷ=x has training SSE 0. At the evaluation point, its loss is 4 versus the intercept loss 1/4. This constructs a case where reduced training loss does not improve a new point.

60. 실제 비교 보고문Reporting an actual comparison

점포 원 410행 중 같은 완전 384행, 전랭크 X=(1, z, NJ, zNJ), 독립 제약 b_NJ=b_zNJ=0, F≈5.499501367320513, HC1 W≈12.130397402990884입니다. 작업 F기준 4의 엄격 비교와 고전W, 실제인과·유의수준 해석의 한계를 쓰세요.

Stores retain 410 original and 384 common complete rows, full-column-rank X=(1, z, NJ, zNJ), independent restrictions b_NJ=b_zNJ=0, F≈5.499501367320513 and HC1 W≈12.130397402990884. Report strict comparison with supplied F cutoff 4, classical W, and limits on actual size/causal interpretation.

풀이와 확인할 이유Solution and explanation

p=4, q=2, 잔차자유도 380입니다. 5.4995>4이므로 주어진 작업 기준을 넘습니다. 고전W=qF≈10.999002734641026이며 HC1 W와 다른 행렬을 사용합니다. 같은행·단위·제약을 명시한 기술 보고는 가능하지만 이 숫자만으로 실제 5%검정이나 최저임금 인과효과가 입증되지 않습니다. 표본선택·의존·분산·평균식과 정책 설계에 대한 별도 근거가 필요합니다.

Here p=4, q=2 and residual degrees of freedom 380. The statistic exceeds the supplied cutoff because 5.4995>4. Classical W=qF≈10.999002734641026 uses a different covariance from HC1 W. One can report this descriptive same-row restriction comparison, without claiming an actual 5% test or a causal minimum-wage effect. Selection, dependence, variance, mean specification and policy design require separate evidence.

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