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で学ぶ統計学入門

6章確率密度関数

5章では、二項分布、ポアソン分布、指数分布、正規分布などの理論的分布を使ってデータをモデル化しました。

二項分布とポアソン分布は離散分布であり、これは結果が整数の、ヒット数とミス数、得点のように、とびとびの要素であることが必要であることを意味しています。離散分布では、各結果は確率質量が対応しています。

指数分布と正規分布は、連続的な分布であり、これは結果が可能な値の範囲内のどの点にもなり得ることを意味します。連続分布では、各結果は確率密度に関連付けられています。確率密度は抽象的な概念で、多くの人にとって最初は難しいと感じますが、一歩ずつ進めていきましょう。最初のステップとして、分布の比較についてもう一度考えてみましょう。

6.1 分布の比較

5章では、離散分布を比較するとき、それらの確率質量関数(PMF)を示すために棒グラフを使いました。連続分布を比較するときは、それらの累積分布関数(CDF)を示すために折れ線グラフを使いました。

離散分布については、CDFを使うこともできます。例えば、lam=2.2のポアソン分布のPMFは、NSFGデータにおける世帯人数の分布をよく表しているモデルです。

read_fem_respを使って回答者データファイルを読み込みます。

from nsfg import read_fem_resp

resp = read_fem_resp()

次に、25歳以上の世帯人数を選びます。

older = resp.query("age >= 25")
num_family = older["numfmhh"]

そして、回答者の分布を表すPmfを作成します。

from empiricaldist import Pmf

pmf_family ...
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