DATA-16 · DATA SCIENCE

펭귄 관측에서 자료사전과 탐색 보고서까지Penguin measurements to an EDA report

네 원행의 손계산에서 같은 완전짝의 집단 분해까지From hand calculations on four source rows to complete-pair group decompositions

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

기초Foundations

1. 한 줄의 펭귄 측정에서 질문을 시작한다1. Start with one penguin measurement record

보관한 자료의 첫 원행에는 Adelie, Torgersen, 부리 길이 39.1mm, 부리 깊이 18.7mm, 날개 길이 181mm, 몸무게 3,750g, male, 2007년이 적혀 있습니다. 먼저 “이 줄의 몸무게는 몇 kg인가?”를 묻는다면 3,750÷1,000=3.75kg입니다. 반면 “모든 펭귄은 얼마나 무거운가?”는 이 한 줄만으로 답할 수 없는 더 큰 질문입니다.

이 장에서는 실제로 보관한 344행·8열을 처음부터 끝까지 연결합니다. 자료사전으로 열을 읽고, 가용 분모를 정하고, 표와 점을 그린 뒤 어떤 관계를 설명할 수 있는지 작은 탐색 보고서로 정리합니다. 앞 장들의 방법을 같은 자료에 적용하되 계산이 달라질 때마다 왜 분모가 달라졌는지도 기록합니다.

자료의 세 보기 이름은 현장 범위·펭귄 측정 기록·연구팀 보고서입니다. 기존 교재의 국가·개인·회사 세 자리에 맞추려고 섬을 국가로, 펭귄을 사람으로 바꾸지 않습니다. 실제 관측 단위가 보고서의 말과 일치해야 합니다.

The first retained source row records Adelie, Torgersen, bill length 39.1 mm, bill depth 18.7 mm, flipper length 181 mm, body mass 3,750 g, male and study year 2007. “What is this recorded mass in kilograms?” has the answer 3.75 kg. “How heavy are all penguins?” asks a wider question that this row alone cannot answer.

We connect one actual retained table of 344 records and eight fields from dictionary to exploratory report. Read each field, choose the available denominator, build tables and plots, and explain observed relationships. When a calculation uses another subset, record why its denominator changed.

Our three views are fieldwork scope, measured penguin records and a research-team report. Islands are not relabelled as countries, penguins as humans or the research team as an observed company. Report language should match the actual observation units.

기초Foundations

2. 네 원행에서 가용 평균을 손으로 계산한다2. Calculate an available mean from four actual source rows

첫 네 원행의 몸무게는 3,750, 3,800, 3,250g과 미가용입니다. 가용 합은 10,800g, 가용 기록 수는 3이므로 평균은 3,600g입니다. 네 번째 칸이 비었다고 0g인 펭귄을 측정한 것은 아닙니다.

실제 첫 네 원행 · 빈 측정은 그대로 보존
원행종날개 길이(mm)몸무게(g)
1Adelie1813750
2Adelie1863800
3Adelie1953250
4Adelie미가용미가용
3750+3800+3250=10800xˉavailable=10800/3=3600\begin{gathered}3750+3800+3250=10800\\\bar x_{\rm available}=10800/3=3600\end{gathered}

빈칸에 0을 넣어 네 행을 나누면 2,700g이 됩니다. 이것은 원 기록을 보존한 가용 평균과 다른 가정입니다. 또한 3,600g은 첫 네 행 중 가용 세 값의 평균이지 전체 344행의 평균이 아닙니다. 표 제목과 결과 문장에 선택 범위를 같이 쓰세요.

The first four mass entries are 3,750, 3,800, 3,250 g and unavailable. The available total is 10,800 g across three records, giving mean 3,600 g. An empty fourth measurement is not a penguin observed to weigh zero.

Actual first four source rows · unavailable measurements retained
Source rowSpeciesFlipper (mm)Mass (g)
1Adelie1813750
2Adelie1863800
3Adelie1953250
4AdelieUnavailableUnavailable
3750+3800+3250=10800xˉavailable=10800/3=3600\begin{gathered}3750+3800+3250=10800\\\bar x_{\rm available}=10800/3=3600\end{gathered}

Zero filling and dividing by four gives 2,700 g, a different assumption. The value 3,600 g describes these three available entries, not all 344 records. Put the selection scope in both the table title and result sentence.

기초Foundations

3. 미가용 칸 수와 불완전한 행 수를 나눈다3. Separate unavailable cells from incomplete records

설명용 네 기록에서 종·몸무게·성별 세 열만 본다면 칸은 4×3=12개입니다. 둘째 기록의 몸무게와 셋째 기록의 성별이 미가용이면 미가용 칸은 2개, 적어도 한 칸이 미가용인 행도 2개입니다. 하지만 한 행에서 두 칸이 빠졌다면 미가용 칸 2개에 불완전한 행은 1개뿐입니다.

실제 표의 344×8=2,752칸에는 미가용 칸이 19개입니다. 모든 열이 가용한 행은 333개라 불완전한 행은 11개입니다. 344−19=325를 완전 행 수라고 계산하면 같은 행에서 빠진 여러 칸을 여러 행처럼 센 셈입니다.

따라서 보고서에는 전체 행 수, 열별 가용 수, 미가용 칸 수, 모든 열 완전 행 수를 구별해 적습니다. 뒤의 몸무게 평균은 몸무게 한 열만 필요하므로 다른 열의 빈칸까지 같은 삭제 조건으로 묶을 이유가 있는지도 다시 묻습니다.

Four toy records with species, mass and sex contain twelve cells. If one mass cell and another record’s sex cell are unavailable, there are two unavailable cells and two incomplete rows. If both cells instead belong to one record, there are still two unavailable cells but only one incomplete row.

The actual 344-by-eight table has 2,752 cells and nineteen unavailable cells. There are 333 all-field complete rows, leaving eleven incomplete rows. Subtracting nineteen from 344 would incorrectly count several missing cells in one row as several missing rows.

Report row count, field-specific availability, unavailable-cell count and all-field complete count separately. A mass mean needs one measured field, so reconsider whether missingness in unrelated fields belongs in that calculation’s exclusion rule.

기초Foundations

4. 이름·종류·단위를 자료사전에 함께 적는다4. Record names, analytical types and units together

열 이름만으로 모든 의미를 짐작하지 않습니다. bill_length_mm는 부리 길이, bill_depth_mm는 부리 깊이이며 둘 다 mm이지만 같은 측정은 아닙니다. body_mass_g는 g 단위 몸무게입니다. 종·섬·성별은 범주 이름이므로 범주 코드의 숫자 평균을 낼 이유가 없습니다.

실제 여덟 열의 역할 · 원자료 형식과 분석 역할을 구별
열의 역할예읽는 방법
범주species / island / sex같은 이름의 기록 수를 센다
측정량bill / flipper / mass같은 정의·단위 안에서 비교한다
조사 연도year원형은 정수 연도, 교차표에서는 연도별 범주로 묶는다

연도 2007·2008·2009는 정수로 저장된 조사 연도입니다. 연도별 개수를 그릴 때는 세 범주처럼 사용할 수 있지만, 그 선택이 원래 연도를 임의의 종 코드로 바꾸는 것은 아닙니다. 측정량의 저장 형식과 이번 질문에서 맡긴 역할을 구별합니다.

Do not infer every definition from a column name. bill_length_mm and bill_depth_mm measure different bill dimensions, both in millimetres. body_mass_g records grams. Species, island and sex are category labels; averaging their assigned numeric codes would not measure a meaningful physical quantity.

Analytical roles of the actual eight fields
RoleExamplesHow to read
Categoryspecies / island / sexCount records with the same label
Quantitybill / flipper / massCompare a shared definition and unit
Study yearyearStored as an integer year; grouped as year categories in a cross-table

Years 2007, 2008 and 2009 are integer study years. A count-by-year plot treats them as three groups without changing what they originally mean. Distinguish storage type from the analytical role chosen for a question.

기초Foundations

5. 원행 번호는 이 사본을 다시 찾는 위치다5. Source row numbers trace this retained copy

첫 원행의 위치는 1, 다음은 2입니다. 이 번호를 남기면 그림의 한 점에서 원 기록으로 돌아갈 수 있습니다. 표를 정렬해 몸무게 순으로 보더라도 원행 위치를 새 정렬 순번으로 덮지 않습니다.

이 위치가 현장에서 부여한 영구 펭귄 표식이라는 정보는 이 여덟 열에 없습니다. 서로 다른 행의 측정이 우연히 같아도 같은 개체라는 증명이 아니고, 값이 다르다고 통계적으로 독립이라는 증명도 아닙니다. 같은 줄의 여러 열은 같은 관측에 연결해 읽습니다.

실습에서 원행 4를 선택하면 날개 길이와 몸무게가 미가용이라는 상태도 함께 표시합니다. 점을 그릴 수 없다는 이유로 원행 자체가 사라지거나 번호가 뒤의 관측으로 이동하지 않게 합니다.

Keep source positions 1, 2 and so on so that a plotted point can be traced back to its retained record. Sorting by mass should not overwrite original positions with new sort ranks.

These eight fields do not provide a permanent field-assigned penguin identifier. Equal measurements across rows do not prove identity; unequal values do not prove statistical independence. Several fields on the same row describe the linked observation.

Selecting source row four in the lab also shows its unavailable flipper and mass. Being unable to draw a point should not erase the original row or shift its position to another observation.

기초Foundations

6. 축약 여덟 열과 원형 열일곱 열을 구별한다6. Distinguish the simplified eight-field table from the raw table

이번에 읽는 파일은 palmerpenguins의 축약 penguins 표를 보관한 CSV입니다. 공식 자료사전은 344행·8변수와 단위를 설명하며, 별도 penguins_raw는 17열 표입니다. 우리가 읽지 않은 열이 실제로 관측된 것처럼 사전에 추가하지 않습니다.

공식 소개는 2007~2009년 Palmer Archipelago의 세 종·세 섬 관측과 연구·교육 자료의 출처를 연결합니다. CC0로 제공된 자료에도 Palmer Station LTER, Kristen Gorman과 원 측정 연구, Allison Horst·Alison Hill의 교육 패키지 기여를 함께 밝혀 독자가 경로를 따라가게 합니다.

이 장의 표와 그림은 보관 CSV에서 새로 계산한 것입니다. 날짜가 다른 원본을 받았다면 먼저 원파일 지문과 행·열·결측 상태를 비교해야 합니다. 패키지를 설치했다거나 별도의 원형 자료를 실행했다는 주장은 여기서 하지 않습니다.

Our retained CSV is the simplified palmerpenguins penguins table. Its official dictionary defines 344 rows, eight variables and their units; penguins_raw is a separately named seventeen-field table. Do not add unobserved raw fields as if they had been read.

The official introduction connects measurements of three species on three islands in 2007–2009 with the research and educational sources. Acknowledge Palmer Station LTER, Kristen Gorman and the measurement research, together with Allison Horst and Alison Hill’s educational package, so readers can follow the source trail.

Tables and figures here are newly computed from the retained CSV. For another downloaded version, compare file hashes, rows, columns and missingness before pooling. Reading this copy does not claim package installation or execution of a separate raw dataset.

기초Foundations

7. 몸무게 평균에 필요한 칸만 먼저 정한다7. Choose the fields required by each question

전체 344행에서 몸무게가 가용한 행은 342개입니다. 날개 길이도 같은 342행에서 가용하여 두 측정의 짝 비교에는 342개를 씁니다. 모든 여덟 열이 가용해야 한다고 요구하면 333행으로 줄어듭니다. 질문이 요구하는 열을 먼저 정하지 않고 전체 완전 행을 한꺼번에 고르면 계산 대상이 바뀔 수 있습니다.

실제 질문별 분모 · 일괄 완전 행 삭제 없음
계산에 필요한 조건행 수
원 관측 기록344
몸무게 가용342
날개·몸무게 함께 가용342
여덟 열 모두 가용333
성별 미가용11
성별 미가용이지만 몸무게 가용9

성별을 비교하는 분석에서는 그 11행의 미가용 상태를 별도로 다뤄야 합니다. 몸무게만 요약하는 분석에서는 그중 몸무게를 아는 9행을 사용할 수 있습니다. 어떤 조건을 택했는지와 빠진 수를 보이면 독자가 두 결과의 차이를 추적할 수 있습니다.

Mass is available for 342 of 344 records. Flipper length is available on the same 342 rows, providing 342 complete measurement pairs. Requiring all eight fields instead leaves 333 rows. Choosing global complete cases before deciding which fields a question needs can change the object being summarized.

Actual question-specific denominators · no global deletion
Required conditionRecords
Original observations344
Available mass342
Available flipper and mass342
All eight fields available333
Unavailable sex11
Unavailable sex but available mass9

A comparison by sex needs explicit treatment of the eleven unavailable labels. A mass-only summary can still use the nine with known mass. State the rule and omitted count so that readers can trace differences between calculations.

기초Foundations

8. 실습 A · 기록 수와 필드 가용성을 점검한다8. Lab A · Inspect record counts and field availability

작은 기록 목록과 열별 자료사전을 입력합니다. 숫자는 따옴표로 감싼 정확한 수, 미가용은 null입니다. 키 자체가 없는 경우와 키는 있으나 null인 경우도 따로 셉니다. 첫 예에서 어떤 행이 세 열 모두 가용한지 손으로 표시한 뒤 결과와 비교하세요.

몸무게 한 칸을 미가용으로 바꿨을 때 전체 행 수는 그대로이고 그 열의 가용 수만 달라져야 합니다. 원 기록을 수정한 입력과, 같은 입력의 자료사전·분모를 읽는 작업을 구별합니다. 새 입력 계산은 브라우저 JavaScript이며 아래 Python/R은 실제 실행한 고정 참조입니다.

Enter records and a field dictionary. Use quoted exact numeric text and null for unavailable cells. An absent key and a present null key are counted separately. First mark by hand which toy rows have all three fields available, then compare the output.

Changing one mass cell to unavailable leaves the row count unchanged while changing field availability. Distinguish editing records from inspecting their dictionary and denominators. Live calculations use browser JavaScript; the Python/R records below are fixed references that actually ran.

기초Foundations

9. 네 기록의 교차표를 세 칸부터 채운다9. Fill a small cross-table one observed cell at a time

설명용 두 표식의 네 행을 (A,X), (A,Y), (B,X), (미가용,Y)라고 합시다. 두 표식을 모두 아는 행은 앞의 세 개입니다. A·X, A·Y, B·X 칸에 1개씩을 놓고 B·Y에는 관측한 0개를 씁니다. 마지막 행을 B나 A에 임의 배정하지 않습니다.

설명용 교차표 · 두 표식이 모두 가용한 세 기록
첫 표식 / 둘째 표식XY행 합
A112
B101
열 합213

0이라는 셀 개수와 미가용 표식은 다릅니다. B·Y의 0은 이번 가용 세 기록에 그런 조합이 없다는 뜻입니다. 마지막 행은 Y임을 알지만 첫 표식을 모르므로 현재의 두 표식 교차표에서는 제외된 1행으로 보고합니다.

Take four toy label pairs (A,X), (A,Y), (B,X) and (unavailable,Y). Both labels are available for the first three. Put one record in each of A/X, A/Y and B/X, and observed count zero in B/Y. Do not guess the missing first label.

Toy cross-table · three jointly available records
First / second labelXYRow total
A112
B101
Column total213

A zero cell count differs from an unavailable label. Zero B/Y means that combination does not occur among the three jointly available rows. The last record has known Y but unknown first label, so report it as one omitted joint record.

기초Foundations

10. 같은 칸에도 세 가지 분모가 있다10. One cell can have three different denominators

앞 표의 A·X 칸은 전체 가용 세 기록 중 1개라 결합 비중은 1/3입니다. A 안에서는 두 기록 중 1개라 X의 비중은 1/2입니다. X 안에서도 두 기록 중 A가 1개라 A의 비중은 1/2입니다. 같은 1을 서로 다른 집합의 크기로 나누었습니다.

Precords(A,X)=1/3Precords(X∣A)=1/2Precords(A∣X)=1/2\begin{gathered}P_{\rm records}(A,X)=1/3\\P_{\rm records}(X\mid A)=1/2\\P_{\rm records}(A\mid X)=1/2\end{gathered}

여기서 확률 표기는 정한 가용 유한 기록에 균등 무게를 준 비중입니다. 모집단의 추출 법칙을 알아낸 것은 아닙니다. 선언한 Z 범주에 관측 행이 하나도 없으면 Z를 조건으로 한 비중은 0/0이라 미정의입니다. 전체 가용 분모가 양수인 결합표의 Z·X 비중 0과 구별합니다.

The A/X cell is one of three jointly available records, giving joint share 1/3. Among A’s two rows, one has X, giving 1/2. Among X’s two rows, one has A, also giving 1/2. The numerator one is divided by different sets.

Precords(A,X)=1/3Precords(X∣A)=1/2Precords(A∣X)=1/2\begin{gathered}P_{\rm records}(A,X)=1/3\\P_{\rm records}(X\mid A)=1/2\\P_{\rm records}(A\mid X)=1/2\end{gathered}

These probabilities are shares in the declared finite set with equal record weights, not a recovered population sampling law. If a declared category Z has no observations, a conditional share given Z has denominator zero and is undefined. Its joint cell share can still be zero when the full joint denominator is positive.

기초Foundations

11. 가용한 한쪽 표식과 가용한 표식 쌍을 구별한다11. Separate one available label from an available label pair

네 설명용 행에서는 첫 표식이 3행에서 가용하고 둘째 표식은 4행에서 모두 가용합니다. 그러나 교차표의 분모는 두 표식을 함께 아는 3입니다. 둘째 표식만 보면 Y가 2/4인 반면, 두 표식 가용 집합 안에서는 Y가 1/3입니다. 분모가 다른 두 값을 계산 오류로 맞추지 않습니다.

미가용을 표시하는 글자와 실제 관측 범주 이름도 구별합니다. 화면에서 “미가용”이라고 읽게 할 수 있지만 그것을 관측된 세 번째 성별이나 조사 섬으로 바꾸는 것은 아닙니다. 미가용 집단을 별도 통으로 포함하는 분석을 택한다면 그 규칙과 분모를 새로 명시합니다.

이 장의 교차표 실습은 두 표식 가용 쌍을 사용하고, 뒤의 공분산 분해 실습은 측정 쌍은 가용하되 집단 표식만 미가용인 행을 별도 집단으로 유지합니다. 서로 다른 질문의 규칙을 결과 옆에서 읽을 수 있게 합니다.

In the four-row toy example, the first label is available three times and the second four times. The joint table still has denominator three. Y occupies 2/4 of all second labels but 1/3 of jointly available label pairs. These differ because the selected sets differ.

A visible “Unavailable” message is not an observed new sex or island category. If an analysis instead keeps unavailable labels as a separate bucket, state that rule and denominator explicitly.

Our cross-table uses jointly available labels. The later covariance decomposition keeps available measurement pairs with an unavailable grouping label in a separate bucket. Read the selected rule beside each result.

기초Foundations

12. 실제 아홉 종·섬 조합을 0도 포함해 남긴다12. Retain all nine observed species/island combinations, including zero cells

실제 세 종과 세 섬을 교차하면 3×3=9칸입니다. Adelie는 Biscoe 44, Dream 56, Torgersen 52행입니다. Chinstrap 68행은 이 사본에서 모두 Dream에 있고 Gentoo 124행은 모두 Biscoe에 있습니다. 0칸도 유지하면 어떤 조합을 세었는지 표에서 바로 확인할 수 있습니다.

실제 344기록 · 원 species 코드 유지
종BiscoeDreamTorgersen합
Adelie445652152
Chinstrap068068
Gentoo12400124

이 표는 보관한 관측의 범위를 보여 줍니다. 관측하지 않은 종·섬 조합이 생물학적으로 불가능하다거나 다른 기간에도 항상 0이라는 결론을 주지는 않습니다. 또한 섬과 종의 구성이 얽혀 있으므로 단순한 섬별 몸무게 차이를 섬의 인과효과로 읽기 전에 구성 차이를 확인해야 합니다.

Crossing three recorded species with three islands gives nine cells. Adelie has 44 Biscoe, 56 Dream and 52 Torgersen records. All 68 Chinstrap records here are from Dream, and all 124 Gentoo records from Biscoe. Retaining zero cells shows the full declared combination set.

Actual 344 records · original species codes retained
SpeciesBiscoeDreamTorgersenTotal
Adelie445652152
Chinstrap068068
Gentoo12400124

This describes the retained observational coverage. An absent combination need not be biologically impossible or absent in another period. Species composition also differs across islands, so inspect that composition before assigning a causal island interpretation to a simple mass contrast.

기초Foundations

13. 연도별 개수를 먼저 세고 시간 변화를 읽는다13. Count study-year observations before interpreting time patterns

원 연도는 2007·2008·2009입니다. 아래 표는 각 종에서 어느 연도에 몇 기록이 있는지 셉니다. 막대 제목은 짧게 “조사 연도별 기록 수”라고 쓰고, 본문과 표에서 2007~2009년의 보관 측정 범위임을 설명할 수 있습니다.

실제 종·조사 연도 개수
종200720082009
Adelie505052
Chinstrap261824
Gentoo344644

2007년 한 행과 2008년 한 행을 번호나 측정값이 비슷하다는 이유로 같은 펭귄의 전후로 연결하지 않습니다. 이 축약 표의 위치 키만으로 같은 개체의 반복 측정을 확인하지 않았습니다. 연도별 관측 구성이 바뀌면 전체 평균 차이에 종·성별 구성 차이도 들어갈 수 있습니다.

The recorded study years are 2007, 2008 and 2009. Count records by species and year before describing a time pattern. A concise chart title can say “Records by study year,” with the retained measurement period explained in the caption and table.

Actual species-by-study-year counts
Species200720082009
Adelie505052
Chinstrap261824
Gentoo344644

Do not pair records across years merely because positions or measurements look similar. These positional keys alone do not verify repeated measurements on the same animal. Changes in species or sex composition can also contribute to differences between yearly aggregate means.

기초Foundations

14. 성별 미가용 11행 중 몸무게는 9개가 알려져 있다14. Nine of eleven unavailable-sex records have available mass

성별이 기록된 행은 female 165개와 male 168개로 합 333개입니다. 성별 미가용 11행 가운데 9행에는 몸무게가 있습니다. 몸무게의 전체 가용 수는 165+168+9=342입니다.

실제 성별 기록 상태와 몸무게 가용성을 함께 표시
성별 기록원행 수몸무게 가용몸무게 미가용
female1651650
male1681680
미가용1192
합3443422

female·male 두 집단의 몸무게 평균만 비교할 때는 각 가용 집단 분모를 사용합니다. 전체 가용 몸무게 평균을 만들 때 그 두 평균만으로 342개를 복원할 수는 없습니다. 빠진 9개의 가용 몸무게가 어느 계산에 포함되는지도 함께 보여야 합니다.

Recorded sex comprises 165 female and 168 male rows, totaling 333. Nine of eleven unavailable-sex rows still have mass. Thus overall available mass count is 165+168+9=342.

Actual sex-recording state and mass availability
Recorded sexSource rowsAvailable massUnavailable mass
female1651650
male1681680
Unavailable1192
Total3443422

A female/male mass contrast uses each available group denominator. Those two means alone do not reconstruct the mean of all 342 known masses: nine additional available masses remain outside those two recorded-sex groups. Show where they enter the chosen calculation.

기초Foundations

15. 기록의 비중과 모집단의 확률을 구별한다15. Distinguish observed proportions from population probabilities

344행 가운데 Gentoo가 124행이면 보관 기록의 비중은 124/344=31/86입니다. 이것을 관측 표의 비중이라고 말할 수 있습니다. 남극 전체 펭귄이 Gentoo일 확률이나 생태계 전체 종 비율로 옮기려면 어떤 개체가 관측 범위에 들어왔는지의 추가 정보가 필요합니다.

같은 표의 기록에 균등 무게를 주는 것은 지금 어떤 한 줄을 한 표로 세겠다는 분석 정의입니다. 원 측정이 독립·동일 분포의 무작위 표본이었다는 사실이 그 정의에서 나오지는 않습니다. 과거 조사 범위와 더 넓은 생태 질문을 따로 적으면 관측 표 자체의 유용한 설명도 더 정확해집니다.

탐색 보고서는 먼저 “이 사본에서 어떤 조합·측정이 보였는가?”에 답합니다. 넓은 모집단이나 개입 효과를 묻는 후속 연구에는 그 질문에 맞는 관측·표집·모형 근거를 덧붙입니다.

Gentoo accounts for 124/344=31/86 of retained records. That is an observed table share. Interpreting it as a species probability among all Antarctic penguins requires further information about how observations entered the study.

Equal record weights define how the current analysis counts rows. They do not establish an iid random sampling design. Separating historical coverage from a wider ecological question also makes the useful description of this actual table more precise.

The exploratory report first answers what combinations and measurements appear in this copy. A later population or intervention study needs observation, sampling and modelling arguments suited to its own question.

기초Foundations

16. 실습 B · 같은 셀에서 분모를 바꿔 읽는다16. Lab B · Read different denominators for the same cell

두 범주 목록을 같은 길이로 입력합니다. 두 값이 모두 가용한 원위치만 공동 표에 들어갑니다. A·X의 개수와 결합 비중, A 안 비중, X 안 비중을 차례로 비교하고 어느 집합이 분모인지 먼저 말해 보세요.

관측하지 않은 Z 범주를 선언해 0셀과 0분모의 차이를 확인합니다. 다음에는 한쪽 표식만 미가용으로 바꿔 각 열의 가용 수와 공동 가용 수가 어떻게 달라지는지 봅니다. 셀 비중의 합과 행·열 조건부 비중의 합은 같은 분모 안에서 확인합니다.

Enter two equal-length category arrays. Only original positions with both labels available enter the joint table. Compare the A/X count, joint share, share within A and share within X, naming each denominator first.

Declare an unobserved Z category to distinguish a zero cell from a zero conditional denominator. Make one label unavailable and inspect field-specific versus joint availability. Check sums of shares within the relevant common denominator.

기초Foundations

17. 3,750g과 3.75kg은 같은 측정이다17. 3,750 g and 3.75 kg describe the same measurement

첫 몸무게 3,750g을 kg으로 바꾸면 1,000으로 나누어 3.75kg입니다. 두 몸무게 3,750g과 3,800g의 차이 50g도 0.05kg으로 함께 바뀝니다. 한 열만 환산한 뒤 다른 열의 단위를 그대로 붙이지 않습니다. 부리 길이와 날개 길이의 mm도 측정 대상이 서로 다릅니다.

같은 양의 배율로 몸무게를 환산하면 평균·중앙값·사분위수·범위는 같은 배율로 바뀝니다. 분산은 차이를 제곱하므로 배율의 제곱으로 바뀌고 단위도 g²에서 kg²로 바뀝니다. 뒤의 상관계수는 양의 단위 환산으로 그대로 유지됩니다. 먼저 어떤 통계량에 어떤 단위가 붙는지 적어 보세요.

실습의 자료사전은 단위 이름을 보존합니다. 열 이름에서 단위를 바꾸었다면 수치도 같은 규칙으로 바뀌었는지 확인합니다. 숫자 3.75를 원래 g 열에 그대로 넣는 일과 g을 kg으로 환산하는 일은 다릅니다.

Converting the first mass from 3,750 g to kilograms divides by 1,000, giving 3.75 kg. The 50 g difference between 3,750 and 3,800 g becomes 0.05 kg too. Do not convert numbers while retaining the wrong unit label. Bill length and flipper length are also different measurements despite sharing millimetres.

A common positive scale factor changes means, medians, quartiles and ranges by that factor. Variance uses squared differences, so it changes by the squared factor and has units g² or kg². Correlation later remains unchanged under positive unit scaling. Start by writing the unit of each statistic.

The dictionary retains unit names. If you relabel a field’s unit, check that its numbers were transformed consistently. Entering 3.75 into a gram field differs from converting grams to kilograms.

기초Foundations

18. 평균 4.25와 중앙값 3은 다른 질문이다18. Mean 4.25 and median 3 answer different questions

설명용 네 수 1, 2, 4, 10의 합은 17이고 평균은 17/4=4.25입니다. 정렬한 가운데 두 수 2와 4의 중간은 3입니다. 큰 값 10이 평균을 위로 당기지만 중앙의 위치는 다르게 요약됩니다. 둘 중 하나를 계산 실수로 고칠 이유는 없습니다.

xˉ=17/4∑i(xi−xˉ)2=195/4s2=195/44−1=65/4\begin{gathered}\bar x=17/4\\\sum_i(x_i-\bar x)^2=195/4\\s^2=\frac{195/4}{4-1}=65/4\end{gathered}

가용한 n≥2개에 대해 여기의 표본식 분산은 중심 제곱합을 n−1로 나눈 값입니다. 이 설명용 결과는 65/4=16.25입니다. 관측 집합의 기술적 퍼짐으로 이를 계산할 수 있지만, 실제 연구 표본이 iid라고 확인했다거나 모집단 분산의 불편 추정이라고 자동 해석하지 않습니다.

가용값이 한 개면 평균과 그 값 자체의 제곱합 0은 정의되지만 n−1 분모의 분산은 미정의입니다. 가용값이 없으면 평균·분위수도 미정의이며, 빈 합 0과 같은 값으로 대신하지 않습니다.

For toy values 1, 2, 4 and 10, the sum is seventeen and mean 17/4=4.25. The midpoint of the two central sorted values, two and four, is three. The large value ten influences the mean more strongly. Different summaries need not be reconciled by changing a correct calculation.

xˉ=17/4∑i(xi−xˉ)2=195/4s2=195/44−1=65/4\begin{gathered}\bar x=17/4\\\sum_i(x_i-\bar x)^2=195/4\\s^2=\frac{195/4}{4-1}=65/4\end{gathered}

For n≥2 available values, the sample-formula variance here divides the centered square sum by n−1, giving 65/4=16.25. It can describe the retained set without certifying iid sampling or automatically establishing an unbiased population-variance estimator.

One available value has a defined mean and centered square sum zero, but the n−1 variance is undefined. With none available, means and quantiles are undefined too; an empty sum zero does not replace them.

기초Foundations

19. 두 정렬값 사이에서 사분위수를 계산한다19. Interpolate a quartile between adjacent sorted values

1, 2, 4, 10을 작은 순서대로 놓습니다. 이 장은 type7 규칙을 명시적으로 사용합니다. 0부터 센 정렬 위치 h=(n−1)p를 구하고, 양옆 값 사이를 선형으로 잇습니다. n=4, p=1/4이면 h=3/4라 첫 값 1에서 다음 값 2 쪽으로 3/4만큼 이동하여 7/4=1.75입니다.

h=(n−1)pj=⌊h⌋,a=h−jQ7(p)=(1−a)x(j)+ax(j+1)\begin{gathered}h=(n-1)p\\j=\lfloor h\rfloor,\quad a=h-j\\Q_7(p)=(1-a)x_{(j)}+a x_{(j+1)}\end{gathered}

위 식은 가용 n≥2개, 0≤p<1의 0부터 센 정렬 인덱스에서 씁니다. 끝점 p=1은 최댓값으로 정하고 n=1이면 모든 분위수를 유일한 가용값으로 정합니다. 같은 네 수에서 중앙값은 Q₇(1/2)=3, 셋째 사분위수는 Q₇(3/4)=11/2=5.5입니다.

분위수의 이름만 같아도 다른 규칙은 다른 답을 줄 수 있습니다. 내림해 순서통계량 하나를 고르는 방법, 다른 보간 위치를 쓰는 방법과 구별하고 보고서에는 이번 규칙을 적습니다.

Sort 1, 2, 4 and 10. We explicitly choose type 7: calculate the zero-based position h=(n−1)p and interpolate between adjacent order statistics. With n=4 and p=1/4, h=3/4 moves three quarters of the way from one to two, giving 7/4=1.75.

h=(n−1)pj=⌊h⌋,a=h−jQ7(p)=(1−a)x(j)+ax(j+1)\begin{gathered}h=(n-1)p\\j=\lfloor h\rfloor,\quad a=h-j\\Q_7(p)=(1-a)x_{(j)}+a x_{(j+1)}\end{gathered}

This formula uses zero-based sorted indices, n≥2 and 0≤p<1. Define p=1 as the maximum; with n=1, every quantile is the unique available value. For the same four values, Q₇(1/2)=3 and Q₇(3/4)=11/2=5.5.

Other quantile rules can give different answers. Distinguish this interpolation from selecting a single order statistic or choosing another plotting position. Name the rule in the report.

기초Foundations

20. 경계 밖의 값은 먼저 질문할 기록이다20. A value beyond a fence is a record to investigate

설명용 네 수의 Q₁=7/4, Q₃=11/2이므로 IQR=15/4입니다. 여기서는 Q₁−1.5IQR와 Q₃+1.5IQR를 질의 경계로 정합니다. 아래·위 경계는 각각 −31/8과 89/8입니다. 10은 위 경계 11.125보다 작으므로 이 규칙에서는 표시되지 않습니다.

IQR=Q3−Q1L=Q1−32IQRU=Q3+32IQR\begin{gathered}\mathrm{IQR}=Q_3-Q_1\\L=Q_1-\tfrac32\mathrm{IQR}\\U=Q_3+\tfrac32\mathrm{IQR}\end{gathered}

가용값 x가 L보다 작거나 U보다 클 때만 질의 표식을 붙입니다. 경계와 같은 값은 밖이 아닙니다. 이 약속을 바꾸면 표시되는 원행이 달라질 수 있으므로 엄격 부등호도 규칙의 일부입니다.

표식은 원 기록과 측정 정의를 다시 읽을 이유를 알려 줍니다. 정확한 드문 관측인지, 단위가 다른지, 입력을 잘못했는지는 별도 확인이 필요합니다. 표식을 붙였다는 사실 자체가 측정 오류의 증거도 삭제 명령도 아닙니다.

The toy quartiles 7/4 and 11/2 give IQR=15/4. Choose query fences Q₁−1.5IQR and Q₃+1.5IQR, giving −31/8 and 89/8. Ten is below the upper fence 11.125, so this rule does not flag it.

IQR=Q3−Q1L=Q1−32IQRU=Q3+32IQR\begin{gathered}\mathrm{IQR}=Q_3-Q_1\\L=Q_1-\tfrac32\mathrm{IQR}\\U=Q_3+\tfrac32\mathrm{IQR}\end{gathered}

Flag an available value only if x<L or x>U. Equality at a fence is not outside. Strict versus inclusive comparisons are part of the declared rule and can change flagged source positions.

A flag prompts inspection of the original record and definition. A rare correct value, a unit mismatch and a data-entry mistake require different responses. The flag itself proves neither error nor a reason to delete.

기초Foundations

21. IQR가 0이어도 다른 값이 있을 수 있다21. Zero IQR can coexist with a different observation

다섯 값 1, 1, 1, 1, 10을 정렬하면 type7의 Q₁과 Q₃은 모두 1입니다. 따라서 IQR=0, 양쪽 경계도 1입니다. 마지막 10은 엄격 경계 밖이라 질의 표식을 받습니다. IQR가 0이라는 말은 가운데 사분위 구간의 폭이 0이라는 뜻이지 모든 관측이 같다는 뜻이 아닙니다.

원래 다섯 값을 보존하면 평균은 14/5=2.8입니다. 표식 10을 삭제하면 네 값 평균 1로 대상이 달라집니다. 실제 삭제를 정당화한 별도 증거 없이 바뀐 평균을 원래 분포의 더 정확한 평균이라고 부르지 않습니다.

모든 값이 1이라면 경계도 1이지만 표식은 없습니다. 두 예의 IQR가 같아도 분포와 평균은 다릅니다. 원래 값 표를 경계 요약과 함께 두는 이유입니다.

For five values 1, 1, 1, 1 and 10, type 7 gives Q₁=Q₃=1. IQR and both fences collapse to zero width at one. The final ten lies strictly outside and is flagged. Zero IQR describes the central quartile width, not equality of every observation.

Retaining all five gives mean 14/5=2.8. Deleting ten changes the mean to one over another selected set. Without separate evidence justifying removal, do not call that the more accurate mean of the original distribution.

If every value were one, the same fences would produce no flags. Equal IQR does not determine the whole distribution or mean, which is why the original-value table remains alongside the summary.

기초Foundations

22. 실제 342개 몸무게의 가운데와 양끝을 읽는다22. Read the center and endpoints of 342 actual masses

전체 344행 중 가용 몸무게는 342개입니다. 최솟값은 2,700g, 최댓값은 6,300g입니다. type7의 Q₁·중앙값·Q₃은 3,550·4,050·4,750g입니다. 이들은 가용 원행을 정렬해 얻은 요약이며 측정하지 않은 두 몸무게를 채운 결과가 아닙니다.

실제 전체 가용 몸무게 · type7
가용 기록 수평균(g)Q₁ (g)중앙값(g)Q₃ (g)최소(g)최대(g)
342약 4,201.75438635504050475027006300

원 합을 가용 수로 나눈 정확 평균은 239500/57g입니다. 화면의 짧은 소수는 이를 표시한 값이며 원 관측이 소수 여섯 자리까지 정밀하게 측정되었다는 뜻은 아닙니다. 범위 3,600g도 신뢰구간 폭이나 개인 예측구간 폭으로 바꾸어 부르지 않습니다.

이 요약은 서로 다른 종을 함께 모았습니다. 다음 절처럼 같은 관측을 종별 기준에서 다시 볼 수 있습니다. 전체 표와 종별 표 중 하나를 버리는 대신 각 표가 정한 질문을 적습니다.

Mass is available for 342 of 344 rows, ranging from 2,700 to 6,300 g. Type 7 gives Q₁ 3,550, median 4,050 and Q₃ 4,750 g. These summarize sorted available records without filling the two unavailable masses.

All actual available mass records · type 7
Available recordsMean (g)Q₁ (g)Median (g)Q₃ (g)Minimum (g)Maximum (g)
342about 4,201.75438635504050475027006300

The exact available mean is 239500/57 g. A short decimal displays that quotient without claiming six-decimal measurement precision. The range 3,600 g is neither a confidence-interval width nor an individual prediction-interval width.

This summary pools species. Inspect the same records against species-specific references next. Keep both views and state the question defined by each.

기초Foundations

23. 같은 2,700g도 전체와 종별 기준에서 다르게 표시된다23. The same 2,700 g can be flagged differently by reference group

전체 가용 몸무게의 IQR는 1,200g이라 경계는 1,750g과 6,550g입니다. 모든 가용 몸무게가 그 안에 있어 전체 기준 질의 표식은 없습니다. Chinstrap 68행만 보면 Q₁=3,487.5g, Q₃=3,950g이라 경계는 2,793.75g과 4,643.75g입니다.

이 종별 기준에서 원행 314의 4,800g과 원행 315의 2,700g에 표식이 붙습니다. 원래 측정값을 바꾸지 않고 비교 기준 집합만 바꾸어 표식 결과가 달라진 것입니다. 이는 두 기록이 오류라는 판정이 아닙니다.

같은 원 측정 · 서로 다른 명시적 type7 경계
기준 집합가용 수아래 경계(g)위 경계(g)표식 원행
전체34217506550없음
Chinstrap682793.754643.75314·315

종별 표본 크기·정렬값·보간 규칙을 보존해야 비교가 재현됩니다. 원행 314·315는 계속 남겨 두며, 다른 열과 출처를 읽은 확인 기록 없이 자동 삭제하지 않습니다.

The pooled IQR is 1,200 g, giving fences 1,750 and 6,550 g and no mass flags. Among 68 Chinstrap records, Q₁=3,487.5 and Q₃=3,950 g, giving fences 2,793.75 and 4,643.75 g.

That species-specific rule flags source row 314 at 4,800 g and row 315 at 2,700 g. The measurements did not change; the reference group did. This is not an error verdict.

Same original measurements · different explicit type 7 fences
Reference setAvailable nLower fence (g)Upper fence (g)Flagged source rows
All34217506550None
Chinstrap682793.754643.75314 and 315

Retain group size, sorted values and interpolation rule to reproduce the comparison. Rows 314 and 315 remain in the data until a separately justified decision, supported by source inspection, says otherwise.

기초Foundations

24. 실습 C · 분위수·경계·원행 표식을 함께 읽는다24. Lab C · Inspect quartiles, fences and original positions

숫자 목록에서 가용 n과 평균을 먼저 확인한 뒤 각 사분위수의 정렬 위치와 보간 무게를 읽습니다. 설명용 1, 2, 4, 10에서 Q₁=1.75를 손으로 재현하세요. 다음에는 1, 1, 1, 1, 10으로 IQR=0인 표식을 비교합니다.

경계 배수 1.5를 바꾸면 질의 규칙이 달라집니다. 값이 경계와 같을 때 표식이 없는지, 모든 값이 미가용일 때 평균과 경계가 미정의인지도 확인하세요. 브라우저 입력에 붙인 표식과 실제 자료 원행의 표식은 선택 범위와 함께 표시하며 자동 삭제하지 않습니다.

Check available n and the mean, then read each quartile’s sorted position and interpolation weight. Reproduce Q₁=1.75 by hand for 1, 2, 4, 10. Then compare the zero-IQR query for 1, 1, 1, 1, 10.

Changing the fence multiplier changes the query rule. Check equality at a fence and the undefined mean/fences when every value is unavailable. Original positions and selected scopes accompany flags; flags do not automatically delete either live inputs or actual source rows.

기초Foundations

25. 두 평균도 같은 세 쌍에서 계산한다25. Calculate both means on the same three pairs

설명용 x=(1, 2, 미가용, 4), y=(2, 3, 5, 8)를 같은 네 위치에 둡니다. x·y를 함께 아는 위치는 첫째·둘째·넷째라 세 쌍입니다. 평균은 x 쪽 7/3, y 쪽 13/3입니다. y 혼자 가용한 네 값 평균 18/4=4.5를 같은 짝 평균이라고 바꾸어 쓰지 않습니다.

설명용 같은 위치에서 연결한 세 완전짝
원위치(0부터)xy짝에 포함
012예
123예
2미가용5아니오
348예

산점도의 한 점은 이 세 쌍 중 하나입니다. x의 첫 세 가용값과 y의 첫 세 가용값을 따로 모아 순서로 연결하면 원위치 3의 x=4가 원위치 2의 y=5와 잘못 묶일 수 있습니다. 원위치로 먼저 짝짓고 필요한 두 값의 가용성을 확인합니다.

Keep x=(1, 2, unavailable, 4) and y=(2, 3, 5, 8) at the same four positions. Positions zero, one and three provide complete pairs. Their means are 7/3 and 13/3. The separate four-value y mean 4.5 is not the paired y mean.

Three toy complete pairs linked by original position
Zero-based positionxyIncluded pair
012Yes
123Yes
2Unavailable5No
348Yes

Each scatterplot point is one of these pairs. Separately compacting available x and available y values can incorrectly match x=4 from position three with y=5 from position two. Pair by original position before checking joint availability.

기초Foundations

26. 평균에서 뺀 두 차이를 곱한다26. Multiply deviations from the paired means

같은 세 쌍의 x 평균 7/3, y 평균 13/3을 각 값에서 뺍니다. 첫 쌍 (1, 2)은 평균보다 각각 −4/3, −7/3 낮아 두 차이의 곱이 28/9로 양수입니다. 마지막 쌍 (4, 8)은 두 평균보다 모두 높아 곱이 55/9로 양수입니다. 가운데 쌍의 곱은 4/9입니다.

Sxy=∑i(xi−xˉ)(yi−yˉ)Sxy=(28+4+55)/9=29/3Sxx=14/3Syy=62/3\begin{gathered}S_{xy}=\sum_i(x_i-\bar x)(y_i-\bar y)\\S_{xy}=(28+4+55)/9=29/3\\S_{xx}=14/3\\S_{yy}=62/3\end{gathered}

Sxx와 Syy는 각각 차이의 제곱합이라 음수가 아닙니다. Sxy는 두 차이의 부호에 따라 양수·음수·0이 될 수 있습니다. 이 세 기호는 같은 n개 완전짝에서 계산합니다. 다른 가용 집합의 평균·분모를 섞으면 지금의 관계식을 그대로 쓸 수 없습니다.

Subtract paired means 7/3 and 13/3. The first pair (1, 2) has deviations −4/3 and −7/3, whose product 28/9 is positive. The final pair (4, 8) is above both means, giving 55/9. The middle product is 4/9.

Sxy=∑i(xi−xˉ)(yi−yˉ)Sxy=(28+4+55)/9=29/3Sxx=14/3Syy=62/3\begin{gathered}S_{xy}=\sum_i(x_i-\bar x)(y_i-\bar y)\\S_{xy}=(28+4+55)/9=29/3\\S_{xx}=14/3\\S_{yy}=62/3\end{gathered}

Sxx and Syy are nonnegative squared-deviation sums. Sxy may have either sign or be zero. Compute all three over the same n complete pairs; combining moments or denominators from different available subsets does not preserve these identities.

기초Foundations

27. 단위를 가진 공분산과 단위 없는 상관을 나눈다27. Distinguish covariance units from dimensionless correlation

가용 완전짝 n≥1개에서 Sxy/n은 이번 관측 집합의 기술적 공분산입니다. n≥2이면 n−1로 나누는 표본식 공분산도 따로 계산할 수 있습니다. 세 쌍의 예에서는 각각 29/9와 29/6입니다. 같은 중심 곱합을 서로 다른 약속의 분모로 나눈 것입니다.

r=SxySxxSyySxx>0,Syy>0r2=841868\begin{gathered}r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}\\S_{xx}>0,\quad S_{yy}>0\\r^2=\frac{841}{868}\end{gathered}

상관은 두 중심 제곱합이 모두 양수일 때 정의합니다. 분자는 x 단위×y 단위이고 분모도 같은 곱 단위여서 r은 단위가 없습니다. 그렇다고 몸무게가 날개 길이에 의해 어느 정도 바뀌는 인과효과나 기울기와 같은 값이 되는 것은 아닙니다.

표본식 공분산을 계산한 것만으로 실제 관측이 iid라는 조건을 확인한 것은 아닙니다. 여기서는 기록을 어떻게 요약했는지 설명하며, 표집 분포·표준오차·회귀 효과는 추가 모형을 갖춘 다른 질문입니다.

For n≥1 complete pairs, Sxy/n is a descriptive covariance of this set. With n≥2, the n−1 sample-formula covariance is another declared summary. The three-pair example gives 29/9 and 29/6. One cross-product sum is divided under different conventions.

r=SxySxxSyySxx>0,Syy>0r2=841868\begin{gathered}r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}\\S_{xx}>0,\quad S_{yy}>0\\r^2=\frac{841}{868}\end{gathered}

Correlation requires both centered square sums positive. Numerator and denominator have matching x-times-y units, making r dimensionless. It is not a causal effect or a slope describing how much mass changes when flipper length changes.

Computing the sample-formula covariance does not establish iid observations. We describe retained records; sampling distributions, standard errors and regression effects require further questions and models.

기초Foundations

28. 양의 단위 환산은 상관을 유지한다28. Positive unit conversions preserve correlation

같은 완전짝에서 x′=a+bx, y′=c+dy로 바꾸며 b와 d가 0이 아니라고 합시다. 원래 Sxx와 Syy가 양수라 r이 정의되어 있어야 합니다. 새 중심 차이는 원래 차이의 b배·d배라 중심 곱합은 bd배, 두 제곱합은 b²배·d²배입니다.

Sxy′=bdSxySxx′=b2SxxSyy′=d2Syyr′=sign⁡(bd) r\begin{gathered}S^{\prime}_{xy}=bdS_{xy}\\S^{\prime}_{xx}=b^2S_{xx}\\S^{\prime}_{yy}=d^2S_{yy}\\r^{\prime}=\operatorname{sign}(bd)\,r\end{gathered}

따라서 g을 kg으로 바꾸는 양의 배율 1/1,000은 상관을 그대로 둡니다. 공분산과 몸무게 분산의 수치는 각각 1/1,000배·1/1,000,000배가 됩니다. 한 축을 음수 배율로 뒤집으면 상관 부호가 바뀌고, 배율 0으로 상수축을 만들면 상관은 미정의입니다.

이 성질은 같은 관측쌍에 같은 아핀 변환을 적용한 경우입니다. 로그처럼 비선형 변환하거나 변환 후 결측 집합을 다르게 골랐다면 같은 주장을 그대로 적용하지 않습니다.

On identical complete pairs, transform x′=a+bx and y′=c+dy with b,d nonzero. Require positive original Sxx and Syy so r already exists. Centered deviations acquire factors b and d, giving:

Sxy′=bdSxySxx′=b2SxxSyy′=d2Syyr′=sign⁡(bd) r\begin{gathered}S^{\prime}_{xy}=bdS_{xy}\\S^{\prime}_{xx}=b^2S_{xx}\\S^{\prime}_{yy}=d^2S_{yy}\\r^{\prime}=\operatorname{sign}(bd)\,r\end{gathered}

The positive factor 1/1,000 from grams to kilograms preserves correlation. Covariance changes by 1/1,000 and mass variance by 1/1,000,000. Reversing one axis with a negative factor changes the sign; collapsing an axis with factor zero makes correlation undefined.

This applies to affine transformations of the same pairs. Nonlinear transformations such as logarithms or different post-transformation availability rules need another analysis.

기초Foundations

29. 상관 0과 상관 미정의는 다르다29. Zero correlation differs from undefined correlation

x가 모두 1이고 y가 2, 4, 6이면 Sxx=0입니다. 중심 곱합은 0이지만 상관 분모도 0이어서 r은 미정의입니다. 점들이 수직선에 놓였다는 그림과 숫자 0이라는 결과를 구별해야 합니다.

반대로 x=(−1, 0, 1), y=(1, −2, 1)은 두 축의 제곱합이 양수이면서 Sxy=0이라 r=0입니다. 이 세 쌍에서는 y=3x²−2라는 관계가 정확히 있습니다. 선형 방향의 상관이 0이라고 모든 관계가 사라지지는 않습니다.

세 쌍 중 하나를 같은 확률로 고르는 유한 확률 예로 읽어도 두 변수는 독립이 아닙니다. x=0이면 y=−2가 확실하지만 전체에서 y=−2일 비중은 1/3이기 때문입니다. 이 명시적 예는 실제 펭귄의 확률 법칙을 확인했다는 주장이 아닙니다.

If every x is one while y is 2, 4, 6, then Sxx=0. The cross-product sum is zero, but the correlation denominator is also zero: r is undefined. A vertical line of points should not be summarized as correlation zero.

For x=(−1, 0, 1), y=(1, −2, 1), both squared sums are positive and Sxy=0, so r=0. Yet y=3x²−2 holds exactly. Absence of this linear correlation does not erase every relationship.

If one of these three pairs is drawn uniformly, the variables are dependent: x=0 makes y=−2 certain, while its overall share is 1/3. This declared finite example does not establish a probability law for the actual penguins.

기초Foundations

30. 전체와 각 종 안의 상관이 모두 양수다30. The pooled and each within-species correlation are positive

날개 길이와 몸무게를 함께 아는 실제 342쌍에서 상관은 약 0.871202입니다. Adelie 151쌍·Chinstrap 68쌍·Gentoo 123쌍 안에서도 각각 약 0.468202·0.641559·0.702667로 모두 양수입니다.

실제 날개(mm)·몸무게(g) · 집단별 가용 쌍 유지
범위같은 측정 완전짝상관(근사)
전체3420.871202
Adelie1510.468202
Chinstrap680.641559
Gentoo1230.702667

전체 상관과 종별 상관이 다르다는 사실을 부호가 뒤집혔다고 표현하지 않습니다. 이 자료에서는 모두 양수이므로 그런 반전은 관측되지 않았습니다. 전체 점 구름은 종 사이 평균 위치의 차이와 각 종 안의 관계를 함께 담고 있습니다.

숫자가 크다고 날개를 길게 만드는 조치가 몸무게를 그 비율만큼 늘린다고 결론 내리지 않습니다. 개체 크기·종·성별·관측 범위 등 다른 정보가 관련될 수 있습니다. 다음 분해는 인과효과 대신 지금 점들의 중심 곱합을 대수적으로 설명합니다.

Across 342 actual complete flipper/mass pairs, correlation is about 0.871202. Within 151 Adelie, 68 Chinstrap and 123 Gentoo pairs it is about 0.468202, 0.641559 and 0.702667 respectively: all positive.

Actual flipper (mm) and mass (g) pairs
ScopeSame complete pairsCorrelation (approx.)
All3420.871202
Adelie1510.468202
Chinstrap680.641559
Gentoo1230.702667

Different pooled and within-group correlations do not automatically mean a sign reversal. No reversal occurs here. The pooled cloud includes both differences in species mean locations and relationships inside each species.

A large correlation does not identify the effect of an intervention that lengthens flippers. Size, species, sex and observational coverage may be relevant. The next decomposition explains the existing centered products algebraically rather than estimating a causal effect.

기초Foundations

31. 짧은 소수와 수학적으로 0인 값을 구별한다31. Distinguish a short display from a mathematical zero

정확한 수가 1/3이어도 화면에는 0.333333처럼 짧게 보일 수 있습니다. 아주 작은 양수는 보통 소수 표현의 범위보다 작아 0처럼 보일 수도 있습니다. 이것은 가용 값이 실제 0이었다는 뜻과 다릅니다. 실습은 정확 분수·근사 소수·표시 범위 상태를 함께 반환합니다.

상관의 제곱이 아주 작으면 그 제곱의 보통 소수 표시는 0이지만 제곱근인 상관은 여전히 표시할 수 있는 크기일 수 있습니다. 따라서 소수 0 하나만 보고 중심 곱합이 정확히 0이라고 결론 내리지 않습니다. 정의된 작은 값과 0분모로 미정의인 경우도 따로 읽습니다.

정확 분수 산술이 원 관측의 측정 정밀도를 높이지는 않습니다. 실제 정수 g·mm 측정과 입력된 십진수의 산술을 보존하는 기능입니다. 표시 자릿수를 늘리는 것과 더 정밀한 측정을 새로 얻는 것은 다릅니다.

Exact 1/3 can have a short display such as 0.333333. A sufficiently small positive value can even display as zero in ordinary floating-point representation. That differs from an observed zero. The lab retains exact fractions, approximate displays and display-range flags.

A very small squared correlation can round to zero even when its square root remains representable. A displayed zero alone therefore does not establish an exactly zero cross-product. Also distinguish a defined tiny value from an undefined zero-denominator correlation.

Exact fraction arithmetic does not improve source measurement precision. It preserves arithmetic on recorded integer grams, millimetres and supplied decimals. More display places are not new measurements.

기초Foundations

32. 실습 D · 같은 쌍과 0분모를 확인한다32. Lab D · Inspect shared pairs and zero denominators

같은 길이의 x·y 목록을 넣고 원위치가 같은 완전짝을 먼저 찾습니다. 세 쌍 예의 평균과 Sxx·Syy·Sxy를 손으로 계산한 뒤 출력에 비교하세요. x를 모두 같은 값으로 바꾸면 공분산 0과 상관 미정의가 어떻게 구별되는지도 봅니다.

한쪽만 미가용으로 만든 행은 다른 축의 가용 단독값으로 따로 짝지어지지 않습니다. 같은 쌍의 단위를 양수 배율로 바꾸고 상관은 유지되지만 공분산 단위와 수치는 달라짐을 설명하세요. 새 입력의 계산과 아래 고정 실제 Python/R 기록은 별도 경로입니다.

Enter equal-length x and y arrays and first locate complete pairs at shared original positions. Recalculate both means and Sxx, Syy, Sxy for the three-pair toy example. Then make x constant and distinguish covariance zero from undefined correlation.

A missing value on one side does not cause independent re-pairing of the remaining marginal values. Apply a positive unit conversion to the same pairs and explain why correlation stays fixed while covariance changes. Live inputs and the actual fixed Python/R records use separate calculation paths.

기초Foundations

33. 두 집단의 안과 사이를 손으로 나눈다33. Separate within-group and between-group products by hand

설명용 네 쌍을 A: (1, 2), (2, 4), B: (4, 3), (5, 6)으로 둡니다. 전체 평균은 x=3, y=15/4입니다. A의 평균은 (3/2, 3), B의 평균은 (9/2, 9/2)입니다. 먼저 각 집단 평균에서 뺀 차이의 곱을 합하면 A는 1, B는 3/2로 집단 안 합은 5/2입니다.

설명용 같은 네 쌍 · 서로 겹치지 않는 두 집단
집단쌍x 평균y 평균안 중심 곱합
A(1,2), (2,4)3/231
B(4,3), (5,6)9/29/23/2

집단 평균이 전체 평균에서 떨어진 정도도 곱합니다. A는 2×(−3/2)×(−3/4)=9/4이고 B도 9/4라 집단 사이 합은 9/2입니다. 전체에서 직접 계산한 중심 곱합 7은 5/2+9/2와 같습니다. 한 쌍을 두 번 세거나 다른 쌍을 빼지 않았기 때문에 연결됩니다.

Use four toy pairs: A has (1, 2), (2, 4); B has (4, 3), (5, 6). Overall means are x=3 and y=15/4. Group means are (3/2, 3) and (9/2, 9/2). Centering within each group gives cross-product sums one and 3/2, totaling 5/2.

Four identical toy pairs partitioned into two groups
GroupPairsMean xMean yWithin cross product
A(1, 2), (2, 4)3/231
B(4, 3), (5, 6)9/29/23/2

Products of group-mean deviations add another component. A contributes 2×(−3/2)×(−3/4)=9/4, and B contributes 9/4 too. The between-group total 9/2 plus within total 5/2 equals the directly calculated overall cross product seven. Every pair remains in exactly one group.

심화Extension

34. 집단 평균을 더했다 빼면 교차항이 사라진다34. Add and subtract group means to cancel mixed terms

선택 심화입니다. 가용 완전짝 N≥1개를 서로 겹치지 않는 비어 있지 않은 집단으로 나누고 n_g를 집단 g의 쌍 수라고 둡니다. 각 집단 안 평균을 x̄_g, ȳ_g, 전체 평균을 x̄, ȳ라고 씁니다. 집단 안 차이를 δᵢ=xᵢ−x̄_g, ηᵢ=yᵢ−ȳ_g로, 집단 평균 차이를 Δ_g=x̄_g−x̄, Γ_g=ȳ_g−ȳ로 정의합니다.

xi−xˉ=δi+Δgyi−yˉ=ηi+Γg∑i∈gδi=0∑i∈gηi=0\begin{gathered}x_i-\bar x=\delta_i+\Delta_g\\y_i-\bar y=\eta_i+\Gamma_g\\\sum_{i\in g}\delta_i=0\\\sum_{i\in g}\eta_i=0\end{gathered}

두 차이의 곱을 전개하면 δη, δΓ, Δη, ΔΓ 네 항입니다. 같은 집단에서는 Δ와 Γ가 상수이고 δ·η의 합이 각각 0이어서 가운데 두 항의 합이 사라집니다. 남은 안 항과 사이 항을 Wxy, Bxy라고 이름 붙이면 다음 식입니다.

Wxy=∑g∑i∈gδiηiBxy=∑gngΔgΓgSxy=Wxy+Bxy\begin{gathered}W_{xy}=\sum_g\sum_{i\in g}\delta_i\eta_i\\B_{xy}=\sum_g n_g\Delta_g\Gamma_g\\S_{xy}=W_{xy}+B_{xy}\end{gathered}

확률적 독립이나 정규성은 이 유한 합의 전개에 필요하지 않습니다. 필요한 것은 같은 쌍, 같은 평균 정의, 겹치지 않는 전체 집단 분할입니다.

Optional extension: partition N≥1 available complete pairs into nonempty disjoint groups, with n_g pairs in group g. Define group means x̄_g, ȳ_g and overall means x̄, ȳ. Let δᵢ=xᵢ−x̄_g and ηᵢ=yᵢ−ȳ_g; let Δ_g=x̄_g−x̄ and Γ_g=ȳ_g−ȳ.

xi−xˉ=δi+Δgyi−yˉ=ηi+Γg∑i∈gδi=0∑i∈gηi=0\begin{gathered}x_i-\bar x=\delta_i+\Delta_g\\y_i-\bar y=\eta_i+\Gamma_g\\\sum_{i\in g}\delta_i=0\\\sum_{i\in g}\eta_i=0\end{gathered}

Expanding the product gives δη, δΓ, Δη and ΔΓ. The middle two sums vanish because group-mean deviations are constant within a group and the centered residuals sum to zero. Denote the remaining within and between terms by:

Wxy=∑g∑i∈gδiηiBxy=∑gngΔgΓgSxy=Wxy+Bxy\begin{gathered}W_{xy}=\sum_g\sum_{i\in g}\delta_i\eta_i\\B_{xy}=\sum_g n_g\Delta_g\Gamma_g\\S_{xy}=W_{xy}+B_{xy}\end{gathered}

This finite identity does not require independence or normality. It requires the same pairs, consistent means and a disjoint partition covering all those pairs.

기초Foundations

35. 제곱합도 안과 사이로 나뉜다35. Square sums also split into within and between terms

같은 네 쌍에서 x 중심 제곱합은 10입니다. 집단 안에서는 A가 1/2, B가 1/2라 합 1이고, 집단 사이 항은 2×(−3/2)²+2×(3/2)²=9입니다. 따라서 10=1+9입니다. y 중심 제곱합은 35/4=13/2+9/4로 나뉩니다.

Sxx=Wxx+BxxSyy=Wyy+Byy10=1+935/4=13/2+9/4\begin{gathered}S_{xx}=W_{xx}+B_{xx}\\S_{yy}=W_{yy}+B_{yy}\\10=1+9\\35/4=13/2+9/4\end{gathered}

집단 안 중심 차이와 집단 평균 차이를 제곱해 전개하면 앞의 중심 곱합과 같은 이유로 교차항이 사라집니다. 제곱합의 사이 항은 음수가 아니지만, 서로 다른 두 변수의 사이 곱합 Bxy는 음수가 될 수도 있습니다.

이 분해의 각 부분은 전체와 같은 관측 쌍을 사용한 기술적 산술입니다. 집단 간 차이를 나누었다고 특정 집단 특성의 인과효과를 제거하거나 추정한 것은 아닙니다.

For the same four pairs, the overall x square sum is ten. The two within sums are 1/2 each, totaling one. The between term is 2×(−3/2)²+2×(3/2)²=9, giving 10=1+9. The y square sum splits as 35/4=13/2+9/4.

Sxx=Wxx+BxxSyy=Wyy+Byy10=1+935/4=13/2+9/4\begin{gathered}S_{xx}=W_{xx}+B_{xx}\\S_{yy}=W_{yy}+B_{yy}\\10=1+9\\35/4=13/2+9/4\end{gathered}

Expanding centered squares cancels the mixed term for the same group-mean reason. Between square sums are nonnegative, while the between cross product Bxy may have either sign.

Every component uses the same observational pairs. Dividing a difference into group components does not by itself remove or estimate the causal effect of a group characteristic.

기초Foundations

36. 공분산의 합성과 상관의 평균은 다르다36. Pooling covariance differs from averaging correlations

가용 N≥1개의 같은 쌍을 비어 있지 않은 집단으로 나눈 경우 Sxy/N을 생각합니다. 각 집단의 기술적 공분산을 c_g=Sxy,g/n_g로 정의하면 전체의 안 성분은 n_g/N을 무게로 한 c_g의 합입니다. 여기에 집단 평균의 사이 성분이 더해집니다.

cg=Sxy,g/ngSxy/N=∑g(ng/N)cg+∑g(ng/N)ΔgΓg\begin{gathered}c_g=S_{xy,g}/n_g\\S_{xy}/N=\sum_g(n_g/N)c_g\\\quad+\sum_g(n_g/N)\Delta_g\Gamma_g\end{gathered}

집단별 r_g는 각 집단의 서로 다른 제곱합으로 나눈 수입니다. 이를 그냥 평균내면 전체 분자·분모를 복원하지 못합니다. 집단 안의 퍼짐이 0이면 r_g는 미정의일 수도 있지만 그 집단의 중심 곱합 0은 전체 합에 정상적으로 들어갈 수 있습니다.

또한 위 c_g는 n_g 분모입니다. n_g−1 분모의 표본식 공분산을 같은 기호로 바꾸어 넣으면 무게도 다시 유도해야 합니다. 특히 한 쌍 집단에서는 후자의 분모가 0입니다.

Partition the same N≥1 complete pairs into nonempty groups. Define group descriptive covariance c_g=Sxy,g/n_g. Dividing the cross-product identity by N weights these within covariances by n_g/N and adds the group-mean component:

cg=Sxy,g/ngSxy/N=∑g(ng/N)cg+∑g(ng/N)ΔgΓg\begin{gathered}c_g=S_{xy,g}/n_g\\S_{xy}/N=\sum_g(n_g/N)c_g\\\quad+\sum_g(n_g/N)\Delta_g\Gamma_g\end{gathered}

Each group correlation uses its own square-sum denominator. Simply averaging group correlations cannot reconstruct the pooled numerator and denominator. A constant group may have undefined r_g while its zero centered cross product remains a valid contribution.

These c_g use n_g denominators. Substituting the n_g−1 sample-formula covariance requires a different derivation of weights. A singleton group makes that latter denominator zero.

기초Foundations

37. 집단 표식이 없어도 아는 측정 쌍은 유지한다37. Retain known measurement pairs with unavailable group labels

네 설명용 쌍은 그대로 두고 집단 표식만 A, 미가용, B, B로 바꿉니다. 집단 표식을 아는 행만 고르면 한 쌍이 빠져 전체 중심도 바뀝니다. 지금은 원래 네 쌍의 분해를 보려 하므로 미가용 표식의 한 쌍을 별도 통으로 보존합니다.

그 통은 새로운 생물학적 집단을 관측했다는 뜻이 아닙니다. 알 수 없는 집단 표식의 기록을 산술에서 어디에 두었는지 표시한 것입니다. 두 한 쌍 집단의 안 곱합은 0이고 B의 안 곱합은 3/2입니다. 전체 7은 안 3/2와 사이 11/2로 분해됩니다.

어떤 규칙이 적절한지는 질문에 달려 있습니다. 앞의 두 범주 교차표는 두 표식이 모두 가용한 집합을 다뤘고, 여기서는 두 측정이 가용한 같은 쌍을 유지합니다. 두 규칙을 혼합한 뒤 같은 분해라고 주장하지 않습니다.

Keep the four toy measurement pairs but change group labels to A, unavailable, B, B. Selecting only known group labels would remove one pair and change the overall means. To decompose the original four pairs, retain that record in an explicitly unavailable-label bucket.

The bucket is an accounting choice, not an observed new biological group. Both singleton groups have within cross product zero; B contributes 3/2. Overall seven now splits into within 3/2 and between 11/2.

The rule depends on the question. The earlier categorical table used jointly known labels; this decomposition keeps the same available measurement pairs. Do not combine incompatible subset rules and call the result the same identity.

기초Foundations

38. 실제 전체 곱합을 같은 342쌍에서 나눈다38. Decompose the actual cross product on the same 342 pairs

실제 날개·몸무게 342쌍의 전체 중심 곱합은 약 3,350,125.877193mm·g입니다. 종별 중심을 사용한 안 항은 약 608,678.320601mm·g, 종 평균과 전체 평균의 사이 항은 약 2,741,447.556592mm·g입니다. 정확한 원분수에서 전체=안+사이가 성립합니다.

실제 같은 342쌍 · 소수 표시는 근사
성분중심 곱합(mm·g), 근사
전체3,350,125.877193
종 안608,678.320601
종 평균 사이2,741,447.556592

세 소수는 독립적으로 짧게 표시했으므로 마지막 자릿수에서 합이 조금 다르게 보일 수 있습니다. 원분수와 가용 원행 번호를 펼쳐 검산할 수 있게 합니다. 이 수치는 각 종이 무작위로 배정되었다거나 종을 바꾸는 조치의 효과를 측정했다는 뜻이 아닙니다.

성별로 집단을 다시 나누면 집단 안·사이 값은 달라질 수 있지만 같은 측정 342쌍을 모두 유지하면 전체 중심 곱합은 그대로여야 합니다. 미가용 성별의 9개 측정 쌍도 별도 집단으로 남깁니다.

The actual 342 flipper/mass pairs have overall centered cross product about 3,350,125.877193 mm·g. Within species contributes about 608,678.320601 mm·g, and species mean locations contribute about 2,741,447.556592 mm·g. Exact fractions satisfy total=within+between.

Identical 342 actual pairs · decimals approximate
ComponentCentered cross product (mm·g), approx.
Total3,350,125.877193
Within species608,678.320601
Between species means2,741,447.556592

Independent decimal formatting can introduce a last-place sum discrepancy, so retain the exact fractions and original pair positions for checking. These components do not establish randomized species assignment or an intervention effect of changing species.

Regrouping by recorded sex can change within/between terms. Keeping all 342 measurement pairs must preserve the total cross product, including nine measured pairs whose sex label is unavailable.

기초Foundations

39. 관측한 관계를 정확한 문장으로 쓴다39. Write an accurate sentence about the observed association

“이 사본에서 날개 길이와 몸무게가 함께 가용한 342쌍의 상관은 약 0.8712였다. 종별 가용 쌍에서도 모두 양수였으며, 전체 중심 곱합에는 종 안의 관계와 종 평균 사이의 차이가 함께 들어 있다.”처럼 결과와 계산 집합을 한 문장에 붙일 수 있습니다.

“종별 상관보다 전체 상관이 더 크니 종별 관계는 모두 음수다”라는 문장은 이 표의 실제 숫자와 다릅니다. “날개 1mm 증가가 몸무게를 몇 g 늘린다”라는 문장도 상관 하나에서 나오지 않습니다. 표에 직접 나타난 수, 대수적 분해, 추가 설계가 필요한 질문을 구별해 적습니다.

더 알아보고 싶은 질문은 남길 수 있습니다. 예컨대 같은 종·기록된 성별·연도 안에서 점들의 관계를 비교할 수 있지만, 집단이 작거나 한 축이 상수인 경우 가용 수와 미정의 상태도 함께 보고해야 합니다.

A supported sentence is: “In this retained copy, correlation among 342 available flipper/mass pairs was about 0.8712. All within-species correlations were positive; the overall cross product contains both within-species relationships and differences between species mean locations.”

“The pooled correlation is larger, therefore every species correlation is negative” contradicts the actual values. Nor does one correlation imply grams caused by a one-millimetre intervention. Separate observed summaries, algebraic decompositions and questions requiring another design.

Further exploratory questions can be recorded. Compare points within species, recorded sex or study year, while also reporting available counts and undefined states in small or constant subsets.

기초Foundations

40. 실습 E · 같은 쌍을 다른 집단으로 나눈다40. Lab E · Partition the same pairs in different ways

x·y·집단 표식 목록의 길이를 같게 입력합니다. 네 쌍 예에서 전체 중심 곱합 7, 안 5/2, 사이 9/2를 먼저 손으로 확인한 뒤 결과를 비교하세요. 집단을 다시 나누면 전체는 유지되면서 안과 사이가 어떻게 바뀌는지 봅니다.

집단 표식 하나를 미가용으로 바꾸어도 x·y가 가용하면 그 쌍은 별도 통에 남습니다. 모두 같은 집단이면 사이 항은 0이고 안 항이 전체와 같아야 합니다. 각 쌍이 따로 한 집단이면 안 항이 0입니다. 집단별 상관을 평균내어 이 항등식을 대신하지 않습니다.

Enter x, y and group arrays of equal length. First verify total cross product seven, within 5/2 and between 9/2 in the four-pair example. Regroup the pairs and inspect changes in the two components while the total remains fixed.

A missing group label keeps an available x/y pair in its own bucket. One common group gives between zero and within equal to total; singleton groups give within zero. Averaging group correlations is not a substitute for this identity.

기초Foundations

41. 작은 보고서는 질문·분모·값·해석을 연결한다41. Connect question, denominator, result and interpretation in a short report

보고서 첫 문장을 “어떤 자료를 분석했다”보다 구체적으로 씁니다. 예를 들어 “보관된 2007~2009년 세 종·세 섬의 몸무게 분포와 날개 길이의 관측 관계를 비교했다”라고 적고 원파일·여덟 열·단위를 연결합니다.

다음에는 전체 344행, 미가용 셀 19개, 몸무게 가용 342개와 모든 열 완전 333개를 구별합니다. 그 뒤 전체 몸무게 사분위수, 종별 비교, 질의 표식 두 원행, 같은 측정 쌍의 상관과 분해를 필요한 표·그림으로 보여 줍니다. 독자가 한 숫자의 분자와 분모를 다시 찾을 수 있어야 합니다.

마지막에는 관측 범위를 넘어 확인하려는 질문을 적습니다. 추가 관측·측정 확인·표집이나 인과 설계가 무엇을 더 알려 줄지 설명하면 됩니다. 아직 관측하지 않은 경로나 개체 표식을 만들어 보고서를 완성하지 않습니다.

Make the opening question more precise than “we analyzed some data”: compare the mass distribution and observed flipper relationship across the three recorded species and islands in 2007–2009, linking file, fields and units.

Distinguish 344 rows, nineteen unavailable cells, 342 available masses and 333 all-field complete records. Then present the relevant quartiles, species comparisons, flagged source positions, complete-pair correlations and decomposition. Readers should be able to recover each numerator and denominator.

End with questions extending beyond current coverage and the additional measurement, sampling or causal design they would need. Do not complete a report by inventing unobserved paths or specimen identifiers.

기초Foundations

42. type7와 기본 상자그림의 힌지는 다를 수 있다42. Type 7 quartiles can differ from default boxplot hinges

같은 1, 2, 4, 10에 R의 명시적 quantile(type=7)을 적용하면 Q₁=1.75, Q₃=5.5입니다. 반면 R grDevices::boxplot.stats의 아래·위 힌지는 이 예에서 1.5와 7입니다. 함수가 정한 요약 규칙이 달라서 생긴 차이입니다.

따라서 우리가 type7과 1.5IQR로 계산한 질의 경계가 모든 소프트웨어의 기본 상자그림과 같다고 하지 않습니다. 사분위수 규칙, 힌지, 수염의 끝과 경계선, 표식의 엄격 부등호를 각각 확인합니다. 경계선은 산술로 정한 수이고 수염 끝은 그 안의 관측값으로 정하는 구현일 수 있습니다.

R 공식 boxplot.stats 문서의 힌지와 반환 stats 설명만 이 비교에 사용합니다. 이 장은 상자그림의 notch를 만들어 알려진 유한 프레임 평균의 신뢰구간이라고 해석하지 않습니다.

For 1, 2, 4, 10, explicit R quantile(type=7) gives Q₁=1.75 and Q₃=5.5. R grDevices::boxplot.stats instead gives hinges 1.5 and 7 in this example. The functions use different summary conventions.

Our explicit type 7/1.5IQR fences therefore need not match every software default boxplot. Check quartiles, hinges, whisker endpoints, fence values and strict flag comparisons separately. A fence is a calculated number; a whisker endpoint may be an observed value inside it.

Use the official boxplot.stats discussion of hinges and returned stats for this comparison. This chapter does not construct notches and call them confidence intervals for a known finite-frame mean.

기초Foundations

43. 짧은 설명 코드와 실제 고정 실행을 구별한다43. Separate short explanation code from fixed actual executions

다음 Python 설명 코드는 정렬 위치와 분수를 직접 계산해 7/4 11/2를 출력합니다. 같은 결과를 R에서 type7로 계산하면 1.75 5.50이고 뒤의 힌지 출력은 1.5 7.0입니다. 두 언어가 모든 수를 같은 내부 표현으로 계산한다는 뜻은 아닙니다.

from fractions import Fraction as F
x = sorted(map(F, ["1", "2", "4", "10"]))
def type7(p):
    h = (len(x) - 1) * p
    j = h.numerator // h.denominator
    k = min(j + 1, len(x) - 1)
    return x[j] + (h - j) * (x[k] - x[j])
print(type7(F(1, 4)), type7(F(3, 4)))
options(digits=17, warn=1)
x <- c(1, 2, 4, 10)
print(quantile(x, c(.25, .75), type=7, names=FALSE, fuzz=0))
print(grDevices::boxplot.stats(x)$stats[c(2, 4)])

본문 아래의 고정 참조 묶음은 별도의 실제 Python/base-R 32개 프로그램과 30개 SVG를 포함합니다. 가용값이 없는 두 언어 참조는 그림을 만들지 않습니다. 브라우저가 이 Python/R 코드를 실행하는 것이 아니라 새 입력은 JavaScript로 계산합니다.

실제 실행 환경·R 표시 자릿수 17·경고 설정·시간대·입력 지문·다운로드 코드·원 출력은 참조 패널에 남습니다. 이 설명 코드 실행 수와 고정 프로그램 수는 따로 셉니다.

The Python explanation below directly computes interpolation fractions and prints 7/4 11/2. Explicit type 7 in R prints 1.75 5.50, followed by hinge values 1.5 7.0. Agreement here does not mean that both languages internally represent every number in the same way.

from fractions import Fraction as F
x = sorted(map(F, ["1", "2", "4", "10"]))
def type7(p):
    h = (len(x) - 1) * p
    j = h.numerator // h.denominator
    k = min(j + 1, len(x) - 1)
    return x[j] + (h - j) * (x[k] - x[j])
print(type7(F(1, 4)), type7(F(3, 4)))
options(digits=17, warn=1)
x <- c(1, 2, 4, 10)
print(quantile(x, c(.25, .75), type=7, names=FALSE, fuzz=0))
print(grDevices::boxplot.stats(x)$stats[c(2, 4)])

The separate fixed reference collection contains 32 actual Python/base-R programs and 30 SVGs. The two language references with no available values produce no graphic. The browser does not execute these Python/R programs; new live inputs use JavaScript.

Reference panels retain the actual environment, R digits 17, warning settings, timezone, input hashes, downloadable code and original output. Explanation-program executions and the fixed reference program count are separate.

기초Foundations

44. 분해를 검산할 때 같은 집합인지 먼저 확인한다44. Check identical pair sets before checking a decomposition

전체를 342쌍으로 계산하고 집단별 항은 성별이 알려진 333쌍에서만 계산하면 서로 같은 분해가 아닙니다. 집단 분할에 들어가지 않은 9쌍이 있기 때문입니다. 정확한 프로그램도 이런 다른 입력 집합을 사용하면 전체=안+사이 검사를 통과할 이유가 없습니다.

검산 순서는 원위치 목록→같은 완전짝→각 쌍의 집단 하나→같은 평균 정의→합의 관계입니다. 집단이 겹치면 어떤 쌍이 두 번 들어가고, 집단이 빠지면 어떤 쌍이 합에서 사라지는지 작은 네 쌍 표로 다시 표시합니다.

가용한 N≥1쌍을 비어 있지 않은 집단으로 정확히 나누면 항등식은 유한 합의 산술로 성립합니다. 이 사실과 기록된 집단 특성이 모든 교란을 통제했다는 통계적·인과적 조건은 다른 주장입니다.

Computing a total over 342 pairs but group components over only 333 known-sex pairs does not form the same decomposition. Nine measured pairs are outside those groups. Even exact arithmetic has no reason to reconcile mismatched input sets.

Check original positions, identical complete pairs, one group per pair, consistent means and then the sum identity. Use the four-pair toy table to trace a duplicated pair under overlapping groups or an omitted pair under incomplete coverage.

A complete disjoint partition of N≥1 available pairs satisfies the finite-sum identity. That does not establish that recorded grouping characteristics control every statistical or causal confounder.

심화Extension

45. 제곱합이 상관의 절댓값을 제한한다45. Square sums bound the absolute correlation

선택 심화입니다. 같은 유한 완전짝에서 Sxx>0, Syy>0라고 둡니다. 모든 실수 t에서 제곱의 합은 음수가 아닙니다. y의 중심 차이에서 t배의 x 중심 차이를 빼서 다음 식을 만듭니다.

ai=xi−xˉ,bi=yi−yˉ0≤∑i(bi−tai)2=Syy−2tSxy+t2Sxx\begin{gathered}a_i=x_i-\bar x,\quad b_i=y_i-\bar y\\0\le\sum_i(b_i-ta_i)^2\\=S_{yy}-2tS_{xy}+t^2S_{xx}\end{gathered}

t=Sxy/Sxx를 대입하면 아래 부등식을 얻습니다. 양수 분모로 나누면 r²≤1, 즉 |r|≤1입니다. 이 증명은 분모 양수 조건을 사용하므로 상수축의 0/0을 상관 0으로 정당화하지 않습니다.

0≤Syy−Sxy2/SxxSxy2≤SxxSyyr2≤1\begin{gathered}0\le S_{yy}-S_{xy}^2/S_{xx}\\S_{xy}^2\le S_{xx}S_{yy}\\r^2\le1\end{gathered}

등호는 모든 중심 y가 같은 t배의 중심 x일 때 성립합니다. 점들이 한 직선에 정확히 놓였다는 유한 기하 조건이며 한 변수를 개입해 움직이는 인과적 조건은 아닙니다.

Optional extension: assume positive Sxx and Syy on the same finite complete pairs. For every real t, a sum of squared residuals is nonnegative:

ai=xi−xˉ,bi=yi−yˉ0≤∑i(bi−tai)2=Syy−2tSxy+t2Sxx\begin{gathered}a_i=x_i-\bar x,\quad b_i=y_i-\bar y\\0\le\sum_i(b_i-ta_i)^2\\=S_{yy}-2tS_{xy}+t^2S_{xx}\end{gathered}

Substitute t=Sxy/Sxx. Dividing by positive denominators gives r²≤1 and hence |r|≤1. The argument requires positive square sums; it does not turn a constant-axis 0/0 into correlation zero.

0≤Syy−Sxy2/SxxSxy2≤SxxSyyr2≤1\begin{gathered}0\le S_{yy}-S_{xy}^2/S_{xx}\\S_{xy}^2\le S_{xx}S_{yy}\\r^2\le1\end{gathered}

Equality holds when every centered y is the same multiple of centered x. That is a finite geometric line condition, not an intervention claim.

기초Foundations

46. 실습 F · 같은 원행에서 탐색 보고서를 만든다46. Lab F · Build an exploratory report from retained source rows

현장 범위 보기에서는 종·섬·연도·기록된 성별 조건을 선택하고 자료사전과 교차표를 확인합니다. 펭귄 기록 보기에서는 몸무게 또는 다른 측정량의 분포와 선택 원행을 함께 읽습니다. 원행 선택이 현재 필터 집합 밖이면 그 사실도 표시하며 다른 행으로 대체하지 않습니다.

연구팀 보기에서는 같은 날개·몸무게 쌍의 상관과 집단 분해를 비교합니다. 종을 성별이나 연도로 바꾸어도 같은 필터 안의 측정 완전짝은 유지되어야 합니다. 좁힌 집합이 비거나 한 축이 상수가 되면 미정의 상태를 결과로 읽고 원 자료를 채우거나 조용히 버리지 않습니다.

먼저 필요한 질문과 분모를 말한 뒤 표와 그림을 엽니다. 새 집계·선택 계산은 보관된 원행에 대한 브라우저 JavaScript입니다. 실제 패키지 설치·원 연구 현장 재측정·미지 모집단의 추론을 수행한 것으로 표시하지 않습니다.

In fieldwork scope, filter species, island, study year and recorded sex, then inspect the dictionary and cross-table. In the penguin-record view, compare a chosen measurement distribution with one original record. If that record lies outside current filters, show this rather than substituting another row.

The research-team view compares correlation and group decomposition on identical flipper/mass pairs. Changing the grouping from species to sex or year preserves the complete measurement-pair set within the chosen filters. Empty or constant subsets retain their undefined quantities without silent imputation or removal.

State question and denominator before opening the table and plot. New aggregation uses browser JavaScript over retained source rows. It does not install packages, repeat field measurements or infer an unspecified wider population.

기초Foundations

47. 현장·펭귄 기록·연구팀의 실제 사례를 읽는다47. Read the actual fieldwork, penguin-record and research-team cases

관측 범위 · 남극의 섬·연도·종을 먼저 읽기

이번 종합 사례는 사람이나 기업으로 꾸민 예가 아니라 실제 펭귄 관측입니다. 보관한 palmerpenguins의 간소화 CSV에는 344개 펭귄 기록과 8개 변수가 있습니다. 자료 설명은 2007~2009년 남극 Palmer 군도의 세 섬에서 관측된 세 종의 성체 먹이활동 펭귄 측정을 다룹니다. 원 측정·공개는 Kristen Gorman과 Palmer Station LTER, 교육용 자료 정리는 Allison Horst·Alison Hill·Kristen Gorman의 기여입니다. 344×8 간소화 파일을 읽었으며 별도의 17변수 penguins_raw를 내려받아 읽었다고 하지 않습니다.

첫 질문은 “어느 종이 더 큰가?”보다 “어떤 기록이 어떤 범위에서 모였는가?”입니다. 이 자료에 세 종이 있다는 사실은 남극 전체에 세 종만 있다는 뜻이 아닙니다. 섬과 종의 조합 중 0개인 셀도 그대로 표시합니다. 예를 들어 이 보관 자료에서 Chinstrap은 Dream에만, Gentoo는 Biscoe에만 기록돼 있습니다. 이는 이 표의 관측 구성이지 다른 섬에서 그 종이 생물학적으로 살 수 없다는 결론이 아닙니다. 표본 추출 확률을 알아냈거나 전 세계 펭귄을 무작위 표집했다고 가정하지 않습니다.

실제 종×섬의 관측 수 · 0은 이 보관 자료에 기록 없음
종BiscoeDreamTorgersen합계
Adelie445652152
Chinstrap068068
Gentoo12400124
실제 종×연도의 관측 구성 · 같은 개체를 추적한 시계열 아님
종200720082009
Adelie505052
Chinstrap261824
Gentoo344644

연도 열이 있다는 이유만으로 원행 1을 2008년·2009년 다른 원행과 같은 개체로 연결하지 않습니다. 이 간소화 파일에는 영구 개체 식별자가 없습니다. source_row_id는 원 파일의 위치를 추적하는 키이며 개체의 독립성이나 재측정을 증명하지 않습니다. 섬과 종 구성이 겹치는 것을 알았으므로, 이 자료만으로 섬 환경과 종 특성의 효과를 자동으로 분리할 수도 없습니다. 탐색 보고서는 자료가 말할 수 있는 범위와 아직 필요한 관측을 함께 적습니다.

먼저 생각한 뒤 풀이 보기: Gentoo가 Biscoe에만 있으니 Biscoe가 몸무게를 늘렸다고 결론 내릴 수 있나요?

관측된 종·섬 구성이 결합돼 있어 그 결론은 식별되지 않습니다. 측정값을 요약할 수는 있지만 섬의 인과효과를 알려면 비교 가능한 설계와 추가 가정·자료가 필요합니다. 없는 셀을 가상의 펭귄으로 채워 비교하지 않습니다.

먼저 생각한 뒤 풀이 보기: 연도 순서로 선을 이으면 한 펭귄의 성장곡선이 되나요?

세 해의 서로 다른 기록 구성을 개인 성장으로 바꾸지 않습니다. 같은 개체라는 식별 근거와 재측정 설계가 별도로 필요합니다. 종별 연도 평균을 그리더라도 관측 집단의 요약이라고 명시합니다.

개체 측정 · 자료사전·결측·단위와 질문별 분모

개체는 실제 펭귄입니다. 종·섬·기록된 성별은 범주이고, 부리 길이·부리 깊이·날개 길이는 mm, 몸무게는 g 단위입니다. year는 조사 연도입니다. 종에 숫자를 붙이거나 연도를 평균낼 수 있다는 사실만으로 생물학적 크기나 성장 속도와 같은 의미를 얻는 것은 아닙니다. 첫 원행의 몸무게 3,750g을 3,750kg으로 읽지 않고 정확히 3.75kg으로 바꿉니다. 원 단위와 변환한 단위를 서로 다른 변수로 추적합니다.

원 8변수의 실제 가용성 · 행과 필드의 결측을 구별
원 필드뜻·단위가용 필드 수가용하지 않은 필드 수
species종 · 범주3440
island섬 · 범주3440
bill_length_mm부리 길이 · mm3422
bill_depth_mm부리 깊이 · mm3422
flipper_length_mm날개 길이 · mm3422
body_mass_g몸무게 · g3422
sex기록된 성별 · 범주33311
year조사 연도3440

가용하지 않은 필드는 모두 19개지만 이를 “펭귄 19마리가 빠졌다”고 쓰면 틀립니다. 전체 344원행 중 모든 8필드가 가용한 행은 333개입니다. 날개 길이와 몸무게 두 값이 가용한 행은 342개이고, 성별이 없지만 몸무게는 있는 행도 9개 있습니다. 성별을 쓰지 않는 몸무게 질문에서 성별 결측 때문에 이 9개까지 버릴 이유가 자동으로 생기지 않습니다. 반대로 성별 비교에서는 11개 성별 결측을 임의의 암수로 채우지 않습니다.

종별 실제 몸무게 요약 · g, 소수 반올림
종원행 수몸무게 가용평균type7 중앙값type7 IQR
Adelie1521513,700.6623,700.000650.000
Chinstrap68683,733.0883,700.000462.500
Gentoo1241235,076.0165,000.000800.000

사분위수는 계산법을 정해야 재현됩니다. 여기서는 정렬한 n개 값에 type7 선형 보간을 명시했습니다. 위치 h=(n−1)p를 0부터 센 정렬 인덱스로 해석하고 이웃 값 사이를 보간합니다. 이는 모든 교과서와 소프트웨어의 사분위수 정의가 반드시 같다는 뜻이 아닙니다. R 재현에서는 quantile(..., type=7)을 직접 지정하고 Python에서는 정확한 분수 보간을 구현해 비교합니다. 기본 boxplot의 내부 경첩 계산이 이 정의와 같다고 조용히 가정하지 않습니다.

IQR=Q.75−Q.25L=Q.25−1.5IQRU=Q.75+1.5IQR\begin{aligned}\mathrm{IQR}&=Q_{.75}-Q_{.25}\\L&=Q_{.25}-1.5\mathrm{IQR}\\U&=Q_{.75}+1.5\mathrm{IQR}\end{aligned}

종별 type7 사분위수에 1.5IQR 규칙을 붙이면 Chinstrap 몸무게 2개가 경계 밖으로 표시되고 다른 두 종은 0개입니다. 전체를 섞은 경계에서는 0개입니다. 어느 집단에서 정의한 경계인지에 따라 질의 결과가 달라집니다. 표시된 두 기록을 실제 측정 오류라고 확정하거나 제거하지 않습니다. 원 수치·단위·원문을 다시 살펴볼 대상이라는 표시일 뿐이며 원행 344개를 보존합니다.

성별 비교의 실제 분모 · 기록이 없는 셀도 보존
종기록된 성별원행 수몸무게 가용가용 몸무게 평균 ·g
Adelie암컷73733,368.836
Adelie수컷73734,043.493
Adelie성별 미가용653,540.000
Chinstrap암컷34343,527.206
Chinstrap수컷34343,938.971
Chinstrap성별 미가용00정의 안 됨 · 가용값 없음
Gentoo암컷58584,679.741
Gentoo수컷61615,484.836
Gentoo성별 미가용544,587.500
먼저 생각한 뒤 풀이 보기: 333·342·344 중 어느 분모가 올바른가요?

질문과 필요한 필드에 따라 다릅니다. 전체 기록 수는 344, 모든 필드 완전행은 333, 날개·몸무게 완전짝은 342입니다. 먼저 분석에 필요한 필드를 정하고 가용·결측 분모를 보고합니다. 작은 숫자를 아무 설명 없이 “정제 후 표본”이라고 부르지 않습니다.

먼저 생각한 뒤 풀이 보기: 극단값을 지우면 평균이 보기 좋아지니 삭제해도 되나요?

보기 좋은 결과가 삭제 근거는 아닙니다. 원문과 단위·측정 절차를 확인하고, 수정이 정당화된다면 근거·원값·새값·영향을 남겨야 합니다. 여기서는 경계의 질의만 수행하고 삭제하지 않습니다.

연구팀 보고 · 전체 상관과 종별 관계를 함께 설명하기

이 절의 조직은 실제 기업으로 꾸민 회사가 아니라 탐색 보고서를 만드는 연구팀입니다. 질문은 “이 관측에서 날개 길이와 몸무게가 어떻게 함께 변하는가?”입니다. 두 값이 있는 같은 342짝을 쓰며, 성별이 없다는 이유로 다른 행을 추가 삭제하지 않습니다. 원 수치로 중심화한 제곱합·교차곱을 계산하고 상관은 무차원 값으로 따로 표시합니다. 이는 날개를 늘리는 처치의 몸무게 인과효과가 아닙니다.

실제 완전짝에서 계산한 Pearson 상관 · 소수 반올림
범위완전짝 수날개 평균 ·mm몸무게 평균 ·g상관
전체342200.9154,201.7540.871202
Adelie151189.9543,700.6620.468202
Chinstrap68195.8243,733.0880.641559
Gentoo123217.1875,076.0160.702667

전체 상관은 약 0.871202로 각 종의 약 0.468202·0.641559·0.702667보다 큽니다. 종 사이 평균 크기의 차이와 종 안에서의 함께 움직임이 전체에 함께 들어 있기 때문입니다. 모든 종 안에서도 상관은 양수이므로 이 예를 “부호가 뒤집힌 역설”이라고 쓰지 않습니다. 반대로 전체 상관이 크다는 이유만으로 모든 종 안의 관계가 같은 강도라고 하지도 않습니다. 집단 구성과 질문을 함께 보아야 합니다.

전체 중심 교차곱을 종 안의 중심 교차곱 합과 종 평균 차이의 항으로 정확히 나눌 수 있습니다. 이 항등식은 기록된 수치의 산술 관계입니다. 각 항의 단위는 mm×g이고, 상관의 단위는 없습니다. 몸무게를 kg으로 바꾸면 교차곱은 1,000으로 나뉘고 몸무게 제곱합은 1,000,000으로 나뉘므로, 양의 단위 변환을 일관되게 하면 상관은 같습니다. 특정 항을 종의 인과적 기여라고 바꾸어 부르지 않습니다.

Sxy=Wxy+BxyWxy=∑g∑i∈g(xi−xˉg)(yi−yˉg)Bxy=∑gng(xˉg−xˉ)(yˉg−yˉ)\begin{aligned}S_{xy}&=W_{xy}+B_{xy}\\W_{xy}&=\sum_g\sum_{i\in g}(x_i-\bar x_g)(y_i-\bar y_g)\\B_{xy}&=\sum_g n_g(\bar x_g-\bar x)(\bar y_g-\bar y)\end{aligned}

완성 보고서는 질문·관측 범위·자료사전·필드별 결측·표·그림·집단별 관계·계산 규칙·한계를 연결합니다. Python과 R 동반 코드는 실제 원 344×8파일을 각각 다시 읽고 원행과 요약을 대조합니다. 탐색 후 결과에 맞추어 종이나 개체를 지우지 않습니다. 발견한 패턴을 확인하려면 별도 가설·비교 설계·새 자료를 고민하고, 지금의 탐색이 사전 지정한 독립 확증검정을 대신했다고 쓰지 않습니다.

먼저 생각한 뒤 풀이 보기: 전체 상관이 종별 상관보다 크면 어느 쪽을 숨겨야 하나요?

둘은 다른 질문의 요약이므로 구성과 분모를 함께 설명합니다. 전체와 종별 모두 계산한 뒤 질문에 맞게 해석하고, 다른 결과를 방해되는 수치라고 숨기지 않습니다. 이 자료는 모두 양수이므로 부호 역전을 주장하지 않습니다.

먼저 생각한 뒤 풀이 보기: 강한 상관과 정확한 재현이 있으면 예측·인과까지 완료됐나요?

관측 관계와 계산 추적이 확인됐습니다. 새로운 개체의 예측 검증, 표집 가정과 추론, 개입의 인과 식별은 추가 과제입니다. 이 보고서는 그 과제를 완료했다고 주장하지 않습니다.

Fieldwork scope · Read Antarctic islands, years and species first

This integrated case studies actual penguin observations, not fabricated people or companies. The retained simplified palmerpenguins CSV contains 344 penguin records and eight variables. Its description covers adult foraging penguins of three species on three Palmer Archipelago islands, Antarctica, in 2007–2009. Acknowledge the observations/publication by Kristen Gorman and Palmer Station LTER and the educational package by Allison Horst, Alison Hill and Kristen Gorman. We read the simplified 344×8 file, not the separate 17-field penguins_raw table.

The first question is not only “which species is larger?” but “what was recorded, within what scope?” Three represented species do not mean Antarctica has only three species. Preserve zero cells in the species/island cross-tabulation. Chinstrap appears only on Dream and Gentoo only on Biscoe in this retained extract. That describes its observation pattern, not biological impossibility elsewhere. No known inclusion probabilities or random sample of all penguins worldwide are assumed.

Actual species×island counts · zero means no record in this extract
SpeciesBiscoeDreamTorgersenTotal
Adelie445652152
Chinstrap068068
Gentoo12400124
Actual species×study-year composition · not a verified individual panel
Species200720082009
Adelie505052
Chinstrap261824
Gentoo344644

A year column does not justify linking row 1 to another year as the same animal. This simplified file has no permanent individual identifier. source_row_id traces a file position, not proof of independent individuals or repeated measurement. The overlapping species/island composition also prevents automatically separating island-environment effects from species characteristics. An EDA report states both the supported scope and the additional observations a new question needs.

Think first, then reveal: Does Gentoo appearing only on Biscoe prove that Biscoe increases body mass?

No. The observed species/island composition does not identify that causal effect. Summaries are possible; a causal question requires a suitable design and additional assumptions/evidence. Do not fill empty cells with invented penguins.

Think first, then reveal: Would connecting years create a penguin growth curve?

It would not establish individual growth from differently composed observations. Individual identity and a repeated-measurement design are required. Even a species/year mean plot describes observed group summaries.

Measured penguins · Dictionary, missingness, units and question-specific denominators

The measured individuals are penguins. Species, island and recorded sex are categories. Bill length, bill depth and flipper length use millimeters; body mass uses grams, and year is the study year. Numeric codes for species or an average year do not automatically represent biological size or growth. Row 1’s 3,750 grams equals 3.75 kilograms, not 3,750 kilograms. Track original and converted units as distinct fields.

Actual availability in eight fields · distinguish missing rows from missing fields
Source fieldKind/unitAvailable fieldsUnavailable fields
speciescategory3440
islandcategory3440
bill_length_mmquantity · mm3422
bill_depth_mmquantity · mm3422
flipper_length_mmquantity · mm3422
body_mass_gquantity · g3422
sexcategory33311
yearinteger study year · year3440

There are 19 unavailable fields, not “19 missing penguins.” Among all 344 source rows, 333 have all eight fields available. Flipper length and body mass are jointly available for 342; nine records lack sex but have mass. A mass-only question does not automatically require deleting those nine because another unused field is missing. Conversely, a sex comparison must not assign invented sexes to the 11 unavailable sex fields.

Actual species mass summaries · grams, rounded display
SpeciesSource rowsMass availableMeanType-7 medianType-7 IQR
Adelie1521513,700.6623,700.000650.000
Chinstrap68683,733.0883,700.000462.500
Gentoo1241235,076.0165,000.000800.000

Quantiles require a declared convention. Use type-7 linear interpolation on n sorted values: h=(n−1)p is a zero-based position, interpolated between adjacent values. Textbooks/software need not share the same convention. The R companion explicitly calls quantile(..., type=7); Python independently performs rational interpolation. Do not silently assume a default boxplot’s internal hinges use this exact definition.

IQR=Q.75−Q.25L=Q.25−1.5IQRU=Q.75+1.5IQR\begin{aligned}\mathrm{IQR}&=Q_{.75}-Q_{.25}\\L&=Q_{.25}-1.5\mathrm{IQR}\\U&=Q_{.75}+1.5\mathrm{IQR}\end{aligned}

The chosen species-specific type-7 1.5-IQR rule flags two Chinstrap masses and none in the other species. The pooled fence flags none. A query depends on the group in which the fence is defined. Neither flagged record is declared a measurement error or deleted. The flags invite checking source values, units and context while retaining all 344 original rows.

Actual denominators for recorded-sex comparison · retain empty cells
SpeciesRecorded sexSource rowsMass availableAvailable-mass mean · g
Adeliefemale73733,368.836
Adeliemale73734,043.493
Adelieunavailable653,540.000
Chinstrapfemale34343,527.206
Chinstrapmale34343,938.971
Chinstrapunavailable00Undefined · no available values
Gentoofemale58584,679.741
Gentoomale61615,484.836
Gentoounavailable544,587.500
Think first, then reveal: Which denominator is correct: 333, 342 or 344?

It depends on the question and required fields. There are 344 source records, 333 all-field complete records and 342 complete flipper/mass pairs. Declare required fields, then report available/unavailable denominators. Do not label a smaller count merely “cleaned sample” without explanation.

Think first, then reveal: May extreme values be removed because the mean looks nicer?

A visually preferable result does not justify deletion. Check original records, units and measurement context. Any justified correction must preserve evidence, original/new values and impact. Here the fence is a query only; no deletion occurs.

Research-team report · Explain pooled and species-specific relationships together

The organization here is a research team producing an EDA report, not a fabricated company. Ask how flipper length and body mass co-vary in these observations. Use the same 342 available pairs without extra deletion for missing sex. Compute centered sums of squares/cross-products from actual values, then report dimensionless correlations separately. This is not the causal mass effect of an intervention that lengthens a flipper.

Pearson correlations from actual complete pairs · rounded
ScopeComplete pairsMean flipper · mmMean mass · gCorrelation
Pooled342200.9154,201.7540.871202
Adelie151189.9543,700.6620.468202
Chinstrap68195.8243,733.0880.641559
Gentoo123217.1875,076.0160.702667

The pooled correlation is approximately 0.871202, above the species values of 0.468202, 0.641559 and 0.702667. The pooled relationship combines differences in species mean size and co-variation within species. Every species correlation is positive, so this is not a sign-reversal example. Conversely, a strong pooled value does not establish equal within-species strength. Read group composition alongside the question.

Decompose the pooled centered cross-product exactly into summed within-species cross-products and a between-species-mean term. This is an arithmetic identity in the recorded values. Each term has units mm×g; correlation has no unit. Converting mass to kilograms divides cross-products by 1,000 and mass sums of squares by 1,000,000, leaving correlation unchanged under consistent positive rescaling. A term is not a species’ causal contribution.

Sxy=Wxy+BxyWxy=∑g∑i∈g(xi−xˉg)(yi−yˉg)Bxy=∑gng(xˉg−xˉ)(yˉg−yˉ)\begin{aligned}S_{xy}&=W_{xy}+B_{xy}\\W_{xy}&=\sum_g\sum_{i\in g}(x_i-\bar x_g)(y_i-\bar y_g)\\B_{xy}&=\sum_g n_g(\bar x_g-\bar x)(\bar y_g-\bar y)\end{aligned}

The completed report connects question, scope, dictionary, field-level missingness, tables, figures, group relationships, calculation conventions and limitations. Python and R companions each reread the actual 344×8 source and check records/summaries independently. Do not delete species or individuals after seeing results to obtain a preferred pattern. Confirmation needs its own hypothesis, comparison design and evidence; exploratory discovery is not a prespecified independent confirmatory test.

Think first, then reveal: Which correlations should be hidden when the pooled value is larger?

Neither. They summarize different scopes; report composition and denominators, then interpret the relevant question. Do not suppress inconvenient summaries. All correlations here are positive, so do not claim a reversal.

Think first, then reveal: Do a strong correlation and exact reproduction complete prediction and causal inference?

They establish a descriptive relationship and traceable computation. Prediction on new individuals, sampling/inferential assumptions and causal identification remain additional tasks. This report does not claim them completed.

기초Foundations

48. 자료사전·보간·그림의 역할을 지정 범위로 읽는다48. Read dictionaries, interpolation and graphics within stated scopes

공식 palmerpenguins 자료사전에서 여덟 열·단위·종·섬·연도를 확인합니다. 소개 글에서는 실제 관측 범위, 333개 완전 행과 미가용 19칸, 측정 연구와 교육 패키지의 출처를 연결해 읽습니다. 그림의 원 저작물을 이 장의 새 그림처럼 사용하지 않습니다.

고정 참조는 실제 Python3.11.8·Matplotlib3.10.0·R 4.5.1 환경에서 실행했습니다. 현재 patched 문서의 표시 버전과 실행 버전은 별도로 기록합니다. 공식 강의 영상은 본문 사례의 플레이어에서 이어 볼 수 있으며, 영상의 직관이 원자료에 없는 개체 표식·표집 확률·인과 경로를 제공한다고 읽지 않습니다.

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

Use the official dictionary for eight fields, units, species, islands and years. Read the introduction for observational coverage, 333 complete rows, nineteen unavailable cells and research/package provenance. Original artwork is not presented as our newly generated figure.

Fixed references ran in the recorded Python 3.11.8, Matplotlib 3.10.0 and R 4.5.1 environment. The current patched-document version is recorded separately from the executed version. The official case video supplies further teaching intuition, without supplying unobserved specimen identifiers, sampling probabilities or causal paths.

Python · R · Inputs, units, transformations and sources

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

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

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

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

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

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

CS50R · 자료·그림 형태·변수 매핑CS50R · Data, geometry and variable mapping

Harvard CS50R · Week 5 Visualizing Data

공식 강의의 자료·기하 형태·시각 매핑과 점·축 이름을 중심으로 봅니다. 본문 펭귄 표의 어떤 필드가 축·집단 이름인지 적습니다. 영상의 패키지 실행과 이 장 base R 재현은 구별합니다.Focus on data, geometries, mappings, points and axis labels. Identify which penguin fields map to axes/groups. Distinguish the lecture’s package examples from this chapter’s base-R reproduction.

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

보고 읽은 뒤 답하기Respond after watching/reading 줄의 순서대로 펭귄 점을 이어도 되나요?May penguin points be connected in source-row order?

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

원행 순서가 연속 경로나 같은 개체 재측정을 뜻하지 않으므로 그 의미를 만들지 않습니다.Source order is not a continuous path or repeated measurement of one individual.

앨리슨 호스트 · 실제 자료와 학습의 연결Allison Horst · Connect actual data with learning

Author’s official CV · selected teaching/data contributions

공식 이력의 자료과학 교육과 공동 저작 palmerpenguins 기여만 읽습니다. 측정 연구자와 교육용 자료 정리자의 역할을 모두 인정하고 다른 사람의 연구 기여를 한 사람에게 몰아주지 않습니다.Read the official CV’s teaching and coauthored palmerpenguins contributions. Acknowledge both measurement researchers and educational-data authors; do not attribute everyone’s research to one person.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 교육용 CSV를 정리한 사람과 현장 관측 자료원은 같은 역할인가요?Are educational-data preparation and field observations the same role?

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

역할을 구별하고 해당 측정·프로그램·패키지의 출처를 함께 적습니다.Distinguish roles and cite the measurements, field program and package appropriately.

공식 자료사전 · 344×8의 각 필드Official dictionary · Each field in the 344×8 data

palmerpenguins · penguins reference and introduction

종·섬·부리·날개·몸무게·성별·연도의 정의와 단위를 원 자료사전으로 확인합니다. 8변수 간소화 자료와 17변수 원자료 표를 구별합니다.Check species, island, bill/flipper measurements, mass, sex and year against the source dictionary. Distinguish the simplified eight-field dataset from the 17-field raw table.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading source_row_id는 원 자료사전에 있는 영구 개체 번호인가요?Is source_row_id a permanent individual ID in the source dictionary?

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

이 장에서 원 파일 위치를 추적하려 붙인 키입니다. 간소화 자료의 영구 개체 ID라고 하지 않습니다.It is assigned here to trace positions in the original file, not a permanent identifier from the simplified data.

R 공식 · 사분위수 계산법을 고정하기Official R · Specify the quantile convention

R stats manual · quantile arguments and Type 7

type7과 결측 처리·정렬 보간의 정의만 읽습니다. 다른 사분위수 정의가 존재하며 기본 boxplot의 계산을 같은 것으로 가정하지 않는 이유를 생각합니다.Read type 7, missingness handling and interpolation. Consider why alternative quantile conventions exist and a default boxplot is not assumed identical.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 서로 다른 사분위수가 나오면 언제나 계산 오류인가요?Are differing quartiles always arithmetic errors?

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

입력·결측 처리·정의·정렬 규칙이 같은지 먼저 확인합니다. 같은 계약일 때만 재현 결과를 대조합니다.First compare inputs, missingness, definitions and ordering; compare reproduction under the same contract.

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

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

1. 첫 몸무게의 단위 환산Convert the first recorded mass

실제 첫 원행의 몸무게는 3,750g입니다. kg으로 환산한 값과, 다른 관측 3,800g과의 차이를 g·kg 두 단위로 쓰세요.

The actual first mass is 3,750 g. Convert it to kilograms, then express its difference from 3,800 g in both units.

풀이와 확인할 이유Solution and explanation

첫 값은 3.75kg이고 차이는 50g=0.05kg입니다. 같은 측정과 차이를 일관되게 1,000으로 나누었습니다. 3.75라는 수에 g 라벨을 그대로 붙이면 단위 환산이 아니라 다른 값을 적은 셈입니다.

The first mass is 3.75 kg. The difference is 50 g=0.05 kg. Divide both measured values and differences consistently by 1,000; retaining a gram label on 3.75 would change the recorded quantity.

2. 실제 첫 네 몸무게의 평균Available versus zero-filled mean

첫 네 원행의 몸무게는 3,750, 3,800, 3,250g과 미가용입니다. 가용 평균과 빈칸을 0으로 채운 네 행 평균을 계산하세요.

The first four masses are 3,750, 3,800, 3,250 g and unavailable. Calculate the available mean and the four-row zero-filled mean.

풀이와 확인할 이유Solution and explanation

가용 합 10,800g을 3으로 나누면 3,600g입니다. 0 채움 뒤 4로 나누면 2,700g입니다. 후자는 미관측 몸무게를 0g이라고 가정한 다른 계산이며, 어느 값도 이 네 행만으로 전체 344행의 평균을 정하지는 않습니다.

The available total 10,800 divided by three gives 3,600 g. Zero filling and dividing by four gives 2,700 g, adding an assumption of zero mass. Neither computation from these four rows alone determines the mean of all 344 records.

3. 칸과 행을 함께 세기Count cells and rows separately

네 기록에서 세 열을 봅니다. 둘째 행의 두 칸이 미가용이고 다른 모든 칸은 가용입니다. 전체 칸 수·미가용 칸 수·불완전한 행 수·완전 행 수를 구하세요.

Four records have three fields. Two cells in the second row are unavailable; all others are available. Count cells, unavailable cells, incomplete rows and complete rows.

풀이와 확인할 이유Solution and explanation

전체는 4×3=12칸, 미가용은 2칸입니다. 두 칸이 같은 행에 있으므로 불완전한 행은 1개, 완전 행은 3개입니다. 4−2=2를 완전 행 수로 쓰면 칸과 행을 섞어 센 것입니다.

There are twelve cells, two unavailable cells, one incomplete row and three complete rows. Subtracting two missing cells from four records would mix counting units.

4. 실제 19칸과 11행Nineteen cells and eleven records

실제 표는 344행·8열이고 미가용 칸 19개, 여덟 열이 모두 가용한 행 333개입니다. 전체 칸 수와 불완전한 행 수를 구하고 344−19가 완전 행 수인지 판단하세요.

The actual table has 344 rows and eight fields, nineteen unavailable cells and 333 all-field complete records. Find cell count and incomplete-row count. Is 344−19 the complete count?

풀이와 확인할 이유Solution and explanation

전체 칸은 2,752개이고 불완전한 행은 344−333=11개입니다. 344−19=325는 완전 행 수가 아닙니다. 한 행에 여러 미가용 칸이 있을 수 있으므로 칸 수만 빼서는 가용 행 수를 복원하지 못합니다.

There are 2,752 cells and eleven incomplete rows. The value 325 is not the complete count: several unavailable cells can belong to one record. Cell and row missingness are distinct.

5. 같은 mm인 다른 변수Two different measurements in millimetres

bill_length_mm와 bill_depth_mm는 둘 다 mm 단위입니다. 단위가 같다는 이유로 같은 측정이라고 할 수 있나요? species에 붙인 숫자 코드의 평균과도 비교하세요.

bill_length_mm and bill_depth_mm share millimetres. Are they the same measurement? Compare this with averaging numeric codes assigned to species.

풀이와 확인할 이유Solution and explanation

길이와 깊이는 다른 부리 치수입니다. 단위가 같아도 변수 정의가 같다는 결론은 나오지 않습니다. 종의 숫자 코드는 범주를 표기하는 약속이므로 그 평균이 부리 크기를 측정하지 않습니다. 자료사전에는 측정 정의와 단위를 함께 적습니다.

Length and depth measure different bill dimensions. Shared units do not make definitions identical. Numeric species codes label categories; their mean does not measure physical bill size. Retain both definition and unit.

6. 보관 종 비중의 분모The denominator of a species share

보관 관측의 종별 행 수는 Adelie 152, Chinstrap 68, Gentoo 124입니다. 총수와 Gentoo의 기록 비중을 구하고 남극 전체의 종 비율이라는 주장도 검토하세요.

Retained species counts are Adelie 152, Chinstrap 68 and Gentoo 124. Find total and Gentoo record share. Does it establish an Antarctic population share?

풀이와 확인할 이유Solution and explanation

합은 344이고 Gentoo 비중은 124/344=31/86입니다. 이는 정한 보관 기록에 균등 무게를 준 비중입니다. 더 넓은 펭귄 모집단의 포함·관측 과정은 별도 정보가 필요하므로 같은 비율로 바꾸어 부르지 않습니다.

Total 344 gives share 124/344=31/86. It describes equal-weight retained records. A wider population proportion requires information linking observations to that population.

7. 성별 빈칸 안의 가용 몸무게Known mass inside unavailable-sex records

전체 344행 중 성별 가용은 333행이고 그 333행의 몸무게는 모두 가용합니다. 몸무게 전체 가용은 342행입니다. 성별 미가용 수와 그중 몸무게 가용 수를 구하세요.

Of 344 records, 333 have recorded sex and every one of those 333 has mass. Overall mass availability is 342. Count unavailable-sex records and their available masses.

풀이와 확인할 이유Solution and explanation

성별 미가용은 11행입니다. 그 안의 가용 몸무게는 342−333=9개입니다. 성별 미가용 중 몸무게도 없는 행은 2개입니다. 몸무게만 계산하는 표에서 이 9개를 자동 삭제할 이유가 있는지 질문별로 검토합니다.

Eleven records lack sex labels; nine of them have mass. The remaining two lack mass too. A mass-only question need not automatically discard the nine known measurements.

8. 여덟 열과 열일곱 열The eight-field and seventeen-field tables

이번에 보관해 읽은 CSV는 penguins의 344행·8열입니다. 별도 penguins_raw가 17열이라는 문서를 읽었다면 이번 보고서에 17열을 모두 관측했다고 써도 되나요?

The CSV actually retained here is 344-by-eight penguins. Documentation also names a seventeen-field penguins_raw table. May the report claim all seventeen fields were observed?

풀이와 확인할 이유Solution and explanation

안 됩니다. 별도 표의 존재를 문서에서 안 것과 해당 열을 실제로 보관·읽은 것은 다릅니다. 이번 사본의 여덟 열과 지문·단위를 기록하고, 읽지 않은 원형 열을 이번 분석의 관측값으로 만들지 않습니다.

No. Knowing another table exists differs from retaining and reading its fields. Document this eight-field copy and its hash/units rather than inventing additional observed variables.

9. 정렬해도 원위치는 남긴다Sorting preserves original positions

원행 314와 315를 몸무게 순으로 다시 정렬했습니다. 화면 정렬 위치가 바뀌면 원행 번호도 덮어써야 하나요? 그 번호가 영구 개체 표식인가요?

Rows 314 and 315 are sorted by mass. Should the original source positions be overwritten by new display ranks? Are they permanent specimen IDs?

풀이와 확인할 이유Solution and explanation

원행 번호를 보존하고 새 정렬 순서는 별도로 둡니다. 그래야 점과 원 기록을 다시 연결할 수 있습니다. 보관 파일의 위치를 추적하는 번호이며 이 여덟 열에서 확인한 영구 펭귄 표식이나 독립성의 증거는 아닙니다.

Keep original positions and represent display order separately. This preserves traceability to the retained file, without asserting permanent specimen identifiers or independence.

10. 키가 없는 칸과 null 칸Absent key versus explicit null

선언한 두 열은 species와 mass입니다. 세 기록은 [{"species":"A","mass":"3"},{"species":"B","mass":null},{"species":"B"}]입니다. mass의 가용·명시적 null·키 부재 수와 전체 완전 행 수를 구하세요.

Declared fields are species and mass, with records [{"species":"A","mass":"3"},{"species":"B","mass":null},{"species":"B"}]. Count available masses, explicit nulls, absent mass keys and complete rows.

풀이와 확인할 이유Solution and explanation

mass 가용은 1개, 명시적 null은 1개, 키 부재는 1개입니다. 종은 세 행 모두 가용하므로 두 열 모두 가용한 완전 행은 첫 행 하나입니다. 가용성이 같은 두 빈 상태라도 원 구조에서 무엇이 빠졌는지는 따로 보존합니다.

There is one available mass, one explicit null and one absent key. Species is available throughout, so only the first record is complete across both fields. Preserve structural absence separately from an explicit unavailable cell.

11. 두 표식의 공동 분모Joint availability denominator

네 범주 쌍은 (A,X), (A,Y), (B,X), (미가용,Y)입니다. 각 표식의 가용 수와 두 표식 공동 가용 수를 구하세요.

Four category pairs are (A,X), (A,Y), (B,X) and (unavailable,Y). Find availability of each label and their joint availability.

풀이와 확인할 이유Solution and explanation

첫 표식은 3개, 둘째는 4개가 가용합니다. 둘 다 가용한 쌍은 3개입니다. 공동 표에서는 마지막 행을 A나 B에 배정하지 않고 제외 수 1개로 보존합니다.

The first label is available three times, the second four times, and both jointly three times. Retain the last row as one omitted joint record without guessing A or B.

12. 한 셀의 세 비중Three shares of one cell

공동 가용 세 쌍은 (A,X), (A,Y), (B,X)입니다. 결합 비중 P(A,X), A 안의 X 비중, X 안의 A 비중을 구하세요.

The jointly available pairs are (A,X), (A,Y), (B,X). Calculate joint share P(A,X), X share within A and A share within X.

풀이와 확인할 이유Solution and explanation

각각 1/3, 1/2, 1/2입니다. 첫 분모는 전체 세 쌍, 둘째는 A 두 쌍, 셋째는 X 두 쌍입니다. 같은 셀 개수 1이어도 조건을 붙인 집합이 달라집니다.

They are 1/3, 1/2 and 1/2. The denominators are all three pairs, the two A pairs and the two X pairs respectively. One numerator does not imply one common denominator.

13. 관측하지 않은 Z의 조건부 비중An unobserved category has no conditional denominator

가용 표는 A·X=1, A·Y=1, B·X=1, B·Y=0입니다. Z 범주를 선언했지만 Z 행은 없습니다. Z·X 결합 비중과 Z를 조건으로 한 X 비중을 비교하세요.

The table has A/X=1, A/Y=1, B/X=1, B/Y=0. A declared category Z has no rows. Compare its joint X share and X conditional on Z.

풀이와 확인할 이유Solution and explanation

전체 가용 분모가 3이므로 Z·X 결합 비중은 0/3=0입니다. 그러나 Z 안의 X 비중은 0/0으로 미정의입니다. 관측한 결합 0과 조건부 분모가 없는 상태를 구별합니다.

The joint share is 0/3=0. Conditional X given Z divides by Z count zero and is undefined. Zero observed joint mass differs from a missing conditional denominator.

14. 0셀과 미가용 표식Zero cell versus an unknown label

가용 세 쌍에서 B·Y 개수는 0이고, 별도 네 번째 행은 첫 표식 미가용·둘째 표식 Y입니다. 네 번째 행을 B·Y의 0으로 기록해도 되나요?

B/Y has count zero among three complete label pairs. A fourth row has unknown first label and known Y. May that row be recorded as zero B/Y?

풀이와 확인할 이유Solution and explanation

안 됩니다. B·Y=0은 가용 세 쌍에 해당 조합이 없다는 셀 개수입니다. 네 번째 행은 첫 표식을 모르므로 어느 첫 범주에도 배정하지 않았습니다. 개수 0과 알 수 없는 범주를 같은 코드로 바꾸지 않습니다.

No. Zero is a cell count among known combinations. The fourth row has an unavailable first label and cannot be assigned to B without another assumption. Preserve the distinct information states.

15. 실제 Biscoe와 Adelie의 서로 다른 분모Actual Biscoe and Adelie denominators

실제 종·섬 표의 행은 Adelie=(44,56,52), Chinstrap=(0,68,0), Gentoo=(124,0,0)이며 열 순서는 Biscoe, Dream, Torgersen입니다. 총 344행에서 Adelie·Biscoe 결합 비중, Biscoe 안 Adelie 비중, Adelie 안 Biscoe 비중을 구하세요.

Actual species rows are Adelie=(44, 56, 52), Chinstrap=(0, 68, 0), Gentoo=(124, 0, 0); columns are Biscoe, Dream, Torgersen. Across 344 records, find joint Adelie/Biscoe share and both conditional directions.

풀이와 확인할 이유Solution and explanation

결합은 44/344=11/86입니다. Biscoe 합은 168이라 그 안 Adelie는 44/168=11/42입니다. Adelie 합은 152이므로 그 안 Biscoe는 44/152=11/38입니다. 분모와 조건 방향이 모두 다릅니다.

Joint share is 11/86. Biscoe totals 168, giving Adelie given Biscoe 11/42. Adelie totals 152, giving Biscoe given Adelie 11/38. Name both the denominator and direction.

16. Gentoo·Dream의 관측 0An observed Gentoo/Dream zero

이 보관 사본에서 Gentoo·Dream 조합은 0개입니다. 이를 “다른 시기에도 Gentoo가 Dream에 있을 수 없다”라고 해석할 수 있나요?

The retained table has zero Gentoo/Dream records. Does this prove Gentoo could never occur there in another period?

풀이와 확인할 이유Solution and explanation

그 결론은 나오지 않습니다. 보관한 관측 범위에서 조합이 없다는 사실을 보고합니다. 다른 시기·더 넓은 생태 범위의 가능성에는 추가 관측과 연구 지식이 필요합니다. 0셀은 특정 관측 표의 기술적 결과입니다.

No. It reports absent combinations within this observational coverage. Claims about other periods or broader ecological possibilities need further evidence.

17. 연도 두 행을 같은 개체로 연결하기Pairing rows across years

2007년 한 행과 2008년 한 행의 몸무게가 같고 이 축약 표에는 영구 개체 ID가 없습니다. 같은 펭귄의 전후라고 짝지어도 되나요?

A 2007 row and a 2008 row have equal mass; the simplified table provides no permanent specimen ID. May they be paired as one penguin over time?

풀이와 확인할 이유Solution and explanation

같은 몸무게만으로는 같은 개체임을 확인하지 못합니다. 연도·원위치·다른 측정을 보존하되 식별 근거 없이 반복 관측으로 연결하지 않습니다. 같은 값과 같은 개체라는 주장은 다릅니다.

Equal mass alone does not establish identity. Preserve years, source positions and measurements without inventing a longitudinal pairing. Equal values and the same entity are different claims.

18. 각 열에는 값이 있지만 공동 쌍은 없다Available marginals without any joint pair

두 행의 첫 표식은 A, 미가용이고 둘째 표식은 미가용, Y입니다. 각 열 가용 수와 공동 가용 수는 얼마인가요? 공동 비중을 모두 0이라고 쓰나요?

Two rows have first labels A, unavailable and second labels unavailable, Y. Count marginal and joint availability. Are all joint shares zero?

풀이와 확인할 이유Solution and explanation

각 열은 한 번씩 가용하지만 공동 가용 쌍은 0개입니다. 공동 표의 분모가 0이어서 비중은 미정의입니다. 분모가 양수인 표의 관측 0셀과는 다릅니다.

Each label is available once, but no row has both. Joint shares are undefined because the common denominator is zero, unlike an observed zero cell in a positive-size table.

19. Y가 1/2인가 1/3인가Y share one half or one third

네 행은 (A,X), (A,Y), (B,X), (미가용,Y)입니다. 둘째 표식만 본 Y 비중과 두 표식 공동 가용 집합의 Y 비중을 구하고 차이를 설명하세요.

The rows are (A,X), (A,Y), (B,X), (unavailable,Y). Compare Y’s share among all second labels with its share among jointly available label pairs.

풀이와 확인할 이유Solution and explanation

둘째 표식 전체에서는 Y가 2/4=1/2입니다. 공동 가용 세 행에서는 Y가 1/3입니다. 마지막 행이 어느 분석 집합에 들어가는지 달라 같은 질문의 계산 오류가 아닙니다.

They are 1/2 and 1/3. The last row contributes to the second-label marginal but not to the joint set. Different denominators define different summaries.

20. 필터 결과가 빈 경우An empty filtered set

원자료 전체는 344행이고 몸무게 가용은 342행이지만 Gentoo·Dream 조건으로 선택된 행은 0개입니다. 그 조건의 가용 몸무게 평균은 전체 평균과 같나요?

The source has 344 rows and 342 available masses, but filtering to Gentoo/Dream selects zero rows. Is its mass mean the overall mean?

풀이와 확인할 이유Solution and explanation

선택 집합이 비어 있어 그 조건의 평균은 미정의입니다. 전체 342개 평균을 빌려 채우지 않습니다. 필터 조건과 선택 수 0, 가용 수 0을 보존해야 빈 집합과 전체 자료를 혼동하지 않습니다.

No. The selected mean is undefined. Do not borrow the pooled mean. Keep the filter, selected count zero and available count zero explicit.

21. 네 값의 평균과 중앙값Mean and median of four values

설명용 가용값은 1, 2, 4, 10입니다. 평균과 가운데 두 값을 평균한 중앙값을 구하세요.

The four available toy values are 1, 2, 4, 10. Find their mean and the median defined by averaging the middle two values.

풀이와 확인할 이유Solution and explanation

합 17을 4로 나눈 평균은 17/4=4.25입니다. 가운데 두 값 2와 4의 평균인 중앙값은 3입니다. 큰 끝값 10이 평균에는 직접 더해지지만 중앙값을 평균과 같게 만들지는 않습니다.

Their sum is 17, so the mean is 17/4=4.25. The median is (2+4)/2=3. A large final value affects the mean without forcing these two summaries to coincide.

22. 중심 제곱합과 표본식 분산Centered squares and sample-formula variance

가용값 1, 2, 4, 10의 평균은 17/4입니다. 평균에서 뺀 차이의 제곱합과 n−1 분모의 표본식 분산을 구하세요.

Available values 1, 2, 4, 10 have mean 17/4. Find their centered square sum and variance using denominator n−1.

풀이와 확인할 이유Solution and explanation

차이는 −13/4, −9/4, −1/4, 23/4입니다. 제곱합은 (169+81+1+529)/16=195/4입니다. n=4라 표본식 분산은 (195/4)/3=65/4입니다. 기록 네 값의 계산식이며 이것만으로 표집의 독립성을 확인하지는 않습니다.

Deviations are −13/4, −9/4, −1/4, 23/4. Their squared sum is 195/4. Dividing by three gives 65/4. This is the declared sample-formula summary; its calculation alone does not establish independent sampling.

23. 첫 사분위수를 보간한다Interpolate the first quartile

정렬된 값은 1, 2, 4, 10입니다. type 7의 0부터 시작한 위치 h=(n−1)p에서 p=1/4를 넣고 이웃 값을 선형 보간해 Q₁을 구하세요.

Sorted values are 1, 2, 4, 10. Type 7 uses zero-based h=(n−1)p. At p=1/4, interpolate adjacent values to find Q₁.

풀이와 확인할 이유Solution and explanation

h=3/4이므로 값 1에서 값 2 쪽으로 3/4만큼 이동합니다. Q₁=(1−3/4)×1+(3/4)×2=7/4입니다. 원 관측에 1.75가 없더라도 정의된 보간값일 수 있습니다.

The position is 3/4, between 1 and 2. Thus Q₁=(1/4)×1+(3/4)×2=7/4. An interpolated quantile need not be an observed value.

24. 셋째 사분위수를 보간한다Interpolate the third quartile

정렬된 값 1, 2, 4, 10에서 type 7 위치 h=(n−1)p와 p=3/4를 사용하여 Q₃을 구하세요.

For sorted values 1, 2, 4, 10, use type 7 position h=(n−1)p at p=3/4 to find Q₃.

풀이와 확인할 이유Solution and explanation

h=9/4=2+1/4입니다. 0부터 센 위치 2의 값 4와 위치 3의 값 10 사이를 보간하여 Q₃=(3/4)×4+(1/4)×10=11/2=5.5를 얻습니다.

Here h=9/4=2+1/4. Interpolating one quarter from 4 to 10 gives Q₃=(3/4)×4+(1/4)×10=11/2.

25. 네 값의 울타리 질의Fence queries for four values

가용값 1, 2, 4, 10에서 type 7 Q₁=7/4, Q₃=11/2입니다. IQR과 Q₁−1.5IQR, Q₃+1.5IQR을 구하고 엄격히 밖에 있는 값만 표시하세요.

Values 1, 2, 4, 10 have type 7 Q₁=7/4 and Q₃=11/2. Find IQR and fences Q₁−1.5IQR, Q₃+1.5IQR. Flag only strictly outside values.

풀이와 확인할 이유Solution and explanation

IQR=15/4입니다. 아래 울타리는 −31/8, 위 울타리는 89/8입니다. 10도 11.125보다 작으므로 표시된 값은 없습니다. 울타리는 원 측정의 오류 여부를 판정하는 정답선이 아니라 선택한 확인 규칙입니다.

IQR=15/4; fences are −31/8 and 89/8. None is flagged: even 10 is below 11.125. A chosen fence rule is a query for inspection rather than proof of measurement error.

26. 울타리 위의 값과 바깥 값At a fence versus beyond it

어떤 참조 집합에서 이미 정한 울타리는 L=−1, U=5입니다. 이 고정 울타리로 질의값 −1, 5, 6을 검사합니다. x<L 또는 x>U일 때만 표시한다면 무엇을 표시하나요? 이 세 값에서 울타리를 다시 추정하지 않습니다.

A reference set has already supplied fixed fences L=−1, U=5. Query −1, 5, 6 using x<L or x>U only; do not refit fences from these queries. Which is flagged?

풀이와 확인할 이유Solution and explanation

6만 표시합니다. −1과 5는 경계에 정확히 같아 엄격한 바깥 조건을 만족하지 않습니다. ≤나 ≥로 규칙을 바꾸면 다른 결과이므로 부등호를 함께 보고합니다.

Only 6 is flagged. Equality at either boundary is retained. Replacing the strict inequalities with inclusive ones would define a different rule.

27. IQR이 0인 다섯 값Zero IQR with an unequal observation

가용값 1, 1, 1, 1, 10의 type 7 두 사분위수는 모두 1입니다. 배수 1.5의 엄격 울타리 표시와 원래 평균, 표시값을 지운 뒤 평균을 비교하세요.

For values 1, 1, 1, 1, 10, both type 7 quartiles equal one. Compare strict 1.5-IQR flags, the original mean and the mean after deleting flagged entries.

풀이와 확인할 이유Solution and explanation

IQR=0이라 울타리 둘 다 1입니다. 값 10만 표시됩니다. 원래 평균은 14/5=2.8이고 10을 지우면 1입니다. 표시와 삭제는 다른 작업이며, 선택 규칙만으로 삭제가 정당화되지는 않습니다.

Both fences equal one, so 10 is flagged. The retained-data mean is 14/5=2.8; deletion changes it to one. A flag is not the same action as deletion.

28. 모두 미가용인 분포An all-unavailable distribution

입력은 미가용, 미가용 두 칸입니다. 가용 수·가용 합·가용 평균·사분위수·표본식 분산을 어떻게 표시해야 하나요? 빈 유한합은 0으로 정의합니다.

Both input entries are unavailable. Report available count, available sum, mean, quartiles and sample-formula variance, defining an empty finite sum as zero.

풀이와 확인할 이유Solution and explanation

가용 수는 0, 가용 합은 빈합 0입니다. 평균은 0/0이라 미정의이고 사분위수와 표본식 분산도 미정의입니다. 합이 0이라는 정의를 평균 0이라는 주장으로 바꾸지 않습니다.

Available count and empty sum are zero. Mean, quartiles and sample-formula variance are undefined. A zero empty sum does not imply a zero available mean.

29. 가용값이 하나뿐인 분포A single available value

입력은 미가용, 3입니다. 가용값 하나의 type 7 분위수를 그 값으로 정의합니다. 평균·두 사분위수·IQR·n−1 분산·엄격 울타리 표시를 구하세요.

Input is unavailable, 3. Define every type 7 quantile of a singleton as its sole value. Find mean, quartiles, IQR, n−1 variance and strict fence flags.

풀이와 확인할 이유Solution and explanation

평균과 두 사분위수는 모두 3이고 IQR은 0입니다. n−1=0이라 표본식 분산은 미정의입니다. 울타리 모두 3이므로 유일한 값은 밖이 아니며 표시되지 않습니다.

Mean and both quartiles equal three, with IQR zero. The sample-formula variance is undefined because n−1=0. Both fences equal three, so the single available observation is not flagged.

30. 전체와 종별 울타리를 구별한다Pooled versus species-specific fences

실제 전체 몸무게의 type 7 Q₁=3,550g, Q₃=4,750g입니다. Chinstrap만의 Q₁=3,487.5g, Q₃=3,950g입니다. 배수 1.5의 울타리로 원행 314의 4,800g과 315의 2,700g을 각각 검사하세요.

Actual pooled mass quartiles are 3,550 and 4,750 g. Chinstrap quartiles are 3,487.5 and 3,950 g. With multiplier 1.5, query source row 314 at 4,800 g and row 315 at 2,700 g under both references.

풀이와 확인할 이유Solution and explanation

전체 울타리는 1,750~6,550g이라 두 값 모두 안에 있습니다. Chinstrap 울타리는 2,793.75~4,643.75g이라 두 값 모두 엄격히 밖입니다. 기준 집합이 다르기 때문에 표시가 달라지며 두 원행은 어느 계산에서도 자동 삭제하지 않습니다.

Pooled fences are 1,750 to 6,550 g; neither is flagged. Chinstrap fences are 2,793.75 to 4,643.75 g; both are strictly outside. Reference subsets differ; no source row is automatically deleted.

31. 두 평균에 같은 쌍을 쓴다Use identical pairs for both means

같은 네 위치의 x=(1,2,미가용,4), y=(2,3,5,8)입니다. 두 값이 모두 가용한 위치와 그 쌍의 두 평균을 구하세요. 위치는 0부터 셉니다.

At four shared zero-based positions, x=(1, 2, unavailable, 4), y=(2, 3, 5, 8). Find complete-pair positions and the two means over those pairs.

풀이와 확인할 이유Solution and explanation

완전짝 위치는 0, 1, 3이고 쌍은 (1,2), (2,3), (4,8)입니다. 평균은 7/3과 13/3입니다. y 단독 평균 18/4는 여기의 짝 평균과 다릅니다.

Positions 0, 1, 3 give (1, 2), (2, 3), (4, 8). Their means are 7/3 and 13/3. The marginal y mean 18/4 uses a different set.

32. 각 열을 따로 압축하면 생기는 오연결Separate compaction can mislink records

원위치가 같은 x=(1,2,미가용,4), y=(2,3,5,8)에서 각 열의 미가용만 따로 지운 뒤 앞에서 세 개씩 짝지으면 x=4가 어느 y와 묶이나요? 올바른 원쌍과 비교하세요.

For shared-position x=(1, 2, unavailable, 4), y=(2, 3, 5, 8), independently remove unavailable entries and pair the first three remaining values. Which y is incorrectly linked to x=4?

풀이와 확인할 이유Solution and explanation

별도 압축은 x=4를 y=5와 묶습니다. 하지만 x=4의 원위치 3에는 y=8이 있으므로 원래 쌍은 (4,8)입니다. 위치를 먼저 연결하고 완전 여부를 검사해야 합니다.

It is linked to 5, although its original position three has y=8. The retained pair is (4, 8). Link original positions before checking availability.

33. 세 쌍의 중심 곱합Centered sums for three pairs

완전짝은 (1,2), (2,3), (4,8)이며 평균은 7/3과 13/3입니다. 중심 곱합 Sxy와 두 중심 제곱합 Sxx,Syy를 구하세요.

Complete pairs (1, 2), (2, 3), (4, 8) have means 7/3 and 13/3. Find Sxy and square sums Sxx,Syy.

풀이와 확인할 이유Solution and explanation

x 차이는 −4/3, −1/3, 5/3이고 y 차이는 −7/3, −4/3, 11/3입니다. 곱합은 (28+4+55)/9=29/3, 제곱합은 (16+1+25)/9=14/3과 (49+16+121)/9=62/3입니다. 모두 같은 세 쌍에서 계산했습니다.

Centered x values are −4/3, −1/3, 5/3; centered y values are −7/3, −4/3, 11/3. Thus Sxy=29/3, Sxx=14/3 and Syy=62/3. All sums use the same three pairs.

34. 공분산의 두 분모Two covariance denominators

같은 세 완전짝의 중심 곱합은 Sxy=29/3입니다. n 분모 기술적 공분산과 n−1 분모 표본식 공분산을 각각 구하세요.

Three complete pairs have centered cross product Sxy=29/3. Calculate descriptive covariance using n and sample-formula covariance using n−1.

풀이와 확인할 이유Solution and explanation

n=3으로 나누면 29/9, n−1=2로 나누면 29/6입니다. 두 값의 차이는 같은 합에 붙인 분모의 차이입니다. 표본식이라는 이름만으로 실제 추출이 독립·동일분포였다고 판단하지 않습니다.

They are 29/9 and 29/6. Different declared denominators explain the difference. Naming a sample formula does not establish an iid sampling mechanism.

35. 단위 없는 상관의 제곱Squared dimensionless correlation

같은 완전짝에서 Sxy=29/3, Sxx=14/3, Syy=62/3입니다. r²=Sxy²/(SxxSyy)와 r의 부호를 구하세요.

On identical complete pairs, Sxy=29/3, Sxx=14/3, Syy=62/3. Find r²=Sxy²/(SxxSyy) and the sign of r.

풀이와 확인할 이유Solution and explanation

r²=(29/3)²/[(14/3)(62/3)]=841/868입니다. 분모가 양수이고 Sxy>0이라 r은 양수입니다. 이 단위 없는 값은 y가 x의 한 단위 증가에 얼마나 변하는지 나타내는 기울기와는 다릅니다.

The squared correlation is 841/868. Since both square sums are positive and Sxy>0, r is positive. This dimensionless summary is not a slope measured in y units per x unit.

36. 상수축의 상관Correlation with a constant axis

세 쌍은 (1,2), (1,4), (1,6)입니다. Sxx와 Sxy, 기술적 공분산, 상관의 정의 여부를 구별하세요.

Pairs are (1, 2), (1, 4), (1, 6). Distinguish Sxx, Sxy, descriptive covariance and whether correlation is defined.

풀이와 확인할 이유Solution and explanation

x 차이가 모두 0이라 Sxx=0과 Sxy=0입니다. n 분모 공분산은 0이지만 상관 분모는 0이라 미정의입니다. 공분산 0을 상관 0으로 옮겨 적을 수 없습니다.

All centered x values are zero. Hence Sxx=Sxy=0 and descriptive covariance is zero. Correlation is undefined because its denominator is zero.

37. 상관 0이어도 비선형 관계는 남는다Zero correlation with nonlinear dependence

쌍 (−1,1), (0,−2), (1,1)을 봅니다. Sxy와 r을 계산하세요. 이어 이 세 쌍 중 하나를 각각 확률 1/3로 추출한다고 명시했을 때 x와 y가 독립인지 판단하세요.

Use pairs (−1, 1), (0,−2), (1, 1). Find Sxy and r. Then explicitly draw one of the three pairs with probability 1/3 each: are x and y independent under this law?

풀이와 확인할 이유Solution and explanation

두 평균은 0이고 Sxy=−1+0+1=0입니다. 두 제곱합이 양수라 r=0입니다. 그러나 y=3x²−2이며, x=0일 때 y=−2 확률은 1인 반면 전체 확률은 1/3입니다. 이 명시한 유한 법칙에서는 독립이 아닙니다.

Both means are zero, and Sxy=−1+0+1=0. Positive square sums make r=0. Yet y=3x²−2: conditional on x=0, y=−2 has probability one instead of its marginal 1/3. Under this declared finite law the variables are dependent.

38. 몸무게를 kg으로 바꾸면Change mass from grams to kilograms

x는 mm, y는 g인 같은 완전짝이고 원래 두 중심 제곱합은 양수입니다. y′=y/1,000으로 바꿀 때 Sxy,Syy,r은 각각 어떻게 변하나요?

On identical complete pairs, x is in mm and y in grams, with positive original square sums. How do Sxy,Syy,r change under y′=y/1,000?

풀이와 확인할 이유Solution and explanation

새 Sxy는 원래의 1/1,000배, Syy는 1/1,000,000배입니다. 상관의 분자와 분모가 같은 양수 배율로 바뀌어 r은 그대로입니다. 단위를 바꾸면서 쌍 집합도 바꾸면 이 설명을 그대로 적용할 수 없습니다.

Sxy is divided by 1,000 and Syy by 1,000,000. The matching positive factor cancels from correlation, so r is unchanged. Preserve the paired set as well as the conversion.

39. 음수 배율과 0배율Negative and zero scale factors

같은 완전짝에서 원래 Sxx,Syy>0이고 상관은 r입니다. x′=10−2x, y′=3y라면 새 상관은 무엇인가요? 대신 x′=10인 상수로 만들면 어떻게 되나요?

Original complete pairs have Sxx,Syy>0 and correlation r. Find correlation for x′=10−2x, y′=3y. What if x′ is instead the constant 10?

풀이와 확인할 이유Solution and explanation

배율 곱은 −6이라 새 상관은 −r입니다. 평행이동 10은 중심 차이에 남지 않습니다. 배율을 0으로 바꾸어 상수축을 만들면 제곱합이 0이므로 상관은 미정의입니다.

The scale product is −6, so correlation becomes −r. The shift vanishes after centering. A zero scale collapses x to a constant and makes correlation undefined.

40. 제곱 표시가 0이어도 양수인 상관A displayed zero square can have a nonzero root

설명용 정확한 상관이 r=10⁻³⁰⁰이고 r²=10⁻⁶⁰⁰이라고 합시다. 보통 binary64 소수 표시에서 r²가 0으로 반올림되지만 r은 표시할 수 있다면 수학적 상관이 0인가요? 실제 측정 정밀도와도 구별하세요.

Assume the illustrative exact correlation is r=10⁻³⁰⁰ and r²=10⁻⁶⁰⁰. An ordinary binary64 display rounds the square to zero while representing r. Is the mathematical correlation zero?

풀이와 확인할 이유Solution and explanation

아닙니다. 가정한 정확 r은 양수이며 제곱의 표시 범위 손실과 구별합니다. 정확 분수·제곱·상관 표시의 상태를 따로 보존하면 됩니다. 산술을 더 정확히 보존한 것이 실제 펭귄을 더 정밀하게 측정했다는 뜻은 아닙니다.

No. The assumed r is positive. Keep exact arithmetic and square/root display statuses distinct. Preserving arithmetic does not add measurement precision to real observations.

41. 두 집단의 중심 곱합Within products for two groups

네 쌍을 A: (1,2),(2,4), B: (4,3),(5,6)으로 나눕니다. 전체 평균은 (3,15/4), 집단 평균은 A=(3/2,3), B=(9/2,9/2)입니다. 집단 안 중심 곱합을 구하고 전체 곱합 7에서 남는 사이 성분을 구하세요.

Partition four pairs into A: (1, 2),(2, 4), B: (4, 3),(5, 6). Overall mean is (3, 15/4); group means are (3/2, 3), (9/2, 9/2). Find the within cross product and the remainder from total seven.

풀이와 확인할 이유Solution and explanation

A 안에서는 (−1/2)(−1)+(1/2)(1)=1이고 B 안에서는 (−1/2)(−3/2)+(1/2)(3/2)=3/2입니다. 안 합은 5/2이고 사이 성분은 7−5/2=9/2입니다. 네 쌍을 겹치거나 빼지 않고 나눈 결과입니다.

Within A contributes one, within B contributes 3/2, totaling 5/2. The between component is 7−5/2=9/2. These components partition exactly the same four pairs.

42. 집단 평균 차이로 사이 성분을 구한다Between products from group means

두 집단에 각각 완전짝 2개가 있습니다. 집단 평균은 (3/2,3)과 (9/2,9/2), 전체 평균은 (3,15/4)입니다. Bxy=Σg ng(x̄g−x̄)(ȳg−ȳ)를 직접 계산하세요.

Each of two groups has two complete pairs. Their means are (3/2, 3), (9/2, 9/2), with overall mean (3, 15/4). Calculate Bxy=Σg ng (x̄g−x̄)(ȳg−ȳ).

풀이와 확인할 이유Solution and explanation

첫 집단은 2×(−3/2)×(−3/4)=9/4, 둘째는 2×(3/2)×(3/4)=9/4입니다. 합은 9/2입니다. 이 성분은 집단 평균의 위치 차이이며 집단을 바꾸는 조치의 인과효과는 아닙니다.

Each group contributes 9/4, giving 9/2. This describes group-mean locations, rather than identifying the effect of an intervention that changes group membership.

43. 네 쌍의 제곱합 분해Both square-sum decompositions

A: (1,2),(2,4), B: (4,3),(5,6)인 같은 네 쌍에서 전체 평균은 (3,15/4)입니다. x와 y의 전체·집단 안·집단 사이 제곱합을 구하세요.

For A: (1, 2),(2, 4), B: (4, 3),(5, 6), the overall mean is (3, 15/4). Find total, within and between square sums for each axis.

풀이와 확인할 이유Solution and explanation

x 전체 제곱합은 4+1+1+4=10, 안 합은 1/2+1/2=1, 사이 합은 9입니다. y 전체는 35/4, 안 합은 2+9/2=13/2, 사이 합은 9/4입니다. 두 축 모두 전체=안+사이가 성립합니다.

For x, total 10 equals within 1 plus between 9. For y, total 35/4 equals within 13/2 plus between 9/4. Both decompositions use identical pairs and group membership.

44. 한 집단과 한 쌍 집단One group versus singleton groups

네 완전짝 (1,2),(2,4),(4,3),(5,6)의 전체 중심 곱합은 7입니다. 모든 쌍을 한 집단에 넣을 때와 각 쌍을 별도 한 쌍 집단으로 만들 때 안·사이 곱합은 어떻게 되나요?

Pairs (1, 2),(2, 4),(4, 3),(5, 6) have overall centered cross product seven. Compare within/between sums when all belong to one group and when each forms its own singleton group.

풀이와 확인할 이유Solution and explanation

한 집단이면 안 7·사이 0입니다. 각 쌍이 별도 집단이면 집단 안 차이는 모두 0이라 안 0·사이 7입니다. 한 쌍 집단의 상관은 미정의여도 그 집단의 안 중심 곱합 0은 유효한 합의 성분입니다.

One group gives within seven and between zero. Singleton groups give within zero and between seven. An undefined singleton correlation does not invalidate its zero within cross product.

45. 미가용 집단 표식을 보존한다Preserve an unavailable group label

네 쌍 (1,2),(2,4),(4,3),(5,6)의 전체 중심 곱합은 7입니다. 집단 표식이 A, 미가용, B, B일 때 미가용을 별도 통으로 유지하여 안·사이 곱합을 구하세요.

Four pairs (1, 2),(2, 4),(4, 3),(5, 6) have total cross product seven. Labels are A, unavailable, B, B. Retain an unavailable-label bucket and find within/between components.

풀이와 확인할 이유Solution and explanation

A와 미가용 통은 각각 한 쌍이라 안 합이 0이고 B의 안 합은 3/2입니다. 전체 안 3/2, 사이 7−3/2=11/2입니다. 미가용 표식 행을 지워서 다른 세 쌍의 분해로 바꾸지 않았습니다. 별도 통이 새로운 관측 생물 집단을 뜻하지도 않습니다.

The two singleton buckets contribute zero within. B contributes 3/2, so within is 3/2 and between is 11/2. The unavailable label is an accounting bucket, not a newly observed biological group.

46. 342쌍의 전체와 333쌍의 성분Total on 342 pairs, components on 333

어떤 보고서가 전체 중심 곱합은 측정 완전짝 342개에서 구하고, 집단 안·사이 성분은 성별 가용 333개에서 구한 뒤 전체=안+사이를 주장합니다. 왜 같은 분해의 검산이 아닌가요?

A report calculates the overall cross product on 342 complete measurement pairs, but within/between terms on 333 known-sex pairs, then claims total=within+between. Why is that not a check of one decomposition?

풀이와 확인할 이유Solution and explanation

성분에서 빠진 9쌍 때문에 전체와 집단 성분의 관측 집합·평균이 달라졌습니다. 342쌍을 분해하려면 미가용 성별의 측정 9쌍도 통으로 남겨 같은 집합을 덮어야 합니다. 또는 전체부터 333쌍으로 다시 계산하고 그 다른 범위를 명시해야 합니다.

The components omit nine pairs and use a different set and means. To decompose 342 pairs, retain the nine measured pairs with unavailable sex in a bucket. Alternatively recompute the total on 333 and state the changed scope.

47. 실제 곱합의 단위와 표시Units and display of actual cross products

같은 실제 날개·몸무게 342쌍의 중심 곱합 표시는 전체 3,350,125.877193, 종 안 608,678.320601, 종 사이 2,741,447.556592입니다. x는 mm, y는 g입니다. 단위를 쓰고, 짧은 소수 합의 일치만으로 원분수 항등식과 인과효과가 증명되는지 답하세요.

For identical 342 actual flipper/mass pairs, displayed total, within-species and between-species cross products are 3,350,125.877193, 608,678.320601, 2,741,447.556592. The axes are mm and g. Give units and explain what matching decimals establish.

풀이와 확인할 이유Solution and explanation

세 값의 단위는 mm·g입니다. 표시 소수의 합은 맞지만 정확한 항등식은 같은 쌍의 원분수에서 따로 검산합니다. 이 대수적 분해로 종 변화의 인과효과가 식별되지는 않습니다. 다른 자릿수 표시에서는 반올림 합 차이가 날 수 있습니다.

All components have units mm·g. Check the exact identity separately using identical pairs and exact fractions. Matching short decimals alone is not an exact proof or identification of a causal species effect; other rounding can leave a displayed sum discrepancy.

48. 공분산을 합치는 무게Weights when pooling covariance

같은 네 쌍 A: (1,2),(2,4), B: (4,3),(5,6)에서 안 곱합은 1과 3/2, 사이 곱합은 9/2입니다. 집단별 n_g 분모 공분산과 전체 n 분모 공분산을 무게로 연결하세요.

For A: (1, 2),(2, 4), B: (4, 3),(5, 6), within cross products are 1 and 3/2, and between cross product is 9/2. Connect group n_g-denominator covariances with the overall n-denominator covariance.

풀이와 확인할 이유Solution and explanation

집단 공분산은 1/2와 3/4이고 무게는 각각 2/4입니다. 안 성분은 (1/2)(1/2)+(1/2)(3/4)=5/8입니다. 사이 성분 (9/2)/4=9/8을 더하면 7/4입니다. n_g−1 공분산이나 집단 상관을 그대로 같은 무게로 대입하지 않습니다.

Group covariances are 1/2 and 3/4, weighted by 1/2 each, giving within 5/8. Add between 9/8 to obtain 7/4. Group sample-formula covariances or correlations cannot simply replace these quantities under the same weights.

49. 양수인 네 상관의 해석Four positive actual correlations

실제 날개·몸무게 상관은 전체 약 0.871202, Adelie 안 0.468202, Chinstrap 안 0.641559, Gentoo 안 0.702667입니다. 집단별 부호 반전이 관측되었나요? 종별 상관의 단순 평균이 전체 상관이어야 하나요?

Actual pooled flipper/mass correlation is about 0.871202; within Adelie, Chinstrap and Gentoo it is 0.468202, 0.641559, 0.702667. Is there a sign reversal? Must their simple average equal the pooled correlation?

풀이와 확인할 이유Solution and explanation

네 값 모두 양수라 부호 반전은 없습니다. 각 상관의 중심·제곱합 분모가 다르므로 종별 상관의 단순 평균이 전체 상관일 필요도 없습니다. 전체 점 구름에는 종 평균 위치 차이도 들어 있습니다.

All are positive, so no sign reversal occurs. Different centers and square-sum denominators mean the simple average need not equal the pooled correlation. Species mean locations also contribute to the pooled cloud.

50. 종별 원행과 완전짝 수Species rows versus complete measurement pairs

실제 종별 원행 수는 Adelie 152, Chinstrap 68, Gentoo 124이고 날개·몸무게 완전짝 수는 각각 151,68,123입니다. 종별로 몇 쌍이 미가용 때문에 빠졌나요? 모든 여덟 열 완전 행을 골랐다고 할 수 있나요?

Actual species row counts are 152, 68, 124, and complete flipper/mass pair counts are 151, 68, 123. How many pairs are unavailable per species? Does this select all-eight-field complete rows?

풀이와 확인할 이유Solution and explanation

종별 차이는 1,0,1쌍이며 총 2쌍입니다. 지금 필요한 두 측정만 확인한 결과라 다른 열까지 완전한 333행 선택과 같지 않습니다. 측정 완전짝은 총 342개입니다.

Differences are 1, 0, 1, totaling two. This checks two measurements, not completeness of unrelated fields. There are 342 measurement pairs, distinct from 333 all-field complete rows.

51. 중심 곱합 분해를 유도한다Derive the centered cross-product identity

유한한 N≥1개 완전짝을 비어 있지 않고 겹치지 않는 집단으로 분할합니다. 집단 안 차이를 δᵢ=xᵢ−x̄g, ηᵢ=yᵢ−ȳg, 평균 차이를 Δg=x̄g−x̄, Γg=ȳg−ȳ로 둡니다. 전체 중심 곱합이 안 합과 사이 합으로 나뉘는 이유를 보이세요.

Partition N≥1 finite complete pairs into disjoint nonempty groups. Define δᵢ=xᵢ−x̄g, ηᵢ=yᵢ−ȳg, Δg=x̄g−x̄, Γg=ȳg−ȳ. Why does the total cross product equal within plus between?

풀이와 확인할 이유Solution and explanation

각 쌍의 곱은 (δᵢ+Δg)(ηᵢ+Γg)입니다. 집단 안 δ와 η의 합은 각각 0이라 δΓ와 Δη 합이 사라집니다. 남는 Σδᵢηᵢ가 안 합이고 Σg ngΔgΓg가 사이 합입니다. 유한 합의 전개여서 독립·정규 가정이 필요하지 않습니다.

Expand (δᵢ+Δg)(ηᵢ+Γg). Within each group, sums of δ and η vanish, eliminating the mixed terms. The remainder is Σδᵢηᵢ+Σg ngΔgΓg. This finite algebra needs no independence or normality assumption.

52. 제곱합 분해의 부호Signs in the square-sum decomposition

유한한 N≥1개 실수값을 비어 있지 않고 겹치지 않는 집단으로 나누고 전체 평균 x̄와 집단 평균 x̄g를 씁니다. Sxx=Σi(xi−x̄)²가 안 합과 사이 합으로 나뉘며 두 성분이 음수가 아님을 보이세요.

Partition N≥1 finite real values into disjoint nonempty groups, using overall mean x̄ and group means x̄g. Show that Sxx=Σi(xi−x̄)² splits into two nonnegative components.

풀이와 확인할 이유Solution and explanation

xi−x̄=(xi−x̄g)+(x̄g−x̄)를 제곱합니다. 집단 안 첫 차이의 합이 0이라 교차항이 사라집니다. 안 합 ΣgΣi∈g(xi−x̄g)²와 사이 합 Σg ng(x̄g−x̄)²는 각각 제곱의 비음수 합입니다.

Square xi−x̄=(xi−x̄g)+(x̄g−x̄). The mixed sum vanishes because group-centered deviations sum to zero. Both remaining terms are sums of squares with nonnegative weights: the within sum and Σg ng (x̄g−x̄)².

53. 상관 절댓값의 상계Bound the absolute correlation

유한한 같은 완전짝에서 aᵢ=xᵢ−x̄, bᵢ=yᵢ−ȳ, Sxx=Σaᵢ²>0, Syy=Σbᵢ²>0, Sxy=Σaᵢbᵢ입니다. Σ(bᵢ−taᵢ)²≥0에 t=Sxy/Sxx를 넣어 |r|≤1을 보이세요.

For identical finite complete pairs, let aᵢ=xᵢ−x̄, bᵢ=yᵢ−ȳ, Sxx=Σaᵢ²>0, Syy=Σbᵢ²>0 and Sxy=Σaᵢbᵢ. Put t=Sxy/Sxx in Σ(bᵢ−taᵢ)²≥0 to prove |r|≤1.

풀이와 확인할 이유Solution and explanation

전개하면 Syy−2tSxy+t²Sxx≥0입니다. 지정 t에서 Syy−Sxy²/Sxx≥0이므로 Sxy²≤SxxSyy입니다. 양수 SxxSyy로 나누어 r²≤1을 얻습니다. 0분모 상수축에는 이 나눗셈을 적용하지 않습니다.

Expansion gives Syy−2tSxy+t²Sxx≥0. Substitution yields Sxy²≤SxxSyy, hence r²≤1 after division by the positive product. A constant-axis zero denominator lies outside this step.

54. 양의 단위 환산과 보간 분위수Positive unit conversion and interpolated quantiles

같은 가용값에 x′=a+bx, b>0를 적용합니다. type 7 분위수는 정렬값 두 개의 가중평균 (1−γ)xj+γxj+1입니다. 새 분위수와 IQR이 어떻게 바뀌는지 유도하세요.

Apply x′=a+bx with b>0 to identical available values. A type 7 quantile is the ordered interpolation (1−γ)xj+γxj+1. Derive the transformed quantile and IQR.

풀이와 확인할 이유Solution and explanation

양수 배율은 정렬 순서를 보존합니다. 같은 두 위치를 보간하면 (1−γ)(a+bxj)+γ(a+bxj+1)=a+bQp입니다. 두 사분위수의 차이에서는 a가 없어져 IQR′=bIQR입니다.

Positive scaling preserves order and interpolation positions. The new weighted average is a+bQp. Subtract transformed quartiles to obtain IQR′=bIQR.

55. 양의 환산에서 울타리 표식 보존Fence flags under positive conversion

같은 가용값을 x′=a+bx, b>0로 환산하고 같은 울타리 배수 k≥0를 씁니다. Q′₁=a+bQ₁, Q′₃=a+bQ₃, IQR′=bIQR이 성립한다고 주어졌습니다. 엄격 울타리 표식이 보존됨을 보이세요.

Convert identical values by x′=a+bx with b>0, retaining fence multiplier k≥0. Given Q′₁=a+bQ₁, Q′₃=a+bQ₃ and IQR′=bIQR, prove preservation of strict fence flags.

풀이와 확인할 이유Solution and explanation

새 아래·위 울타리는 L′=a+bL, U′=a+bU입니다. b>0이므로 x′<L′와 x<L가 동치이고 x′>U′와 x>U가 동치입니다. 따라서 같은 원행 표식이 보존됩니다. 이 증명은 정확 산술이며 반올림한 경계를 새 입력으로 삼는 경우까지 같다고 말하지 않습니다.

New fences are L′=a+bL and U′=a+bU. Positive b preserves both strict inequalities, so exactly the same source rows are flagged. This exact-arithmetic proof does not replace boundaries with separately rounded new inputs.

56. 미가용 성별 쌍까지 평균에 포함한다Include measured masses with unavailable sex

342개 가용 몸무게 중 female 165개 평균 f, male 168개 평균 m, 성별 미가용 9개 평균 u입니다. 전체 몸무게 평균과 성별 가용 333개 평균을 쓰세요. 두 평균이 같은 필요충분조건은 무엇인가요?

Among 342 available masses, 165 female values average f, 168 male values average m, and nine unavailable-sex values average u. Express the pooled and 333-known-sex means. When are they equal?

풀이와 확인할 이유Solution and explanation

전체는 (165f+168m+9u)/342, 성별 가용 평균 h는 (165f+168m)/333입니다. 전체=(333h+9u)/342이므로 두 평균의 차이는 9(u−h)/342입니다. 따라서 정확히 u=h일 때 같습니다. 미가용 표식을 지우면 언제나 평균이 바뀐다고도, 언제나 보존된다고도 할 수 없습니다.

The pooled mean is (165f+168m+9u)/342. Set h=(165f+168m)/333. The pooled-minus-known difference is 9(u−h)/342, so equality holds exactly when u=h. Omitting an unavailable label need neither always change nor always preserve the mean.

57. 관측 0칸과 영구 개체 번호An observed zero cell and a source position

보관 표에서 Gentoo·Dream 칸이 0이고 원행 314가 4,800g입니다. 이 두 사실로 “Gentoo는 Dream에 살 수 없다” 또는 “314는 영구 개체 표식이다”를 결론 낼 수 있나요?

The retained table has zero Gentoo/Dream records, and source row 314 records 4,800 g. Do these establish biological impossibility on Dream or a permanent specimen identifier 314?

풀이와 확인할 이유Solution and explanation

둘 다 자료에 없는 추가 주장입니다. 첫 사실은 이 보관 표에 해당 관측이 없음을 말하며 두 번째 번호는 이 사본에서 기록을 찾는 위치입니다. 더 넓은 생태적 가능성이나 영구 개체 추적에는 별도 정보가 필요합니다.

Neither follows. Zero describes this table’s coverage; 314 locates a record in this retained copy. Wider ecological possibilities or permanent specimen tracing require additional information.

58. type 7 분위수와 상자그림 힌지Type 7 quartiles versus boxplot hinges

가용값 1,2,4,10에 R의 type 7 사분위수는 1.75와 5.5이고 기본 boxplot.stats 힌지는 1.5와 7입니다. 두 출력이 다르다는 사실만으로 계산 오류인가요? 같은 표식 규칙이라고 부를 수 있나요?

For values 1, 2, 4, 10, R type 7 quartiles are 1.75 and 5.5, while default boxplot.stats hinges are 1.5 and 7. Does disagreement alone establish an error or an identical flag rule?

풀이와 확인할 이유Solution and explanation

아닙니다. 서로 다른 정의의 요약값입니다. type 7 울타리를 설명한다면 그 분위수를 직접 계산해야 하며 상자그림 힌지를 같은 값으로 대신하지 않습니다. 그림·표 제목에 실제 사용한 정의를 적습니다.

No. The definitions differ. A type 7 fence analysis must compute its chosen quartiles rather than substitute boxplot hinges. Name the actual rule in tables and plots.

59. 보관 실행과 새 브라우저 입력Archived execution versus new browser input

이 장에는 실제 새 프로세스로 실행한 Python/R 프로그램 32개와 SVG 30개가 보관되어 있습니다. 독자가 브라우저 목록을 새 값으로 바꿔 얻은 평균도 새 Python/R 실행인가요? SVG가 없는 두 기록은 자동 실패인가요?

The chapter retains 32 actually executed Python/R programs and 30 SVGs. Is a newly edited browser mean another Python/R execution? Are the two records without SVG automatically failures?

풀이와 확인할 이유Solution and explanation

새 입력은 브라우저 JavaScript 계산입니다. 별도 다운로드 코드의 실제 실행과 구별합니다. 미가용만 있는 두 언어 예제는 수치 상태를 텍스트로 반환하므로 SVG가 없어도 성공한 기록입니다. 성공 여부·산출물 종류·실행 경로를 각각 읽습니다.

New inputs run browser JavaScript. Distinguish this from actually executing downloaded code. The two language versions of the all-unavailable example successfully return text states without SVG. Read execution status, artifact type and calculation path separately.

60. 짧은 탐색 보고서를 완성한다Write a short exploratory report

실제 표 344행·8열, 미가용 19칸, 모든 열 완전 333행, 날개·몸무게 완전짝 342개와 r≈0.871202가 주어졌으며 종별 상관도 모두 양수입니다. Chinstrap의 type 7 엄격 1.5-IQR 질의는 원행 314·315를 표시하지만 삭제하지 않습니다. 관측 범위·분모·규칙을 포함하는 세 문장 보고서를 쓰세요.

Given 344 retained records/eight fields, nineteen unavailable cells, 333 all-field complete records, 342 flipper/mass pairs and r≈0.871202, with all within-species correlations positive, write three sentences. A strict 1.5-IQR Chinstrap query using type 7 flags rows 314 and 315 without deletion. State scopes and rules.

풀이와 확인할 이유Solution and explanation

예: “보관한 344행·8열에서 미가용은 19칸이며 모든 열 완전 행은 333개이다. 날개·몸무게를 함께 아는 342쌍의 상관은 약 0.871202이고, 종별 상관도 모두 양수라 부호 반전은 관측되지 않았다. Chinstrap 안의 type 7 엄격 1.5-IQR 규칙은 원행 314·315를 확인 대상으로 표시했으며 원행을 삭제하거나 인과효과를 추정하지 않았다.”

Example: “The retained 344-by-eight table has nineteen unavailable cells and 333 all-field complete records. Across 342 complete flipper/mass pairs, correlation is about 0.871202; positive within-species correlations show no sign reversal here. A strict type 7 1.5-IQR query within Chinstrap flags source rows 314 and 315 for inspection while retaining them, without estimating an intervention effect.”

자료와 출처Data and sources

실습에 추가한 실제 입력과 출처Additional observed lab inputs and provenance

실제 자료 사례Actual-data cases · 원자료·단위·결측·변환·출처Inputs, units, missingness, transformations and sources

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms