Upgrade to Pro — share decks privately, control downloads, hide ads and more …

回帰分析/大規模言語モデルと統計 / Regression Analysis, Large Language Models and Statistics

回帰分析/大規模言語モデルと統計 / Regression Analysis, Large Language Models and Statistics

早稲田大学大学院経営管理研究科「企業データ分析」2023 冬の第13-14回で使用したスライドです。

Kenji Saito

January 25, 2024
Tweet

More Decks by Kenji Saito

Other Decks in Business

Transcript

  1. 1 11 30 • 2 11 30 (B A )

    • 3 12 7 • 4 12 7 • 5 12 14 • 6 12 14 t • 7 12 21 2 ( ) t • 8 12 21 2 ( ) t • 9 1 11 P • 10 1 11 • 11 1 18 • 12 1 18 • 13 1 25 • 14 1 25 • W-IOI 2023 13-14 — 2024-01-25 – p.3/30
  2. ( 20 ) 1 • 2 R • 3 •

    4 • 5 • 6 ( ) • 7 (1) • 8 (2) • 9 R ( ) (1) — Welch • 10 R ( ) (2) — χ2 • 11 R ( ) (1) — • 12 R ( ) (2) — • 13 GPT-4 14 GPT-4 15 ( ) LaTeX Overleaf 8 (12/21 ) / (2 ) OK / 2023 13-14 — 2024-01-25 – p.4/30
  3. 11 — 2 t FWER (Family-Wise Error Rate) Bonferroni (

    2 t ) / Tukey-Kramer q 12 / r s xy / vs. 2023 13-14 — 2024-01-25 – p.5/30
  4. 13 / ( ) 2 r2 β β 95% E[y|x]

    95% ( ) y 95% ( ) GPT-4 2023 13-14 — 2024-01-25 – p.6/30
  5. 6. (1) ( ) (2) 2024 1 21 ( )

    23:59 JST ( ) Waseda Moodle (Q & A ) (1)(2) Discord 2023 13-14 — 2024-01-25 – p.8/30
  6. . . . . . . 10 6 (1/23( )

    ) ( ) → 6 ( ) → 4 ( ) ( ) → 1 → 1 2023 13-14 — 2024-01-25 – p.9/30
  7. I 1 r x y 2 r α = 0.05

    3 r P = 0.05 ⇒ . . . x y ( ; n Cr ) ( ) P < 0.05 2023 13-14 — 2024-01-25 – p.10/30
  8. I [ ] 10 ⇒ 10 1, 10, 100, 1000

    (log(x) and/or log(y)) R plot plot “ log="x" ” x <- c(1, 2, 4, 8, 16, 32, 64, 128, 256) y <- c(1, 2, 3, 4, 5, 6, 7, 8, 9) plot(x, y) plot(x, y, log="x") plot(x, y, log="y") plot(x, y, log="xy") plot(log(x), y) 2023 13-14 — 2024-01-25 – p.11/30
  9. W 4 120 5 125 10 100 15 50 9

    90 Pearson R r = −0.96 ⇒ R ( ) what ( ) how how R 2023 13-14 — 2024-01-25 – p.12/30
  10. S [ ] t t p p 0.05 ⇒ t

    = r n−2 1−r2 t 2023 13-14 — 2024-01-25 – p.13/30
  11. 13 / ( ) 2 r2 β β 95% E[y|x]

    95% ( ) y 95% ( ) 2023 13-14 — 2024-01-25 – p.15/30
  12. (1/4) x y ( ) x y E[y|x] = α

    + βx (E[y|x] , β ) x y x y E[y|x] σ x 2 α β ( ) ˆ y = a + bx (b ) SSresidual a b SSresidual = n i=1 e2 i = n i=1 (yi − ˆ yi )2 2023 13-14 — 2024-01-25 – p.16/30
  13. (2/4) b b = r sy sx = sxy s2

    x = n i=1 (xi − ¯ x)(yi − ¯ y) n i=1 (xi − ¯ x)2 a a = ¯ y − b¯ x (¯ y = a + b¯ x (¯ x, ¯ y) ) r2 ××% △△ 2023 13-14 — 2024-01-25 – p.17/30
  14. (“ .txt” ) 0 10 20 30 40 50 10

    12 14 16 18 ㄢእ㐠ື᫬㛫 ▷㊥㞳 ಺ૠ ֎ૠ     (r2 = −0.352) y = 16.16 + −0.12x 52 10 . . . ( ) 2023 13-14 — 2024-01-25 – p.18/30
  15. (3/4) x SSx = n i=1 (xi − ¯ x)2

    MSresidual = SSresidual dfresidual = n i=1 (yi − ˆ yi )2 n − 2 b H0 : β = 0 ( β ) HA : β = 0 ( β ) Student t t = b MSresidual SS x = r n − 2 1 − r2 2023 13-14 — 2024-01-25 – p.19/30
  16. (4/4) β 95% b − t0.05 (n − 2) MSresidual

    SSx , b + t0.05 (n − 2) MSresidual SSx E[y|x] 95% ( ) ˆ y − t0.05 (n − 2) MSresisudal ( 1 n + (x − ¯ x)2 SSx ), ˆ y + t0.05 (n − 2) MSresisudal ( 1 n + (x − ¯ x)2 SSx ) y 95% ˆ y − t0.05 (n − 2) MSresidual (1 + 1 n + (x − ¯ x)2 SSx ), ˆ y + t0.05 (n − 2) MSresidual (1 + 1 n + (x − ¯ x)2 SSx ) 2023 13-14 — 2024-01-25 – p.20/30
  17. Y ( p.299) “ Y.R” ( cor.test() lm() ) 2023

    13-14 — 2024-01-25 – p.21/30
  18. m P(w1 , . . . , wm ) (Wikipedia)

    1 (Wikipedia) : ( ) ← (Generative Pre-training) : ( ) ( ) 2023 13-14 — 2024-01-25 – p.23/30
  19. A X M. MIT 2013 LEGO X A A X

    A X X X (2013 ) ⇒ 10 Open Interpreter A . . . 1 2023 13-14 — 2024-01-25 – p.25/30
  20. V ( p.248) GPT-4 R 4 19 4 4 (

    1 4) R 2 3 Tukey-Kramer 1 <- c(3.10, 3.14, 3.07, 3.20, 2.84) 2 <- c(2.76, 2.88, 2.88, 3.08, 2.93) 3 <- c(3.19, 3.13, 3.45, 3.34) 4 <- c(2.84, 2.72, 2.61, 2.65, 2.61) ( ) ( ) 3(a) 1(ab) 2(bc) 4(c) 2023 13-14 — 2024-01-25 – p.26/30
  21. 7. (1) R L A TEX (Overleaf) 2 A4 2

    (2) 2024 2 5 ( ) 23:59 JST ( ) Waseda Moodle (Q & A ) Overleaf (read-only OK) · https://www.overleaf.com/read/tfbbnvhqfkqm#609f5b 2023 13-14 — 2024-01-25 – p.28/30
  22. L A TEX Overleaf L A TEX ( or )

    ( ) arXiv.org L ATEX L ATEX ( ) PDF GPT-4 L A TEX Overleaf L A TEX https://www.overleaf.com Google 2023 13-14 — 2024-01-25 – p.29/30