Skip to Content
Think Stats 第3版 ―Pythonで学ぶ統計学入門
book

Think Stats 第3版 ―Pythonで学ぶ統計学入門

by Allen B. Downey, 大橋 真也
October 2025
Intermediate to advanced
328 pages
3h 56m
Japanese
O'Reilly Japan, Inc.
Content preview from Think Stats 第3版 ―Pythonで学ぶ統計学入門

9章仮説検定

本書で探究してきたデータセットでは、人やペンギンのグループ間の違い、変数間の相関、回帰直線の傾きなどを見てきました。このような結果は観測効果と呼ばれます。観測効果は、直接観測できない母集団における実際の効果とは対照的に、標本に現れるものです。明らかな効果が見られる場合、それがより大きな集団に存在する可能性が高いのか、それとも偶然標本に現れたのかを検討する必要があります。

この問題を定式化する方法はいくつかあり、フィッシャーの帰無仮説検定、ネイマン・ピアソンの決定理論、ベイズ仮説検定などがあります。ここで紹介するのは、実務でもよく用いられるこれらの手法の組合せです。

9.1 コイン投げ

簡単な例から始めましょう†1。2002年にユーロ硬貨が導入されたとき、好奇心旺盛なコイン愛好家がベルギーの1ユーロ硬貨を250回転がしたところ、表が140回、裏が110回出ました。コインの偏りがまったくなければ、表は125回しか出ないと予想されるので、このデータはコインが偏っていることを示唆しています。一方、毎回正確に125回の表が出るわけないので、コインは実際には偏りがなく、期待値からの明らかな差は偶然によるものである可能性もあります。それが妥当かかどうかを確かめるために、仮説検定を行います。

[†1] D. J. MacKay, Information Theory, Inference and Learning Algorithms (Cambridge University Press, 2003)の例に基づく。

次の関数を使い、コインが偏りがない場合の観測された値と期待値との差の絶対値を計算します。

n = 250
p = 0.5
        
def abs_deviation(heads): ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

直感 生成AI ―ハンズオンで動かして学ぶ拡散モデル入門

直感 生成AI ―ハンズオンで動かして学ぶ拡散モデル入門

Omar Sanseviero, Pedro Cuenca, Apolinário Passos, Jonathan Whitaker, 江川 崇
SRE サイトリライアビリティエンジニアリング ―Googleの信頼性を支えるエンジニアリングチーム

SRE サイトリライアビリティエンジニアリング ―Googleの信頼性を支えるエンジニアリングチーム

Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy, 澤田 武男, 関根 達夫, 細川 一茂, 矢吹 大輔, Sky株式会社 玉川 竜司
MLOps実装ガイド ―本番運用を見据えた開発戦略

MLOps実装ガイド ―本番運用を見据えた開発戦略

Yaron Haviv, Noah Gift, 井伊 篤彦, 入江 美穂, 張 凡, 樋口 千洋

Publisher Resources

ISBN: 9784814401376Publisher Website