Statistics/Concepts(+codes)

Parametric vs. Non-Parametric Tests

metamong 2022. 5. 2.

๐Ÿ‘ฉ‍๐Ÿ”ฌ Parametric(๋ชจ์ˆ˜์ ) & Non-Parametric(๋น„๋ชจ์ˆ˜์ ) test ์ข…๋ฅ˜ ๊ตฌ๋ณ„์€ ๋งค์šฐ ์ค‘์š”ํ•˜๋‹ค!

 

๐Ÿ‘ฉ‍๐Ÿ”ฌ ๊ฐ„๋žตํžˆ ๋งํ•˜์ž๋ฉด ๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•์€ data์˜ ๋ถ„ํฌ๋ฅผ ๊ฐ€์ • (์ฃผ๋กœ ์ •๊ทœ์„ฑ - normal distribution)ํ•œ ์ฑ„ hypothetical test๋ฅผ ์ง„ํ–‰ํ•˜๋Š” ๋ฐฉ์‹(๋ชจ์ง‘๋‹จ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์•Œ๊ณ  ์žˆ๋Š” ์ฑ„๋กœ ์ง„ํ–‰)์ด๊ณ  & ๋น„๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•์€ ๊ทธ๋Ÿฐ ๋ถ„ํฌ๊ฐ€ ์•„์˜ˆ ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค ์ƒ๊ฐํ•˜๊ณ  ์ง„ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•(๋ชจ์ง‘๋‹จ์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ์—†์Œ)์ด๋‹ค.

 

๐Ÿ‘ฉ‍๐Ÿ”ฌ ์ผ๋‹จ ๋ถ„ํฌ๋ฅผ ๊ฐ€์ •ํ•˜๊ณ  ์‹œ์ž‘ํ•˜๋Š”, ๋Œ€๋ถ€๋ถ„์˜ test๋กœ ๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•์„ ์ง„ํ–‰ํ•˜๋Š” Parametric Method์˜ ์žฅ์ ๋“ค๋ถ€ํ„ฐ ์•Œ์•„๋ณด์ž

Parametric Methods - ์žฅ์ 

1> ๐Ÿ™‹‍โ™€๏ธ skewed๋˜๊ฑฐ๋‚˜ ํŠน์ • ๋ฐฉํ–ฅ์œผ๋กœ ์น˜์šฐ์น˜์ง€ ์•Š์€ ๋ถ„ํฌ์—ฌ๋„ ์‹ ๋ขฐํ•  ๋งŒํ•œ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ€์ ธ๋‹ค ์ค€๋‹ค

 

* outlier๊ฐ€ ์กด์žฌํ•˜๊ฑฐ๋‚˜, non-normally distributed๋œ data์—ฌ๋„ test ๋ณ„ ์š”๊ตฌ sample size๋งŒ ๋„˜๊ฒจ์ค€๋‹ค๋ฉด, '๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•'์— ์˜ํ•ด ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋Š” ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ€์ ธ๋‹ค ์คŒ

 

* ์•ž์„œ ๋ฐฐ์› ๋˜ ์ด 3๊ฐ€์ง€์˜ test (One-Sample T-Test & Two-Samples T-Test & ANOVA)์˜ ์ตœ์†Œ ์š”๊ตฌ์กฐ๊ฑด sample size๋Š” ์•„๋ž˜์™€ ๊ฐ™์Œ

 

 

2> ๐Ÿ™‹‍โ™€๏ธ ๊ทธ๋ฃน ๊ฐ„์˜ ๋ถ„์‚ฐ์ด ๋‹ฌ๋ผ๋„ ์‹ ๋ขฐ์„ฑ ์žˆ๋Š” ๊ฒฐ๊ณผ๋ฅผ ๊ฐ€์ ธ๋‹ค ์ค€๋‹ค

 

๊ทธ๋ฃน ๊ฐ„ ๋ถ„์‚ฐ์— ํฌ๊ฒŒ ์˜ํ–ฅ์„ ์•ˆ๋ฐ›์Œ!

 

3> ๐Ÿ™‹‍โ™€๏ธ ํ†ต๊ณ„์  power (Statistical Power)๋ฅผ ๊ฐ–๊ณ  ์žˆ๋‹ค

 

→ ์ฆ‰ ์‹ค์ œ ์–ด๋–ค ํšจ๊ณผ effect๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ง€ ํƒ์ง€ํ•˜๋Š” ํ†ต๊ณ„์  ๋ฌธ์ œ์—์„œ ๋ชจ์ˆ˜์  method๊ฐ€ ๋” ์‰ฝ๊ฒŒ ํƒ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” power๋ฅผ ๊ฐ€์ง

Non-Parametric Methods - ์žฅ์ 

1> ๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ mean์ด ์•„๋‹Œ median์„ ์ธก์ •ํ•œ๋‹ค

 

skewed๋œ distribution์„ ๋ณด๋ฉด mean๊ณผ median์€ ๋งค์šฐ ๋‹ค๋ฅธ ์ง€์ ์— ์žกํžˆ๋ฏ€๋กœ parametric์„ ์„ ํƒํ•  ๊ฒƒ์ธ์ง€, non-parametric์„ ์„ ํƒํ•  ๊ฒƒ์ธ์ง€์— ๋”ฐ๋ผ ๋งค์šฐ ๋‹ค๋ฅธ ๊ฒฐ๊ณผ๋ฅผ ์‚ฐ์ถœํ•œ๋‹ค. ํŠนํžˆ ์‹ฌํ•˜๊ฒŒ skewed๋œ ๋ถ„ํฌ์˜ ๊ฒฝ์šฐ, ์šฐ๋ฆฌ๊ฐ€ ๊ด€์‹ฌ์žˆ์–ด ํ•˜๋Š” data์˜ ์ง‘์ค‘๋œ ๋ถ€๋ถ„์€ ์ฃผ๋กœ median์œผ๋กœ ์ธก์ •์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฒฝ์šฐ์— ๋”ฐ๋ผ non-parametric method๋ฅผ ๋” ์„ ํ˜ธํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

 

2> ๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ sample size๊ฐ€ ์ž‘๊ณ , non-normalํ•œ data์˜ ๊ฒฝ์šฐ ์œ ์šฉ

 

3> ๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ ordinal data, ranked data, outliers์— ์ ํ•ฉ

 

→ parametric์˜ ๋‹จ์ ์€ ์•„๋ฌด๋ž˜๋„ outlier์˜ ์˜ํ–ฅ์„ ๊ทธ๋Œ€๋กœ ๋ฐ›๊ธฐ ๋•Œ๋ฌธ์— ์›ํ•˜์ง€ ์•Š๋Š” ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์˜ฌ ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์ด๋‹ค. ํ•˜์ง€๋งŒ ๋น„๋ชจ์ˆ˜์  ๋ฐฉ๋ฒ•์€ outlier์— ํฌ๊ฒŒ ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š๋Š”๋‹ค.

hypothesis test ์ข…๋ฅ˜>

* ๋นจ๊ฐ„ ์‚ฌ๊ฐํ˜• ๋ฐฐ์›€ (ํ˜„์žฌ ํฌ์ŠคํŒ… ๋‚ ์งœ ๊ธฐ์ค€) (๊ณง ๋‹ค๋ฅธ test๋„ ๋ฐฐ์šธ ์˜ˆ์ •!)

 

 

๐Ÿคก One-Sample Parametric T-Test>

 

T-test ๐Ÿ‘‰ ใ€ŠOne-sample T-test (w/ python code)ใ€‹

๐Ÿ‘’ ์ €๋ฒˆ ์‹œ๊ฐ„์— statistics์—์„œ ๋นผ๋†“์„ ์ˆ˜ ์—†๋Š” '๊ฐ€์„ค๊ฒ€์ • TEST - Hypothesis Test'์— ๋Œ€ํ•ด ๋ฐฐ์› ๋‹ค. Hypothesis Test: H0 & Ha - concepts 1. Hypothesis Testing? → Null Hypothesis(H0) ๐Ÿ™†‍โ™‚๏ธ 1โ–ถ Creat..

sh-avid-learner.tistory.com

 

๐Ÿคก Two-Samples Independent Parametric T-Tests>

 

T-test ๐Ÿ‘‰ใ€ŠTwo-samples 'independent' T-test (w/python code)ใ€‹

โ‘  ๊ฐ€์„ค๊ฒ€์ • hypothesis test์— ๋Œ€ํ•ด์„œ ๋ฐฐ์› ๊ณ  โ‘ก ๊ทธ ์ค‘ ๋Œ€ํ‘œ์ ์ธ One-sample T-test์— ๋Œ€ํ•ด์„œ ๋ฐฐ์› ๋‹ค. T-test ๐Ÿ‘‰ ใ€ŠOne-sample T-test (w/ python code)ใ€‹ ๐Ÿ‘’ ์ €๋ฒˆ ์‹œ๊ฐ„์— statistics์—์„œ ๋นผ๋†“์„ ์ˆ˜ ์—†๋Š” '๊ฐ€์„ค..

sh-avid-learner.tistory.com

 

๐Ÿคก More Than Two Samples One-Way Parametric ANOVA>

 

ANOVA & (One-Way ANOVA + w/code)

๐Ÿง ์šฐ๋ฆฌ๋Š” ํ•œ sample ์ง‘๋‹จ์˜ ํ‰๊ท ์ด ๋ชจ์ง‘๋‹จ์˜ ํ‰๊ท ์ด ๊ฐ™์€ ์ง€๋ฅผ ๊ฒ€์ •ํ–ˆ๊ณ  (one-sample t-test) T-test ๐Ÿ‘‰ ใ€ŠOne-sample T-test (w/ python code)ใ€‹ ๐Ÿ‘’ ์ €๋ฒˆ ์‹œ๊ฐ„์— statistics์—์„œ ๋นผ๋†“์„ ์ˆ˜ ์—†๋Š” '๊ฐ€์„ค๊ฒ€์ • TE..

sh-avid-learner.tistory.com

 

** ์ •๋ฆฌ๋ฅผ ํ•ด๋ณด์ž๋ฉด! **

 

Properties Parametric Non-Parametric
๊ฐ€์ • O X
central tendency value ํ‰๊ท  ์ค‘๊ฐ„๊ฐ’(median)
correlation pearson spearman
probablistic distribution normal(์ •๊ทœ) arbitrary
population ์ง€์‹ ํ•„์š” ํ•„์š” X
์‚ฌ์šฉ๋˜๋Š” ๊ณณ interval data nominal data
์˜ˆ์‹œ z-test, t-test ๋“ฑ๋“ฑ Kruskal-Wallis, Mann-Whitney ๋“ฑ๋“ฑ
์žฅ์  data ์ž์ฒด์— dependent - accuracy ๋†’์Œ ๋ถ„ํฌ์— ์˜ํ–ฅ x - robust, ๋” ๋‹ค์–‘ํ•œ ์ƒํ™ฉ์— ์“ฐ์ž„
์ ์šฉ variable variable & attributes

 

๐Ÿค— ํ˜„์žฌ ํฌ์ŠคํŒ… ์‹œ๊ฐ ๊ธฐ์ค€ ์ด 3๊ฐœ์˜ test์— ๋Œ€ํ•ด์„œ๋งŒ ๋ฐฐ์› ๋Š”๋ฐ, ์•ž์œผ๋กœ ํ›จ์”ฌ ๋” ๋งŽ์€ test ํฌ์ŠคํŒ…ํ•จ์œผ๋กœ์จ parametric vs. non-parametric์˜ ์ฐจ์ด๋ฅผ ์ง์ ‘ ๋ˆˆ์œผ๋กœ ํ™•์ธํ•ด๋ณด์ž!


* ์ถœ์ฒ˜1) https://byjus.com/maths/difference-between-parametric-and-nonparametric/

* ์ถœ์ฒ˜2) https://keydifferences.com/difference-between-parametric-and-nonparametric-test.html 

* ์ถœ์ฒ˜3) https://www.analyticsvidhya.com/blog/2021/06/hypothesis-testing-parametric-and-non-parametric-tests-in-statistics/

* ์ถœ์ฒ˜4) https://statisticsbyjim.com/hypothesis-testing/nonparametric-parametric-tests/

'Statistics > Concepts(+codes)' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Two-Samples ๐œ’2 test  (0) 2022.05.03
๐œ’2 distribution + One-Sample ๐œ’2 test  (0) 2022.05.02
Types of Errors in Hypothesis Testing  (0) 2022.04.27
ANOVA & (One-Way ANOVA + w/code)  (1) 2022.04.25
distributionโ‰ซ Student's t-distribution (in-depth)  (0) 2022.04.25

๋Œ“๊ธ€