PDA

View Full Version : การทดสอบการแจกแจงปกติของข้อมูลด้วย Google Sheets (Normality Test by Google Sheets)


zam007
15 มีนาคม 2021, 21:05
การทดสอบการแจกแจงปกติของข้อมูล (https://en.wikipedia.org/wiki/Normality_test) เป็นข้อตกลงเบื้องต้นก่อนที่จะใช้สถิติแบบพาราเมตริก เช่น t-test, F-test, ANOVA เป็นต้น โดยปกติสามารถใช้โปรแกรมทางสถิติจำพวก SPSS (https://www.ibm.com/analytics/spss-statistics-software), SAS (https://www.sas.com/en_th/home.html), Stata (https://www.stata.com/), R (https://www.r-project.org/) ซึ่งต้องติดตั้งบนเครื่องคอมก่อนจึงจะใช้งานได้ อีกทั้งบ้างโปรแกรมมีค่าใช้จ่ายด้วย
กระผมจึงได้ทดลองสร้างโปรแกรมทดสอบการแจกแจงปกติของข้อมูลแบบออนไลน์ โดยสร้างเป็น User-Function ใน Google Sheets ด้วยภาษา Javascript โดยเลือกการทดสอบทางสถิติที่แข็งแกร่งและเป็นที่นิยมมา 3 รูปแบบดังนี้ *** (https://web.archive.org/web/20150630110326/http://instatmy.org.my/downloads/e-jurnal%202/3.pdf)
Shapiro-Wilk Test
Lilliefors (Kolmogorov-Smirnov) Test
Anderson-Darling Test
ตัวอย่างโปรแกรมเป็นดังนี้

https://docs.google.com/spreadsheets/d/1Zj3Cafi-l_qZj_ze_mI9qELX83-8mSAIIrXbkSBW9fQ/edit?usp=sharing

โค้ดต้นฉบับ
1.https://github.com/rniwa/js-shapiro-wilk/blob/master/shapiro-wilk.js
2.http://svn.r-project.org/R/trunk/src/nmath/pnorm.c
3.http://svn.r-project.org/R/trunk/src/nmath/qnorm.c
4.https://rdrr.io/cran/nortest/src/R/lillie.test.R
5.https://rdrr.io/cran/nortest/src/R/ad.test.R

phurinat
06 สิงหาคม 2023, 13:03
😀😀😀😀😀😀😀😀😀😀😀