Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R ...
Search
Kenji Saito
PRO
November 30, 2024
Technology
0
6
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
早稲田大学大学院経営管理研究科「企業データ分析」2024 冬のオンデマンド教材 第12回で使用したスライドです。
Kenji Saito
PRO
November 30, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
12
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
8
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
7
R を用いた分析(補講) (1) — 重回帰分析 / Analysis using R (supplementary) (1) - Multiple regression analysis
ks91
PRO
0
5
GPT-4 を用いたデータ分析 / Data analysis using GPT-4
ks91
PRO
0
8
GPT-4 を用いた論文生成 / Paper generation using GPT-4
ks91
PRO
0
8
棒グラフ、帯グラフ(、円グラフ) / Bar chart, band chart (, pie chart)
ks91
PRO
0
13
さまざまなグラフ描画(1) / Various graphical representations (1)
ks91
PRO
0
10
さまざまなグラフ描画(2) / Various graphical representations (2)
ks91
PRO
0
12
Other Decks in Technology
See All in Technology
LY Accessibility Guidelines @fukuoka_a11yconf_前夜祭
lycorptech_jp
PRO
1
130
2024/11/29_失敗談から学ぶ! エンジニア向けre:Invent攻略アンチパターン集
hiashisan
0
230
今はまだ小さい東京ガス内製開発チームが、これからもKubernetesと共に歩み続けるために
yussugi
3
510
歴史あるRuby on Railsでデッドコードを見つけ、 消す方法@yabaibuki.dev #3
ayumu838
0
1.7k
累計2500万着電を支える大規模 電話自動応答サービスのアーキテクチャ / Architecture of a Large-Scale Automated Phone Response Service Supporting 25 Million Cumulative Calls
ymachida
8
4.2k
次のコンテナセキュリティの時代 - User Namespace With a Pod / CloudNative Days Winter 2024
pfn
PRO
4
430
偶有的複雑性と戦うためのアーキテクチャとチームトポロジー
knih
7
5.9k
Bytebaseで実現する データベース管理の効率化
shogo452
1
280
50以上のマイクロサービスを支えるアプリケーションプラットフォームの設計・構築の後悔と進化 #CNDW2024 / regrets and evolution of application platform
toshi0607
5
620
Nutanixにいらっしゃいませ。Moveと仮想マシン移行のポイント紹介
shadowhat
0
240
もう一度、 事業を支えるシステムに。
leveragestech
6
3k
sre本読んだ感想
pisakun
0
160
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Language of Interfaces
destraynor
154
24k
Facilitating Awesome Meetings
lara
50
6.1k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Bash Introduction
62gerente
608
210k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
760
The Invisible Side of Design
smashingmag
298
50k
Documentation Writing (for coders)
carmenintech
65
4.5k
A better future with KSS
kneath
238
17k
Transcript
Boxes and whiskers — generated by Stable Diffusion XL v1.0
2024 12 R ( ) (2) — (WBS) 2024 12 R ( ) (2) — — 2024-11 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2024-winter 2024 12 R ( ) (2) — — 2024-11
– 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/16 ) / (2 ) OK / 2024 12 R ( ) (2) — — 2024-11 – p.3/14
N(µ, σ2) ρ 2 ( : ˆ y = a
+ b1 x1 + b2 x2 + e ) 2024 12 R ( ) (2) — — 2024-11 – 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) 2024 12 R ( ) (2) — — 2024-11 – 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 2024 12 R ( ) (2) — — 2024-11 – 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) 2024 12 R ( ) (2) — — 2024-11 – 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, . . . 2024 12 R ( ) (2) — — 2024-11 – 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 2024 12 R ( ) (2) — — 2024-11 – p.9/14
0 5 10 15 20 13 14 15 16 17
18 ㈇ࡢ┦㛵ࡢ 㐌ᙜࡓࡾࡢㄢእ㐠ື㛫 100m㉮ࡢࢱ࣒ (⛊) r : -0.5932345 ( ) -0.5884094 ( ) 2024 12 R ( ) (2) — — 2024-11 – 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 2024 12 R ( ) (2) — — 2024-11 – 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 2024 12 R ( ) (2) — — 2024-11 – 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 2024 12 R ( ) (2) — — 2024-11 – p.13/14
2024 12 R ( ) (2) — — 2024-11 –
p.14/14