작은 설문 하나를 끝까지: 빈도에서 회귀까지
지어낸 설문 60명 · 여섯 마디 — 빈도 → 기술통계 → t검정 → 일원 ANOVA → 상관 → 회귀
연구 질문 — 점수는 성별·부서에 따라 다른가, 그리고 무엇이 점수를 예측하는가?
이 사례는 영어입니다 — 원자료·표·APA 문장이 영어로 되어 있습니다.
원자료 walkthrough_survey.csv · 60행
지어낸 자료 — scripts/walkthrough/make_sample.py 가 만든 60행 설문 표본(안내 글 세 편과 따라 하기가 쓰는 그 표본). 표와 APA 문장은 backend/tests/test_en_sample_walkthrough_en2.py 가 엔진을 영어로 실제 돌려 낸 실측치입니다.
| id | gender | age | department | satisfaction | score |
|---|---|---|---|---|---|
| R001 | F | 28 | Sales | 4 | 4.12 |
| R002 | M | 20 | Sales | 3 | 2.93 |
| R003 | F | 33 | Support | 2 | 1.91 |
| R004 | M | 32 | Sales | 3 | 2.46 |
| R005 | F | 46 | Support | 5 | 4.9 |
완주 여정 — 단계별로 실제로 만든 것
① 빈도 — 누가 답했나
먼저 셉니다. 성별과 부서에 각각 몇 명이 있는지, 빠진 칸은 없는지. 이 마디를 건너뛰면 뒤의 모든 검정이 «몇 명 위에서 돌았는지» 모른 채 나옵니다.
A frequency analysis was conducted on gender and department (N = 60). For gender (2 categories), "F, M" each appeared equally often (30, 50.0% of valid cases); valid n = 60, missing = 0. For department (3 categories), the most frequent category was "Research" (24, 40.0% of valid cases); valid n = 60, missing = 0. No missing data were present.
② 기술통계 — 점수의 생김새
점수 한 열의 평균·표준편차·중앙값·사분위·최솟값·최댓값과 왜도·첨도를 봅니다. 분포가 한쪽으로 몰려 있으면 뒤에서 고를 검정이 달라집니다.
Descriptive statistics were computed for score (N = 60). For score, M = 3.75, SD = 0.77, Mdn = 3.96, range = 1.73–5.00. Skewness = -0.57 and kurtosis = -0.05, within normal range. No missing data were present.
③ 독립표본 t검정 — 성별에 따라 다른가
두 집단의 평균을 견줍니다. 등분산 가정은 Levene 검정이 함께 재고, 결과에는 효과크기(Cohen’s d)와 평균차의 신뢰구간이 붙습니다.
Independent-samples t-tests compared score across levels of gender (N = 60). For score, F (M = 4.11, SD = 0.66) scored significantly higher than M (M = 3.39, SD = 0.71), Student's t(58) = 4.06, p < .001, d = 1.05, 95% CI [0.36, 1.07]. Levene's test indicated equal variances.
④ 일원 ANOVA — 부서에 따라 다른가
집단이 셋이면 t검정을 세 번 하지 않고 한 번에 봅니다. 효과가 유의할 때 어느 쌍이 갈라지는지는 사후검정(Tukey HSD)이 짚어 주고, 그 표도 아래에 함께 실립니다.
One-way ANOVAs examined score across levels of department (N = 60). For score, there was a non-significant effect, F(2, 57) = 1.77, p = .180, η² = .06. Levene's test indicated equal variances (p = .886). Group statistics: Research (M = 3.96, SD = 0.71), Sales (M = 3.51, SD = 0.80), Support (M = 3.70, SD = 0.79).
⑤ 상관 — 무엇이 함께 움직이나
변수 셋을 한 번에 견주면 쌍이 셋입니다. 그래서 문장이 아니라 상관행렬로 냅니다 — 칸마다 r과 p가 함께 있습니다.
A Pearson correlation analysis was conducted (N = 60). score and age were significantly correlated in a positive direction, r = .26, 95% CI [.01, .49], p = .041. score and satisfaction were significantly correlated in a positive direction, r = .87, 95% CI [.79, .92], p < .001.
⑥ 회귀 — 무엇이 점수를 예측하나
나이와 만족도로 점수를 예측합니다. 성별은 글자라 엔진이 회귀에서 빼는데, **빼면서 그렇게 말합니다** — 조용히 지우지 않습니다(아래 각주).
A multiple linear regression was conducted to predict score from age, satisfaction. The overall model was significant (R² = .77, adjusted R² = .76, F(2, 57) = 93.64, p < .001). The predictors accounted for 76.7% of the variance in score. age was not a significant predictor (β = .11, p = .083). satisfaction significantly predicted score (B = 0.72, SE = 0.06, β = .85, t(57) = 13.05, p < .001). Multicollinearity was assessed using the variance inflation factor; the maximum VIF was 8.28 (age), indicating no serious multicollinearity. · Excluded variables: gender — not numeric, so they were left out.
핵심 산출
① 빈도 — Frequency table
Total N = 60, Total missing = 0 · Cumulative percent: based on valid responses
| Variable | Category | Frequency | Percent | Valid Percent | Cumulative Percent |
|---|---|---|---|---|---|
| gender | F | 30 | 50.0 | 50.0 | 50.0 |
| gender | M | 30 | 50.0 | 50.0 | 100.0 |
| department | Research | 24 | 40.0 | 40.0 | 40.0 |
| department | Sales | 17 | 28.3 | 28.3 | 68.3 |
| department | Support | 19 | 31.7 | 31.7 | 100.0 |
| Total | 60 | 100.0 | 100.0 | 100.0 |
② 기술통계 — Descriptive statistics
Total N = 60, Total missing = 0
| Variable | N | Mean | Std. Deviation | Variance | Std. Error | Median | Q1 | Q3 | Minimum | Maximum | Skewness | Kurtosis |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| score | 60 | 3.75 | 0.77 | 0.59 | 0.099 | 3.96 | 3.23 | 4.27 | 1.73 | 5.0 | -0.567 | -0.052 |
③ 독립표본 t검정 — Mean comparison by gender
score: Levene p=.399
| Variable | Group | N | Mean | SD | Equal variances | t | df | p | Mean difference | Cohen's d | 95% CI of difference |
|---|---|---|---|---|---|---|---|---|---|---|---|
| score | F | 30 | 4.11 | 0.657 | assumed | 4.058 | 58 | < .001 | 0.718 | 1.048 | [0.364, 1.072] |
| M | 30 | 3.39 | 0.713 |
④ 일원 ANOVA — score — Post hoc comparisons (Tukey HSD)
| Comparison | Mean difference | Std. Error | p | 95% CI | Decision |
|---|---|---|---|---|---|
| Research vs Sales | 0.445 | 0.170 | .163 | [-0.134, 1.025] | N.S. |
| Research vs Support | 0.256 | 0.165 | .520 | [-0.305, 0.818] | N.S. |
| Sales vs Support | -0.189 | 0.179 | .737 | [-0.800, 0.421] | N.S. |
④ 일원 ANOVA — Mean comparison by department
score: η²=0.058, ω²=0.025, Post hoc: no significant pairs
| Variable | Group | N | Mean | SD | SS | df | MS | F | p |
|---|---|---|---|---|---|---|---|---|---|
| score | Research | 24 | 3.96 | 0.707 | 2.041 | 2 | 1.021 | 1.767 | .180 |
| Sales | 17 | 3.51 | 0.796 | ||||||
| Support | 19 | 3.70 | 0.792 | ||||||
| Within groups | 32.921 | 57 | 0.578 | ||||||
| Total | 34.963 | 59 |
⑤ 상관 — Pearson correlation matrix
N = 60 (pairwise) · Each cell: r (p) · Significant correlations: score↔age(r=0.264, p=.041, positive), score↔satisfaction(r=0.868, p=< .001, positive)
| Variable | age | satisfac… | score |
|---|---|---|---|
| age | 1 | ||
| satisfaction | 0.176 (.178) | 1 | |
| score | 0.264 (.041) | 0.868 (< .001) | 1 |
⑥ 회귀 — Factors predicting score
Dependent variable: score · N = 60 · Model summary rows: R² and adjusted R² sit in the value column; the model F sits in the test-statistic and significance columns.
| Variable | B | SE | β | t | p | VIF |
|---|---|---|---|---|---|---|
| (Constant) | 0.774 | 0.240 | 3.227 | .002 | - | |
| age | 0.007 | 0.004 | 0.115 | 1.765 | .083 | 8.28 |
| satisfaction | 0.718 | 0.055 | 0.848 | 13.047 | < .001 | 8.28 |
| R² | 0.767 | |||||
| Adjusted R² | 0.758 | |||||
| Model F(2, 57) | 93.643 | < .001 |
대표 인용
모든 인용은 원자료에 실재하는 문장입니다 (발췌 실재 검증 통과).
논문형 표
복사하면 편집 가능한 사본이 작업대에 열립니다 — 이 전시는 그대로 남습니다.