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
応用セッション_同じデータでもP値が変わる話/key_considerations_in_NH...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
florets1
January 17, 2024
Education
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
応用セッション_同じデータでもP値が変わる話/key_considerations_in_NHST_2
florets1
January 17, 2024
More Decks by florets1
See All by florets1
Rでドレミ/Do-Re-Mi_with_R
florets1
0
67
整数計画ソルバーで遊ぼう/using_an_integer_programming_solver_in_r
florets1
0
47
データ分析をはじめよう/lets_start_data_analysis
florets1
2
1.1k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
860
Tableauとggplot2の背景/Background_of_Tableau_and_ggplot2
florets1
0
100
Rで学ぶデータハンドリング入門/Introduction_to_Data_Handling_with_R
florets1
0
180
人工知能はクロスジョインでできている/AI_Is_Built_on_Cross_Joins
florets1
0
140
仮説の取扱説明書/User_Guide_to_a_Hypothesis
florets1
4
500
複式簿記から純資産を排除する/eliminate_net_assets_from_double-entry_bookkeeping
florets1
1
530
Other Decks in Education
See All in Education
NDIAS Automotive / IoT CTF 2026 Recap - Keyfob & OSINT
himitu23
0
350
「答えを出す」より「わかる」をつくる
kzkmaeda
1
310
【デザイナー就活講座】 デザイナー就活市場・企業探し・ポートフォリオのポイント
koheihasebe
0
680
チームの鏡になるー自分の癖を知ると、チームのパターンが見えてくる@スクフェス仙台
saorimurooka
0
220
Introduction to M&A
bvr7352
0
230
aini school小中等部説明会資料
ainischool
0
140
Requirements Analysis and Prototyping - Lecture 3 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.8k
Web Architectures - Lecture 2 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
210
One Year of Learning English with AI @エンジニア英語キャリア Meetup #3
kekekenta
0
260
GENERAL PHARMACOLOGY
pawan_pharm
0
160
Comentario del plano urbano de Madrid hasta 1860 (1ª parte )
juanmartin2026
1
100k
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
A Soul's Torment
seathinner
8
3.7k
Prompt Engineering for Job Search
mfonobong
0
470
Making Projects Easy
brettharned
120
6.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Transcript
1 応用セッション 2024.01.20 Tokyo.R #110 同じデータでもP値が変わる話
2 統計的仮説検定 同じデータからは同じ検定結果が得られるもの と考えられがちですが 実際には必ずしもその通りではありません。
3 例えば コイン投げをして24回中7回が表になったという単純 なデータを考えてみましょう。 このようなデータでも、実験の設定や投げる回数の制 約によって、統計的仮説検定の結果が変わることがあ るのです。
4 コインを1回投げる 𝑝 𝑦 𝜃 = 𝜃𝑦(1 − 𝜃)(1−𝑦) 𝜃
= 0.5 ベルヌーイ分布 θ: 表が出る確率 y: 1 は表, 0 は裏
5 コインをN回投げる 裏裏表表裏裏表裏裏裏裏裏裏裏裏裏表裏裏表表裏裏表 表が出る確率 θ 投げる回数 N 表の回数 z 二項分布
6 統計的仮説検定の流れ 帰無仮説をたてる ↓ 標本分布を計算する ↓ データを観測してP値を求める
7 帰無仮説をたてる ある統計量がある値と等しいということを帰無仮説と して設定します。 例) コインの裏表が出る確率が50%と等しい 平均値が等しい
8 標本分布を計算する 帰無仮説が成り立つ場合にその統計量が従うであろう 確率分布(=標本分布)を計算します。 例) コインの裏表が出る確率 → 二項分布など 平均値 →
t分布など
9 データを観測してP値を求める 実際に観測された値、もしくはそれ以上に極端な値が 標本分布に占める面積、つまりそのような値が観測さ れる確率(P値)を求めます。
10 P値があらかじめ設定したしきい値(たとえば5%)よ りも小さければ、そもそも帰無仮説が間違っていたの だと結論づけます。 逆に小さくなければ帰無仮説を棄却せず、判断を保留 します。 P値で判断
11 コインを24回投げて7回表が出た このコインは公平か。 データ観測者の意図 コインを24回投げると決めていた。結果として7回表 がでた。
12 標本分布 表が出る確率 θ 投げる回数 N 表の回数 z 二項分布
13 データを観測 θ = 0.5 N = 24 z =
7 P値 = 0.064 Sample Proportion z/N p(z/N)
14 Rのコード
15 Pythonのコード
16 コインを24回投げて7回表が出た このコインは公平か。 データ観測者の意図 7回表が出るまで投げ続けると決めていた。結果として 24回投げた。 ↓ 23回投げた時点で6回表が出ており、24回目では表が 出た。
17 標本分布 N-1回投げた時点でz-1回表が出て N回目は表
18 データを観測 θ = 0.5 z = 7 N =
24 P値 = 0.017 Sample Proportion z/N p(z/N)
19 Rのコード
20 Pythonのコード
21 投げる回数N 表が出る回数 z • Nを固定する意図ではP値=0.064(判断を保留) • zを固定する意図ではP値=0.017(帰無仮説を棄却) 同じデータを観測しても、観測者の意図によって 検定結果が変わる!
22 意外にも 観察者の意図やデータ収集の方法が、統計的な結果に 影響を与える可能性があるのです。 このような現象は、統計的な検定の限界や留意すべき 要点を浮き彫りにします。単に数値を見るだけではな く、実験の文脈や条件を正しく理解することの重要性 を示しています。
23 参考書 飯塚修平. ウェブ最適化ではじめる機械学習. オライ リー・ジャパン, 2020 John K. Kruschke.
Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan EDITION 2. Academic Press, 2014