๐Ÿ–๏ธ
gitbook_docs
  • Introduction
  • Machine Learning
    • Recommended Courses
      • For Undergrad Research
      • Math for Machine Learning
    • ML Notes
      • Covariance Correlation
      • Feature Selection
      • Linear Regression
      • Entropy, Cross-Entropy, KL Divergence
      • Bayesian Classifier
        • Terminology Review
        • Bayesian Classifier for Normally Distributed classes
      • Linear Discriminant Analysis
      • Logistic Regression
        • Logistic Regression Math
      • Logistic Regression-MaximumLikelihood
      • SVM
        • SVM concept
        • SVM math
      • Cross Validation
      • Parameter, Density Estimation
        • MAP, MLE
        • Gaussian Mixture Model
      • E-M
      • Density Estimation(non-parametric)
      • Unsupervised Learning
      • Clustering
      • kNN
      • WaveletTransform
      • Decision Tree
    • Probability and Statistics for Machine Learning
      • Introduction
      • Basics of Data Analysis
      • Probability for Discrete Random Variable
      • Poisson Distribution
      • Chi-Square Distribution
      • P-value and Statistical Hypothesis
      • Power and Sample Size
      • Hypothesis Test Old
      • Hypothesis Test
      • Multi Armed Bandit
      • Bayesian Inference
      • Bayesian Updating with Continuous Priors
      • Discrete Distribution
      • Comparison of Bayesian and frequentist inference
      • Confidence Intervals for Normal Data
      • Frequenist Methods
      • Null Hypothesis Significance Testing
      • Confidence Intervals: Three Views
      • Confidence Intervals for the Mean of Non-normal Data
      • Probabilistic Prediction
  • Industrial AI
    • PHM Dataset
    • BearingFault_Journal
      • Support Vector Machine based
      • Autoregressive(AR) model based
      • Envelope Extraction based
      • Wavelet Decomposition based
      • Prediction of RUL with Deep Convolution Nueral Network
      • Prediction of RUL with Information Entropy
      • Feature Model and Feature Selection
    • TempCore Journal
      • Machine learning of mechanical properties of steels
      • Online prediction of mechanical properties of hot rolled steel plate using machine learning
      • Prediction and Analysis of Tensile Properties of Austenitic Stainless Steel Using Artificial Neural
      • Tempcore, new process for the production of high quality reinforcing
      • TEMPCORE, the most convenient process to produce low cost high strength rebars from 8 to 75 mm
      • Experimental investigation and simulation of structure and tensile properties of Tempcore treated re
    • Notes
  • LiDAR
    • Processing of Point Cloud
    • Intro. 3D Object Detection
    • PointNet
    • PointNet++
    • Frustrum-PointNet
    • VoxelNet
    • Point RCNN
    • PointPillars
    • LaserNet
  • Simulator
    • Simulator List
    • CARLA
    • Airsim
      • Setup
      • Tutorial
        • T#1
        • T#2
        • T#3: Opencv CPP
        • T#4: Opencv Py
        • Untitled
        • T#5: End2End Driving
  • Resources
    • Useful Resources
    • Github
    • Jekyll
  • Reinforcement Learning
    • RL Overview
      • RL Bootcamp
      • MIT Deep RL
    • Textbook
    • Basics
    • Continuous Space RL
  • Unsupervised Learning
    • Introduction
  • Unclassified
    • Ethics
    • Conference Guideline
  • FPGA
    • Untitled
  • Numerical Method
    • NM API reference
Powered by GitBook
On this page
  • Student t
  • Binomial Distribution
  • T-test
  • Multiple Testing
  • ANOVA(Analysis of Variance)

Was this helpful?

  1. Machine Learning
  2. Probability and Statistics for Machine Learning

Hypothesis Test Old

Student t

  • \eqalign{ & Let\;T = {Z \over {\sqrt {V/n} }} \cr & with\;Z \sim N(0,1) \cr & V \sim x^2 (n) \cr}
  • n: Degree of Freedom, t ๋ถ„ํฌ์˜ ๋ชจ์–‘ ๊ฒฐ์ •

    • Z์™€ V๋Š” independent

    • x^2: ์นด์ด ์ œ๊ณฑ ๋ถ„ํฌ

Then

TโˆผtnT \sim t_nTโˆผtnโ€‹
  • Properties

  • symmetric distribution

    i.e.โ€…โ€Šโˆ’Tโˆผtni.e.\; - T \sim t_ni.e.โˆ’Tโˆผtnโ€‹
  • n=1 โ†’ Cauchy distribution(ํ‰๊ท  ์กด์žฌx)์˜ ์ผ๋ฐ˜ํ™”

  • nโ‰ฅ2 โ†’ ํ‰๊ท ์ด 0

    \eqalign{ & E(T) = E(Z)E({1 \over {\sqrt {V/n} }}) = 0 \cr & E(Z)\;and\;E({1 \over {\sqrt {V/n} }})\;are\;independent \cr & if\;n = 1,\;E({1 \over {\sqrt {V/n} }})\;doesn't\;exist \cr}
    1. Heavier-tailed than Normal Distribution: ๊ทน๋‹จ์ ์ธ ๊ฐ’์ด ๋ฐœ์ƒํ•  ํ™•๋ฅ ์ด ๋†’์•„์ง

    2. For n large, t_n looks very much like N(0,1)

      = Distribution of t_n goes to N(0,1) as n โ†’โˆž

      ์ฆ๋ช…)

      \eqalign{ & Let\;T_n = {Z \over {\sqrt {V_n /n} }},\;with\;Z_1 ,\;Z_2 ,\;... \cr & V_n = Z_1 ^2 + Z_2 ^2 + ... + Z_n ^2 \cr & Then\;{{V_n } \over n} \to 1\;by\;LLN\;Since\;E(Z_2 ) = 1 \cr & So\;T_n \to Z \cr & So\;t_n \;converges\;to\;N(0,1)\;distribution \cr}

Binomial Distribution

  • ๋ฒ ๋ฅด๋ˆ„์ด ์‹œํ–‰: ์„ฑ๊ณต/์‹คํŒจ๋กœ๋งŒ ๋‚˜ํƒ€๋‚˜๋Š” ์‹œํ–‰, ๊ฐ ์‹œํ–‰์€ ๋…๋ฆฝ

  • ์„ฑ๊ณตํ•  ํ™•๋ฅ  p, ์‹คํŒจํ•  ํ™•๋ฅ  q=1-p โ†’ ๋ฒ ๋ฅด๋ˆ„์ด ์‹œํ–‰์„ n๋ฒˆ ํ–ˆ์„ ๋•Œ์˜ ํ™•๋ฅ  ๋ถ„ํฌ

  • ํ™•๋ฅ ์งˆ๋Ÿ‰ํ•จ์ˆ˜

\eqalign{ & f(x) = _n C_x p^x q^{n - x} \cr & where\;x = 0,\;1,\;2,\;... \cr & q = 1 - p \cr}

T-test

  • ๋ชจ์ง‘๋‹จ์˜ ๋ถ„์‚ฐ์„ ๋ชจ๋ฅผ ๋•Œ ๋…๋ฆฝ๋œ ๋‘ ์ง‘๋‹จ์˜ ํ‰๊ท ๊ฐ„์˜ ์ฐจ์ด๋ฅผ ๋น„๊ต(= ์–ผ๋งˆ๋ถ€ํ„ฐ ์œ ์˜ํ•œ๊ฐ€?)

    ex) 2010๋…„ ๋‚จ์ž ํ‰๊ท  ํ‚ค vs 2020๋…„ ๋‚จ์ž ํ‰๊ท  ํ‚ค 175

    โ€‹ ์‹ ์•ฝ์„ ๋จน๊ธฐ ์ „ ๊ฐ„ ์ˆ˜์น˜ vs ๋จน์€ ํ›„์˜ ๊ฐ„ ์ˆ˜์น˜

  • Null Hypothesis: ์ฐจ์ด๊ฐ€ ์—†๋‹ค๋Š” ๊ฐ€์„ค(= ๋‘ ์ง‘๋‹จ์˜ ํ‰๊ท ์ด ๊ฐ™๋‹ค)

    Alternative Hypothesis: ์ฐจ์ด๊ฐ€ ์žˆ๋‹ค๋Š” ๊ฐ€์„ค(= ๋‘ ์ง‘๋‹จ์˜ ํ‰๊ท ์ด ๋‹ค๋ฅด๋‹ค)

  • ๊ฐ€์ •: ๋…๋ฆฝ์„ฑ, ์ •๊ทœ์„ฑ, ๋“ฑ๋ถ„์‚ฐ์„ฑ(H0์„ ๋ฐ›์•„๋“ค์—ฌ์•ผ ํ•จ)

  • ๋‹จ์ผํ‘œ๋ณธ: ๋ชจ์ง‘๋‹จ vs ํ‘œ๋ณธ์ง‘๋‹จ

    \eqalign{ & t = {{(\overline X - \mu )} \over {{\sigma \over {\sqrt n }}}} \sim t(n - 1) \cr & where\;\overline X = sample\;mean \cr & \mu = population\;mean \cr & t(n - 1) = t\;distribution\;with\;n - 1\;dof \cr}

    โ†’ ฮฑ ๊ฐ’๊ณผ t ๊ฐ’์„ ๋น„๊ต, ํ˜น์€ p ๊ฐ’๊ณผ ๊ฐ’์„ ๋น„๊ต

  • ํ‘œ๋ณธ 2๊ฐœ

    \eqalign{ & t = {{(\overline {X_1 } - \overline {X_2 } ) - (\mu _1 - \mu _2 )} \over {SE_{(\overline {X_1 } - \overline {X_2 } )} }} \cr & where\;SE_{(\overline {X_1 } - \overline {X_2 } )} = s_p ^2 ({1 \over {n_1 }} + {1 \over {n_2 }}):standard\;error \cr & s_p ^2 = {{(n_1 - 1)s_1 ^2 + (n_2 - 1)s_2 ^2 } \over {(n_1 - 1) + (n_2 - 1)}}:\; ํ†ตํ•ฉ\;๋ถ„์‚ฐ\cr}

Multiple Testing

  • ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํ‘œ๋ณธ์ง‘๋‹จ๋ผ๋ฆฌ ๋น„๊ตํ•  ๋•Œ ๋‹จ์ˆœํžˆ Hypothesis test๋ฅผ ์—ฌ๋Ÿฌ ๋ฒˆ ํ•ด์„œ๋Š” ์•ˆ๋œ๋‹ค: Hypothesis test๋ฅผ ๋งŽ์ด ํ• ์ˆ˜๋ก type 1 error๊ฐ€ ์ ์–ด๋„ 1๋ฒˆ ๋‚˜์˜ฌ ํ™•๋ฅ ์ด ์˜ฌ๋ผ๊ฐ€๊ธฐ ๋•Œ๋ฌธ

    • n๋ฒˆ testํ–ˆ์„ ๋•Œ error๊ฐ€ ํ•œ๋ฒˆ๋„ ์•ˆ ๋‚˜์˜ฌ ํ™•๋ฅ  P(0):

      \eqalign{ & P(0) = \alpha ^0 (1 - \alpha )^n \cr & if\;n\;increases \to P(0)\;decreases \cr}

      ๋”ฐ๋ผ์„œ Multiple testing์„ ํ•  ๋•Œ๋Š” ํ†ต๊ณ„์  ์ˆ˜์ • ์ ˆ์ฐจ๊ฐ€ ํ•„์š”ํ•จ

  • Bonferroni Correction: ๊ฐ„๋‹จํ•˜์ง€๋งŒ ์‹œํ–‰ ์ˆ˜๊ฐ€ ๋งŽ์•„์งˆ์ˆ˜๋ก ๋ถ€์ •ํ™•ํ•ด์ง

    Rejectโ€…โ€ŠH0โ€…โ€Šifโ€…โ€Špiโ‰คฮฑnReject\;H_0 \;if\;p_i \le {\alpha \over n}RejectH0โ€‹ifpiโ€‹โ‰คnฮฑโ€‹

    ์ฆ‰ n๋ฒˆ ์‹œํ–‰ํ•  ๋•Œ ์œ ์˜ํ™•๋ฅ ์€ ฮฑ/n

  • Dunnet test: ์ •ํ™•๋„๊ฐ€ ๋†’๊ณ  ์ˆ˜์ •๋œ t-distribution์„ ์‚ฌ์šฉํ•จ. ๋Œ€์กฐ๊ตฐ์ด 1๊ฐœ์ผ ๋•Œ ์œ ์šฉํ•จ

    ex) ๋Œ€์กฐ๊ตฐ A, ์‹คํ—˜๊ตฐ B, C, D์ผ ๋•Œ

    โ€‹ A-B, A-C, A-D ๋น„๊ต ok

    โ€‹ A-B, B-C, C-D ๋น„๊ต no

\eqalign{ & t = {{\overline {Y_i } - \overline {Y_o } } \over {\sqrt {MS_W ({1 \over {N_i }} - {1 \over {N_o }})} }} \cr & where\;\overline {Y_{^i } } ,\;\overline {Y_o } = Sample\;mean\;of\;each\;groups \cr & MS_W = Mean\;square\;within = {{SS_{within} } \over {dof_{within} }} \cr & SS_{within} = Sum\;of\;squares\;within\;groups:(n - 1)\sigma ^2 \cr & dof_{within} = Total\;dof:Sample\;number - Group\;number \cr}

ANOVA(Analysis of Variance)

  • T-test๋Š” ๋‘ ๊ทธ๋ฃน์˜ ํ‰๊ท ์ด ๊ฐ™์€์ง€ ๋น„๊ตํ–ˆ๋‹ค๋ฉด, ANOVA๋Š” ์—ฌ๋Ÿฌ ๊ทธ๋ฃน์˜ ํ‰๊ท ์„ ๋น„๊ตํ•จ

    • Multiple testing์€ type 1 error๊ฐ€ ๋ฐœ์ƒํ•  ํ™•๋ฅ ์ด ๋†’์•„์ง€๊ธฐ ๋•Œ๋ฌธ์— ANOVA๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ

  • ANOVA๋ฅผ ํ•˜๊ธฐ ์ „์— ์•Œ์•„์•ผ ํ•˜๋Š” ๋ณ€์ˆ˜๋“ค

    • ๋…๋ฆฝ๋ณ€์ˆ˜: ์ธ๊ณผ๊ด€๊ณ„์—์„œ ์›์ธ์ธ ๋ณ€์ˆ˜

    • ์ข…์†๋ณ€์ˆ˜: ์ธ๊ณผ๊ด€๊ณ„์—์„œ ๊ฒฐ๊ณผ์ธ ๋ณ€์ˆ˜

    • ํ†ต์ œ๋ณ€์ˆ˜: ๊ธฐ๋ณธ์ ์œผ๋กœ๋Š” ๋…๋ฆฝ๋ณ€์ˆ˜์ด๋‚˜ ์—ฐ๊ตฌ์˜ ๊ด€์‹ฌ์‚ฌ๊ฐ€ ์•„๋‹Œ ๋ณ€์ˆ˜

      ex) ๊ณ ๊ฐ๋งŒ์กฑ๋„(๋…๋ฆฝ), ๋‹ค๋ฅธ ์›์ธ1(ํ†ต์ œ), ๋‹ค๋ฅธ ์›์ธ2(ํ†ต์ œ), .... โ†’ ์žฌ๋ฐฉ๋ฌธ์œจ(์ข…์†)

    • ํ†ต์ œ๋ณ€์ˆ˜๋ฅผ ํ•˜๋‚˜๋„ ๊ณ ๋ คํ•˜์ง€ ์•Š์œผ๋ฉด model misspecification ์ด ๋ฐœ์ƒํ•จ(๋ชจ๋ธ์ด ์ž˜๋ชป๋˜์—ˆ๋‹ค๋Š” ์˜๋ฏธ)

  • One-way ANOVA: ๋…๋ฆฝ๋ณ€์ˆ˜๊ฐ€ 1๊ฐœ์ธ ANOVA

    • One-way ANOVA์— ์‚ฌ์šฉ๋˜๋Š” ๋ณ€์ˆ˜์˜ ํŠน์„ฑ

      • ์ข…์†๋ณ€์ˆ˜: Continuous ํ•ด์•ผํ•จ

      • ๋…๋ฆฝ๋ณ€์ˆ˜: Discrete/Categorical ํ•ด์•ผํ•จ

        ex) ์–ด๋ฆฐ ์•„์ด๋“ค์˜ ํญ๋ ฅ์„ฑ ์‹คํ—˜

        โ€‹ ์˜์ƒ์˜ ์ข…๋ฅ˜(๋…๋ฆฝ ๋ณ€์ˆ˜) - ํญ๋ ฅ์˜ํ™”/๋“œ๋ผ๋งˆ/๊ณต์ต๊ด‘๊ณ 

        โ€‹ โ†’ ์ ์ˆ˜ํ™”๋œ ์•„์ด๋“ค์˜ ํญ๋ ฅ์ ์ธ ํ–‰๋™(์ข…์† ๋ณ€์ˆ˜)

        • ANOVA์—์„œ ๋…๋ฆฝ๋ณ€์ˆ˜๋Š” ๋ฐ˜๋“œ์‹œ 1๊ฐœ์ž„(์˜์ƒ์˜ ์ข…๋ฅ˜) ์ ˆ๋Œ€ 3๊ฐœ(ํญ๋ ฅ์˜ํ™”, ๋“œ๋ผ๋งˆ, ๊ณต์ต๊ด‘๊ณ )๊ฐ€ ์•„๋‹˜!

    • Formula

      \eqalign{ & Y_{ij} = \mu + \tau _j + e_{ij} \cr & where\;i = ๊ทธ๋ฃน\;๋‚ด์˜\;ID \cr & j = Group(1,\;2,\;3,\;...) \cr & \tau = ๋…๋ฆฝ๋ณ€์ˆ˜ \cr & e = error(\tau _j ์—\;์˜ํ•ด\;์„ค๋ช…๋˜์ง€\;์•Š๋Š”\;์˜ค์ฐจ=random\;error) \cr}
      • ์ด๋Ÿฐ ์‹์—์„œ ๋ณดํ†ต์€ ์šฐ๋ณ€์€ ๋…๋ฆฝ๋ณ€์ˆ˜ ์ขŒ๋ณ€์€ ์ข…์†๋ณ€์ˆ˜

  • F-values ~ F-distribution: F-value๋Š” F-distribution์„ ๋”ฐ๋ฅธ๋‹ค

    • ๋‹ค๋ฅธ test๋“ค์ฒ˜๋Ÿผ F-value๋ฅผ ๊ตฌํ•ด์„œ F-distribution์—์„œ ฮฑ๊ฐ’๊ณผ ๋น„๊ตํ•˜๋ฉด ๋จ

    • F-value: ๋‘ ๊ฐœ์˜ ๋ถ„์‚ฐ์˜ ๋น„์œจ์„ ๋‚˜ํƒ€๋ƒ„

    • Between Variance: GM(์ „์ฒด ํ‰๊ท )๊ณผ ๊ฐ ๊ทธ๋ฃน๊ฐ„์˜ ๋ถ„์‚ฐ์„ ๋‹ค ํ•ฉ์นœ ๊ฐ’

      • BV๊ฐ€ ํฌ๋ฉด ์ ์–ด๋„ ํ•œ ๊ทธ๋ฃน์ด ๋‹ค๋ฅธ ๊ทธ๋ฃน์˜ ํ‰๊ท ์—์„œ ๋ฉ€๋ฆฌ ๋–จ์–ด์ ธ ์žˆ์Œ(ANOVA์˜ ๋ชฉ์ : ์—ฌ๋Ÿฌ ๊ทธ๋ฃน์˜ ํ‰๊ท ์ด ๊ฐ™์€๊ฐ€?)

    • Within Variance: ๊ทธ๋ฃน ๋‚ด์˜ ๋ถ„์‚ฐ

      โ†’ BV๊ฐ€ WV๋ณด๋‹ค ์ถฉ๋ถ„ํžˆ ์ปค์•ผ "BV๊ฐ€ ํฌ๋‹ค"๋ผ๊ณ  ๋งํ•  ์ˆ˜ ์žˆ๋‹ค(WV๋Š” ๋žœ๋คํ•œ ๋ณ€๋™๊ฐ’์„ ์˜๋ฏธ)

    • F-value

      \eqalign{ & F - value = {{BV} \over {WV}} = {{MS_{treatment} } \over {MS_{error} }} = {{MS_{between} } \over {MS_{within} }} \cr & where\;MS = Mean\;Squared \cr}
  • Hypothesis

    \eqalign{ & H_0 :\mu _0 = \mu _1 = ... = \mu _k \cr & H_1 :\mu _i \ne \mu _k :์ ์–ด๋„\;ํ•œ\;๊ทธ๋ฃน์˜\;ํ‰๊ท ์€\;๋‹ค๋ฅด๋‹ค \cr & variance:{{\sum {(x - \overline x )^2 } } \over {df}} \cr} \eqalign{ & df_{BV} :group\;number \cr & df_{WV} :n - k \cr & where\;n:sample\;number\;of\;each\;group \cr & k:group\;number \cr}
  • Two-way ANOVA: ๋…๋ฆฝ ๋ณ€์ˆ˜ ๋‘๊ฐœ

    • Main effect: ๋…๋ฆฝ๋ณ€์ˆ˜๊ฐ€ ๊ฐ€์ง€๋Š” ํšจ๊ณผ + interaction effect

    • ๋…๋ฆฝ๋ณ€์ˆ˜์™€ ์ข…์†๋ณ€์ˆ˜๊ฐ€ linear(์ง์„ )์ด๋ผ๊ณ  ๊ฐ€์ •

    • f-value

      • ์ฒซ ๋ฒˆ์งธ ๋…๋ฆฝ๋ณ€์ˆ˜ main effect๋ฅผ ์ธก์ •ํ•˜๊ธฐ ์œ„ํ•œ f-value

      • ๋‘ ๋ฒˆ์งธ ๋…๋ฆฝ๋ณ€์ˆ˜ main effect๋ฅผ ์ธก์ •ํ•˜๊ธฐ ์œ„ํ•œ f-value

      • interaction ํšจ๊ณผ๋ฅผ ์ธก์ •ํ•˜๊ธฐ ์œ„ํ•œ f-value

        โ†’ 3๊ฐœ์˜ BV์™€ 1๊ฐœ์˜ WV๋ฅผ ๋น„๊ต

    • Hypothesis๋Š” 3๊ฐœ ํ•„์š”

      • ์ฒซ ๋ฒˆ์งธ main effect์— ๋Œ€ํ•œ ๊ฐ€์„ค

        H01:ฮผ11=ฮผ12=...=ฮผ1kH_{01} :\mu _{11} = \mu _{12} = ... = \mu _{1k}H01โ€‹:ฮผ11โ€‹=ฮผ12โ€‹=...=ฮผ1kโ€‹
    • ๋‘ ๋ฒˆ์งธ main effect์— ๋Œ€ํ•œ ๊ฐ€์„ค

      Ha1:ฮผ1iโ‰ ฮผ1kH_{a1} :\mu _{1i} \ne \mu _{1k}Ha1โ€‹:ฮผ1iโ€‹๎€ =ฮผ1kโ€‹
      • interaction effect์— ๋Œ€ํ•œ ๊ฐ€์„ค

        \eqalign{ & H_{03} = interaction\;effect\;doesn't\;exist\; \cr & H_{a3} = interaction\;effect\;exists \cr}
PreviousPower and Sample SizeNextHypothesis Test

Last updated 3 years ago

Was this helpful?

[]:

https://www.youtube.com/watch?v=HlSyvMRLu4w&ab_channel=SapientiaaDei