손실·위험·경험위험·베이즈 규칙Loss, risk, empirical risk and Bayes rules
한 번의 우산 결정에서 조건부 위험·ERM·적정 확률 점수까지From one umbrella decision to conditional risk, ERM and proper scores
실습 6종 · 풀이 포함 연습문제 60개6 labs · 60 exercises with solutions
기초Foundations
예측이 틀리면 어떤 비용이 생길까?What happens when a prediction is wrong?
내일 학교에 갈 때 우산을 챙길지 생각해 봅시다. 비가 오는지를 맞히는 일과 우산을 가져가는 일은 연결되어 있지만, 같은 일은 아닙니다. 비 올 확률을 30%라고 예상해도 비에 젖는 불편이 아주 크면 우산을 가져갈 수 있습니다. 작은 우산을 들고 다니는 불편이 더 크다고 판단하는 사람은 다른 선택을 할 수 있습니다.
머신러닝도 먼저 이 질문부터 시작합니다. 무엇을 관측했고, 무엇을 예측하며, 어떤 행동을 선택하고, 결과가 드러난 뒤 어떤 기준으로 평가할까요? 컴퓨터가 복잡한 식을 계산해도 평가 기준을 정해 주지는 않습니다. 잘 맞힌 비율을 높이는 일과 큰 실수를 줄이는 일이 다른 답을 낼 수 있습니다.
첫 읽기에서는 표를 한 행씩 계산하세요. 두 번째 읽기에서는 평균 손실을 가장 작게 만드는 규칙의 수학적 조건을 따라갑니다. 분수·평균에서 출발하지만, 조건부 위험과 베이즈 규칙은 대학원 결정이론에서도 다시 쓰는 언어입니다.
Imagine deciding whether to take an umbrella to school tomorrow. Predicting rain and choosing an umbrella are related tasks. A forecast of 30% rain can still justify an umbrella when getting wet is costly. Someone who strongly dislikes carrying one may make a different choice under different costs.
Machine learning begins with these questions: what was observed, what is predicted, what action is selected, and how will it be judged after the outcome is known? A computer can calculate a complicated formula without choosing an appropriate evaluation criterion. Maximizing the fraction of correct labels can produce a different rule from reducing costly mistakes.
On a first pass, calculate each table row. On a second pass, follow the conditions that make average loss smallest. Fractions and means are sufficient to start; conditional risk and Bayes rules are also central language in graduate decision theory.
기초Foundations
관측·정보·예측·행동·결과를 구별한다Separate observations, information, predictions, actions and outcomes
기호를 늘리기 전에 각 역할을 고정합시다. X는 결정을 내릴 때 이미 아는 정보입니다. 하늘 상태, 측정 시점까지의 사용량처럼 그 시점에 관측할 수 있어야 합니다. Y는 나중에 알게 되는 결과이며 우산 예시에서는 비가 오면 1, 오지 않으면 0입니다.
예측 f(X)는 정보에서 계산한 수입니다. 비 올 확률 q(X)는 0과 1 사이의 수이고, 행동 a(X)는 우산을 가져가지 않음 0 또는 가져감 1입니다. 확률 0.3을 행동 0.3이라고 읽거나, 행동 1을 비가 반드시 온다는 주장으로 읽으면 역할을 섞게 됩니다.
마지막으로 손실 ℓ(Y,a)은 결과와 행동을 보고 정한 평가값입니다. 여러 대안 중 어떤 값이 작은지를 비교할 수 있게 정의합니다. 컴퓨터의 입력 열에 이미 내일의 실제 비 여부를 넣었다면 좋은 예측을 배운 것이 아닙니다. 결정 때 없던 답을 미리 본 것입니다.
확인 · 비 올 확률이 0.3인데 우산 행동이 1이면 모순인가요?
모순이 아닙니다. 확률은 결과의 불확실성을, 행동은 선택한 비용 아래의 결정을 나타냅니다. 다음 절들에서 확률 0.3에도 우산을 선택하는 비용 조건을 직접 계산합니다.
Fix the roles before adding notation. X is information already available when a decision is made, such as the current sky or usage observed up to a cutoff. Y is the later outcome: in the umbrella example, rain is 1 and no rain is 0.
A prediction f(X) is a number computed from that information. A rain probability q(X) lies between 0 and 1, whereas action a(X) is 0 for no umbrella or 1 for taking one. Reading probability 0.3 as action 0.3, or action 1 as a statement that rain is certain, mixes these roles.
Loss ℓ(Y, a) is the declared evaluation after outcome and action are compared. Its definition makes alternatives comparable. Feeding tomorrow’s actual rain into today’s features would give the calculation an answer unavailable at the decision time.
Check · Is probability 0.3 inconsistent with action 1?
No. A probability describes uncertainty about the outcome; an action describes a decision under chosen costs. Later sections calculate cost conditions under which taking an umbrella is optimal even at probability 0.3.
기초Foundations
전부 가정한 여덟 행을 한 행씩 읽는다Read every row of an eight-record assumed table
학습용으로 동일확률의 여덟 세계를 가정합니다. A와 B는 결정 전에 보이는 두 종류의 하늘 정보입니다. A가 비를 일으킨다고 가정하지 않습니다. 아래의 0·1은 그 세계에서 나중에 드러날 비 여부입니다. 실제 날씨 관측이나 기상청 예보 성능을 뜻하지 않습니다.
전부 가정 · 각 행의 작업 비중 1, 정규화 확률 1/8
원위치
정보 X
결과 Y
비중
비용을 보기 전 행동
1
A
0
1
0
2
A
0
1
0
3
A
0
1
0
4
A
1
1
0
5
B
0
1
1
6
B
1
1
1
7
B
1
1
1
8
B
1
1
1
A의 네 세계 중 하나, B의 네 세계 중 셋에서 비가 옵니다. 이 가정 법칙에서 조건부 비 확률은 각각 1/4과 3/4입니다. A에서 행동 0, B에서 행동 1을 고르면 4번과 5번 두 세계에서 분류를 틀립니다. 정확도는 6/8, 오류율은 2/8입니다.
같은 X·Y가 반복되어도 행을 임의로 지우지 않습니다. 여기서는 서로 다른 가정 세계가 같은 정보와 결과를 가질 수 있습니다. 나중에 실제 자료를 읽을 때는 원위치, 개인·점포 코드, 중복 입력 패턴, 독립적인 관측 단위를 구별해야 합니다.
Assume eight equally likely teaching worlds. A and B are two sky-information categories visible before the decision. We do not assume that a category causes rain. The 0/1 outcome is revealed later in that world. These are not actual weather observations or a forecast-service performance study.
Wholly assumed · working weight 1 and normalized mass 1/8 per row
Position
Information X
Outcome Y
Weight
Initial action
1
A
0
1
0
2
A
0
1
0
3
A
0
1
0
4
A
1
1
0
5
B
0
1
1
6
B
1
1
1
7
B
1
1
1
8
B
1
1
1
Rain occurs in one of the four A worlds and three of the four B worlds. Conditional rain probabilities under this assumed law are therefore 1/4 and 3/4. Taking action 0 at A and 1 at B makes errors at positions 4 and 5: accuracy 6/8 and error 2/8.
Repeated X/Y values do not justify deleting rows. Distinct assumed worlds can share information and outcomes. With actual data we will distinguish original position, person or establishment code, repeated input patterns and independent observation units.
기초Foundations
손실도 단위가 있으며 선택한 기준이다A loss has units and is a declared criterion
손실은 무엇을 비교하는지에 따라 단위가 달라집니다. 예측한 용돈이 12,000원이고 실제 값이 10,000원이면 오차는 −2,000원입니다. 절대오차는 2,000원, 제곱오차는 4,000,000원²입니다. 제곱오차를 400만 원의 현금 손해라고 부를 수는 없습니다.
GDP를 예측하면 1인당 2015년 불변 USD라는 원 단위를 먼저 적습니다. 그 제곱손실은 해당 단위의 제곱입니다. 금액 단위를 100배로 바꾸면 같은 실제 오차의 제곱손실은 10,000배가 됩니다. 평가 숫자가 커졌다는 사실만으로 예측이 나빠진 것이 아닙니다.
0·1 분류의 오류율은 단위 없는 비율입니다. 거짓 양성 비용 1과 거짓 음성 비용 4를 선택하면 평균 손실은 선택한 비용 단위입니다. 이 장에서 고른 1·4는 실제 기업 장부에서 확인한 금액이 아닙니다. 비용 단위와 자료 측정 단위를 따로 기록하세요.
The unit of loss depends on the comparison. If predicted pocket money is 12,000 won and the realized amount is 10,000 won, the error is −2,000 won. Absolute error is 2,000 won; squared error is 4,000,000 won². The latter is not four million won of cash damage.
For GDP prediction, first state the source unit: constant-2015 USD per person. Squared loss has the square of that unit. Multiplying the monetary unit by 100 multiplies squared loss by 10,000 without changing the underlying real prediction error.
A 0/1 classification error rate is dimensionless. Selecting false-positive cost 1 and false-negative cost 4 creates a loss in chosen cost units. Those 1/4 costs are not amounts verified from a company ledger. Record the decision-cost unit separately from the measurement unit.
기초Foundations
오차를 제곱하는 이유와 큰 오차의 영향Squared errors and the influence of large mistakes
제곱손실은 실제 결과 y와 예측 또는 행동 a의 차이를 제곱합니다. 오차의 부호는 사라지고, 큰 차이는 더 빠르게 커집니다. 오차 1과 3의 제곱은 1과 9입니다. 큰 오차를 특히 줄이려는 목적에 맞을 수 있지만 모든 문제의 유일한 올바른 평가 기준은 아닙니다.
ℓ2(y,a)=(y−a)2
우산 표에서 행동을 0 또는 1로 제한하면, 맞힌 행의 제곱손실은 0이고 틀린 행은 1입니다. 따라서 A에서 0, B에서 1인 초기 행동의 평균 제곱손실은 (0+0+0+1+1+0+0+0)/8=1/4입니다. 여기에서는 제곱손실과 단순 분류 오류가 일치합니다.
예측값을 확률 0.25처럼 연속적으로 허용하면 이야기가 달라집니다. Y가 0일 때 손실은 0.25², Y가 1일 때는 0.75²입니다. 결과가 0·1이어도 확률 예측은 0·1 행동과 다른 집합에서 평가됩니다. 어떤 출력값을 허용하는지도 최적화 문제의 일부입니다.
Squared loss squares the difference between realized outcome y and prediction or action a. The error sign disappears, while large differences grow faster: errors 1 and 3 produce losses 1 and 9. This can suit a goal of reducing large errors, but is not the only legitimate criterion.
ℓ2(y,a)=(y−a)2
Restrict umbrella actions to 0 or 1. Correct labels have squared loss 0 and errors have loss 1. The initial A0/B1 rule has average squared loss (0+0+0+1+1+0+0+0)/8=1/4. In this restricted action space, squared loss equals classification error.
Allowing a continuous probability prediction such as 0.25 changes the problem. Its loss is 0.25² when Y=0 and 0.75² when Y=1. A binary outcome does not require a binary probability prediction. The permitted output space is part of the optimization problem.
기초Foundations
절댓값과 비대칭 비용을 손으로 비교한다Compare absolute and asymmetric costs by hand
절대손실은 오차의 크기를 그대로 사용합니다. 세 가정 결과가 1, 2, 9일 때 예측을 2로 정하면 절대오차는 1, 0, 7이며 평균은 8/3입니다. 평균인 4를 예측하면 절대오차 3, 2, 5의 평균은 10/3입니다. 이 경우 절대손실은 2에서 더 작습니다.
ℓ1(y,a)=∣y−a∣
같은 세 결과를 제곱손실로 보면 4에서 (9+4+25)/3=38/3, 2에서는 (1+0+49)/3=50/3입니다. 데이터가 바뀐 것이 아니라 평가 기준이 바뀌었습니다. 평균과 중앙값 중 어느 것이 언제 최적인지는 뒤에서 증명합니다.
우산 문제에서 맑은데 우산을 들고 다니는 비용을 1, 비가 오는데 안 가져간 비용을 4로 선택해 봅시다. 초기 A0/B1 행동은 4번에서 비용 4, 5번에서 비용 1을 내므로 평균 비용 5/8입니다. 두 종류 실수를 같은 비용으로 세었던 1/4과 목적이 다릅니다.
Absolute loss uses error magnitude directly. For three assumed outcomes 1, 2, 9, prediction 2 gives errors 1, 0, 7 and mean absolute loss 8/3. Predicting their mean 4 gives errors 3, 2, 5 and loss 10/3. Absolute loss is smaller at 2 in this example.
ℓ1(y,a)=∣y−a∣
Under squared loss the same outcomes give (9+4+25)/3=38/3 at 4, versus (1+0+49)/3=50/3 at 2. The data have not changed; the criterion has. Later sections prove when a mean or a median is optimal.
Now choose umbrella false-positive cost 1 and false-negative cost 4. The initial A0/B1 rule incurs 4 at position 4 and 1 at position 5, for mean cost 5/8. This evaluates a different objective from the equal-error loss 1/4.
기초Foundations
같은 예측과 서로 다른 행동One probability prediction can lead to different actions
A의 비 확률 1/4을 알더라도 행동은 비용에 따라 정해집니다. 우산을 안 가져가면 비 오는 1/4의 세계에서 비용 4를 내므로 평균 비용은 1입니다. 가져가면 비가 안 오는 3/4에서 비용 1을 내므로 평균 비용 3/4입니다. 선택한 비용 아래서는 우산을 가져가는 쪽이 작습니다.
B에서도 우산을 가져가면 비용 1/4, 안 가져가면 3입니다. 두 정보값 모두에서 우산을 가져가는 규칙의 전체 평균 비용은 (3/4+1/4)/2=1/2입니다. 초기 규칙의 5/8보다 작습니다.
하지만 항상 가져가는 규칙의 분류 정확도는 4/8로 초기 규칙의 6/8보다 낮습니다. 이것은 계산의 모순이 아닙니다. 선택한 비용 기준은 큰 거짓 음성을 줄이기 위해 작은 거짓 양성을 허용합니다. 실제 의사결정에서는 비용 선택의 근거와 영향을 별도로 설명해야 합니다.
Even when A’s rain probability 1/4 is known, the action depends on costs. No umbrella incurs cost 4 in the rainy 1/4 of worlds, giving expected cost 1. Taking an umbrella incurs cost 1 in the dry 3/4, giving cost 3/4. Taking one is better under these selected costs.
At B, taking one costs 1/4 and not taking one costs 3. The rule that always carries an umbrella therefore has overall mean cost (3/4+1/4)/2=1/2, below the initial rule’s 5/8.
Its classification accuracy is nevertheless 4/8, below the initial rule’s 6/8. There is no numerical contradiction. The chosen criterion tolerates more inexpensive false positives to reduce expensive false negatives. A real decision report must explain and examine its cost choices.
기초Foundations
실습 A · 관측 하나의 손실Lab A · One-record loss
먼저 한 관측의 결과와 행동을 넣어 제곱·절대·분위수·분류 비용을 비교하세요. 결과 9, 행동 2에서 제곱손실은 49, 절대손실은 7입니다. 분류 비용을 고르면 결과와 행동은 둘 다 0·1이어야 합니다. 연속형 예측의 숫자를 자동으로 분류 코드로 바꾸지 않습니다.
비용 1·4를 2·8로 함께 두 배로 하면 모든 행동의 평균 비용은 두 배가 되지만 비용의 상대비는 같습니다. 한 비용만 바꾸면 최적 행동이 바뀔 수 있습니다. 손실값의 크기, 단위, 최소화하는 행동을 따로 적어 보세요.
실습 풀이 · 결과 1, 행동 0, 거짓 음성 비용 4
실제 양성을 음성으로 분류했으므로 비용은 4입니다. 같은 행의 제곱·절대손실은 각각 1입니다. 출력 4는 관측된 기업 손해가 아니라 여기서 정한 평가값입니다.
Enter one outcome and action, then compare squared, absolute, quantile and classification costs. Outcome 9 with action 2 gives squared loss 49 and absolute loss 7. Binary-cost evaluation requires both outcome and action in {0, 1}; it does not silently convert an arbitrary continuous number into a class.
Doubling costs 1/4 to 2/8 doubles every action’s expected cost while retaining relative costs. Changing only one cost can change the optimum. Record the loss magnitude, unit and minimizing action separately.
Worked lab · Outcome 1, action 0, false-negative cost 4
A positive outcome was classified negative, so the chosen cost is 4. Squared and absolute losses for the same row are both 1. The 4 is a declared evaluation value, not a measured business loss.
기초Foundations
행 수와 확률 가중치를 구별한다Distinguish row counts from probability mass
평균의 분모는 무엇에 대해 평균하는지를 알려 줍니다. 여덟 세계가 동일확률이면 각 손실을 더해 8로 나눕니다. 행의 작업 비중이 1, 2, 1이라면 총비중은 4이고 확률은 1/4, 1/2, 1/4입니다. 작업 비중 자체가 이미 합 1인 확률일 필요는 없습니다.
pi=∑jwjwi,wi≥0,j∑wj>0
비중이 0인 행은 보존하되 그 법칙의 평균에는 기여하지 않습니다. 모든 비중이 0이면 정규화할 분모가 없으므로 위험을 0이라고 출력할 수 없습니다. 원래의 행 수와 양의 비중을 가진 기여 행 수를 함께 확인해야 합니다.
실제 국가 자료에 같은 비중을 주면 국가를 같은 비중으로 평균한 값입니다. 세계 인구의 개인을 같은 비중으로 평균했다는 뜻은 아닙니다. 개인 조사 비중을 쓰는지, 선택한 작업 비중을 쓰는지도 계산 계약의 일부입니다.
The denominator says what is being averaged. For eight equally likely worlds, add losses and divide by 8. Working weights 1, 2, 1 have total 4 and normalized masses 1/4, 1/2, 1/4. Working weights need not already sum to 1.
pi=∑jwjwi,wi≥0,j∑wj>0
Retain zero-weight rows while excluding their contribution to that law’s mean. If all weights are zero, there is no normalizing denominator; risk is undefined rather than zero. Check original row counts alongside positive-weight contributors.
Equal working weights on countries produce an equal-country average. They do not give every person in the world equal weight. Whether a calculation uses original survey weights or selected working weights is part of its contract.
기초Foundations
위험은 선언한 법칙 아래 평균 손실이다Risk is mean loss under a declared law
위험 R(f)은 선언한 자료 생성 법칙 아래에서 예측 또는 행동 규칙 f의 손실을 평균한 값입니다. 여기서 위험이라는 말은 겁을 주는 표현이 아니라 기대손실의 이름입니다. 확률변수의 기대값은 같은 상황을 반복했을 때의 장기 평균이라는 직관으로 시작할 수 있습니다.
RP(f)=EP[ℓ(Y,f(X))]
아래첨자 P는 어느 법칙에서 평균하는지를 드러냅니다. 같은 f라도 비가 더 자주 오는 지역이나 같은 하늘 정보의 의미가 다른 기간에서는 위험이 달라질 수 있습니다. 손실을 정하는 일과 P를 아는 일은 별개의 문제입니다.
우리의 가정 여덟 세계에서는 P를 직접 정했으므로 위험을 정확한 분수로 계산할 수 있습니다. 실제 자료에서는 미래 모집단 법칙 P를 모르는 경우가 보통입니다. 표에서 계산한 평균을 모집단 위험의 참값으로 부르려면 표본·측정·시점·배포 환경을 연결하는 근거가 더 필요합니다.
Risk R(f) is the average loss of prediction or decision rule f under a declared data-generating law. Here “risk” is the technical name for expected loss. A long-run average under repeated comparable situations provides a starting intuition for expectation.
RP(f)=EP[ℓ(Y,f(X))]
The subscript P makes the averaging law explicit. The same rule can have different risk where rain is more common or where sky information has a different meaning. Declaring a loss and knowing P are separate tasks.
Our eight assumed worlds specify P directly, so their risk is exactly calculable. Actual future population laws are usually unknown. Connecting a retained table average to true population risk requires arguments about sampling, measurement, timing and deployment.
기초Foundations
경험위험의 분모와 원자료 결측Empirical-risk denominators and original missing outcomes
양의 정수 n≥1개 결과를 실제로 관측하여 같은 비중을 주고 손실을 평균하면 경험위험입니다. 예를 들어 가정한 훈련표의 여덟 손실 합이 2라면 경험위험은 2/8입니다. 앞의 가정 여덟 세계와 숫자가 같아도, 유한 법칙을 완전히 안다는 해석과 관측한 훈련표를 요약한다는 해석은 다릅니다.
Rn(f)=n1i=1∑nℓ(yi,f(xi))
1976년 임금 원자료 3,613행 중 지정한 원 로그임금은 3,010행에서 관측되고 603행은 미관측입니다. 해당 로그임금 손실을 3,010으로 나누면 가용 결과 행의 평균입니다. 603개의 손실을 0으로 넣어 3,613으로 나누면 다른, 근거 없는 값을 만듭니다.
결측이 있는 전체 원틀의 위험은 그 미관측 값이나 추가 가정 없이는 정해지지 않을 수 있습니다. 실습은 전체 원행·가용 행·미관측 양의 비중을 표시하고, 가용 행의 조건부 위험과 전체 원틀 위험을 나누어 출력합니다. 0비중 미관측은 평균에 기여하지 않지만 양의 비중 미관측은 전체 위험을 가립니다.
Giving equal weight to n≥1 observed results and averaging losses defines empirical risk. Eight assumed training observations with total loss 2 have empirical risk 2/8. Identical numbers can represent either a completely declared finite law or a summary of an observed training table; those interpretations differ.
Rn(f)=n1i=1∑nℓ(yi,f(xi))
Among 3,613 original 1976 wage records, the specified source-log outcome is available in 3,010 and unavailable in 603. Dividing its observed loss sum by 3,010 summarizes available outcomes. Inserting zero losses for 603 unobserved outcomes and dividing by 3,613 invents information.
Full-frame risk may remain unidentified without the missing outcomes or further assumptions. Labs display retained/available rows and unavailable positive weight, separating available-conditional risk from full-frame risk. A missing zero-weight outcome contributes nothing; a positive-weight missing outcome obstructs full risk.
기초Foundations
조건을 고정한 뒤 평균 손실을 비교한다Compare expected losses at fixed information
정보를 A로 고정하면 이제 A의 네 세계만 비교합니다. 그 안의 정규화 분모는 4이며, 우산을 안 가져가는 행동의 선택 비용은 (0+0+0+4)/4=1입니다. 가져가는 행동은 (1+1+1+0)/4=3/4입니다. 이 조건에서 더 작은 쪽을 고르는 것이 조건부 결정입니다.
r(a∣x)=E[ℓ(Y,a)∣X=x]
조건부 위험에서는 x를 고정하고 가능한 행동 a를 바꿉니다. A와 B가 생길 전체 확률은 나중에 전체 위험을 합칠 때 사용합니다. A가 드물다는 이유만으로 A 안의 조건부 분모를 전체 8로 바꾸면 조건부와 전체를 섞게 됩니다.
조건부 평균은 인과적 개입을 자동으로 뜻하지 않습니다. X=A인 세계를 모아 평균한 값과, 실제로 하늘이나 고객 특성을 바꾸었을 때 생길 결과는 별도 질문입니다. 이 장에서는 주어진 정보에서 평가 기준을 최소화하는 계산을 배웁니다.
Fix the information at A and compare its four worlds. The conditional normalizing denominator is 4. No umbrella has cost (0+0+0+4)/4=1; taking one costs (1+1+1+0)/4=3/4. Choosing the smaller value solves this conditional decision.
r(a∣x)=E[ℓ(Y,a)∣X=x]
Conditional risk holds x fixed while varying action a. The overall probability of A or B is used later to combine conditional risks. Replacing the conditional denominator 4 by the overall 8 confuses conditional and joint averaging.
Conditional averaging is not automatically a causal intervention. Averaging worlds with X=A differs from changing a sky condition or customer characteristic. This chapter minimizes a declared evaluation criterion using given information.
기초Foundations
조건부 위험을 평균하면 전체 위험이 된다Average conditional risks to obtain overall risk
초기 A0/B1 규칙에서 A의 평균 분류 비용은 1, B의 평균 비용은 1/4입니다. 두 정보값의 확률이 각각 1/2이므로 전체 위험은 (1/2)×1+(1/2)×(1/4)=5/8입니다. 여덟 행의 비용을 직접 더한 결과와 같습니다.
R(f)=x∑P(X=x)r(f(x)∣x)
이것이 유한 법칙의 전체기대값 법칙입니다. 각 집단의 평균을 구한 뒤 집단의 확률로 가중해야 합니다. 집단 크기가 다를 때 집단 평균을 무조건 반반 섞으면 원래의 행 가중 법칙을 바꾸게 됩니다.
조건부 최적 행동을 모든 양의 확률 정보값에서 선택할 수 있고 행동 간 추가 제약이 없다면, 각 항을 작게 만드는 선택이 전체 합도 작게 만듭니다. 하루 전체 우산 수량처럼 정보값을 가로지르는 자원 제약이 있으면 별도의 결합 최적화 문제가 됩니다. 이 장의 점별 규칙에는 그런 제약이 없습니다.
For initial rule A0/B1, conditional classification cost is 1 at A and 1/4 at B. Both information categories have probability 1/2, so total risk is (1/2)×1+(1/2)×(1/4)=5/8, exactly the direct eight-row calculation.
R(f)=x∑P(X=x)r(f(x)∣x)
This is the finite law of total expectation. After calculating group means, weight them by group probabilities. Averaging unequally sized groups half-and-half can change the original row-weighting law.
When an optimal action can be chosen separately at every positive-mass information value, and no constraint links actions across values, minimizing each term minimizes the sum. A shared resource limit would instead create a coupled optimization problem. Our pointwise rule has no such constraint.
기초Foundations
조건부 평균이 제곱손실을 최소화하는 이유Why a conditional mean minimizes squared loss
제곱손실에서 왜 조건부 평균을 예측할까요? 정보 x를 고정하고 μ=E[Y|X=x]라고 합시다. Y−a를 (Y−μ)+(μ−a)로 나누어 제곱하면, 결과의 본래 변동과 평균에서 벗어난 예측을 분리할 수 있습니다. 유한한 조건부 2차 모멘트가 있다고 가정합니다.
E[(Y−a)2∣X=x]=Var(Y∣X=x)+(a−μ)2
전개에서 교차항은 2(μ−a)E[Y−μ|X=x]=0입니다. 첫 항인 조건부 분산은 a를 바꾸어도 그대로입니다. 둘째 항의 제곱은 0 이상이고 a=μ에서만 0이므로, 실수 행동 전체를 허용하면 μ가 유일한 최소해입니다.
A의 비 확률 1/4이면 Y의 평균도 1/4입니다. 분산은 (1/4)×(3/4)=3/16입니다. 1/2을 예측하면 추가 제곱 (1/2−1/4)²=1/16이 붙어 기대손실 1/4이 됩니다. 행동을 0·1로만 제한하면 평균 1/4은 허용 행동이 아니므로, 같은 최소해 결론을 그대로 적용할 수 없습니다.
Why predict a conditional mean under squared loss? Fix x and let μ=E[Y|X=x]. Write Y−a=(Y−μ)+(μ−a) and expand the square. This separates outcome variation from moving the prediction away from the mean. Assume the conditional second moment is finite.
E[(Y−a)2∣X=x]=Var(Y∣X=x)+(a−μ)2
The cross-term is 2(μ−a)E[Y−μ|X=x]=0. Conditional variance does not depend on action a. The remaining square is nonnegative and equals zero only at a=μ, so the mean is the unique optimum when all real actions are allowed.
At A, rain probability and binary-outcome mean are 1/4, with variance (1/4)×(3/4)=3/16. Predicting 1/2 adds (1/2−1/4)²=1/16, giving expected loss 1/4. If actions are restricted to {0, 1}, mean 1/4 is inadmissible; the same minimizing-action conclusion cannot simply be reused.
기초Foundations
같은 관측값도 가중 법칙에 따라 답이 달라진다The same values can imply different answers under different weights
두 결과 0과 10을 같은 비중으로 평균하면 5입니다. 결과 0의 비중을 3, 결과 10의 비중을 1로 정하면 평균은 (3×0+1×10)/4=5/2입니다. 제곱손실을 최소화하는 상수도 그에 따라 5에서 5/2로 바뀝니다.
법칙의 변화와 행을 하나 지우는 일을 혼동하지 마세요. 어떤 행이 어떤 비중으로 남는지 명시하면 새로운 작업 법칙을 정의할 수 있습니다. 그렇다고 그것이 실제 모집단 법칙이나 원 조사 비중으로 확인되는 것은 아닙니다.
실제 데이터의 미래 분포가 바뀌면 과거 표의 최적 규칙도 미래 최적일 필요가 없습니다. 여기서의 계산은 분포 변화의 원인을 추정하지 않습니다. 어떤 법칙에서 평균했는지를 숨기지 않고 쓰는 습관이 다음 장의 일반화·평가 설계를 이해하는 출발점입니다.
Equal weights on outcomes 0 and 10 give mean 5. Giving outcome 0 weight 3 and outcome 10 weight 1 gives (3×0+1×10)/4=5/2. The squared-loss optimal constant changes from 5 to 5/2 accordingly.
Changing a law differs from silently deleting a row. Explicit retained rows and weights can define a new working law, but do not certify it as a population law or original survey weighting.
If future distributions change, a past-table optimum need not remain optimal. These calculations do not identify the cause of distribution shift. Stating the averaging law explicitly prepares the generalization and evaluation designs in later chapters.
기초Foundations
실습 B · 유한 법칙과 위험의 합Lab B · Finite laws and risk sums
여덟 가정 세계의 손실을 행별로 계산하고 전체 평균을 확인하세요. A0/B1 행동에서 제곱손실은 1/4, 선택 분류 비용 FP=1·FN=4의 위험은 5/8입니다. 같은 행의 같은 행동을 서로 다른 기준으로 평가한 값입니다.
실습에서 결과 한 칸을 미관측으로 바꾸면 이전 결과를 이어 쓰지 말고 가용 분모를 먼저 읽으세요. 양의 비중 미관측이 남으면 전체 위험은 미정의로 표시하고 가용 행 평균을 별도로 제공합니다. 비중 0의 미관측을 0손실 관측으로 바꾸지는 않습니다.
실습 풀이 · 4번 가정 세계의 결과를 모르면?
초기 비용 표에서 4번이 비인지 아닌지 모릅니다. 알려진 비용 합은 5번의 1뿐이므로 가용 7행 평균은 1/7입니다. 전체 8세계 위험은 4번 비용 없이 결정되지 않습니다. 4번 비용을 원래 값 4로 복구하면 전체 평균은 5/8입니다.
Calculate all eight assumed worlds row by row. With actions A0/B1, squared risk is 1/4 and chosen FP1/FN4 classification risk is 5/8. The same rows and actions have been evaluated under different criteria.
After making an outcome unavailable, inspect the available denominator rather than carrying forward the old result. Positive-weight missing outcomes leave full risk undefined while an available-row mean is reported separately. A missing zero-weight row does not become a zero-loss observation.
Worked lab · What if outcome at position 4 is unknown?
We no longer know whether world 4 is rainy. The only known positive cost is 1 at position 5, so available-seven-row mean cost is 1/7. Full-eight-world risk is not determined. Restoring the original cost 4 recovers 5/8.
학부Undergraduate
절대손실의 중앙값은 하나가 아닐 수 있다An absolute-loss median can be an interval
절대손실에서 중앙값이 최적이라는 말은 중앙값 하나만 정해진다는 뜻이 아닙니다. 동일확률의 두 결과 1과 4를 생각해 봅시다. 예측 a가 1과 4 사이에 있으면 두 절대오차의 합은 (a−1)+(4−a)=3입니다. 어디를 골라도 평균 손실은 3/2입니다.
L(a)=21∣1−a∣+21∣4−a∣
a가 1보다 작으면 a를 오른쪽으로 조금 옮길 때 두 오차가 모두 줄어듭니다. 4보다 크면 왼쪽으로 옮길 때 둘 다 줄어듭니다. 따라서 전체 최소해는 닫힌 구간 [1,4]이며 중점 5/2만이 정답인 것은 아닙니다. 최소 손실의 값과 최소화하는 예측의 집합을 구별하세요.
가중치가 다르면 같은 두 결과라도 구간이 사라질 수 있습니다. 결과 1의 확률이 3/4이고 결과 4가 1/4이면 중앙값 1이 유일한 최소해입니다. 행을 정렬한 뒤 누적 비중이 전체의 절반에 도달하는 곳과 그다음 넘어서는 곳을 확인하면 이 차이를 볼 수 있습니다.
An absolute-loss optimum need not be a single median. Consider equally likely outcomes 1 and 4. If prediction a lies between them, the sum of absolute errors is (a−1)+(4−a)=3. Every point in the interval gives mean loss 3/2.
L(a)=21∣1−a∣+21∣4−a∣
Below 1, moving a right reduces both errors. Above 4, moving it left reduces both. Thus the complete minimizing set is the closed interval [1, 4], not just its midpoint 5/2. Distinguish the minimum loss value from the set of predictions attaining it.
Unequal weights can remove the interval. If outcome 1 has probability 3/4 and outcome 4 has probability 1/4, prediction 1 is the unique median optimum. Sorting outcomes and locating where cumulative weight reaches and then exceeds one half reveals the difference.
학부Undergraduate
분위수 손실과 끝점의 반직선 해Quantile loss and endpoint half-line minimizers
예측이 너무 작을 때 더 큰 벌점을 주려면 분위수 손실을 쓸 수 있습니다. 0≤τ≤1로 두고, 오차 u=y−a가 양수이면 τu, 음수이면 (1−τ)(−u)를 줍니다. τ=3/4이면 같은 크기의 과소예측을 과대예측보다 세 배 크게 평가합니다. 이것은 선택한 평가 기준이며 실제 손해를 관측했다는 뜻은 아닙니다.
ρτ(u)=τmax(u,0)+(1−τ)max(−u,0)
유한한 가정 결과를 정렬하고 누적확률을 F라고 하면 실수 a의 최소해 조건은 F(a−)≤τ≤F(a)입니다. 이는 a 바로 왼쪽까지의 확률은 τ를 넘지 않고 a까지의 확률은 τ 이상이라는 뜻입니다. 동일확률 결과 1·4에서는 τ=1/4의 최소해가 1, τ=1/2에서는 [1,4], τ=3/4에서는 4입니다.
끝점도 직접 보세요. τ=0이면 y보다 큰 예측만 벌점을 받으므로 모든 a≤최솟값이 최소해입니다. τ=1이면 모든 a≥최댓값이 최소해입니다. 따라서 각각 (−∞,1], [4,∞)인 반직선입니다. 빈 자료나 총비중 0에서는 이 결론을 자료로부터 계산할 수 없습니다.
Quantile loss can penalize predictions that are too small more heavily. For 0≤τ≤1 and error u=y−a, use τu when u is positive and (1−τ)(−u) when negative. At τ=3/4, equal-sized underprediction costs three times overprediction. This is a selected criterion, not a measured financial consequence.
ρτ(u)=τmax(u,0)+(1−τ)max(−u,0)
For a finite outcome law with cumulative distribution F, a real minimizer satisfies F(a−)≤τ≤F(a). Cumulative mass just below a does not exceed τ, while mass through a reaches τ. Equally likely outcomes 1 and 4 give optimum 1 at τ=1/4, interval [1, 4] at τ=1/2, and optimum 4 at τ=3/4.
Inspect endpoints directly. At τ=0 only overprediction is penalized, so all predictions no larger than the minimum minimize. At τ=1 all predictions at least the maximum minimize. The sets are (−∞, 1] and [4, ∞). Empty data or zero total weight do not identify these sets.
학부Undergraduate
거짓 양성과 거짓 음성 비용의 문턱Thresholds from false-positive and false-negative costs
이제 Y와 행동 a를 0·1로 제한합니다. 양성을 놓친 거짓 음성 비용을 c_FN, 음성이지만 양성으로 분류한 거짓 양성 비용을 c_FP라고 합시다. 두 비용은 비음수라고 가정합니다. 정보 x에서 양성확률 p를 안다면 행동 0의 조건부 위험은 c_FN p, 행동 1은 c_FP(1−p)입니다.
r(0∣x)=cFNp,r(1∣x)=cFP(1−p)
비용 합이 양수이면 행동 1이 엄격하게 더 좋은 조건은 p>c_FP/(c_FP+c_FN)입니다. 같은 값에서는 두 행동이 모두 최소해입니다. 비용 1·4에서는 문턱이 1/5이므로 p=1/4인 A에서도 행동 1이 유리합니다.
한 비용이 0인 경계도 유효합니다. c_FP=0, c_FN>0이면 p>0인 곳에서 행동 1이 유리하며 p=0에서는 두 행동이 동률입니다. 두 비용이 모두 0이면 모든 행의 비용이 0이고 두 행동 모두 최소입니다. 이 경우 0/0을 하나의 문턱 숫자로 출력하면 안 됩니다.
Restrict Y and action a to {0, 1}. Let c_FN be false-negative cost and c_FP false-positive cost. Assume both costs are nonnegative. At information x with known event probability p, action 0 has conditional risk c_FN p, while action 1 has c_FP(1−p).
r(0∣x)=cFNp,r(1∣x)=cFP(1−p)
When total cost is positive, action 1 is strictly preferable if p>c_FP/(c_FP+c_FN). At equality both actions minimize. Costs 1 and 4 give threshold 1/5, making action 1 preferable even at A’s probability 1/4.
A zero cost is a valid boundary. If c_FP=0 and c_FN>0, action 1 is preferable where p>0, while both tie at p=0. If both costs are zero, every row has zero loss and both actions minimize. The resulting 0/0 does not define a numerical threshold.
학부Undergraduate
동점 해 전체와 실행 때의 선택을 나눈다Keep all optimal ties separate from an execution convention
최적 행동이 여럿이면 계산은 그 집합을 먼저 보여 주어야 합니다. p=1/5, c_FP=1, c_FN=4에서 두 위험은 모두 4/5입니다. 수학적 최소해는 {0,1}입니다. “같으면 1을 택한다”는 운영 약속을 추가할 수 있지만 그 약속이 0을 비최적으로 만드는 것은 아닙니다.
절대손실의 구간 [1,4]에서도 마찬가지입니다. 왼쪽 끝 1, 중점 5/2, 오른쪽 끝 4는 모두 최소해입니다. 표시 편의를 위해 중점을 골랐다는 것과 자료가 유일한 중점을 식별했다는 것은 다른 주장입니다.
실습은 최소해의 전체 모양과 실제 표시용 선택을 구분합니다. 분류에서는 두 행동을, 연속형에서는 단일점·닫힌 구간·반직선을 보여 줍니다. 동점 처리 약속은 재현 가능한 코드와 보고서에 남겨야 하며 평가 결과를 본 뒤 유리한 쪽으로 바꾸어서는 안 됩니다.
When several actions are optimal, report the set first. At p=1/5 with c_FP=1 and c_FN=4, both risks equal 4/5. The mathematical minimizing set is {0, 1}. Adding an execution convention such as choosing 1 at equality does not make 0 suboptimal.
The same distinction applies to absolute-loss interval [1, 4]. Its left endpoint 1, midpoint 5/2 and right endpoint 4 all minimize. Choosing a convenient display midpoint differs from identifying it uniquely from the data.
The lab separates the complete minimizing shape from a display or execution choice: two binary actions, a singleton, a closed interval or a half-line. Record tie conventions in reproducible code and reports; do not revise them after inspecting evaluation outcomes.
학부Undergraduate
확률 0인 정보값에는 조건부 답이 정해지지 않는다A zero-mass information value does not define a conditional law
가정 표에는 A와 B만 있습니다. C가 주어졌을 때 비 올 확률을 묻는다면 어떤 분모로 계산할까요? C의 비중이 0이어서 조건부 비율은 0/0입니다. 이를 “비 올 확률 0”으로 채우면 자료에 없는 조건부 법칙을 발명합니다.
실습은 이 조건부 질문을 미정의로 표시합니다. 동시에 이 유한 법칙에서 C가 일어나지 않는다는 사실도 구별합니다. C에서 규칙의 행동을 0이나 1로 임의 확장해도 현재 법칙의 전체 평균 손실은 바뀌지 않습니다. 그렇다고 C가 나타나는 미래 환경에서 어느 행동이 좋은지 알아낸 것은 아닙니다.
심화 관점에서는 조건부 기대값과 베이즈 규칙을 확률 1의 범위에서 비교합니다. 확률 0인 점의 서로 다른 정의가 같은 전체 위험을 만들 수 있습니다. 새 범주가 들어오는 실제 서비스에서는 명시적 대체 규칙과 별도 검증이 필요하며, 기존 표의 비어 있는 조건을 확인된 예측으로 표시하지 않습니다.
The assumed table contains only A and B. What denominator defines rain probability given C? Its mass is zero, so the conditional ratio is 0/0. Filling it with probability zero invents an unsupported conditional law.
The lab marks that conditional question undefined. Separately, changing a rule’s action at C cannot affect overall risk under this law because C never occurs. This does not reveal which action is best in a future environment where C occurs.
On a second pass, conditional expectations and Bayes rules are compared almost surely. Different definitions at zero-mass points can produce identical overall risk. An actual service encountering a new category needs an explicit fallback rule and separate evaluation rather than a fabricated conditional estimate.
학부Undergraduate
점별 최적 행동과 전체 베이즈 위험Pointwise optimal actions and global Bayes risk
주어진 법칙과 손실 아래에서 전체 위험을 가장 작게 만드는 규칙을 베이즈 규칙이라고 부릅니다. 여기서 법칙은 알고 있다고 가정하며, 가능한 예측 함수의 집합을 함께 정합니다. 유한한 정보값마다 행동을 따로 고를 수 있으면 조건부 위험의 최소해를 연결해 전체 규칙을 만들 수 있습니다.
f∗(x)∈argaminE[ℓ(Y,a)∣X=x],RP∗=finfRP(f)
제곱손실과 실수 예측에서는 A에서 1/4, B에서 3/4인 규칙이 최적입니다. 두 조건부 분산이 모두 3/16이고 정보값의 확률이 1/2이므로 베이즈 위험도 3/16입니다. 이것은 가정 법칙과 현재 정보 X에 대한 최적값입니다.
쓸 수 있는 정보가 늘거나 손실이 바뀌면 최적 규칙과 위험도 달라질 수 있습니다. 따라서 베이즈 위험을 세상 어디서나 줄일 수 없는 고정 숫자로 읽지 않습니다. 실제 데이터의 경험적 조건부 비율로 만든 규칙을 알려진 미래 모집단의 베이즈 규칙이라고 부르지도 않습니다.
A Bayes rule minimizes overall risk under a specified law and loss. The law is treated as known, and the permitted prediction-function class must also be stated. With independently selectable actions at finitely many information values, conditional minimizers can be joined into a global rule.
f∗(x)∈argaminE[ℓ(Y,a)∣X=x],RP∗=finfRP(f)
Under squared loss with real predictions, the optimal rule predicts 1/4 at A and 3/4 at B. Both conditional variances equal 3/16, and each information value has mass 1/2, so Bayes risk is 3/16.
This optimum depends on the assumed law and current information X. More information or a different loss can change it. Bayes risk is not a universally fixed number. A rule constructed from empirical conditional frequencies is not automatically a known future-population Bayes rule.
학부Undergraduate
베이즈 결정 규칙과 베이지안 추론은 다른 말이다Bayes decision rules differ from Bayesian parameter inference
“베이즈”라는 이름이 나온다고 반드시 모수의 사전분포를 정하고 사후분포를 계산했다는 뜻은 아닙니다. 방금의 최소화는 이미 주어진 P(Y|X)에서 기대손실을 비교했습니다. 모집단 모수에 관한 사전·사후 추론을 수행하지 않았습니다.
베이지안 모수 추론을 했다면, 자료를 본 뒤 얻은 사후 예측분포에 대해 손실을 평균해 행동을 고를 수도 있습니다. 그 경우에는 어떤 분포가 사후 예측분포인지, 무엇을 조건으로 삼았는지를 추가로 명시합니다. 주어진 분포 아래의 결정 원리와 그 분포를 어떻게 학습했는지를 구분하면 용어가 정리됩니다.
예를 들어 고객 이탈 집단 확률에 가상 개수 1·1을 더하는 평활화를 쓸 수 있습니다. 그것은 특정 확률 적합 선택입니다. 적합한 확률로 비용을 최소화하는 다음 결정 단계와, 그 확률이 실제 모집단에서 맞는지 확인하는 평가 단계는 계속 별도입니다.
The word “Bayes” does not necessarily mean that a prior over model parameters was specified and updated to a posterior. The preceding minimization compared expected losses under a given P(Y|X). It did not perform prior/posterior parameter inference.
After Bayesian parameter inference, one can instead average loss under a posterior predictive distribution. Then identify that distribution and its conditioning data explicitly. Separating decision principles from how a predictive distribution was learned resolves the terminology.
For example, adding pseudo-counts 1 and 1 to fit a churn-cell probability is a particular estimation choice. Minimizing decision cost using that fitted probability and evaluating whether it describes the actual population remain separate subsequent questions.
학부Undergraduate
실습 C · 손실별 최적 행동 집합Lab C · Loss-specific minimizing action sets
같은 유한 표에서 손실을 바꾸며 전체 최소해를 비교합니다. 제곱손실에서는 평균, 절대손실에서는 중앙값 집합, 분위수 손실에서는 선택한 분위수 집합, 0·1 분류에서는 선택 비용의 최소 행동을 읽으세요. 어떤 경우에도 미정의 분모를 0으로 채우지 않습니다.
가정 결과 1·4에 같은 비중을 주고 절대손실을 고르면 [1,4]가 나와야 합니다. 분위수 τ를 0으로 바꾸면 (−∞,1], 1로 바꾸면 [4,∞)입니다. 가정 분류확률 p=1/5, FP=1·FN=4에서는 두 행동이 모두 최소입니다.
실습 풀이 · 비중이 없는 새 정보 C
조건부 법칙이 없어 최소 행동을 자료에서 정할 수 없습니다. 현재 가정 법칙에서 C의 행동을 바꾸어도 전체 위험이 그대로인 성질과, C의 위험을 알았다는 주장을 구별합니다.
Compare complete minimizers across losses on the same finite table. Read means for squared loss, median sets for absolute loss, quantile sets for selected pinball loss and cost-minimizing binary actions. Undefined denominators are never filled with zero.
Equal-weight assumed outcomes 1 and 4 should produce [1, 4] under absolute loss. Changing quantile τ to 0 gives (−∞, 1]; changing it to 1 gives [4, ∞). At binary probability p=1/5 with FP1/FN4 costs, both actions minimize.
Worked lab · New information C has no mass
There is no conditional law from which to identify its action. Changing a rule at C leaves current overall risk unchanged, but does not identify risk conditional on C.
학부Undergraduate
후보 함수 집합부터 선언한다Declare the candidate function class first
현실의 학습 알고리즘은 가능한 모든 함수를 한 번에 비교하지 않습니다. 상수만 허용하거나, 일정한 직선만 허용하거나, 나무 깊이를 제한하는 등 후보 함수 집합 H를 먼저 정합니다. “최소 위험”이라고 쓸 때 어느 집합에서 최소인지 밝혀야 합니다.
가정 우산 법칙에서 상수 실수 예측만 허용하면 평균 Y=1/2이 최적이고 제곱위험은 1/4입니다. A·B마다 다른 실수 예측을 허용하면 1/4·3/4를 사용해 위험 3/16을 얻습니다. 후보 집합이 더 넓어 최적값이 작아졌지만, 실제로 그 규칙을 유한 자료에서 정확히 배울 수 있는지는 다른 질문입니다.
선형 모형의 설명 열, 전처리, 누락 범주 대체값도 후보 함수의 일부입니다. 서로 다른 함수 집합의 최적값을 비교하면서 계산에 쓴 자료·손실·가중 법칙까지 바꾸면 무엇이 원인인지 분해하기 어렵습니다. 한 번에 무엇을 바꾸는지 적으세요.
A learning algorithm does not compare every conceivable function at once. It declares a class H: constants, selected linear functions, trees of bounded depth or another family. A minimum-risk claim must identify its function class.
In the umbrella law, restricting real predictions to constants gives mean Y=1/2 and squared risk 1/4. Allowing separate real predictions at A and B gives 1/4 and 3/4 with risk 3/16. A richer class lowers the best available risk; whether finite data can learn that rule accurately is another question.
Predictor columns, preprocessing and unseen-category fallbacks are parts of a function definition. Changing data, loss and weights together with the class makes comparisons hard to interpret. State exactly what is changed.
학부Undergraduate
같은 훈련행에서 후보 손실을 모두 계산한다Compare all candidates on the same training rows
경험위험 최소화, 줄여서 ERM은 선언한 후보들 중 훈련표의 평균 손실이 가장 작은 것을 고릅니다. 이름이 길어도 절차는 단순합니다. 후보마다 같은 훈련행에 예측하고, 행별 손실을 더해 같은 분모로 나눕니다. 그다음 가장 작은 값의 후보를 모두 남깁니다.
f∈argf∈HminRn(f)
두 훈련 결과가 0과 1이고 후보가 상수 0·상수 1이라면 제곱손실은 각각 1/2입니다. 상수 1/2를 후보에 추가하면 손실은 (1/4+1/4)/2=1/4입니다. 이 예의 ERM은 후보를 명시하면 손으로 완전히 확인할 수 있습니다.
훈련 결과가 빠진 양의 비중 행이 있으면 후보의 전체 훈련 위험이 정의되지 않을 수 있습니다. 후보마다 예측이 가능한 행만 제각각 골라 다른 분모에서 최소값을 겨루게 해서는 안 됩니다. 실습은 모든 후보의 전체 훈련 위험이 정의된 경우에 선택을 보고합니다.
Empirical risk minimization, or ERM, selects the smallest training-average loss within a declared candidate set. For each candidate, predict on the same training rows, sum row losses and divide by the same denominator. Retain all candidates attaining the minimum.
f∈argf∈HminRn(f)
For training outcomes 0 and 1, constant candidates 0 and 1 each have squared loss 1/2. Adding constant 1/2 gives loss (1/4+1/4)/2=1/4. Once candidates are stated, this ERM example can be checked completely by hand.
A positive-weight missing outcome can leave full training risk undefined. Do not let candidates compete on separately selected denominators containing only the rows they predict. The lab reports selection when every candidate has defined full training risk.
학부Undergraduate
경험위험 최소해와 동점 선택 규칙Empirical minimizers and a fixed tie convention
훈련 결과 0·1과 상수 후보 0·1만 있으면 두 후보 모두 ERM입니다. 실습의 기본 실행 약속은 입력 목록에서 먼저 나온 최소 후보를 선택하는 것입니다. 전체 최소 후보 목록도 함께 보존하며, 다른 동점 후보를 명시적으로 선택할 수 있습니다.
이제 평가 결과 하나가 1이라고 합시다. 상수 0의 평가 제곱손실은 1이고 상수 1은 0입니다. 이를 보고 상수 1을 골랐다면 평가 결과를 선택에 사용한 것입니다. 훈련에서 이미 정한 첫 후보 규칙의 손대지 않은 평가와 같은 절차라고 보고할 수 없습니다.
동점 처리는 작아 보이지만 재현성의 일부입니다. 더 큰 임계값을 택할지, 더 단순한 모형을 택할지 같은 약속은 선택 자료의 범위 안에서 정합니다. 실제 자료의 임계값 동률도 같은 원리로 추적합니다.
With training outcomes 0 and 1 and only constant candidates 0 and 1, both are ERM solutions. The lab’s default execution convention selects the first listed minimizer while preserving the full list. Another training-tied candidate may be explicitly selected.
Now suppose a single evaluation outcome is 1. Constant 0 has evaluation squared loss 1; constant 1 has loss 0. Choosing 1 after inspecting this result uses evaluation data for selection. It is a different protocol from evaluating the training-defined first-candidate rule untouched.
Tie handling is part of reproducibility. Preferences for a larger threshold or a simpler model must be declared within the allowed selection process. Actual threshold ties are traced with the same principle.
학부Undergraduate
추정한 상수와 독립적인 시험을 구별한다Separate a fitted constant from independent testing
훈련 결과가 0·1이면 표본평균 1/2로 만든 상수는 훈련 제곱손실을 최소화합니다. 이 값을 계산하는 일은 적합입니다. 같은 값 1/2를 다른 평가행의 결과와 비교해 손실을 계산하는 일은 평가입니다. 식에 들어가는 숫자가 같아도 어떤 결과를 언제 읽었는지가 중요합니다.
적합 후에는 규칙 전체를 고정해야 합니다. 상수, 집단별 값, 전처리 평균, 범주 대체값, 임계값을 평가 결과에 맞춰 고치면 같은 고정 규칙을 평가한 것이 아닙니다. 실습의 후보는 상수 또는 명시한 범주별 표이며, 선택된 규칙을 그대로 평가행에 적용합니다.
이 장의 실제 국가·임금 사례는 보관 자료의 경험적 위험을 해석하는 예시입니다. 같은 자료로 평균·중앙값을 구하고 그 자료에서 손실을 보여 주는 결과를 독립 시험 성능이라고 부르지 않습니다. 고객 사례의 미래 모집단 최적성도 별도 근거 없이 주장하지 않습니다.
For training outcomes 0 and 1, the fitted constant mean 1/2 minimizes training squared loss. Computing it is fitting; comparing that fixed 1/2 against separate evaluation outcomes is evaluation. The same numerical constant can occur in different data-use protocols.
Freeze the whole rule after fitting: constants, group values, preprocessing means, unseen-category fallbacks and thresholds. Revising them using evaluation outcomes changes the evaluated procedure. Lab candidates are fixed constants or explicit group lookups applied unchanged to evaluation rows.
The actual country and wage cases describe empirical losses within retained data. Computing a mean or median and scoring it on the same data is not independent test performance. Nor does the customer case identify future-population optimality without additional evidence.
학부Undergraduate
훈련 손실 감소가 시험 개선을 보장하지 않는다Lower training loss need not improve test risk
두 가정 훈련행이 (A,0), (B,1)이라고 합시다. 상수 1/2는 훈련 제곱손실 1/4입니다. A에서는 0, B에서는 1이고 새 범주에서는 0이라는 표 규칙을 허용하면 훈련 손실이 0입니다.
그런데 새 평가행이 (C,1)이면 표 규칙의 손실은 1, 상수 1/2는 1/4입니다. 훈련 손실을 더 줄인 후보가 이 평가에서는 나빠졌습니다. 이 예는 실제 산업 성능 연구가 아니라, 훈련 적합 개선만으로 시험 개선을 보장하는 주장이 틀렸다는 반례입니다.
새 범주에 대한 대체값을 선언하지 않았다면 해당 후보의 평가 예측과 전체 평가 위험은 미정의입니다. 모르는 예측을 0으로 채워 결과를 만드는 것과, 규칙의 일부로 미리 대체값 0을 선언하는 것은 다른 일입니다. 후자는 계산 가능하지만 성능이 좋다는 보장은 없습니다.
Assume two training rows (A, 0) and (B, 1). Constant 1/2 has training squared loss 1/4. A lookup predicting 0 at A, 1 at B and fallback 0 for new categories has training loss 0.
For evaluation row (C, 1), however, the lookup loses 1 while constant 1/2 loses 1/4. Better training fit performed worse here. This constructed example is a counterexample to a claimed guarantee, not an actual industry performance study.
Without a declared fallback, the lookup’s evaluation prediction and full evaluation risk are undefined. Silently filling an unknown prediction with zero differs from declaring fallback zero as part of the rule beforehand. A declared fallback makes evaluation calculable without guaranteeing good performance.
학부Undergraduate
모집단 법칙을 모르면 무엇을 말할 수 있을까?What remains unknown without the population law?
경험위험은 관측한 훈련표의 함수입니다. 모집단 위험은 정해진 규칙을 새로운 법칙 아래 평균한 값입니다. 훈련표가 모집단의 작은 부분이라면 둘이 같아야 할 이유는 없습니다. 규칙 자체도 같은 훈련표를 보고 선택되므로 선택 효과를 고려해야 합니다.
이 장은 어떤 가정도 없이 일반화가 된다는 정리를 제시하지 않습니다. 뒤 장에서 독립 표집, 유한하거나 제한된 복잡도의 후보 집합, 손실의 범위, 집중부등식 같은 조건을 함께 검토합니다. 조건 없이 표 안의 최소값만 보고 미래 성능을 확정하지 않는 것이 첫 단계입니다.
모든 경험위험이 쓸모없다는 뜻도 아닙니다. 출처·측정·분모를 지키고 선택과 평가를 나누면, 무엇을 관측했고 무엇을 아직 모르는지 명확한 결과를 만들 수 있습니다. 실제 자료의 재현 가능한 기준선은 복잡한 모형을 검토할 때 필요한 비교점입니다.
Empirical risk is a function of the observed training table. Population risk averages a fixed rule under a specified new-observation law. A small training sample need not produce the same value. Because the rule was selected using that sample, selection also matters.
This chapter does not promise assumption-free generalization. Later chapters examine independent sampling, constrained hypothesis complexity, loss bounds and concentration arguments. The first step is to avoid certifying future performance from a training minimum alone.
Empirical risk remains useful. Source, measurement and denominator discipline, together with separated selection and evaluation, yield a clear account of what is observed and what is unknown. Reproducible actual-data baselines are valuable comparison points for more complex models.
학부Undergraduate
새로운 범주와 분포 변화의 범위Unseen categories and changing distributions
훈련에서는 X=A·B만 보았는데 실제 운영에서는 C가 들어올 수 있습니다. 예측 함수를 C까지 정의했는지 먼저 확인해야 합니다. 함수의 값이 없으면 예측을 못 한 것이고, 값은 있어도 C의 결과 법칙을 모르므로 위험을 검증하지 못한 것일 수 있습니다.
더 미묘한 변화도 있습니다. A·B의 전체 비율만 달라지면 기존 조건부 위험을 새로운 비율로 평균해 전체 위험이 바뀔 수 있습니다. A 안에서 비 올 확률 자체가 바뀌면 기존 조건부 규칙도 달라질 수 있습니다. 두 변화를 같은 의미의 변화라고 처리하지 않습니다.
실제 고객 자료에는 행별 달력일과 확인된 고객 식별자가 없습니다. 원행을 고정 난수로 나눈 것은 계산을 재현하기 위한 자료 역할입니다. 새 시점·다른 고객·다른 국가로의 검증을 자동으로 만들어 주지는 않습니다. 이 차이는 실제 사례의 인수인계 기록에도 남깁니다.
Training may contain only A and B while deployment introduces C. First check whether the prediction function is defined at C. No value means no prediction; an assigned value can still lack risk validation if C’s outcome law is unknown.
Other shifts are subtler. Changing only the overall A/B frequencies can change total risk by reweighting conditional risks. Changing rain probability within A can change the preferred conditional rule itself. These are different changes.
The actual churn data lack per-row calendar dates and verified customer identifiers. A reproducible row split defines data roles without automatically validating future periods, new customers or other countries. Record that distinction in case handovers.
학부Undergraduate
실습 D · 고정 후보의 훈련 선택과 시험 평가Lab D · Training selection and fixed-test evaluation
훈련 후보의 예측 규칙을 먼저 선언한 뒤 같은 훈련행에서 손실을 비교하세요. 모든 최소 후보, 기본 동점 선택, 그 규칙의 평가 손실을 따로 읽습니다. 평가 결과가 가장 좋은 후보를 자동으로 선택하는 버튼이 아닙니다.
상수 0·1의 훈련 동점 예와 새 범주 C의 대체값 예를 각각 실행해 보세요. 양의 비중 훈련 결과가 빠지거나 후보의 예측이 없으면 전체 훈련 위험과 선택이 미정의여야 합니다. 평가 결과가 없을 때 평가 손실 0을 만들어서는 안 됩니다.
실습 풀이 · 훈련 동점 후보의 순서를 바꾸면?
수학적 최소 후보 집합은 그대로입니다. 목록의 첫 최소 후보를 고르는 실행 약속 때문에 선택 표시는 바뀔 수 있습니다. 평가 정답은 그 순서 변경을 정당화하는 선택 자료로 사용하지 않습니다.
Declare candidate prediction rules, then compare them on the same training rows. Read the full minimizing set, default tie choice and that fixed rule’s evaluation loss separately. The lab does not automatically select the best evaluation score.
Run both the constant-0/1 training tie and the unseen-C fallback example. Positive-weight missing training outcomes or missing candidate predictions should leave full training selection undefined. An empty evaluation set must not produce evaluation loss zero.
Worked lab · What if tied candidates change order?
The mathematical minimizing set stays unchanged. Selecting the first listed minimizer can change the displayed executed rule. Evaluation labels are not used to justify the reordered selection.
학부Undergraduate
확률을 예측하는 것과 0·1을 선택하는 것Predicting a probability versus choosing a binary action
우산 여부를 고를 때는 행동 0·1이 필요하지만, 친구에게 날씨의 불확실성을 알려 줄 때는 확률 q가 유용합니다. 같은 행동 1을 고른 두 사람이 비 올 확률을 각각 0.3과 0.9로 생각할 수도 있습니다. 행동의 정확도만 보아서는 이 차이가 사라집니다.
확률 예측을 평가하는 손실은 q 자체를 입력으로 받습니다. 이진 결과 y에 대한 Brier 손실은 (y−q)²입니다. 0·1 행동을 넣으면 틀린 행의 손실이 1이고 맞힌 행은 0이지만, 중간 확률을 허용하면 다른 문제가 됩니다. y=1에 q=0.8이면 손실은 0.04입니다.
확률을 잘 예측한 뒤 비용에 맞는 행동을 따로 골라야 합니다. 참 이탈 확률 p=0.3을 안다고 가정하고 FP=1, FN=4로 정하면 행동 1의 위험은 0.7이고 행동 0은 1.2입니다. 비용을 FP=4, FN=1로 바꾸면 반대입니다. 참 확률을 바꾸지 않아도 행동은 바뀝니다.
An umbrella decision needs an action in {0, 1}, while communicating uncertainty benefits from a probability q. Two people choosing action 1 might believe the rain probability is 0.3 and 0.9 respectively. Action accuracy alone discards that difference.
A probability score takes q itself as input. Binary Brier loss is (y−q)². Restricting q to actions 0 and 1 gives loss one on mistakes and zero on correct decisions. Intermediate probabilities define a different problem: y=1 and q=0.8 give loss 0.04.
Choose a cost-sensitive action separately from the probability report. Assume the true event probability is p=0.3. With FP=1 and FN=4, action 1 has expected cost 0.7 and action 0 costs 1.2. FP=4 and FN=1 reverse the choice without changing the true probability.
심화Extension
Brier 점수를 제곱 완성으로 유도한다Derive the Brier score by completing the square
결과 1의 확률이 p이고 결과 0의 확률이 1−p라고 가정합시다. 고정한 확률 보고 q의 기대 Brier 손실은 p(1−q)²+(1−p)q²입니다. 이것은 결과가 나온 뒤의 손실이 아니라 두 가능한 결과의 손실을 확률로 평균한 값입니다.
B(p,q)=p(1−q)2+(1−p)q2=p(1−p)+(q−p)2.
첫 항은 q와 무관하고 둘째 항은 음수가 될 수 없습니다. 따라서 q=p가 유일한 최소해입니다. p가 0이나 1인 경계에서도 같은 식이 성립합니다. 참 확률을 안다고 가정하면 그 확률을 그대로 보고하는 것이 이 기대 점수에서 최적입니다.
p=1/4, q=1/2이면 기대 손실은 1/4입니다. q=1/4로 보고하면 3/16이므로 차이는 1/16입니다. 차이가 (q−p)²이라는 계산은 새로운 관측에서 p를 이미 알고 있다는 증명이 아닙니다. 실제 p를 자료로 추정하는 문제는 별도로 남아 있습니다.
Assume the outcome is one with probability p and zero with probability 1−p. A fixed report q has expected Brier loss p(1−q)²+(1−p)q². This averages the losses of the two possible outcomes; it is not one realized loss.
B(p,q)=p(1−q)2+(1−p)q2=p(1−p)+(q−p)2.
The first term is constant in q and the second is nonnegative. Thus q=p uniquely minimizes the expectation, including p=0 and p=1. Given the true probability, truthful reporting is optimal for this score.
At p=1/4, report q=1/2 gives expectation 1/4, while q=1/4 gives 3/16. The excess is 1/16=(q−p)². This identity does not show that the true probability of a new observation is already known. Estimating it from data remains a separate problem.
심화Extension
로그손실을 조건부 평균으로 읽는다Read logarithmic loss as conditional expected loss
로그손실은 실제 일어난 결과에 작은 확률을 주면 크게 벌점합니다. y=1일 때 −log q, y=0일 때 −log(1−q)입니다. 여기서는 밑이 자연상수 e인 자연로그를 쓰며, 비율 확률은 단위가 없습니다. 로그 밑을 1보다 큰 다른 수로 바꾸면 손실 전체의 양의 배수만 바뀝니다.
첫 식의 경계는 다음 절의 약속으로 읽습니다. p=1/4이고 q=1/2이면 기대 로그손실은 log 2≈0.693147입니다. q=p이면 약 0.562335로 더 작습니다. 이 소수는 로그의 근삿값이며 0.562335라는 유한 소수가 정확한 수학적 답인 것은 아닙니다.
로그손실은 드문 사건에 거의 0의 확률을 준 보고를 강하게 벌점합니다. 그러나 더 큰 벌점을 준다는 것이 모든 실제 의사결정에 더 좋은 비용 기준임을 의미하지는 않습니다. 확률 보고의 점수와 실제 행동의 비용을 구별해 선택하세요.
Logarithmic loss strongly penalizes a tiny probability assigned to the realized outcome. It is −log q for y=1 and −log(1−q) for y=0. We use natural logarithms. Probabilities are dimensionless; changing the logarithm base to another number greater than one multiplies all losses by a positive constant.
Interpret endpoint products using the next section’s conventions. For p=1/4 and q=1/2, expected log loss is log 2≈0.693147. Reporting q=p reduces it to approximately 0.562335. These decimals approximate logarithms; the finite decimal 0.562335 is not the exact mathematical answer.
A log score heavily penalizes near-zero reports for rare realized events. That does not make it the best actual action-cost criterion in every setting. Choose probability-report scores separately from costs attached to actions.
심화Extension
0확률·불가능 사건·무한 로그손실Zero probabilities, impossible outcomes and infinite log loss
q=0이라고 보고했는데 실제 y=1이면 로그손실은 +∞입니다. 이것은 계산 실패로 생긴 결측이 아니라 점수가 정한 확장실수 값입니다. q=1인데 y=0이어도 같습니다. 어떤 유한한 큰 수로 조용히 바꾸면 원래 평가 문제를 바꾼 것입니다.
반면 가정한 법칙에서 p=0이고 q=0이면 결과 1은 확률 0입니다. 이 불가능 결과에 적힌 무한 벌점은 기대값에 양의 질량으로 들어가지 않습니다. 기대 손실은 결과 0의 손실 0입니다. 이를 0·log 0 항은 0이라는 약속으로 표현합니다.
p=0인데 q=1이면 실제로 일어나는 결과 0에 확률 0을 준 것이므로 기대 손실은 +∞입니다. ‘표에 0이 있다’는 말만으로는 어느 경우인지 정할 수 없습니다. 어떤 사건의 확률이 0이고 그 사건이 평균에서 양의 질량을 갖는지 확인하세요.
If q=0 is reported and y=1 occurs, log loss is +∞. This is a defined extended-real value, not missingness caused by a calculation failure. The same occurs for q=1 and y=0. Silently replacing infinity with a finite cap changes the scoring problem.
In contrast, under an assumed law p=0 and report q=0, outcome one has zero probability. Its infinite penalty receives no positive mass in the expectation. Expected loss is zero from outcome zero. This is expressed by defining the zero-mass term 0·log 0 as zero.
With p=0 and q=1, the outcome that actually occurs is assigned probability zero, so expectation is +∞. Merely noticing a zero in the table does not distinguish these cases. Identify which probability is zero and whether that outcome has positive mass in the expectation.
심화Extension
왜 참 확률이 기대 점수를 최소화할까?Why does truthful probability reporting minimize expected score?
0<p<1, 0<q<1에서 로그 점수의 기울기를 계산하면 −p/q+(1−p)/(1−q)=(q−p)/[q(1−q)]입니다. q가 p보다 작으면 음수, 크면 양수이므로 p로 이동할 때 기대 점수가 작아집니다. 유일한 최소해는 q=p입니다.
H(p,q)−H(p,p)=plogqp+(1−p)log1−q1−p≥0.
이 차이를 두 베르누이 법칙 사이의 KL 발산이라고 부릅니다. 이 장에서는 미분의 부호로 비음수와 등호 조건을 확인했습니다. p=0·1은 경계의 한 항을 직접 계산하면 같은 결론을 얻습니다. 로그의 정의역과 0질량 약속 없이 분수식을 경계에 그대로 대입하지 마세요.
Brier와 로그처럼 참 확률 보고가 기대 점수를 최소화하면 적정 점수라고 부릅니다. 유일하게 최소화하면 엄밀히 적정하다고 합니다. ‘어떤 데이터에서도 계산된 예측이 진실’이라는 뜻이 아닙니다. 참 법칙을 고정했을 때 비교할 유인 구조에 대한 말입니다.
For interior probabilities, the derivative of expected log score is −p/q+(1−p)/(1−q)=(q−p)/[q(1−q)]. It is negative below p and positive above p, so moving toward p reduces the expectation. The unique minimum is q=p.
H(p,q)−H(p,p)=plogqp+(1−p)log1−q1−p≥0.
This difference is the KL divergence between two Bernoulli laws. Here the derivative sign establishes its nonnegativity and equality condition. For p=0 or 1, calculate the remaining term directly. Do not substitute endpoints into undefined ratios without the stated zero-mass convention.
A score is proper when reporting the true probability minimizes its expectation, and strictly proper when that report is unique. Brier and log scores have this property. It describes incentives under a fixed true law; it does not certify any fitted data-based probability as true.
심화Extension
정확도·비용·보정은 서로 다른 질문이다Accuracy, cost and calibration ask different questions
보정은 ‘확률 0.3으로 예측한 경우들에서 결과 1의 비율도 0.3인가?’라는 질문입니다. 손에 든 표에서 일치한다는 경험적 보정과 미래 법칙에서 일치한다는 모집단 보정은 다릅니다. 작은 표의 모든 예측을 0·1로 외우면 훈련 보정이 좋아 보여도 새 관측을 맞힌다는 증거는 아닙니다.
여덟 가정 행의 A에서는 1의 비율이 1/4이고 B에서는 3/4입니다. 모든 행에 q=1/2을 주어도 전체 비율이 1/2이어서 이 한 보고값의 묶음에서는 보정됩니다. 하지만 A·B를 구별해 1/4·3/4로 보고하면 Brier 위험은 1/4에서 3/16으로 줄어듭니다. 전체 보정만으로 이용 가능한 정보를 모두 썼다고 말할 수 없습니다.
따라서 정확도·분류 비용·확률 점수·보정·집단별 위험을 각각 보고하세요. 임의로 고른 비용에서 위험이 작다는 것이 집단 간 형평성이나 제도적 적합성까지 자동으로 보장하지 않습니다. 사례에서는 어떤 기준을 썼는지 명시하고 자료가 확인하지 못하는 판단은 남겨 둡니다.
Calibration asks whether outcomes occur at rate 0.3 among cases reported at probability 0.3. Empirical agreement in a retained table differs from calibration under a future law. Memorized training labels can look perfectly calibrated without demonstrating new-observation performance.
In our eight assumed rows, event frequencies are 1/4 in A and 3/4 in B. Reporting 1/2 everywhere is calibrated at its single report value because the overall frequency is 1/2. Yet using A/B to report 1/4 and 3/4 reduces Brier risk from 1/4 to 3/16. Overall calibration alone does not establish that all available information was used.
Report accuracy, action cost, probability scores, calibration and subgroup risks as distinct quantities. Low risk at declared costs does not automatically establish fairness or institutional suitability. State the criterion and preserve judgments that the source data cannot verify.
심화Extension
수학적 0과 화면의 반올림 0을 구별한다Distinguish mathematical zero from display rounding
이 장의 분수 입력·제곱손실·가중 평균은 정수의 분자와 분모로 보존합니다. 예를 들어 1/3을 0.333333으로 반올림한 뒤 여러 번 곱하면 정확한 분수 계산과 달라질 수 있습니다. 반올림은 독자를 위한 표시 단계에서 합니다.
로그는 일반적으로 유리수가 아니므로 로그손실의 정확한 분수값을 만들지 않습니다. 실행기는 유리수 구간으로 로그의 하한·상한을 감싸고 소수 근삿값을 따로 표시합니다. log 2의 구간 끝점은 정확한 유리수일 수 있지만 그 중점이 log 2와 정확히 같다는 뜻은 아닙니다.
아주 작은 양수가 화면에서 0처럼 보여도 정확한 분자·분모나 부호 표시는 남아야 합니다. 반대로 수학적으로 손실이 정확히 0이면 ‘아주 작음’과 구별합니다. 무한 로그손실·미정의 평균·유한 양수는 다른 결과이며, 같은 빈칸으로 숨기지 않습니다.
Rational inputs, squared losses and weighted means retain integer numerators and denominators. Rounding 1/3 to 0.333333 before repeated products can change the answer. Round only at the presentation stage.
Logarithms are generally irrational, so the engine does not invent an exact rational log loss. It encloses logarithms in certified rational lower and upper bounds and separately displays decimal approximations. Rational interval endpoints do not make their midpoint exactly log 2.
A tiny positive value can display as zero at ordinary precision; its exact fraction or sign should remain available. Conversely, mathematically exact zero differs from a small positive number. Infinite log loss, undefined means and finite positive values remain distinct outcomes.
심화Extension
실습 E · 가정 확률의 Brier·로그 점수Lab E · Brier and log scores under an assumed probability
가정한 참 확률 p와 보고 q를 따로 바꾸세요. p=1/4에서 q=1/2·1/4를 비교하여 Brier의 초과 위험이 1/16에서 0으로 줄어드는지 확인합니다. 로그 점수도 q=p에서 최소지만 손실의 소수 크기는 다릅니다.
p=0,q=0과 p=0,q=1을 실행하여 정확한 0과 무한을 구별하세요. 다음으로 p를 아주 작게 두고 q=0을 입력합니다. 드물더라도 양의 질량이 있는 결과에 0을 준 기대 로그손실은 무한입니다. 선택 비용에 따른 0·1 행동을 계산한 결과와 이 확률 점수를 바꿔 부르지 마세요.
실습 풀이 · q=p이면 이후 모든 행의 손실이 0인가요?
아닙니다. 0<p<1이면 참 확률로 보고해도 결과는 불확실합니다. 최소 기대 Brier는 p(1−p)>0입니다. 최소화는 매번 정답을 안다는 뜻이 아닙니다.
Change assumed true probability p separately from report q. At p=1/4, compare q=1/2 and 1/4: Brier excess falls from 1/16 to zero. Log score is also minimized at q=p, but its numerical scale differs.
Run p=0, q=0 and p=0, q=1 to distinguish exact zero from infinity. Then choose a tiny positive p with q=0. An event with positive mass assigned probability zero gives infinite expected log loss even when rare. Do not rename these probability scores as the cost of a chosen binary action.
Worked lab · Does q=p make every later loss zero?
No. With an interior p, reporting truthfully still leaves uncertain outcomes. Minimum expected Brier loss p(1−p) is positive. Minimization does not mean knowing each realized answer.
심화Extension
실제 국가 GDP의 예측 단위와 평균 손실Actual country GDP units and empirical losses
국가 사례는 내려받은 World Bank의 2024년 16개 국가 GDP·기대수명 기록을 사용합니다. 목표 Y는 1인당 GDP, 단위는 2015년 불변 USD입니다. 사람 수나 현재 환율 달러를 예측하는 표가 아닙니다. 16개를 각각 같은 비중으로 평균한 결과는 전 세계 개인의 평균 위험도 아닙니다.
같은 국가행에서 상수 하나를 고를 때 제곱손실은 평균을, 절대손실은 중앙값 집합을 선호합니다. 두 손실은 각각 USD²와 USD 단위이므로 숫자 크기만 보고 어느 모형이 더 좋다고 비교하면 안 됩니다. 같은 손실·행·비중 아래의 후보를 비교하세요.
기대수명 80세 이상과 미만으로 나누는 기준은 학습용 기술 집단입니다. 국가행 평균을 두 개로 나누면 경험적 제곱위험을 줄일 수 있지만 건강이 GDP를 인과적으로 늘렸다는 결론이 아닙니다. 두 변수의 같은 연도 관측은 실제 의사결정 시점에 알려진 정보였다는 보장도 하지 않습니다.
The country case uses 16 downloaded World Bank country records for GDP and longevity in 2024. Y is GDP per capita in constant 2015 USD. The table does not predict population counts or current-exchange-rate dollars. Equal-country averaging is not the risk of an average individual worldwide.
For a constant prediction on the same rows, squared loss favors the mean and absolute loss the median set. Their units are USD² and USD respectively, so numerical magnitudes do not establish which model is better across the two losses. Compare candidates under the same loss, rows and weights.
The longevity cutoff of 80 years defines descriptive teaching groups. Two group means can lower empirical squared risk without identifying a causal effect of health on GDP. Same-year recorded values also do not guarantee that both fields were available at an earlier decision time.
심화Extension
1976년 교육·원 로그임금과 가용 분모1976 schooling, source-log wages and available denominators
개인 사례는 Card 자료의 원 3,613행과 1976년 교육·시간당 임금 관련 필드를 사용합니다. 이 장의 Y는 원자료가 제공한 손질된 로그임금 lwage76입니다. 임금 원값에 브라우저에서 로그를 다시 취해 만든 열이 아닙니다. 원 코드북의 표본과 결측 약속을 먼저 읽어야 합니다.
로그임금은 3,010행에서 가용하고 603행은 이 목표가 없습니다. 가용행 평균 손실은 이 3,010행의 분모를 사용합니다. 603행에 0을 넣거나 가용행 위험을 전체 3,613행의 위험이라고 표시하지 않습니다. 가용 비중과 미가용 비중은 함께 남깁니다.
교육연수 12년 이하·초과라는 집단은 기술적인 비교입니다. 집단별 평균 로그임금을 예측해 경험위험을 줄여도 교육의 인과적 임금 수익률을 추정한 것은 아닙니다. 또한 exp(평균 로그임금)은 일반적으로 산술평균 임금과 같지 않습니다. 원 로그 열의 손질과 결측까지 있으므로 원 USD 임금 평균이라고 바꿔 부르지 않습니다.
The person case retains 3,613 original Card records with schooling and hourly-wage-related fields for 1976. Y is the source-supplied trimmed log-wage field lwage76. It is not a browser recomputation of the logarithm of every raw wage. Read the original sample and missingness definitions first.
The log outcome is available on 3,010 rows and unavailable on 603. Mean loss among available rows uses the denominator 3,010. Do not fill the other outcomes with zero or label the available-row risk as risk over all 3,613 records. Retain both available and unavailable mass.
Schooling at most 12 years versus above 12 defines a descriptive comparison. Predicting group mean log wages can lower empirical risk without estimating education’s causal wage return. Also, exp(mean log wage) generally differs from arithmetic mean wage. Source trimming and missingness further prevent renaming this target as raw USD wage.
심화Extension
실제 고객 이탈과 선택한 분류 비용Actual customer churn and declared classification costs
기업 사례는 공개 Iranian Churn의 3,150개 원 위치를 모두 사용합니다. 결과 Churn은 원 0·1 코드입니다. Tariff Plan의 1·2를 학습용 집단으로 나누되 고객의 실명·개별 식별자·달력상의 발생 순서를 이 파일이 확인해 주는 것처럼 쓰지 않습니다.
집단 안 실제 이탈 비율은 이 보관 표의 경험적 확률입니다. 독립적으로 알고 있는 미래 개인 고객의 참 확률이 아닙니다. 표의 비율을 같은 표에서 평가하는 계산에는 별도 새 관측 검증이 없습니다. 이 장은 그 구별을 익히는 장이며 후속 모델의 배포 성능으로 제시하지 않습니다.
FP=1,FN=4는 손으로 비교하기 위해 고른 비용입니다. 실제 통신사의 손실액·추가 연락 효과·유지 보상액을 관측한 것이 아닙니다. 비용 비율을 바꾸어도 실제 Churn 원값은 그대로 남아야 합니다. 손실을 낮추는 통계적 행동과 실제 고객에게 무엇을 할지는 따로 논의합니다.
The company case retains all 3,150 original positions in the public Iranian Churn dataset. Churn keeps its original binary code. Tariff Plan codes 1 and 2 form teaching groups; the file does not establish named identities, verified unique customer identifiers or per-row calendar ordering.
Each group’s recorded event frequency is an empirical probability of this retained table, not an independently known true future probability for an individual customer. Scoring those same frequencies on the same rows is not evaluation on new observations. This chapter teaches the distinction and does not present deployment performance.
FP=1 and FN=4 are selected teaching costs, not measured company losses, contact effects or retention incentives. Changing costs must not alter original Churn outcomes. A statistical loss-minimizing action and an actual customer intervention require separate discussion.
심화Extension
실습 F · 같은 실제 행과 서로 다른 손실Lab F · The same actual rows under different losses
국가·개인·기업을 차례로 선택하고 같은 원행에서 손실 종류와 가정을 바꾸세요. 출력의 원행 수·양의 비중 분모·가용 결과 수를 먼저 확인한 뒤 위험을 비교합니다. 개인 사례의 미가용 결과가 다른 손실을 고른다고 사라지면 안 됩니다.
상수 규칙과 집단별 규칙, 손실의 최소값과 최소 규칙 집합을 구별하여 읽으세요. 집단이 비어 있으면 그 집단의 조건부 최소값을 계산할 분모가 없지만, 비어 있는 집단에 어떤 값을 줄지 전체 평균 위험이 결정하지 못한다는 설명은 남습니다.
실습 풀이 · 이 표에서 구한 최적값을 바로 서비스에 쓸까요?
이 표 안의 경험적 최적이라는 뜻부터 확인합니다. 운영 시점 입력의 가용성, 별도 평가 기간·집단, 비용의 실제 의미와 다른 선택 기준을 검토해야 합니다. 이 계산만으로 미래 고객 성능이나 정책 효과는 확인되지 않습니다.
Select country, person and company in turn, then vary loss choices and assumptions on the same original records. Read source size, positive-weight denominator and available outcomes before comparing risks. Missing person outcomes must not vanish because a different loss is selected.
Separate constant from group-specific rules and minimum values from complete minimizing sets. Empty groups have no denominator for a conditional optimum. Their prediction extension is also not determined by the overall empirical average, which assigns them zero mass.
Worked lab · Is the table optimum ready for service?
First recognize that it is an empirical optimum in this table. Review prediction-time availability, separate evaluation periods/groups, the actual meaning of costs and other decision criteria. This calculation alone verifies neither future customer performance nor policy effects.
심화Extension
원자료부터 Python·R 계산을 재현한다Reproduce Python/R calculations from original records
내려받는 Python과 R 코드는 같은 공개 선택 CSV를 읽고 목표·가중치·결측을 확인한 뒤 평균 손실과 최소해를 계산합니다. 실행 환경을 준비한 후 교재 폴더를 기준으로 실행하고 출력의 입력 SHA-256을 원자료 안내와 대조하세요. 브라우저의 즉시 계산은 JavaScript이며 로컬 Python·R 실행과 같은 방식으로 부르지 않습니다.
원자료의 열을 읽는 과정, 수학적으로 파생한 값, 화면의 반올림을 따로 남기면 서로 다른 구현을 비교할 수 있습니다. 제곱·절대·비대칭·분류 비용 계산은 정확한 분수로 대조하고 로그는 정의역·무한·구간 근사를 별도로 확인합니다. 코드가 끝났다는 메시지만으로 출처나 해석이 맞다고 결론내리지 않습니다.
실습 보고서에는 파일 이름·버전·단위·선택 규칙·가용 분모·선언한 비용·실행 명령을 적으세요. 프로그램이 출력한 숫자를 본문에 옮기기 전에 한두 행을 손으로 확인하고 전체 합계와 맞춰 보세요. 다른 사람이 같은 입력과 조건에서 검산할 수 있는 기록이 목표입니다.
Downloadable Python and R programs read the same public selected CSVs, verify outcomes, weights and missingness, then compute losses and minimizing sets. Prepare the environment, run from the textbook directory and compare input SHA-256 hashes with the source notes. Immediate browser calculations use JavaScript and are not labelled local Python/R execution.
Retain extraction, mathematical derivation and display rounding separately to compare implementations. Check squared, absolute, asymmetric and binary-cost calculations as rational values. Check log-score domains, infinity and bounded approximations separately. A successful exit message alone does not establish source authenticity or interpretation.
Record filenames, versions, units, selection rules, available denominators, declared costs and commands in your report. Hand-check a few rows before transferring program values into prose, then reconcile full totals. The aim is a record another reader can verify under the same inputs and conditions.
자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.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.
결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. CSV 원자료는 덮어쓰지 않습니다.Result files are saved in the result directory specified by each script; the input CSVs are not overwritten.
심화Extension
국가·개인·기업의 비교 사례Comparative country, person and establishment cases
국가 · 같은 16행의 평균·중앙값·손실
같은 나라의 1인당 GDP를 하나의 상수로 예상한다면 어느 수를 고를까요? 너무 높은 예상과 너무 낮은 예상에 같은 제곱 벌점을 주면 평균이, 절대 차이로 평가하면 중앙값 집합이 답입니다. 어느 답이 더 좋다는 말보다 어떤 손실·단위·비중을 사용했는지 먼저 정해야 합니다.
실제 입력은 2026년 10월 20일 보관한 World Bank 합본 응답의 2024년 16개 국가 기록입니다. GDP 지표 NY.GDP.PCAP.KD는 2015년 불변 USD의 1인당 값이고 SP.DYN.LE00.IN은 출생 시 기대수명입니다. 원 합본의 국가 코드·연도·지표를 합성키로 대조했습니다. 10월 27일에 새로 내려받은 GDP 빈티지라고 바꿔 쓰지 않으며, 역사적 개별 API 요청 URL을 완전히 복원했다고도 주장하지 않습니다.
보관한 2024년 실제 16개 국가 · 원 위치·정확 분수는 CSV
국가
기대수명 · 년
GDP/인 · 2015 USD
가정한 기술 집단
AUS
83.051
61,486.381
life_ge80
BRA
76.023
9,566.745
life_lt80
CAN
82.108
45,061.386
life_ge80
CHN
78.017
13,119.108
life_lt80
DEU
80.793
44,027.763
life_ge80
FRA
82.980
39,683.395
life_ge80
GBR
81.387
47,900.968
life_ge80
IDN
71.288
4,367.947
life_lt80
IND
72.235
2,366.833
life_lt80
JPN
84.036
37,976.637
life_ge80
KOR
83.629
37,048.426
life_ge80
MEX
75.264
10,284.034
life_lt80
SGP
83.346
68,129.696
life_ge80
USA
78.890
66,856.513
life_lt80
VNM
74.736
4,012.508
life_lt80
ZAF
66.312
5,715.475
life_lt80
실제·파생 · 가용행의 동일 작업비중 · 상수 최소해 · 소수는 근사
집단
원행
가용
미가용
평균
중앙값 전체 구간
최소 제곱위험
최소 절대위험
all
16
16
0
31,100.238572
[37,048.426400, 37,976.637179]
532,020,447.033472
20,290.104033
life_ge80
8
8
0
47,664.331759
[44,027.763155, 45,061.386459]
112,522,545.567226
7,980.276238
life_lt80
8
8
0
14,536.145385
[5,715.475315, 9,566.745187]
402,779,982.294873
10,420.454529
그래프의 관측값과 그룹별 평균은 같은 원행으로부터 계산했습니다. 기대수명 80세 이상 8개와 미만 8개는 설명을 위한 기술 집단이며, 예측 시점의 실제 가용성이나 인과 식별 조건을 확인한 분할이 아닙니다. 두 그룹 평균을 사용하면 동일한 가용행의 제곱위험이 상수 하나보다 커질 수는 없습니다. 이것은 더 넓은 규칙 집합에 원래 상수 규칙도 포함되기 때문입니다.
중앙값 구간은 한 숫자만 남기지 않습니다. 원행 수가 짝수이면 정렬 중앙 두 값 사이가 절대위험의 전체 최소 구간일 수 있습니다. CSV는 양 끝을 정확한 분수로 남기고 그림·표는 소수 근사로 표시합니다. 제곱위험의 단위 (2015년 불변 USD/인)²와 절대위험의 단위 2015년 불변 USD/인의 숫자 크기를 직접 비교해 우열을 정하지 않습니다.
국가를 같은 비중으로 평균한 위험은 세계 개인의 평균 위험이 아닙니다. 또한 기대수명과 GDP의 동시 관측으로 건강 정책의 효과를 식별하지 않습니다. 같은 표에서 집단별 평균을 정하고 그 표에서 점수를 낸 경험적 비교이며, 별도 국가·시점의 평가 점수는 아닙니다.
먼저 생각하기 · 그룹별 평균으로 이 표의 손실이 줄면 새 국가에서도 항상 더 좋나요?
아닙니다. 보관 표의 집단별 상수를 선택해 같은 표에서 평가한 결과입니다. 다른 국가나 시점에서의 분포·정보 가용성·비용을 확인하고 별도 평가를 설계해야 합니다.
개인 · 603개 미가용 결과와 위험의 분모
국가 표에서는 모든 결과가 있었지만 개인 표에는 목표가 없는 행이 있습니다. 같은 계산 버튼을 눌러도 분모를 자동으로 원행 수로 통일하면 안 됩니다. 가용행의 평균을 구하는 문제와 원래 전체 표의 위험을 아는 문제를 구분합니다.
실제 자료는 David Card가 공개한 proximity ZIP의 nls.dat와 code_bk.txt입니다. 원 3,613행을 보존했고 교육연수 ed76은 원 고정폭 18~19열, 손질 로그임금 lwage76은 86~97열에서 읽었습니다. 코드북이 원 시간당 임금의 센트 단위와 로그임금의 outlier trimming을 지정합니다. 원 로그 필드를 새로 계산한 로그로 대체하지 않습니다. 원 결측 토큰 점(.)은 미가용이며 실제 숫자 0과 다릅니다.
실제·파생 · 가용행의 동일 작업비중 · 상수 최소해 · 소수는 근사
집단
원행
가용
미가용
평균
중앙값 전체 구간
최소 제곱위험
최소 절대위험
all
3613
3010
603
6.261832
[6.285998, 6.287859]
0.196891
0.353750
schooling_gt12
1807
1521
286
6.357943
[6.393591, 6.393591]
0.183432
0.337340
schooling_le12
1806
1489
317
6.163655
[6.198479, 6.198479]
0.191565
0.353206
교육 12년 이하 그룹은 원행 1,806개 중 1,489개가 가용하고 317개가 미가용입니다. 12년 초과는 1,807개 중 1,521개 가용, 286개 미가용입니다. 전체 가용 3,010개와 미가용 603개가 그대로 합쳐집니다. 표의 평균·중앙값·최소 위험은 가용행 안에서 계산한 것이며 미가용 결과를 0으로 채우지 않았습니다.
그림은 3,010개 가용 원 위치의 실제 로그임금과 그 기술 집단의 평균을 점으로 비교합니다. 나머지 603행은 CSV에 위치와 미가용 상태를 유지합니다. 모든 위치에 그룹 평균 예측은 붙일 수 있어도 결과가 없는 행의 손실을 관측했다고 말할 수는 없습니다.
교육별 평균 차이는 같은 표의 기술적 예측 차이입니다. 교육의 인과 수익률, 개인의 능력이나 진로 선택의 효과를 자동으로 식별하지 않습니다. 손질된 로그 센트 임금의 평균을 지수화한 숫자를 원 USD 임금의 산술평균이라고 부르지 않습니다. 미가용 선택의 원인과 미래 표본의 위험은 추가 가정·자료가 필요합니다.
먼저 생각하기 · 가용 평균 손실을 원행 3,613개로 나누어 더 작게 표시하면 되나요?
아닙니다. 가용 손실 합을 전체 분모로 나누면 미가용 손실이 0이라는 근거 없는 대체가 섞입니다. 가용 조건부 위험과 알려지지 않은 전체 위험, 가용·미가용 비중을 따로 보고합니다.
먼저 생각하기 · 그룹의 전체 원행 수와 가용행 수 중 어느 비중으로 그룹 위험을 합치나요?
이 표의 가용행 평균을 복원하려면 1,489/3,010과 1,521/3,010을 사용합니다. 전체 원행 비중으로 섞으면 다른 조건부 법칙이 됩니다. 미가용 결과까지 가진 전체 위험은 이 파일만으로 결정되지 않습니다.
기업 · 495개 실제 이탈과 가정한 비용
실제 결과가 0·1이어도 어느 행동을 고를지는 비용에 따라 달라집니다. 먼저 원 고객 이탈 비율을 계산하고, 다음에 손으로 고른 두 비용쌍을 적용합니다. 비용을 바꾼 뒤 Churn 원값까지 바꾸면 같은 자료를 비교하는 것이 아닙니다.
실제 입력은 UCI Iranian Churn의 원 3,150행입니다. Churn=1은 495행, 0은 2,655행입니다. 원 Tariff Plan 코드 1은 2,905행 중 이탈 489개, 코드 2는 245행 중 6개입니다. 공개 설명은 입력이 처음 9개월의 집계이고 결과는 12개월 말 상태라고 밝힙니다. 달력 연도·독립 고객 식별자·원행의 시간순서는 주어지지 않으므로 새로 만들어 붙이지 않습니다.
실제 0·1 원값의 집계 · 같은 표의 경험적 확률
집단
원행
이탈
경험비율 · 정확 분수
비율 근사
최소 Brier
all
3150
495
11/70
0.157143
0.132449
tariff_1
2905
489
489/2905
0.168330
0.139995
tariff_2
245
6
6/245
0.024490
0.023890
그룹 안 제곱손실의 최소 확률 보고는 그 그룹의 경험적 비율입니다. 그러나 같은 결과를 사용해 비율을 정하고 그 결과로 점수를 냈으므로 알려진 미래 고객 확률이나 검증 성능이 아닙니다. 통신요금제별 차이도 요금제 변경의 인과효과로 해석하지 않습니다.
전부 가정한 비용 · 회사 손실액/연락 효과가 아님
집단
FP/FN
행동 0 위험
행동 1 위험
전체 최소 행동
all
1/4
22/35
59/70
{0}
all
1/9
99/70
59/70
{1}
tariff_1
1/4
1956/2905
2416/2905
{0}
tariff_1
1/9
4401/2905
2416/2905
{1}
tariff_2
1/4
24/245
239/245
{0}
tariff_2
1/9
54/245
239/245
{0}
FP=1,FN=4에서는 문턱이 1/5이고 두 그룹 비율이 모두 그보다 작아 행동 0이 최소입니다. FN을 9로 바꾸면 문턱은 1/10이 되어 tariff_1에서는 행동 1, tariff_2에서는 0입니다. 이것은 가정한 분류 비용이 선택을 바꾼 예입니다. 실제 연락 비용, 연락하면 남을 확률, 이탈 고객의 손실 금액을 측정한 값이 아닙니다.
전체 한 비율로 보고한 최소 Brier는 649/4900입니다. 그룹별 비율로 계산한 가용 Brier 위험은 0.130965입니다. 같은 표의 정보 분할이 줄인 경험적 위험이며 별도 검증 점수로 올리지 않습니다. 손실 점수·보정·의사결정 기준·현실의 고객 처우는 각각 검토할 질문입니다.
자료 표기: Iranian Churn [Dataset] (2020), UCI Machine Learning Repository, DOI 10.24432/C5JW3Z, CC BY 4.0. 이 장은 원 Churn·Tariff Plan의 선택과 집단별 파생 위험을 새로 구성하고 원 위치·정확 분수·가정 비용을 표시했습니다.
먼저 생각하기 · 비용이 1:9일 때 행동 1인 고객에게 연락하면 실제 이탈을 막나요?
이 계산은 기록된 결과와 가정 비용 아래의 분류 행동을 고릅니다. 연락의 잠재 결과나 효과·비용은 관측하지 않아 실제 유지 효과를 알 수 없습니다. 별도 개입 근거와 적절한 평가가 필요합니다.
Country · means, medians and losses on the same 16 records
Which constant would you choose to predict GDP per capita across these countries? Squared penalties favor the mean; absolute penalties favor the median set. Specify loss, units and weights before asking which answer is better.
The actual inputs are 16 country records for 2024 in the retained World Bank composite response downloaded 20 October 2026. Indicator NY.GDP.PCAP.KD is GDP per capita in constant 2015 USD; SP.DYN.LE00.IN is life expectancy at birth. Country, year and indicator composite keys were matched. We do not relabel this as a newly downloaded 27 October GDP vintage or claim to reconstruct every historical individual API request URL.
Retained actual 16 country records for 2024 · original positions/exact fractions in CSV
Country
Longevity / years
GDP/person / 2015 USD
Declared descriptive group
AUS
83.051
61,486.381
life_ge80
BRA
76.023
9,566.745
life_lt80
CAN
82.108
45,061.386
life_ge80
CHN
78.017
13,119.108
life_lt80
DEU
80.793
44,027.763
life_ge80
FRA
82.980
39,683.395
life_ge80
GBR
81.387
47,900.968
life_ge80
IDN
71.288
4,367.947
life_lt80
IND
72.235
2,366.833
life_lt80
JPN
84.036
37,976.637
life_ge80
KOR
83.629
37,048.426
life_ge80
MEX
75.264
10,284.034
life_lt80
SGP
83.346
68,129.696
life_ge80
USA
78.890
66,856.513
life_lt80
VNM
74.736
4,012.508
life_lt80
ZAF
66.312
5,715.475
life_lt80
Actual/derived · equal working weights on available rows · constant minima · rounded displays
Group
Source
Available
Unavailable
Mean
Full median interval
Min squared risk
Min absolute risk
all
16
16
0
31,100.238572
[37,048.426400, 37,976.637179]
532,020,447.033472
20,290.104033
life_ge80
8
8
0
47,664.331759
[44,027.763155, 45,061.386459]
112,522,545.567226
7,980.276238
life_lt80
8
8
0
14,536.145385
[5,715.475315, 9,566.745187]
402,779,982.294873
10,420.454529
Observed points and group means use the same source rows. The longevity groups contain eight countries each, at least 80 years versus below 80. They are declared descriptive groups, not a verified prediction-time or causal design. Group means cannot increase squared risk on these same rows because the expanded rule class includes the original constant rule.
The full median interval is retained. With even sample size, the two central ordered values can bound a whole interval of absolute-risk minimizers. Downloads retain exact rational endpoints while tables/plots round for display. Squared risk in (constant-2015 USD/person)² and absolute risk in constant-2015 USD/person cannot be ranked by comparing numerical magnitudes across their different units.
Equal-country mean risk is not mean risk for people worldwide. Same-year longevity/GDP observations do not identify a health-policy effect. Selecting group means and scoring on the same table is descriptive empirical comparison, not performance on separate countries or periods.
Think first · Do lower group-mean losses here guarantee improvement for a new country?
No. These constants were selected and scored on the retained table. A different population or period requires evidence about its distribution, available information and costs and a separately designed evaluation.
Person · 603 unavailable outcomes and the risk denominator
Unlike the complete country table, the person table has unavailable outcomes. A common calculation button must not silently use source-row count for every denominator. Available-row mean risk and identified risk over the original full frame are different targets.
The actual source is David Card’s public proximity ZIP, nls.dat and code_bk.txt. All 3,613 original positions remain. Schooling ed76 comes from fixed-width columns 18–19; source-trimmed log wage lwage76 from 86–97. The codebook describes hourly wages in cents and outlier trimming for the log field. We retain that supplied log outcome rather than recomputing logs of every raw wage. Original dot(.) missing tokens differ from observed zero.
Actual/derived · equal working weights on available rows · constant minima · rounded displays
Group
Source
Available
Unavailable
Mean
Full median interval
Min squared risk
Min absolute risk
all
3613
3010
603
6.261832
[6.285998, 6.287859]
0.196891
0.353750
schooling_gt12
1807
1521
286
6.357943
[6.393591, 6.393591]
0.183432
0.337340
schooling_le12
1806
1489
317
6.163655
[6.198479, 6.198479]
0.191565
0.353206
Schooling at most 12 years has 1,806 source rows, 1,489 available and 317 unavailable. Above 12 years has 1,807 source rows, 1,521 available and 286 unavailable. Totals remain 3,010 available and 603 unavailable. Means, median sets and risks are calculated on available outcomes; none of the missing outcomes is filled with zero.
The figure compares source-log wages and descriptive group means at 3,010 available original positions. The other 603 rows retain positions and missing flags in the download. A group-mean prediction can be assigned to a row whose outcome is missing, but its loss cannot be claimed as observed.
Education-group differences are descriptive predictions in this retained table. They do not identify causal education returns, ability or effects of career choice. Exponentiating a trimmed log-cents wage mean does not yield arithmetic mean raw USD wages. Selection into availability and future risk require further evidence or assumptions.
Think first · May the available loss total be divided by 3,613 to show a smaller mean?
No. That calculation implicitly gives missing outcomes zero loss. Separately report available conditional risk, unidentified full-frame risk and available/unavailable masses.
Think first · Which weights recombine available group risks?
Use 1,489/3,010 and 1,521/3,010 to recover the mean over available outcomes. Full-source group shares define a different conditional law. Full-frame risk including unknown outcomes is not determined by this file.
Company · 495 recorded churn events and assumed costs
Even with binary actual outcomes, the preferred action depends on costs. First calculate recorded churn frequencies, then apply two explicitly chosen cost pairs. Changing costs must not change original Churn outcomes.
The actual UCI Iranian Churn input has 3,150 original rows: 495 Churn=1 and 2,655 Churn=0. Tariff Plan 1 has 489 events among 2,905 rows; code 2 has six among 245. Official documentation describes first-nine-month aggregated inputs and outcomes at month twelve. Calendar years, independent customer identifiers and chronological source-row order are not supplied and are not invented here.
Aggregate original binary outcomes · empirical probabilities of the same table
Group
Source
Churn
Empirical rate / exact
Rate approx.
Min Brier
all
3150
495
11/70
0.157143
0.132449
tariff_1
2905
489
489/2905
0.168330
0.139995
tariff_2
245
6
6/245
0.024490
0.023890
Under squared probability loss, the empirical group rate minimizes risk inside each group. Those rates were selected and scored with the same outcomes: they are neither independently known future customer probabilities nor heldout performance. Tariff differences also do not identify effects of changing a plan.
Wholly declared costs · not measured company losses/contact effects
Group
FP/FN
Action 0 risk
Action 1 risk
Full minimizing set
all
1/4
22/35
59/70
{0}
all
1/9
99/70
59/70
{1}
tariff_1
1/4
1956/2905
2416/2905
{0}
tariff_1
1/9
4401/2905
2416/2905
{1}
tariff_2
1/4
24/245
239/245
{0}
tariff_2
1/9
54/245
239/245
{0}
At FP=1, FN=4, the threshold is 1/5 and both rates lie below it, so action zero minimizes. With FN=9, the threshold becomes 1/10 and tariff_1 prefers one while tariff_2 still prefers zero. This illustrates assumed classification costs changing an action. It measures neither actual contact costs, retention probability under contact nor the financial loss from churn.
The pooled minimum Brier score is 649/4900. Group-rate available Brier risk is 0.130965. This is an empirical gain from the information partition in the same retained table, not a separate validation result. Scores, calibration, decision criteria and actual customer treatment remain distinct questions.
Source credit: Iranian Churn [Dataset] (2020), UCI Machine Learning Repository, DOI 10.24432/C5JW3Z, CC BY 4.0. This chapter creates selections and group-risk calculations from original Churn/Tariff Plan fields while retaining source positions, exact fractions and declared costs.
Think first · Would contacting customers assigned action one under 1: 9 costs actually prevent churn?
This calculation chooses classification actions under recorded outcomes and assumed costs. It does not observe contact potential outcomes, effects or costs. Actual retention benefits require separate intervention evidence and suitable evaluation.
심화Extension
평가 대상과 알 수 없는 부분을 함께 보고한다Report evaluation targets alongside what remains unidentified
작은 팀 프로젝트로 같은 표에 대해 두 보고서를 작성하세요. 첫 보고서는 제곱손실의 상수·집단 예측, 둘째는 절대손실 또는 분류 비용을 사용합니다. 각 보고서의 첫 문장은 ‘어떤 행의 어떤 결과를 어떤 정보로 예측했는가’여야 합니다. 손실 단위가 다르면 수치의 크기를 서로 서열화하지 않습니다.
숫자 뒤에는 최소해의 유일성·집단별 가용 분모·동점 규칙·미관측 결과·평가 역할을 적습니다. 특히 결과를 보고 집단 경계나 비용을 바꾸었다면 그 선택도 분석 절차에 포함합니다. 정해진 표에서 낮아진 위험과 새 관측의 위험을 같은 결론으로 적지 않습니다.
마지막에는 반례를 하나 만드세요. 가중치만 바꾸면 결론이 바뀌는가, 새 범주를 추가하면 어떤 예측이 미정의인가, 누락 결과가 모두 반대 방향이면 전체 위험을 결정할 수 있는가? 잘 만든 반례는 계산을 방해하는 장식이 아니라 주장의 적용 범위를 정확하게 보여 주는 도구입니다.
For a team project, write two reports on the same table. Use constant and group predictions with squared loss in one, absolute loss or binary action costs in the other. Begin each with the rows, outcome and information used for prediction. Do not rank numerical magnitudes across different loss units.
Follow each number with uniqueness, group-specific available denominators, tie rules, missing outcomes and evaluation roles. If outcomes informed a new grouping cutoff or cost choice, include that selection in the procedure. Lower retained-table risk and risk for new observations are separate conclusions.
Finish with one counterexample. Can reweighting change the conclusion? What becomes undefined with a new category? Could unknown outcomes reverse the full-frame comparison? A well-constructed counterexample clarifies a claim’s scope rather than merely decorating a calculation.
심화Extension
공식 영상·학자·심화 읽기Official video, scholar and second-pass reading
권장 자료는 본문 뒤의 영상·학자·함께 읽기에 연결합니다. 입문 영상은 분류·예측 문제를 잡는 데 사용하고, 결정이론 소개에서는 손실·정보·규칙을 구별하며, 심화 강의 노트에서는 조건부 위험을 최소화하는 식을 다시 따라갑니다. 자료가 다루지 않은 이 장의 실행기나 실제 사례를 원 저자의 결과라고 부르지 않습니다.
첫 읽기는 8행 표와 실습 A·B, 두 번째는 베이즈 최소해와 ERM의 차이, 세 번째는 적정 점수와 실제 자료의 한계에 집중하세요. 증명에서 막히면 확률 가중치가 있는 작은 표를 만들어 같은 식을 합으로 다시 써 보세요. 어려운 개념을 작은 사례로 설명한 뒤 일반식으로 돌아오는 것이 학습 목표입니다.
Recommended resources follow in the videos, thinkers and guided-reading section. Use the introductory video to formulate prediction/classification tasks, decision-theory material to separate loss, information and rules, and advanced notes to revisit conditional-risk minimization. Do not attribute our implementation or actual cases to a source that does not present them.
On a first pass, study the eight-row table and Labs A/B. On a second, distinguish Bayes minimizing sets from ERM. On a third, work through proper scores and actual-data limitations. When a proof is difficult, construct a small probability-weighted table, rewrite the expectation as a sum and then return to the general identity.
본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.
분류·예측 문제를 처음 세우는 방법Formulate an initial classification/prediction task
MIT OpenCourseWare · 6.0002 · Fall 2016 · Lecture 11
공식 입문 강의의 지도학습·특징 벡터 도입을 본문 X·Y 구별과 연결합니다. 이 장의 전체 분위수 최소해·유리수 로그 구간·실제 자료 계산을 강의가 시연했다는 뜻은 아닙니다. 영어 원영상이며 재생·자막은 본문 플레이어에서 선택합니다.Relate the official introduction to supervised learning/feature vectors to our X/Y distinction. It does not demonstrate this chapter’s full quantile sets, rational log bounds or actual-source calculations. English original; playback/captions use the in-page player.
교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.
보고 읽은 뒤 답하기Respond after watching/reading정답을 특징 벡터에 넣으면 훈련 정확도가 좋아도 무엇이 문제인가요?What is wrong with putting the later answer in a feature vector even if training accuracy improves?
생각을 점검하는 해설Check your reasoning
결정 때 없던 결과 정보를 사용해 예측 문제를 바꿉니다. 측정·집계·가용 시점을 확인해야 하며 점수가 높다는 사실만으로 실제 예측 성능을 보증하지 않습니다.It uses unavailable-at-decision outcome information and changes the prediction task. Check measurement, aggregation and availability; a high score alone does not certify predictive use.
에이브러햄 발트 · 손실과 결정 규칙Abraham Wald · losses and decision rules
University of St Andrews · MacTutor biography
대학의 인물 소개에서 발트의 결정이론 연구를 읽고, 추정값 자체와 손실 아래의 행동 규칙을 구별하는 질문에 연결합니다. 본문의 사례와 코드는 새로 작성했으며 발트가 이 고객 자료를 분석했다는 뜻이 아닙니다.Read the university biography’s account of Wald’s decision-theory work and relate it to separating estimates from actions under a loss. Our cases/code are new and are not attributed to Wald.
보고 읽은 뒤 답하기Respond after watching/reading같은 참 확률을 아는 두 사람이 다른 행동을 고르면 반드시 한 명이 계산을 틀렸나요?Must one of two people knowing the same probability be wrong if their actions differ?
생각을 점검하는 해설Check your reasoning
아닙니다. 행동 집합·손실·제약이 다르면 최소 행동이 다를 수 있습니다. 실제 결과 법칙과 가치 판단에 해당하는 비용 선택을 함께 명시합니다.No. Different action sets, losses or constraints can yield different minima. State the outcome law separately from the declared cost judgments.
지도학습 · 훈련·평가 오차와 베이즈 분류기Supervised learning · training/test error and the Bayes classifier
Stanford · STATS 202 official course notes
Test vs training error와 Bayes classifier의 지정 부분을 읽습니다. 0·1 손실에서 참 조건부 법칙을 안다는 사고실험과 자료에서 그 확률을 추정하는 일을 구별합니다. 본문은 일반 비용과 동점 집합을 별도로 전개합니다.Read the designated Test vs training error and Bayes classifier passages. Separate the thought experiment of knowing the true conditional law from estimating it. Our chapter separately derives general costs and tie sets.
보고 읽은 뒤 답하기Respond after watching/reading자료의 그룹 비율을 구한 것이 알려진 모집단 베이즈 확률과 같은가요?Is a data-based group frequency the same as an independently known population Bayes probability?
생각을 점검하는 해설Check your reasoning
아닙니다. 보관 표의 경험적 법칙과 미래 관측의 법칙은 다릅니다. 추정·선택·평가 역할과 가정을 따로 적어야 합니다.No. The empirical retained-table law differs from a future-observation law. Specify estimation, selection, evaluation roles and assumptions separately.
심화 · 분류 위험과 경험위험의 정의Second pass · classification risk and empirical risk
MIT 18.657 · Philippe Rigollet · 2015 · Lecture 1 pp 2–4
강의 1의 2.1절, 2.2절 중 위험·경험위험의 정의와 고정 h의 평균, 인쇄 4쪽 Important Remark의 학습 규칙 조건부 평가에 범위를 한정합니다. 같은 X에 상충하는 Y가 있으면 h(Xᵢ)=Yᵢ를 동시에 만족시켜 모두 암기할 수 없습니다. 고정 규칙의 불편한 경험위험과 자료로 고른 최소 경험위험을 구별합니다. 이후 표본복잡도 증명은 지정 범위가 아닙니다.Restrict reading to Lecture 1 Section 2.1, the risk/empirical-risk definitions and fixed-h expectation in Section 2.2, and the conditional evaluation in the Important Remark on printed page 4. If the same X has conflicting Y labels, no rule can simultaneously memorize all h(Xᵢ)=Yᵢ. Distinguish fixed-rule unbiased empirical risk from the data-selected minimum; later sample-complexity proofs are outside the assigned range.
보고 읽은 뒤 답하기Respond after watching/reading고정 h의 경험위험이 불편하면 선택한 최소 경험위험도 그 규칙의 미래 위험에 불편한가요?Does fixed-h unbiased empirical risk imply unbiased future-risk evaluation of the selected minimum?
생각을 점검하는 해설Check your reasoning
일반적으로 아닙니다. 선택은 같은 결과에 의존합니다. Q40의 두 상수 반례는 E[min]과 min E가 다른 이유를 직접 보여 줍니다.Generally no. Selection depends on the same outcomes. The two-constant counterexample in Question 40 shows directly why E[min] and min E differ.
연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof
먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.
1. 제곱오차의 두 후보Two squared-error candidates
가정한 관측값 y=5입니다. 예측 a=3과 a=8의 제곱손실을 구하고 이 한 행에서 더 작은 후보를 고르세요.
Assume observed y=5. Compute squared losses for predictions a=3 and a=8, then choose the smaller on this one row.
풀이와 확인할 이유Solution and explanation
오차는 각각 2와 −3이고 제곱하면 4와 9입니다. 이 한 행의 제곱손실은 a=3이 작습니다. 여러 행의 평균 위험이나 미래 예측 성능은 아직 계산하지 않았습니다.
Errors are 2 and −3, giving losses 4 and 9. Prediction 3 wins on this one row. No multirow mean risk or future performance has been calculated.
2. 절대손실과 제곱손실의 단위Units of absolute and squared loss
가정한 실제 지출이 10천원이고 예측이 7천원입니다. 절대손실과 제곱손실을 단위와 함께 쓰고, 3과 9를 서로 비교해 더 좋은 기준을 고를 수 있는지 설명하세요.
Assume actual spending is 10 thousand KRW and prediction is 7 thousand KRW. Give absolute and squared losses with units. Can comparing 3 and 9 establish the better criterion?
풀이와 확인할 이유Solution and explanation
절대손실은 3천원, 제곱손실은 9(천원)²입니다. 단위와 벌점 구조가 다르므로 숫자가 작다는 이유로 절대손실이 더 좋은 기준이라고 정할 수 없습니다. 같은 기준에서 다른 예측을 비교해야 합니다.
Absolute loss is 3 thousand KRW; squared loss is 9 (thousand KRW)². Units and penalty shapes differ, so the smaller number does not establish a better criterion. Compare predictions under the same criterion.
3. 과소예측의 비대칭 벌점Asymmetric penalty for underprediction
가정한 y=5에서 a=3과 a=7을 비교합니다. 분위수 손실은 u=y−a에 대해 τmax(u,0)+(1−τ)max(−u,0)이고 τ=3/4입니다. 두 손실은 얼마인가요?
Assume y=5 and compare a=3 with a=7 using pinball loss τmax(u, 0)+(1−τ)max(−u, 0), u=y−a and τ=3/4. Find both losses.
풀이와 확인할 이유Solution and explanation
a=3이면 u=2라서 손실은 (3/4)×2=3/2입니다. a=7이면 u=−2라서 (1/4)×2=1/2입니다. 같은 크기의 오차라도 과소예측을 세 배 크게 평가하는 기준이므로 a=7이 작습니다.
At a=3, u=2 and loss is 3/2. At a=7, u=−2 and loss is 1/2. Equal-magnitude errors receive different penalties because this criterion weights underprediction three times as much; a=7 wins.
4. 분류 오류의 이름Name the classification errors
결과 y=0·1, 행동 a=0·1이고 맞힌 비용은 0, FP=2, FN=5로 가정합니다. (y,a)=(0,1),(1,0),(1,1)의 손실을 쓰세요.
Assume binary outcomes/actions, zero cost for correct actions, FP=2 and FN=5. Give losses for (y, a)=(0, 1), (1, 0), (1, 1).
풀이와 확인할 이유Solution and explanation
(0,1)은 실제 음성에 양성 행동을 했으므로 FP이고 손실 2입니다. (1,0)은 FN이어서 5, (1,1)은 맞힌 행동이어서 0입니다. 오류 이름은 예측 확률이 아니라 결과와 행동의 조합으로 정합니다.
The first pair is a false positive with cost 2; the second is a false negative with cost 5; the last is correct with cost zero. Error types refer to outcomes/actions, not to a probability report.
5. 측정 단위를 바꾼 손실Rescaling outcome units
가정한 y=2,a=1을 미터에서 센티미터로 바꿉니다. 두 척도에서 절대·제곱손실을 계산하고, 모든 후보를 같은 방식으로 변환하면 최소 후보의 순서가 바뀌는지 설명하세요.
Assume y=2 and a=1 in metres and convert both to centimetres. Calculate absolute/squared losses before and after. Does consistent conversion change the ranking of candidates?
풀이와 확인할 이유Solution and explanation
미터 단위 손실은 1과 1입니다. 센티미터에서는 차이가 100이므로 100과 10,000입니다. 각각 모든 후보 손실에 양의 상수 100 또는 10,000을 곱하므로 같은 종류 손실의 최소 후보 집합은 그대로입니다. 서로 다른 손실끼리의 수치 비교는 여전히 의미가 다릅니다.
Losses are 1 and 1 in metre units, and 100 and 10,000 after conversion. Multiplying every candidate loss by the same positive constant preserves its minimizing set within that loss type. Comparing different loss types remains a different question.
6. 여덟 행의 비용 평균Cost average over eight rows
전부 가정한 여덟 동일비중 행에서 그룹 A의 결과는 0,0,0,1이고 행동은 모두 0입니다. B의 결과는 0,1,1,1이고 행동은 모두 1입니다. FP=1,FN=4일 때 전체 비용 위험을 구하세요.
Eight wholly assumed equally weighted rows have A outcomes 0, 0, 0, 1 with action 0 and B outcomes 0, 1, 1, 1 with action 1. Find overall risk at FP=1, FN=4.
풀이와 확인할 이유Solution and explanation
A에는 FN 한 개의 비용 4, B에는 FP 한 개의 비용 1이 있습니다. 전체 비용 합계 5를 행 8개로 나누면 5/8입니다. 그룹별 평균은 1과 1/4이고, 각 그룹 비중 1/2로 평균해도 5/8입니다.
A has one false negative costing 4; B has one false positive costing 1. Total cost 5 over eight rows gives 5/8. Group risks are 1 and 1/4; averaging them with masses 1/2 also gives 5/8.
7. 한 사건의 큰 비용A rare outcome with a large cost
전부 가정한 결과 법칙은 P(Y=1)=1/100, P(Y=0)=99/100입니다. FP=1,FN=200이면 항상 0과 항상 1 중 어떤 행동의 기대 비용이 작나요?
Assume P(Y=1)=1/100, P(Y=0)=99/100, FP=1 and FN=200. Compare always-zero and always-one actions.
풀이와 확인할 이유Solution and explanation
항상 0의 비용 위험은 200×1/100=2입니다. 항상 1은 1×99/100=99/100입니다. 사건이 드물어도 FN 비용이 커서 항상 1이 이 기준에서 낫습니다. 실제 비용이 이 값이라는 주장은 아닙니다.
Always zero has risk 200/100=2. Always one has risk 99/100. Despite a rare event, the high false-negative cost favors action one under the declared criterion. These are assumed costs, not measured business losses.
8. 모든 오류 비용이 0일 때When every error costs zero
FP=FN=0이고 p=P(Y=1)=3/10인 가정 법칙입니다. 0·1 행동의 위험과 최소 행동 집합은 무엇인가요?
Assume FP=FN=0 and event probability p=3/10. Give both action risks and the complete minimizing set.
풀이와 확인할 이유Solution and explanation
두 행동의 위험은 모두 0이며 최소 집합은 {0,1}입니다. 비용 합으로 나눈 문턱 FP/(FP+FN)은 0/0이므로 사용할 수 없습니다. 임의로 한 행동만 유일한 정답으로 보고하면 안 됩니다.
Both risks are zero and the minimizing set is {0, 1}. The threshold FP/(FP+FN) is 0/0 and cannot be used. Do not report an arbitrary tie choice as the unique mathematical answer.
9. 같은 확률과 다른 행동Same probability, different actions
가정한 p=3/10에서 비용쌍 (FP,FN)=(1,4)와 (4,1)을 각각 사용합니다. 각 경우 행동 0·1의 기대 비용과 최소 행동을 구하세요.
At assumed p=3/10, use cost pairs (FP, FN)=(1, 4) and (4, 1). Find both action risks and the minimum action in each case.
풀이와 확인할 이유Solution and explanation
첫 쌍의 행동 0 위험은 4×3/10=6/5, 행동 1은 1×7/10=7/10이어서 1이 낫습니다. 둘째는 3/10과 28/10이므로 0이 낫습니다. 참 확률은 같아도 선택한 행동 기준이 달라집니다.
For the first pair, action-zero risk is 6/5 and action-one risk is 7/10, favoring one. For the second, risks are 3/10 and 28/10, favoring zero. The probability stays fixed while the decision criterion changes.
10. 확률 보고와 행동 값Probability report versus action
한 사람이 비 올 확률을 q=0.3으로 보고하면서 우산 행동 a=1을 선택했습니다. 관측 y=1이 나왔을 때 Brier 손실과 FP=1,FN=4의 행동 손실은 각각 얼마인가요?
A person reports rain probability q=0.3 and chooses umbrella action a=1. After outcome y=1, find Brier loss and action loss at FP=1, FN=4.
풀이와 확인할 이유Solution and explanation
Brier는 (1−0.3)²=0.49입니다. 행동은 실제 1에 대해 1을 골랐으므로 비용 0입니다. 0.49와 0은 서로 다른 출력에 적용한 다른 평가이며, 모순이 아닙니다.
Brier loss is (1−0.3)²=0.49; the correct binary action costs zero. The two numbers evaluate different outputs under different criteria and are not contradictory.
11. 경험적 법칙의 제곱위험Squared risk under an empirical law
For equally weighted assumed rows A: (0, 0, 0, 1), B: (0, 1, 1, 1), predict zero in A and one in B. Find squared risk and binary error rate.
풀이와 확인할 이유Solution and explanation
제곱손실은 틀린 두 행에서 1, 나머지 여섯 행에서 0이어서 2/8=1/4입니다. 예측이 0·1로 제한된 이 예에서는 제곱손실이 오류 지시값과 같아 오류율도 1/4입니다. 중간 확률을 허용하면 이 일치는 일반적으로 사라집니다.
Two mistakes contribute one each and six correct rows contribute zero, giving risk 1/4. Squared loss equals the error indicator here because predictions are binary. Intermediate probability reports generally remove that equivalence.
12. 행 수와 비중의 차이Row counts versus weights
전부 가정한 세 행의 손실은 0,1,4이고 비중은 1,2,1입니다. 가중 평균 위험과 단순 행 평균을 구하고 차이를 설명하세요.
Three wholly assumed row losses are 0, 1, 4 with weights 1, 2, 1. Compute weighted and unweighted mean risk.
풀이와 확인할 이유Solution and explanation
가중 위험은 (1×0+2×1+1×4)/(1+2+1)=6/4=3/2입니다. 단순 평균은 5/3입니다. 두 값은 같은 행에 서로 다른 법칙을 준 결과입니다. 비중의 의미를 지정하지 않고 둘 중 하나를 실제 모집단 위험이라고 선택하지 않습니다.
Weighted risk is 6/4=3/2, while the row mean is 5/3. They assign different laws to the same rows. Without specifying the weights’ meaning, neither is automatically an actual population risk.
13. 빠진 결과와 전체 위험Missing outcomes and full-frame risk
동일비중 가정 세 행의 제곱손실이 0,4,미관측입니다. 가용행 평균과 전체 세 행의 평균을 구별하세요. 미관측 결과의 손실이 음수가 아니란 것만 압니다.
Three equally weighted assumed rows have squared losses 0, 4 and unknown. Distinguish available-row mean from full-frame mean. Only nonnegativity is known for the unknown loss.
풀이와 확인할 이유Solution and explanation
가용행 평균은 4/2=2입니다. 전체 평균은 (4+L)/3이며 미관측 L≥0을 모르므로 정확히 정해지지 않습니다. 하한은 4/3이고 제곱손실의 상한이 없으면 유한한 상한도 보장하지 못합니다. 결측을 0으로 넣은 4/3은 알려진 평균이 아닙니다.
Available-row mean is 2. Full-frame mean is (4+L)/3 with unknown L≥0, so it is unidentified. Its lower bound is 4/3, with no guaranteed finite upper bound for unbounded squared loss. Filling the missing loss with zero does not establish that lower bound as the true mean.
14. 0비중의 결측Missingness at zero weight
세 가정 행의 비중은 1,1,0이고 제곱손실은 0,4,미관측입니다. 전체 가중 위험이 정의되는지, 마지막 원행은 삭제해도 되는지 설명하세요.
Three assumed rows have weights 1, 1, 0 and squared losses 0, 4, unknown. Is full weighted risk defined? Should the last original row be deleted?
풀이와 확인할 이유Solution and explanation
양의 비중이 있는 두 행의 결과가 모두 가용하여 위험은 4/2=2입니다. 0비중 행은 이 평균의 양의 질량에 기여하지 않습니다. 원행을 삭제할 필요는 없으며 비중 0과 결측 상태를 함께 보존해야 나중에 비중 변경의 의미를 확인할 수 있습니다.
Risk is defined as 4/2=2 because every positive-weight outcome is available. The zero-weight row contributes no positive mass. Retain its original position, zero weight and missingness so a later reweighting remains auditable.
15. 가용 질량으로 조건화Condition on available mass
가정한 세 행의 확률 질량은 1/2,1/4,1/4이고 손실은 2,0,미관측입니다. 가용 질량과 가용 조건부 위험을 구하세요.
Three assumed masses are 1/2, 1/4, 1/4 with losses 2, 0, unknown. Find available mass and risk conditional on availability.
풀이와 확인할 이유Solution and explanation
가용 질량은 3/4입니다. 알려진 손실의 질량가중 합은 (1/2)×2+(1/4)×0=1이므로 조건부 위험은 1/(3/4)=4/3입니다. 이 1을 전체 위험이라 부를 수 없고, 4/3도 전체 법칙의 위험과 구별해야 합니다.
Available mass is 3/4 and its unnormalized weighted loss is 1. Conditional risk is 1/(3/4)=4/3. Neither the unnormalized known contribution nor this conditional mean should be labelled the unidentified full-law risk.
16. 전체기대값의 집단 분해Group decomposition of total expectation
가정한 그룹 질량은 P(A)=3/4,P(B)=1/4입니다. 고정 규칙의 조건부 위험은 A에서 1/3, B에서 2입니다. 전체 위험을 구하고 그룹 위험을 단순 평균하면 왜 다른지 설명하세요.
Assume P(A)=3/4, P(B)=1/4 and conditional risks 1/3 in A and 2 in B for a fixed rule. Find total risk and compare with the unweighted group average.
풀이와 확인할 이유Solution and explanation
전체 위험은 (3/4)(1/3)+(1/4)2=1/4+1/2=3/4입니다. 단순 집단 평균은 (1/3+2)/2=7/6으로 다른 집단 법칙을 사용합니다. 개별 그룹 안에서 이미 계산한 분모와 전체 그룹 질량을 구별하세요.
Total risk is (3/4)(1/3)+(1/4)2=3/4. The unweighted group average is 7/6 and corresponds to a different group law. Keep within-group denominators distinct from overall group masses.
17. 빈 그룹의 조건부 평균Conditional means in an empty group
가정한 법칙의 양의 질량은 그룹 A에만 있고 A의 위험은 2입니다. B의 질량은 0입니다. 전체 위험과 B의 조건부 위험, B에 줄 행동을 구별하세요.
All positive mass lies in assumed group A with risk 2; group B has mass zero. Distinguish total risk, B’s conditional risk and its action extension.
풀이와 확인할 이유Solution and explanation
전체 위험은 2입니다. B의 조건부 위험을 비율로 계산하면 0/0이므로 미정의입니다. B의 행동을 바꾸어도 이 법칙의 전체 평균은 바뀌지 않아 전체 위험만으로 B의 행동을 결정할 수 없습니다. 미정의를 조건부 위험 0으로 표시하지 않습니다.
Overall risk is 2. The ratio defining B’s conditional risk is 0/0 and undefined. Any action extension on B leaves overall risk unchanged, so the law does not determine that extension. Undefined conditional risk must not be displayed as zero.
18. 빈 평가 표An empty evaluation table
훈련에서 하나의 규칙을 정했지만 평가 표의 양의 비중 합이 0입니다. 평가 위험을 0이라고 표시해도 되는지 식의 분모를 사용해 설명하세요.
A rule was selected on training data, but evaluation has total positive weight zero. May evaluation risk be reported as zero? Explain using its denominator.
풀이와 확인할 이유Solution and explanation
가중 위험은 손실가중 합을 비중 합으로 나눕니다. 분모가 0이어서 평균은 미정의입니다. 평가 결과가 없다는 것과 오류가 없다는 것은 다릅니다. 선택한 훈련 규칙은 남길 수 있지만 평가 위험과 평가 순위는 만들지 않습니다.
Mean risk divides weighted loss by total weight. A zero denominator makes it undefined. No evaluation observations differs from zero error. Retain the selected training rule, but do not invent an evaluation score or ranking.
19. 평균 주변의 제곱 완성Complete the square around the mean
동일비중 가정 결과는 1,3입니다. 상수 a의 평균 제곱위험을 식으로 전개하고 최소 상수·최소 위험·a=0의 초과 위험을 구하세요.
Equally weighted assumed outcomes are 1 and 3. Expand constant-prediction squared risk; find the minimizer, minimum and excess at a=0.
풀이와 확인할 이유Solution and explanation
[(1−a)²+(3−a)²]/2=a²−4a+5=(a−2)²+1입니다. 유일한 최소 상수는 평균 2, 최소 위험은 1입니다. a=0의 위험은 5이고 초과 위험은 4=(0−2)²입니다.
Risk expands to a²−4a+5=(a−2)²+1. The unique minimizing constant is mean 2 and minimum risk is 1. At a=0, risk is 5 and excess is 4=(0−2)².
20. 비중의 공통 배수A common scale factor for weights
가정 손실 1,9에 비중 2,6을 주었다가 20,60으로 바꿉니다. 정규화 평균과 손실가중 합이 각각 어떻게 바뀌나요?
Assumed losses 1, 9 have weights 2, 6, then weights 20, 60. How do normalized mean risk and the unnormalized weighted sum change?
풀이와 확인할 이유Solution and explanation
처음 합은 2+54=56, 비중 합 8이어서 평균 7입니다. 새 합은 560, 비중 합 80이어서 평균은 여전히 7입니다. 공통 양의 배수는 법칙의 상대 질량을 바꾸지 않지만 정규화하지 않은 합은 바꿉니다.
The first weighted sum is 56 with total weight 8, giving mean 7. The new sum is 560 with total weight 80, again mean 7. A common positive scaling preserves relative masses while changing unnormalized totals.
21. 중앙값의 전체 구간The entire median interval
가정한 Y는 1과 4에 각각 확률 1/2을 둡니다. 상수 예측 a∈R의 절대위험 최소 집합과 최소값을 구하세요.
Assume Y equals 1 or 4 with probability 1/2 each. Find the complete minimizing set and minimum of absolute risk over a∈R.
풀이와 확인할 이유Solution and explanation
1≤a≤4이면 위험은 [(a−1)+(4−a)]/2=3/2로 일정합니다. 1보다 작으면 오른쪽 이동, 4보다 크면 왼쪽 이동으로 줄어듭니다. 따라서 최소 집합은 [1,4], 최소값은 3/2입니다. 중점만 정답이 아닙니다.
Within [1, 4], risk equals [(a−1)+(4−a)]/2=3/2. Outside it, moving toward the interval reduces risk. Thus every a in [1, 4] minimizes, not merely the midpoint.
22. 불균등 질량의 중앙값A median with unequal masses
가정한 Y=1의 확률은 3/4, Y=4는 1/4입니다. 절대위험의 전체 최소 집합과 최소값을 구하세요.
Assume P(Y=1)=3/4 and P(Y=4)=1/4. Find all absolute-risk minimizers and the minimum.
풀이와 확인할 이유Solution and explanation
구간 (1,4)에서는 오른쪽 이동에 대한 기울기가 3/4−1/4=1/2이어서 증가합니다. 1의 왼쪽에서는 감소하므로 유일한 최소는 1입니다. 위험은 (1/4)×3=3/4입니다.
Risk decreases below 1 and has slope 3/4−1/4=1/2 inside (1, 4), so it increases there. The unique minimizer is 1, with risk (1/4)×3=3/4.
23. 누적 질량이 문턱과 같을 때When cumulative mass equals the quantile level
P(Y=1)=3/4,P(Y=4)=1/4인 가정에서 τ=3/4 분위수 손실을 최소화하세요. a=1과 a=4 사이에 유일한 답이 있나요?
Assume masses 3/4 at 1 and 1/4 at 4, with pinball level τ=3/4. Find all minimizers. Is the answer unique between 1 and 4?
풀이와 확인할 이유Solution and explanation
1≤a≤4에서 위험은 (3/4)(1/4)(a−1)+(1/4)(3/4)(4−a)=9/16입니다. 구간 밖에서는 안쪽 이동으로 줄어듭니다. 누적 질량이 정확히 τ인 평평한 구간 때문에 전체 최소해는 [1,4]입니다.
Inside [1, 4], expected loss is (3/4)(1/4)(a−1)+(1/4)(3/4)(4−a)=9/16. Moving inward lowers loss outside. Cumulative mass exactly at τ creates the full flat minimizing interval [1, 4].
24. 분위수 끝점의 반직선Quantile endpoint half-lines
가정한 Y의 두 값은 1,4이고 질량은 각각 1/2입니다. τ=0과 τ=1의 pinball 최소 집합·최소 위험을 구하세요.
For equally likely assumed outcomes 1 and 4, find minimizing sets and minimum pinball risk at τ=0 and τ=1.
풀이와 확인할 이유Solution and explanation
τ=0이면 손실은 max(a−y,0)이므로 a≤1에서 모두 0입니다. 최소 집합은 (−∞,1]입니다. τ=1이면 max(y−a,0)이므로 a≥4에서 모두 0, 집합은 [4,∞)입니다. 끝점 분위수는 한 숫자만 고르는 문제가 아닙니다.
At τ=0, loss max(a−y, 0) vanishes for all a≤1, giving (−∞, 1]. At τ=1, max(y−a, 0) vanishes for a≥4, giving [4, ∞). Both minima are zero and neither minimizing set is a singleton.
25. 비용 문턱의 정확한 동점An exact cost-threshold tie
가정한 p=1/5,FP=1,FN=4에서 두 행동의 위험과 전체 최소 행동 집합을 구하세요.
At assumed p=1/5, FP=1 and FN=4, find both action risks and every minimum action.
풀이와 확인할 이유Solution and explanation
행동 0의 위험은 4×1/5=4/5, 행동 1은 1×4/5=4/5입니다. 최소 집합은 {0,1}입니다. 실행기가 동점에서 0을 고르더라도 1이 수학적으로 열등하다는 뜻은 아닙니다.
Both actions cost 4/5 in expectation, so the minimizing set is {0, 1}. An implementation may choose zero to resolve a tie; that does not make action one mathematically inferior.
26. 무질량 집단의 규칙 확장Extend a rule on a null group
가정한 X=A의 질량은 1, X=B는 0입니다. A에서 Y=2가 확실하고 제곱손실을 사용합니다. 전체 위험을 최소화하는 규칙 f(A),f(B)를 모두 설명하세요.
Assume X=A has mass one, X=B has mass zero, and Y=2 surely in A. Under squared loss, characterize every whole-law minimizing rule f(A), f(B).
풀이와 확인할 이유Solution and explanation
양의 질량을 가진 A에서 f(A)=2가 필요하고 충분합니다. B는 전체 평균에 기여하지 않아 임의의 실수 f(B)를 줄 수 있습니다. 따라서 A의 조건부 최적은 유일하지만 전체 함수는 무질량 집단의 값까지 유일하게 정해지지 않습니다.
Exactly f(A)=2 is necessary and sufficient on positive-mass support. Any real f(B) leaves the overall risk unchanged. Conditional optimality on A is unique, but the entire function is not unique on a null group.
27. 조건부 최소가 전체 최소가 되는 이유Why conditional minima minimize total risk
유한 가정 정보 집합에서 각 x의 질량은 wₓ≥0, 합은 1입니다. 비교하는 조건부 위험 rₓ(a)는 모두 유한하며 rₓ(a*ₓ)≤rₓ(a)입니다. 모든 x에서 선택 가능한 규칙에 대해 f*(x)=a*ₓ가 전체 위험을 최소화함을 보이세요.
On a finite assumed information set, masses wₓ≥0 sum to one. All compared conditional risks are finite, and each satisfies rₓ(a*ₓ)≤rₓ(a). Show that f*(x)=a*ₓ minimizes total risk over unrestricted rules.
풀이와 확인할 이유Solution and explanation
각 부등식에 비음수 wₓ를 곱해 더하면 Σwₓrₓ(a*ₓ)≤Σwₓrₓ(f(x))입니다. 이것이 전체기대값 분해에 의한 위험 비교입니다. 규칙들이 x별로 독립적으로 선택 가능하고 최소가 존재한다는 조건을 썼습니다. 양의 질량에서 엄격히 손해인 선택은 전체에서도 손해입니다.
Multiply each inequality by nonnegative wₓ and sum to obtain Σwₓrₓ(a*ₓ)≤Σwₓrₓ(f(x)). This uses the total-expectation decomposition, attainable conditional minima and a rule class allowing each x-specific choice. A strictly worse action on positive mass also worsens total risk.
28. 제한된 가설 공간의 비용The cost of restricting hypotheses
전부 가정한 A·B는 질량이 각각 1/2이고 Y의 조건부 평균은 각각 0,2이며 조건부 분산은 모두 1입니다. 제곱손실에서 상수만 허용할 때와 그룹별 상수를 허용할 때 최소 위험을 구하세요.
Assume A/B have equal mass, conditional means 0 and 2, and conditional variance one in each group. Compare minimum squared risk for one constant versus group-specific constants.
풀이와 확인할 이유Solution and explanation
그룹별 평균을 쓰면 각 조건부 위험 1이어서 전체 1입니다. 상수 a의 위험은 1+[(a−0)²+(a−2)²]/2=2+(a−1)²입니다. 최소 상수는 1, 위험은 2입니다. 제약 때문에 이용 가능한 정보의 이득 1을 잃습니다.
Group means give conditional risk one in each group, hence total one. A constant has risk 1+[a²+(a−2)²]/2=2+(a−1)², minimized at one with risk two. Restricting the rule class costs one unit of risk.
29. 기대값의 존재 조건Existence of an expected loss
가정한 양의 정수 K에 P(K=k)=2⁻ᵏ,k=1,2,…를 주고 Y=2ᴷ로 둡니다. 모든 유한 a에 대한 절대위험 E|Y−a|가 유한한지 설명하세요. 이 법칙의 평균을 제곱손실 공식에 기계적으로 넣어도 되나요?
Assume P(K=k)=2⁻ᵏ for k≥1 and Y=2ᴷ. Is E|Y−a| finite for any finite a? May the mean simply be inserted into a squared-loss minimizer formula?
풀이와 확인할 이유Solution and explanation
확률합은 1이지만 E[Y]=Σ2⁻ᵏ2ᵏ=Σ1=∞입니다. |Y−a|≥Y−|a|이므로 어떤 유한 a에서도 절대위험은 무한입니다. 유한 평균·2차 적률을 전제로 한 제곱 완성과 유일한 유한 최소 위험 공식은 적용할 수 없습니다. 유한 입력 표 실행기는 이 무한지지 법칙을 계산했다고 주장하지 않습니다.
The probabilities sum to one, but E[Y]=Σ1=∞. Since |Y−a|≥Y−|a|, every finite action has infinite absolute risk. Finite-moment squared-completion formulas and a unique finite minimum cannot be invoked. The finite-table engine does not claim to execute this infinite-support law.
30. 베이즈 규칙과 사후확률Bayes rules versus posterior probabilities
가정한 고정 법칙 P(X,Y)와 손실 ℓ 아래 rₓ(a)=E[ℓ(Y,a)|X=x]를 최소화하는 규칙을 구했습니다. 모수 θ의 사전분포와 사후분포를 지정하지 않았습니다. 이것을 베이즈 규칙이라 부르는 데 모순이 있나요?
A rule minimizes rₓ(a)=E[ℓ(Y, a)|X=x] under a fixed assumed joint law and loss. No prior/posterior over a parameter θ was specified. Is calling it a Bayes rule contradictory?
풀이와 확인할 이유Solution and explanation
모순이 아닙니다. 이 장의 예측 결정이론에서는 고정 결합법칙의 조건부 위험 최소 규칙이라는 용법을 씁니다. θ의 사전·가능도·사후를 갱신하는 추론 절차를 자동으로 수행했다는 뜻이 아닙니다. 어떤 확률 대상과 법칙을 썼는지 명시해야 합니다.
No. In this predictive decision-theory usage, a Bayes rule minimizes conditional risk under a fixed joint law. It does not imply that a prior, likelihood and posterior update for θ was performed. Specify the probability object and law being used.
31. ERM 동점과 후보 순서ERM ties and candidate order
동일비중 가정 훈련 결과는 0,1이고 후보 규칙은 항상 0인 h₀와 항상 1인 h₁입니다. 제곱 경험위험과 전체 최소 후보를 구하세요. 첫 목록 후보를 고르면 순서 변경이 무엇을 바꾸나요?
Assumed equal-weight training outcomes are 0, 1. Candidates h₀ and h₁ always predict zero and one. Find squared empirical risks and the minimizing set. What changes if the first listed minimizer is selected?
풀이와 확인할 이유Solution and explanation
두 위험은 1/2로 같고 최소 후보 집합은 {h₀,h₁}입니다. 목록을 바꾸면 실행에서 선택한 이름은 바뀔 수 있지만 최소 집합과 최소 위험은 바뀌지 않습니다. 동점 규칙을 수학적 유일성으로 보고하지 않습니다.
Both risks are 1/2 and both candidates minimize. Changing list order can change the executed tie choice but not the mathematical set or minimum value. Report the tie rule separately from uniqueness.
32. 평가 결과로 훈련 동점을 고르면Resolve a training tie using evaluation labels?
가정 훈련 결과 0,1에서 상수 h₀=0,h₁=1이 제곱위험 1/2로 동점입니다. 별도 평가 결과는 1 한 행입니다. 평가 손실을 구하고, 이를 보고 h₁을 선택하면 왜 평가 역할이 바뀌나요?
Training outcomes 0, 1 give tied squared risks 1/2 for constants h₀=0, h₁=1. A separate evaluation row has outcome one. Find evaluation losses and explain choosing h₁ after seeing it.
풀이와 확인할 이유Solution and explanation
평가 손실은 h₀에 1,h₁에 0입니다. 이 결과로 h₁을 선택하면 평가 정답을 선택 자료로 사용한 것입니다. h₁의 선택 후 성능을 독립적으로 확인할 새 평가 자료가 필요합니다. 동점 규칙을 훈련 전에 정하면 이 평가값은 고정 규칙의 평가로 남습니다.
Evaluation losses are one and zero. Selecting h₁ because of those labels turns the evaluation data into selection data. A fresh evaluation is needed for the selected rule. A tie rule fixed before seeing labels preserves evaluation of a fixed choice.
33. 상수 ERM의 직접 계산Compute constant ERM directly
동일비중 가정 훈련 결과가 0,0,1이고 모든 실수 상수 a를 허용합니다. 제곱 경험위험의 최소 상수와 최소값을 구하세요.
Assume equal-weight training outcomes 0, 0, 1 and any real constant prediction a. Find squared ERM and its risk.
풀이와 확인할 이유Solution and explanation
위험은 [2a²+(1−a)²]/3=a²−(2/3)a+1/3=(a−1/3)²+2/9입니다. 최소 상수는 1/3, 최소 위험은 2/9입니다. 이 훈련 평균이 알려지지 않은 미래 법칙의 참 평균이라는 결론은 아닙니다.
Risk is [2a²+(1−a)²]/3=(a−1/3)²+2/9. The unique constant ERM is 1/3 with risk 2/9. The training average is not thereby established as the true mean of a future law.
34. 기억 규칙과 훈련 손실Memorization and training loss
가정 훈련은 (X,Y)=(A,0),(B,1) 두 동일비중 행입니다. 기억 규칙 h(A)=0,h(B)=1과 상수 g=1/2를 비교하세요. 새 범주 C의 Y=1, h(C)=0이라는 별도 대체 약속에서 두 평가 손실도 계산하세요.
Assumed training rows are (A, 0), (B, 1). Compare h(A)=0, h(B)=1 with constant g=1/2. A new category C has Y=1 and an explicitly declared fallback h(C)=0. Find training and evaluation squared losses.
풀이와 확인할 이유Solution and explanation
훈련에서 h는 0, g는 1/4입니다. 새 C에서는 h의 손실 1, g는 1/4입니다. 낮은 훈련 손실이 이 평가에서 낮은 손실을 보장하지 않습니다. h(C)=0은 훈련행에서 정해진 값이 아니라 추가 대체 약속입니다.
Training risk is zero for h and 1/4 for g. At C, losses are one and 1/4. Lower training risk does not guarantee lower evaluation loss. The value h(C)=0 is an added fallback convention, not determined by the training observations.
35. 가중 상수 ERMWeighted constant ERM
가정한 결과는 0,10이고 비중은 9,1입니다. 제곱손실의 최소 상수와 최소 위험을 구하고 단순 행 평균 5와 비교하세요.
Assumed outcomes are 0 and 10 with weights 9 and 1. Find the weighted squared-loss optimum and risk, then compare with unweighted mean five.
풀이와 확인할 이유Solution and explanation
가중 평균은 (9×0+1×10)/10=1입니다. 위험은 [9×1²+1×9²]/10=9입니다. a=5이면 위험은 [9×25+25]/10=25입니다. 비중을 무시한 평균은 선택한 가중 법칙에서 최소가 아닙니다.
The weighted mean is one, with risk (9+81)/10=9. Prediction five gives risk (225+25)/10=25. Ignoring weights does not minimize the declared weighted law.
36. 누락 예측을 가진 후보A candidate with a missing prediction
양의 동일비중 훈련 결과 0,1에서 후보 h의 예측은 0,미관측입니다. 가용 첫 행의 손실 0을 h의 전체 훈련 위험이라고 사용할 수 있나요?
For positive equal-weight training outcomes 0, 1, candidate h predicts zero on the first row and has no prediction on the second. May its available loss zero be used as its full training risk?
풀이와 확인할 이유Solution and explanation
아닙니다. 두 번째 양의 비중 행의 손실을 계산할 수 없어 전체 위험은 미정의입니다. 첫 행의 가용 조건부 위험 0과 구별해야 합니다. 누락 예측을 0으로 채우거나 다른 후보보다 유리하게 일부 행만 비교하면 같은 훈련 문제를 풀지 않습니다.
No. The missing prediction prevents a loss on a positive-weight row, leaving full risk undefined. Available conditional loss zero is a different quantity. Filling the prediction with zero or comparing different subsets changes the training problem.
37. 평가 결측은 훈련 선택과 별개Missing evaluation versus training selection
가정 훈련 결과 0,0에서 상수 후보 0·1을 제곱손실로 선택했습니다. 평가 표 한 행의 결과는 미관측입니다. 선택 규칙과 평가 위험을 각각 보고하세요.
Training outcomes 0, 0 select between constants zero and one using squared loss. One evaluation outcome is missing. Report the selected rule separately from evaluation risk.
풀이와 확인할 이유Solution and explanation
훈련 위험은 0과 1이어서 상수 0을 선택합니다. 평가 손실은 결과가 없어 계산할 수 없습니다. 평가 미정의가 훈련에서 이미 정의된 선택을 지우지는 않으며, 평가 손실 0을 보증하지도 않습니다.
Training risks zero and one select the zero rule. The missing evaluation outcome leaves evaluation risk undefined. That does not erase the valid training selection or establish zero evaluation loss.
38. 새 정보값의 대체 규칙Fallback for an unseen information value
훈련에서는 A만 관측했고 그 안의 제곱손실 최소 예측은 2입니다. 실제 입력 B가 들어왔고, 후보 함수는 B에서 임의의 실수값으로 확장할 수 있습니다. 경험위험 최소화만으로 f(B)를 정할 수 있나요? 대체값 0을 쓰려면 무엇을 보고해야 하나요?
Only A was observed in training and its squared-loss optimum is two. A new input B arrives, and candidates permit any real-valued extension at B. Does ERM determine f(B)? What must be reported if fallback zero is used?
풀이와 확인할 이유Solution and explanation
훈련 법칙은 B에 질량 0을 주므로 f(B)의 값에 무관하게 훈련 위험이 같습니다. 따라서 ERM만으로 정해지지 않습니다. 0은 별도로 선언한 실행 약속임을 표시하고, 새 범주에서 평가한 근거와 적용 한계를 따로 보고해야 합니다.
Training assigns zero mass to B, so every extension gives the same training risk. ERM alone does not determine it. Label zero as an added execution convention and separately report evidence and limits for the new category.
39. 벌점을 더한 선택은 다른 목적함수Adding a penalty changes the objective
가정 후보 M₁,M₂의 경험위험은 0.1,0.2이고 복잡도는 2,0입니다. 경험위험만의 선택과 λ=0.1로 위험+λ×복잡도를 최소화한 선택을 구별하세요.
Assumed candidates M₁, M₂ have empirical risks 0.1, 0.2 and complexities 2, 0. Compare pure ERM with minimizing risk+λ×complexity at λ=0.1.
풀이와 확인할 이유Solution and explanation
순수 ERM은 0.1이 작은 M₁입니다. 벌점 목적값은 M₁에 0.1+0.1×2=0.3, M₂에 0.2여서 M₂입니다. 이것은 정규화된 다른 선택 기준이며, 미래 위험 개선을 이 두 숫자만으로 증명하지 않습니다.
Pure ERM selects M₁. Penalized values are 0.3 and 0.2, selecting M₂. The penalty defines a different objective and these numbers alone do not prove improved future risk.
40. 최소의 평균과 평균의 최소Mean of minima versus minimum of means
평가 Y가 확률 1/2씩 0·1인 가정입니다. 고정 후보 h₀=0,h₁=1을 제곱손실로 비교합니다. 각 후보의 기대 평가 손실과, Y를 본 뒤 두 손실 중 작은 값을 고른 값의 기대를 계산하세요.
Assume an evaluation Y equals zero or one with equal probability. Fixed candidates h₀=0, h₁=1 use squared loss. Find each expected loss and the expectation of the smaller loss chosen after seeing Y.
풀이와 확인할 이유Solution and explanation
고정 후보는 각각 확률 1/2로 틀리므로 기대 손실이 1/2입니다. Y를 본 뒤 맞는 후보를 고르면 매번 0이어서 최소 손실의 기대는 0입니다. E[min loss]=0은 min E[loss]=1/2와 다릅니다. 평가 정답으로 고른 최소값은 고정 규칙의 성능이 아닙니다.
Each fixed candidate is wrong with probability 1/2 and has expected loss 1/2. After seeing Y, choosing the correct candidate always gives zero. Thus E[min loss]=0 differs from min E[loss]=1/2. The label-selected minimum is not performance of a fixed rule.
41. Brier 초과 위험Brier excess risk
가정 참 확률 p=1/4에서 q=1/2와 q=p를 비교합니다. 기대 Brier 손실과 초과 위험을 직접 계산하세요.
At assumed p=1/4, compare reports q=1/2 and q=p. Calculate expected Brier losses and the excess directly.
At q=1/2 both outcomes incur 1/4. At q=1/4, expectation is (1/4)(3/4)²+(3/4)(1/4)²=3/16. Excess is 1/16=(q−p)².
42. 0질량 항과 로그손실Zero-mass terms in log loss
가정한 p=0에서 q=0과 q=1의 기대 자연로그 손실을 각각 구하세요. 불가능 결과의 무한 벌점을 어떻게 취급하나요?
At assumed p=0, find expected natural-log loss for q=0 and q=1. How is an infinite penalty on an impossible outcome treated?
풀이와 확인할 이유Solution and explanation
q=0이면 실제 양의 질량은 Y=0에만 있고 그 손실은 −log 1=0입니다. 확률 0인 Y=1의 항은 기대값에서 0으로 취급합니다. q=1이면 질량 1의 Y=0에 확률 0을 주어 기대 손실이 +∞입니다.
For q=0, all mass is on Y=0 with loss −log 1=0. The impossible Y=1 term contributes zero. For q=1, the outcome with mass one is assigned probability zero and expected loss is +∞.
43. 아주 드물어도 양의 확률Tiny but positive event probability
가정한 p=10⁻¹⁰⁰에서 q=0을 보고했습니다. 기대 로그손실은 0, 작은 유한수, +∞ 중 무엇인가요? Brier 기대 손실도 구하세요.
Assume p=10⁻¹⁰⁰ and report q=0. Is expected log loss zero, finite and small, or +∞? Also find expected Brier loss.
풀이와 확인할 이유Solution and explanation
양의 확률 p를 가진 사건 Y=1에 0을 주었으므로 기대 로그손실은 +∞입니다. 사건이 드물다는 이유로 그 양의 질량을 0으로 바꾸지 않습니다. Brier는 Y=1에서 1, Y=0에서 0이므로 기대가 p=10⁻¹⁰⁰입니다. 두 점수의 경계 성질은 다릅니다.
Positive mass on Y=1 receives a zero report, so expected log loss is +∞. Rarity does not turn positive mass into zero. Expected Brier loss is p=10⁻¹⁰⁰ because losses are one and zero. The scores have different endpoint behavior.
44. 정확한 0과 작은 양수Exact zero versus a tiny positive value
가정한 p=0,q=10⁻²⁰입니다. 기대 Brier와 로그손실을 식으로 쓰고, 보통 화면에 둘 다 0처럼 보이면 어떤 정보를 유지해야 하나요?
Assume p=0 and q=10⁻²⁰. Express expected Brier and log loss. What must remain visible if ordinary display precision makes both look zero?
풀이와 확인할 이유Solution and explanation
Brier는 q²=10⁻⁴⁰으로 정확히 양수이고 로그손실은 −log(1−10⁻²⁰)>0입니다. 로그는 q와 매우 가깝지만 정확히 같지는 않습니다. 분수·양수 표시와 로그의 유효 구간을 보존해 정확한 0과 구별해야 합니다.
Brier is exactly q²=10⁻⁴⁰> 0, and log loss is −log(1−10⁻²⁰)> 0. The log value is close to q but not exactly q. Retain the rational value/positive sign and valid log enclosure rather than relabelling either as exact zero.
45. KL 초과 로그 점수KL excess log score
가정한 p=1/2에서 q=1/4의 기대 로그손실과 참 보고 q=p의 값을 자연로그 식으로 구하세요. 두 값의 차이를 간단히 하세요.
At assumed p=1/2, express expected log loss for q=1/4 and truthful q=p using natural logarithms, then simplify the difference.
풀이와 확인할 이유Solution and explanation
q=1/4이면 −(1/2)log(1/4)−(1/2)log(3/4)=(1/2)log(16/3)입니다. 참 보고는 log 2입니다. 차이는 (1/2)log[(16/3)/4]=(1/2)log(4/3)>0입니다. 로그의 근삿값을 유한 소수의 정확한 값으로 쓰지 않습니다.
The first value is (1/2)log(16/3); truthful reporting gives log 2. Their difference is (1/2)log(4/3)> 0. A decimal approximation should not be presented as an exact finite-decimal logarithm.
46. 로그 점수의 유일한 최소The unique minimum of log score
0<p<1을 고정합니다. H(p,q)=−p log q−(1−p)log(1−q),0<q<1의 미분 부호를 사용해 유일한 최소를 찾으세요. 경계 q=0·1도 비교하세요.
Fix 0< p< 1. Use the derivative sign of H(p, q)=−p log q−(1−p)log(1−q) for 0< q< 1 to identify its unique minimum. Compare q=0 and 1.
풀이와 확인할 이유Solution and explanation
미분은 (q−p)/[q(1−q)]입니다. 분모가 양수라서 q<p이면 감소, q>p이면 증가하므로 q=p가 유일합니다. p가 내부이면 두 결과 모두 양의 확률이고 끝점 보고는 그중 하나에 0을 주어 위험이 무한이므로 더 작지 않습니다.
The derivative is (q−p)/[q(1−q)]. Its positive denominator makes it negative below p and positive above p, giving unique minimum q=p. Since both outcomes have positive mass, endpoint reports yield infinite risk and cannot improve the interior minimum.
47. 보정되었지만 덜 유익한 예측Calibrated yet less informative predictions
동일비중 가정 8행은 A에서 0,0,0,1, B에서 0,1,1,1입니다. 모든 행에 q=1/2를 주는 보고와 A에 1/4,B에 3/4를 주는 보고가 각 보고값 묶음에서 보정되는지 확인하고 Brier 위험을 비교하세요.
Eight assumed equal-weight rows have A outcomes 0, 0, 0, 1 and B outcomes 0, 1, 1, 1. Compare reporting 1/2 everywhere with reporting 1/4 in A and 3/4 in B. Check empirical calibration at each report value and Brier risk.
풀이와 확인할 이유Solution and explanation
첫 보고값의 결과 1의 전체 비율은 4/8=1/2여서 경험적으로 보정됩니다. 둘째도 각 그룹 비율과 보고값이 일치합니다. 위험은 첫째 1/4, 둘째 각 그룹에서 3/16이어서 전체 3/16입니다. 보정만으로 정보 활용과 위험을 모두 정하지 못합니다.
The pooled event frequency is 1/2, so the constant report is empirically calibrated. The group reports also match their frequencies. Risks are 1/4 and 3/16 respectively. Calibration alone does not determine information use or score quality.
48. 정확도와 비용의 최적 행동Accuracy versus cost-optimal actions
가정한 p=3/10입니다. 항상 0·항상 1의 정확도를 비교한 뒤 FP=1,FN=4의 비용 위험을 비교하세요. 두 최적 후보가 같나요?
Assume p=3/10. Compare accuracy of always-zero and always-one rules, then compare risks at FP=1, FN=4. Do they favor the same rule?
풀이와 확인할 이유Solution and explanation
정확도는 각각 7/10과 3/10이므로 항상 0이 높습니다. 비용 위험은 6/5와 7/10이므로 항상 1이 작습니다. 서로 다른 손실 기준에 대한 다른 최적이며, 확률 법칙은 바꾸지 않았습니다.
Accuracies are 7/10 and 3/10, favoring zero. Cost risks are 6/5 and 7/10, favoring one. Different criteria have different optimal actions under the same law.
49. 제곱의 부동소수점 언더플로Floating-point underflow after squaring
정확한 유리수 q=10⁻²⁰⁰의 제곱 q²를 구하세요. 이 값을 배정밀도 표시에서 0으로 변환할 수 있다고 할 때 원 수학적 결과를 어떻게 보고해야 하나요?
Find the exact square of rational q=10⁻²⁰⁰. If conversion to double precision displays zero, how should the mathematical result be reported?
풀이와 확인할 이유Solution and explanation
q²=10⁻⁴⁰⁰이며 분자는 1이므로 양수입니다. 부동소수점 0은 수학적 0이 아니라 표현 범위의 한계입니다. 정확한 분수 1/10⁴⁰⁰과 양수·표시 언더플로 정보를 남겨야 합니다.
The square is 10⁻⁴⁰⁰, with numerator one and positive sign. A floating-point zero reflects representation limits, not exact zero. Retain the exact fraction 1/10⁴⁰⁰ plus the positive/underflow distinction.
50. 로그 구간과 근삿값의 오차A logarithm enclosure and approximation error
어떤 로그값 L이 정확한 유리수 구간 [a,b] 안에 있음을 증명했습니다. 중점 m=(a+b)/2의 최대 절대오차를 구하고, m을 정확한 L이라고 부르면 왜 안 되나요?
A logarithm L is certified to lie in rational interval [a, b]. Bound the absolute error of midpoint m=(a+b)/2. Why is m not necessarily exactly L?
풀이와 확인할 이유Solution and explanation
|L−m|≤(b−a)/2입니다. 구간의 양쪽 어느 끝에 가까워도 중점에서 이 거리보다 멀 수 없습니다. 구간 폭이 0임을 따로 증명하지 않는 한 중점은 오차가 통제된 근사이며 로그 자체가 유리수라는 결론은 아닙니다.
The bound is |L−m|≤(b−a)/2. Either endpoint is exactly that distance from the midpoint. Unless zero width is established separately, m is a controlled approximation and does not show that the logarithm is rational.
51. 실제 국가 자료의 목표 단위Outcome units in actual country records
이 장의 실제 16개 국가 목표는 2024년 1인당 GDP이며 단위는 2015년 불변 USD입니다. 가정한 예측 오차가 한 행에서 100 USD라면 절대·제곱손실의 단위와 값은 무엇인가요?
The actual 16-country target is 2024 GDP per capita in constant 2015 USD. If one hypothetical prediction error is 100 USD, give absolute/squared loss values and units.
풀이와 확인할 이유Solution and explanation
절대손실은 100(2015년 불변 USD), 제곱손실은 10,000(2015년 불변 USD)²입니다. 현재 달러나 총 GDP 손실로 바꾸지 않습니다. 100의 오차는 질문의 가정이며 실제 국가의 관측 오차를 새로 보고한 것은 아닙니다.
Losses are 100 constant-2015 USD and 10,000 (constant-2015 USD)². Do not rename them current-dollar or total-GDP losses. The error of 100 is hypothetical, not a newly measured actual-country prediction error.
52. 동일 국가 비중과 세계 개인Equal-country weights versus people worldwide
실제 국가 표의 16행을 동일비중으로 평균한 제곱위험을 구했습니다. 이 값을 세계 개인의 평균 위험이라고 부를 수 있나요? 바꾸어 해석하려면 어떤 대상과 비중이 필요하나요?
Squared risk was averaged equally across 16 actual country rows. Is this average risk for individuals worldwide? What target/weights would a different interpretation require?
풀이와 확인할 이유Solution and explanation
아닙니다. 관측 단위는 국가이고 같은 1/16 비중은 사람 수를 반영하지 않습니다. 개인 수준 결과와 표본 범위, 국가별 인구·개인 분포 및 목표 집계에 맞는 비중이 필요합니다. 국가 평균만으로 개인 안의 소득 분포나 개인 예측 손실을 복원할 수 없습니다.
No. Units are countries and weights 1/16 do not represent population counts. A person-level target, coverage, population/within-country distributions and suitable weights would be needed. Country means alone do not recover individual income distributions or person-level prediction losses.
53. 실제 결측 분모와 식별 범위Actual missing denominators and identification
실제 개인 원행은 3,613개이고 원 손질 로그임금은 3,010행에서만 가용합니다. 가정한 고정 예측의 가용행 평균 제곱손실이 1/5라고 합시다. 나머지 603행의 손실은 비음수이나 상한을 모릅니다. 전체 평균에 대해 무엇을 알 수 있나요?
There are 3,613 original person rows and 3,010 available source-trimmed log wages. Assume a fixed prediction has available-row mean squared loss 1/5; the other 603 losses are nonnegative with no known upper bound. What is known about the full-frame mean?
풀이와 확인할 이유Solution and explanation
알려진 손실 합은 3,010×1/5=602입니다. 전체 위험은 (602+미관측 손실 합)/3,613이어서 하한 602/3,613만 알 수 있고 유한 상한은 보장되지 않습니다. 1/5는 가용행 평균이며 전체 3,613행 평균으로 쓰지 않습니다. 손실 1/5는 이 질문의 가정입니다.
Known loss totals 3,010/5=602. Full risk is (602+unknown loss sum)/3,613, giving lower bound 602/3,613 and no guaranteed finite upper bound. The assumed 1/5 is an available-row mean, not a full-frame mean or a measured source statistic.
54. 로그 평균을 원 임금 평균으로 바꾸기Exponentiating a mean log is not averaging wages
전부 가정한 원 임금 두 값은 2,8이고 같은 비중입니다. 로그임금의 평균을 지수화한 값과 원 임금 산술평균을 구하세요. 실제 손질 로그임금 열을 해석할 때의 주의점도 쓰세요.
Two wholly assumed wages are 2 and 8 with equal weights. Compare the exponential of mean log wage with arithmetic mean wage, then state a caution for actual trimmed source log wages.
풀이와 확인할 이유Solution and explanation
exp[(log 2+log 8)/2]=sqrt(16)=4이고 산술평균은 5입니다. 지수화한 로그 평균은 기하평균과 관련되며 산술평균과 일반적으로 다릅니다. 실제 열에는 원자료의 손질·가용성 규칙도 있어 원 임금 전수 평균이라고 부를 수 없습니다.
Exponentiating the mean log gives sqrt(2×8)=4; the arithmetic mean is 5. The former is related to a geometric mean and generally differs. Actual source trimming and availability further prevent calling it the arithmetic mean of all original wages.
55. 고객 비용은 관측값인가 가정인가Are customer costs observed or assumed?
실제 Iranian Churn의 3,150행을 그대로 둔 채 FP=1,FN=4를 FP=4,FN=1로 바꾸었습니다. 어떤 원자료 값이 바뀌어야 하나요? 비용에 따른 최적 행동이 바뀌면 참 이탈 비율도 바뀌나요?
The 3,150 actual Iranian Churn rows stay fixed while teaching costs change from FP=1, FN=4 to FP=4, FN=1. Which original fields should change? Does a changed optimal action alter the recorded churn frequency?
풀이와 확인할 이유Solution and explanation
원 Churn·Tariff Plan 등 어떤 필드도 바뀌면 안 됩니다. 바뀐 것은 선언한 평가 기준입니다. 동일 비율에서 비교할 행동 위험과 선택만 달라질 수 있습니다. 실제 회사 손해액이나 연락의 유지 효과를 이 비용 가정으로 관측했다고 주장하지 않습니다.
No original Churn, Tariff Plan or other field should change. Only the declared criterion changes; action risks and choices may change at the same recorded rate. These teaching costs do not establish actual losses or causal retention effects.
56. 원 위치와 사람 식별Source position versus person identity
공개 고객 파일에 원 위치 1~3,150을 붙였습니다. 이를 고객 실명 식별자나 실제 가입 순서로 해석해 시간순 검증을 만들 수 있나요?
Original positions 1–3,150 are attached to the public customer file. Can these be treated as named customer identities or actual signup order to construct temporal validation?
풀이와 확인할 이유Solution and explanation
원 위치는 보관 파일을 재현하기 위한 좌표입니다. 실제 개인 식별·중복 여부·가입일 순서를 별도 원필드가 확인하지 않으면 그런 의미를 추가할 수 없습니다. 위치 기반 분할은 실행 역할을 정할 수 있지만 미래 시점이나 새 개인 검증이라고 자동으로 부르지 않습니다.
Source position is a reproducibility coordinate. Without supporting fields it establishes neither named identity, uniqueness nor signup chronology. A position-based split defines execution roles but does not automatically validate future periods or new individuals.
57. 실제 집계에서 선택 비중의 의미Meaning of weights in a descriptive aggregate
전부 가정한 두 국가 목표값은 10,30입니다. 동일비중과 비중 1,3의 제곱손실 최소 상수를 각각 구하세요. 두 결과의 차이가 국가 정책 효과를 나타내나요?
Two wholly assumed country outcomes are 10 and 30. Find squared-loss minimizing constants with equal weights and weights 1, 3. Does the difference identify a policy effect?
풀이와 확인할 이유Solution and explanation
동일비중 평균은 20이고 비중 1,3에서는 (10+90)/4=25입니다. 이는 같은 값에 다른 목표 법칙을 준 결과입니다. 어떤 개입으로 값이 바뀐 비교가 아니므로 정책 효과를 식별하지 않습니다. 비중이 무엇을 대표하는지 먼저 보고해야 합니다.
The optima are 20 and (10+90)/4=25. They reweight the same values rather than compare outcomes under an intervention. No policy effect is identified. State what the weights are intended to represent.
58. 원 결측 토큰의 보존Preserve a source missing token
원 코드북에서 점(.)은 결과가 미가용임을 뜻하고 0은 실제 관측값입니다. CSV를 읽는 코드가 둘 다 숫자 0으로 바꿨다면 손실 평균에 어떤 오류가 생기나요?
A source codebook defines dot (.) as unavailable and zero as an observed value. What goes wrong if the CSV reader converts both to numeric zero before computing losses?
풀이와 확인할 이유Solution and explanation
가용 결과 수가 거짓으로 늘어나고 실제로 모르는 손실을 예측과 0의 차이로 계산합니다. 분모와 손실 합이 모두 바뀔 수 있습니다. 원 토큰과 미가용 상태를 남기고 실제 0은 가용행으로 계산해야 하며 변환 규칙을 명시해야 합니다.
Availability is falsely inflated and unknown losses are replaced by losses against invented outcome zero. Both numerator and denominator can change. Preserve original tokens and missingness while treating actual zero as observed, with an explicit conversion rule.
59. 선택 후 평가 자료의 역할Evaluation roles after model selection
실제 자료에서 그룹 경계 두 개를 후보로 비교했습니다. 평가 정답을 보고 위험이 작은 경계를 고른 뒤 그 같은 최소 위험을 최종 성능으로 보고했습니다. 무엇이 문제이고 어떻게 고치나요?
Two grouping cutoffs were compared on actual evaluation labels. The lower-risk cutoff was selected and that same minimum was reported as final performance. Identify the problem and a correction.
풀이와 확인할 이유Solution and explanation
평가 자료가 그룹 경계의 선택에 참여했습니다. 최소값은 선택 절차의 낙관성을 포함할 수 있어 독립 고정 규칙 평가로 부를 수 없습니다. 선택용 검증과 최종 평가 역할을 나누고 선택·비용·전처리를 고정한 뒤 보지 않은 평가 자료로 다시 확인합니다. 표본·시간·단위의 적절성도 따로 검토합니다.
Evaluation labels participated in selecting the cutoff, so the minimum may include selection optimism. Separate validation for selection from final evaluation; freeze selection, costs and preprocessing before using unseen evaluation data. The suitability of sampling, timing and units remains a separate question.
60. 재현 가능한 최종 메모A reproducible final memo
실제 국가·개인·기업 중 하나를 골라 보고서를 쓴다고 가정합니다. 목표·손실·정보·분모·최소해·실행·알 수 없는 부분을 빠뜨리지 않는 일곱 문장의 메모 틀을 작성하세요.
Choose one actual country, person or company case and write a seven-sentence memo template covering target, loss, information, denominator, minimizers, execution and what remains unidentified.
풀이와 확인할 이유Solution and explanation
예: ①원자료 이름·버전·원 위치·대상 단위를 적는다. ②목표 필드와 단위·손질 규칙을 쓴다. ③예측 때의 정보와 미확인 가용 시점을 밝힌다. ④손실·비중·가정 비용과 가용/미가용 분모를 쓴다. ⑤최소값·전체 최소해·실행 동점 규칙을 구별한다. ⑥입력 해시·코드·환경·출력과 한 행 검산을 연결한다. ⑦경험적 결과를 미래 위험·실제 비용·인과효과로 바꾸지 않고 추가 자료가 필요한 부분을 적는다.
For example: identify source/version/positions/unit; define outcome/units/trimming; state prediction-time information and unverified timing; give loss/weights/assumed costs and availability denominators; separate minimum, full minimizer set and executed tie choice; link input hashes/code/environment/output to a hand check; state what empirical results do not identify about future risk, real costs or causal effects and which evidence is still needed.
자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.