1What this book is¶
This is the coursebook for MATH 2200, the gateway statistics course at California State University, Bakersfield (CSUB). It is a free, open coursebook: you can read it on a laptop or a phone, search it, copy its code, and keep it after the semester ends. Nothing in it is behind a paywall.
The book teaches statistics the way it is actually done — with data and a computer. Every idea is built in three steps, always in the same order:
We never publish a number we did not compute. Every figure, summary statistic, and worked answer in this book is produced by R code that runs on a real, documented dataset — or it carries a citation to its source. You can trust the numbers because the code that made them is right there on the page.
2Who it is for¶
This book is written for you — a first-year CSUB student taking your first statistics course, very possibly your first college math course of any kind. You might be majoring in business, nursing, kinesiology, criminal justice, psychology, computer science, or mathematics. You do not need any programming background, and you do not need to have liked your last math class. If you can read a news headline and wonder whether the number in it is trustworthy, you already have the instinct this course will sharpen.
CSUB is a Hispanic-Serving Institution in California’s Central Valley, and this book is grounded in that place. Chapters open with questions about Bakersfield air quality, Kern County agriculture and oilfield employment, local schools, and student life — because statistics is most convincing when it is about something real and close to home. The data are genuine downloads from public sources (with a few clearly labeled classroom simulations), documented in the Dataset Index.
3How to use this book¶
Read with R open. Each chapter is meant to be worked, not just read:
Start with the Kern-County hook that opens each chapter. It is the real question the chapter answers.
Read intuition formula R, in order. Don’t skip to the formula. The intuition is what makes the formula stick.
Do the worked example before you try the exercises. Every new skill is demonstrated once, start to finish, before you are asked to use it.
Watch for durable-skill callouts. Each chapter flags at least two workplace skills — quantitative reasoning, critical thinking, quantitative communication, self-directed learning, or teamwork — and explains where you will use them after the course.
Use the appendices. A formula sheet, distribution tables, an R quick reference, a which-test decision guide, a glossary, and answers to the odd-numbered exercises are all in the back.
3.1Try it — the interactive tools¶
Reading about statistics is not the same as doing it. Two companion tools let you do it:
The Statistics Explorer (a Shiny web app) lets you point, click, and explore data — and every action shows you the exact R code that produced it, ready to copy. It is the bridge from clicking to coding.
The Jupyter labs — one per chapter — walk you step by step through the chapter’s R skills with starter code and short exercises.
Look for the “Try it” links inside each chapter; they point you to the matching Explorer module and lab.
To run R yourself — the labs and every R box in this book — use the CSUB
JupyterHub at https://mosaic and BSDA already installed. Nothing
to install on your own computer.
4Accessibility¶
This book is built to be usable by everyone:
Every figure has meaningful alt text describing what the figure shows, not just that a figure exists.
Color is never the only signal. Plots use the colorblind-safe Okabe–Ito palette, and important distinctions are also carried by shape, position, or labels.
Tables have proper headers, and text and background colors meet the WCAG AA contrast standard.
The layout is responsive, so the book reads cleanly on a phone, and the site has full-text search.
If you use a screen reader or other assistive technology and hit a barrier in this book, that is a bug we want to fix — please tell your instructor so it can be reported to the CSUB Department of Mathematics.
5Licensing, in one sentence¶
The writing is free to reuse and adapt under CC BY-SA 4.0, the code is MIT, and the book adapts OpenIntro’s openly licensed materials with attribution — the full details, and how to cite us, are on the License & Attribution page.
Welcome to MATH 2200. Open R, pick a question about your own backyard, and let’s get started.