Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
R を用いた分析(補講) (2) — 人工データの生成 / Generating Artifi...
Search
Kenji Saito
PRO
January 25, 2024
Business
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R を用いた分析(補講) (2) — 人工データの生成 / Generating Artificial Data
早稲田大学大学院経営管理研究科「企業データ分析」2023 冬のオンデマンド教材 第11回で使用したスライドです。
Kenji Saito
PRO
January 25, 2024
Transcript
14 slides
generated by Stable Diffusion XL v1.0 2023 12 R (
) (2) — (WBS) 2023 12 R ( ) (2) — — 2024-01 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2023-winter 2023 12 R ( ) (2) — — 2024-01
– p.2/14
( 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 12 R ( ) (2) — — 2024-01 – p.3/14
N(µ, σ2) ρ 2 ( : ˆ y = a
+ b1 x1 + b2 x2 + e ) 2023 12 R ( ) (2) — — 2024-01 – p.4/14
N(µ, σ2) “rnorm()” set.seed(173205) # # N(50, 10^2) 100 x
<- rnorm(n=100, mean=50, sd=10) # x # hist(x) mean(x) sd(x) 2023 12 R ( ) (2) — — 2024-01 – p.5/14
Histogram of x x Frequency 10 20 30 40 50
60 70 80 0 5 10 15 20 25 30 35 mean(x) : 50.06994 sd(x) : 10.30096 2023 12 R ( ) (2) — — 2024-01 – p.6/14
ρ 2 (1/2) MASS “mvrnorm()” “ .R” # r =
0.9 # t = 3.7 # r = 15.2 # t = 7.5 # = -0.5 # <- matrix(c( r^2, * t * r, * r * t, t^2 ), nrow=2) 2023 12 R ( ) (2) — — 2024-01 – p.7/14
“mvrnorm()” = S xx S xy S xy S yy
= S xx rS x S y rS x S y S yy ( r = S xy S x S y ) 2 x, y x, y, z, . . . 2023 12 R ( ) (2) — — 2024-01 – p.8/14
ρ 2 (2/2) MASS “mvrnorm()” “ .R” # set.seed(28284) <-
mvrnorm(n=100, mu=c( r, t), Sigma= ) <- pmin(pmax( [,1], 13.0), 19.9) <- pmin(pmax( [,2], 0.0), 20.0) “ [,1]” “ [,2]” plot 2023 12 R ( ) (2) — — 2024-01 – p.9/14
0 5 10 15 20 13 14 15 16 17
18 ㈇ࡢ┦㛵ࡢ 㐌ᙜࡓࡾࡢㄢእ㐠ື㛫 100m㉮ࡢࢱ࣒ (⛊) r : -0.5932345 ( ) -0.5884094 ( ) 2023 12 R ( ) (2) — — 2024-01 – p.10/14
(1/2) “ .R” n <- 50 # a <- 49.4
# ( (158cm ) ) # r_father <- 0.306 mean_father <- 168.78 sd_father <- 3.2 # r_mother <- 0.37 mean_mother <- 155.32 sd_mother <- 2.45 2023 12 R ( ) (2) — — 2024-01 – p.11/14
(2/2) “ .R” <- round(rnorm(n=n, mean=mean_father, sd=sd_father), digits=1) <- round(rnorm(n=n,
mean=mean_mother, sd=sd_mother), digits=1) e <- rnorm(n=n, mean=0, sd=2.8) # <- round(a + r_father * + r_mother * + e, digits=1) 1 “round()” plot 2023 12 R ( ) (2) — — 2024-01 – p.12/14
ፉ㌟㛗 160 165 170 175 152 156 160 164 160
165 170 175 ∗㌟㛗 152 156 160 164 150 154 158 150 154 158 ẕ㌟㛗 : 34.2484 : 0.3545 : 0.4137 : 0.2831 2023 12 R ( ) (2) — — 2024-01 – p.13/14
2023 12 R ( ) (2) — — 2024-01 –
p.14/14
More Decks by Kenji Saito
See All by Kenji Saito
NPO とは何か(を考えるワールドカフェ) / What Is an NPO? (A World Café Discussion)
ks91
PRO
0
15
講師自己紹介 / Lecturer's Self-Introduction
ks91
PRO
0
15
講師研究紹介 / Faculty Research Profile
ks91
PRO
0
10
FinTech 11-12 : Cyber-Physical Society and Future of Finance
ks91
PRO
0
61
サイバーフィジカル・セキュリティーと人間の安全保障 / Cyber-Physical Security and Human Security
ks91
PRO
0
32
ゼミ紹介 デジタルトランスフォーメーションと経済・金融の未来 / Zemi Introduction : Digital Transformation and the Future of the Economy and Finance
ks91
PRO
0
37
FinTech 9-10 : Smart Contracts and Decentralized Finance
ks91
PRO
0
81
FinTech 7-8 : Blockchain
ks91
PRO
0
84
Fall 2026: A Guide & Workshop on Using AI for Academic Paper Writing
ks91
PRO
1
130
Other Decks in Business
See All in Business
ラクスル会社紹介資料 / RAKSUL Introduction
raksulrecruiting
18
270k
ピリカ 採用候補者向け資料(スマホ版)2026.11
pirika_info
0
280
Give people back the work they were hired to do
ediel
0
210
ハンディ株式会社 | 会社ご説明資料
handy_official
0
5.9k
Clarity for Product People (short version)
arnekittler
0
810
20261024_スクラム祭り三島
kgnkhkr
1
570
【DearOne】Dear Newest Member
hrm
3
21k
4 operating model upgrades for success with AI - Matthew Skelton - Enterprise AI Summit - Bletchley Park, UK
matthewskelton
PRO
0
640
I'm the trigger
in0u
1
250
『仲良しで何が悪い』へのアンチテーゼ - 馴れ合いからプロとして背中を預け合えるチームを作る
rechiba3
0
1.3k
株式会社ユビレジ_採用ピッチ資料 / Ubiregi_CompanyProfile
ubiregi_saiyo
1
12k
G-gen カルチャー
ggen
0
1.3k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
300
Everyday Curiosity
cassininazir
0
400
The browser strikes back
jonoalderson
0
1.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Optimising Largest Contentful Paint
csswizardry
37
4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Being A Developer After 40
akosma
PRO
92
590k
How GitHub (no longer) Works
holman
316
150k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
Rails Girls Zürich Keynote
gr2m
96
14k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k