know.

CookbookTeaching and coursesNo. 17

An open textbookchapters drafted in the open and released under a Creative Commons licence

Recipe No. 17Teaching and courses

For
A community-college instructor writing an open textbook for introductory statistics
You bring
Your lecture notes, the public datasets you teach with, R scripts that run, and the openly licensed books you plan to adapt
You get
Eight chapters of an open statistics textbook, each on its own public link with its licence statement and every section sourced, ready for layout in Pressbooks
Time
A term to draft, about a chapter a fortnight
Works in
know.sh on the web · your AI assistant, through MCP
Keep it
Private while you work; share one document by a read-only link when it is ready.

Students in an introductory statistics course often pay more for the textbook than they can easily afford, and many never buy it. Open textbooks answer that, and they are written the way courses are taught: a chapter at a time, tried on a class, rewritten the next term. The hard part is keeping the draft, the sources and the permissions straight while all three are still changing.

This recipe drafts Counting on It: Introductory Statistics in know.sh. Your assistant, whether Claude, ChatGPT or a local model, turns your lecture notes into a chapter: a research document whose overview carries the chapter’s aims and its licence statement, with a finding per section. You write the explanations into shape in the editor, with sources on every section, tables, and R code in code blocks. A chapter goes out on its own public link as soon as it is good enough for students, and those links are the draft edition your class reads while you write the next one.

Two things stay outside. know.sh has no maths typesetting, so formulas are written in plain text or as code until layout. And the finished book is laid out in Pressbooks or a similar platform, which makes the editions students download and print.

What you will use

Shelf
One shelf for the book, Counting on It, whose notes record the licence decision and the house style.
Research document
One document per chapter; the overview holds the chapter’s aims and its licence statement.
Finding
One finding per section, with its source links, tables and R code blocks; exercises filed as a Question.
Your AI assistant
Lays out each chapter from your notes, checks sources and attributions, finds openly licensed datasets on the web, and reads chapters back as Markdown for layout.
The editor
Where the explanations become yours: tables, code blocks, formulas in plain text, attribution lines and the order of sections.
The A–Z index
The book’s index of names, datasets and acronyms (Gosset, ANOVA), grown from section titles and their opening lines as you write.
Public link
A public link per chapter that never expires, so students read the draft while you write on.

Method

  1. 1

    Choose the licence before the first chapter

    Decide the book’s licence before you adapt a word, because the licence of anything you adapt limits what yours can be. CC BY lets anyone reuse the book with credit and is the usual choice for open textbooks. Adapting material licensed CC BY-SA means the adapted work must be released under CC BY-SA too. Write the decision into the shelf’s notes, with the date and your reasons.

    Then write the licence statement that ends every chapter’s overview: “Counting on It: Introductory Statistics by R. Delgado, Alder Valley Community College, is licensed under CC BY 4.0, except where otherwise noted.” Each chapter has its own link, and a reader may arrive at any one of them without seeing the others.

  2. 2

    Have your assistant lay out a chapter from your notes

    Give your assistant your lecture notes and R scripts for one chapter, attached in Claude or ChatGPT or as files a local client can read. Ask it to create Chapter 5 — Confidence intervals on the Counting on It shelf: the chapter’s aims and your licence statement in the overview, then one finding per section, with your worked examples, tables and code carried across as they are.

    It arranges your material; it does not write the book. The explanations are yours to write and rewrite, and the assistant’s draft is scaffolding. know.sh numbers findings by their order, so section 5.3 is simply the third finding of chapter 5; keep numbers out of section titles and they cannot fall out of step when you reorder.

  3. 3

    Write it into shape in the editor

    Press Edit and work through the chapter. Rewrite each explanation in your voice, drag sections into teaching order, and split any section too long to read on a phone. File each kind of section the same way throughout: explanations as Observation, worked examples as Evidence, common mistakes as Problem, exercises as Question, and say in the overview what each means.

    Tables arrive as tables and code sits in fenced blocks, highlighted while you edit. Run every block in R yourself before it goes on a link; an assistant reading code is not a test of it. There is no maths typesetting, so write formulas in plain text or as code — mean ± t* × s / sqrt(n) — and define every symbol in the sentence that follows.

  4. 4

    Give every section its sources

    Every finding has a list of source links. Use it every time: the dataset’s home page, the study a worked example came from, the open textbook a passage was adapted from. When a passage is adapted, also end the section with an attribution line naming the title, author, source and licence, and saying what you changed: “Adapted from Statistics for Everyone, chapter 6, by J. Ferris, CC BY 4.0; example data replaced.”

    Then ask your assistant to read the chapter and list every section without a source link, every passage that looks adapted but has no attribution line, and every symbol used before it is defined, as a finding called Checks before release rather than changes to the text.

  5. 5

    Find data and material to adapt

    For datasets or openly licensed chapters, ask your assistant to research the question on the web and file what it finds as a new document on the shelf, one finding per dataset, each with its source links. This needs an assistant that can search the web; Claude and ChatGPT can, and many local set-ups cannot.

    Treat what comes back as leads. Open every source, read its licence on its own page, and check the data says what the summary claims before a student sees it.

  6. 6

    Release each chapter on its own link

    When a chapter is ready for students, press Share, leave it with no expiry (the default), and copy the link as soon as it appears; it is shown once. Leave out Checks before release from its own page. Set no password: an open textbook is meant to be open.

    Ask your assistant for one more document, Read me first, with the book’s description, the licence, a line saying the draft changes between terms, and room for the link to every released chapter, which you paste in. Share that one too and post it in your course shell. When you revise a chapter, its link shows the new version at once, and the chapter’s revisions keep what last term’s class read.

  7. 7

    Move to Pressbooks for layout

    When the draft settles, lay the book out in Pressbooks or a similar platform, which handles the web edition, the files students download and proper mathematical notation. Bring the text across a chapter at a time: ask your assistant to read the chapter back to you as Markdown in the chat, then paste it into the platform and check it against the original.

    Keep know.sh as the working draft. Errata arrive by email from students and colleagues; file each in an Errata document, a Bug for a mistake and a Suggestion for an improvement, and fix the chapter and the layout together.

Specimen

Counting on ItChapter 5

3of 9

Confidence interval for a mean

Evidence, key finding, 1 highlight, 1 note, 3 sources, 540 words

A city transport survey publishes the one-way commuting times of people who answered it. We take a random sample of 24 and estimate the mean commute for everyone who answered.

SamplenMean (minutes)Standard deviation
Transport survey, random sample2427.59.8

A 95% confidence interval for a mean is mean ± t* × s / sqrt(n), where t* is the critical value of the t distribution with n − 1 = 23 degrees of freedom, about 2.07.

commute <- read.csv("commute_sample.csv")
t.test(commute$minutes, conf.level = 0.95)$conf.int
# 23.4 to 31.6 minutes

We are 95% confident that the mean commute lies between about 23.4 and 31.6 minutes. That is a statement about the method, not about any one commuter.

Adapted from Statistics for Everyone, chapter 6, by J. Ferris, CC BY 4.0; example data replaced.

A section as a finding: a table, the R code that produced the interval and the formula in plain text, ending with its attribution line. The assistant has proposed a note about rounding; nothing changes unless it is accepted.
  1. You

    Using know.sh, find three openly licensed public datasets for teaching simple linear regression to first-year students: under 500 rows, everyday subjects, a clearly stated licence. File them as a new document called “Datasets for chapter 7” on my Counting on It shelf, one finding per dataset.

  2. ChatGPT

    I searched the web and read the licence page of each candidate. Two national statistics portals and one city open-data portal had suitable tables; I skipped four whose terms did not allow redistribution.

  3. research_createCreated Datasets for chapter 7 on Counting on It
  4. finding_addAdded “Household energy use and floor area” with 2 sources: the portal page and its licence page
  5. finding_addAdded “Commute distance and travel time” with 2 sources: the city data portal and its terms of use
  6. finding_addAdded “Tree height and trunk diameter” with 2 sources: the survey page and its licence
  7. ChatGPT

    Each finding quotes the licence as the source page states it. Please open the licence pages yourself before you use the data; I cannot confirm licences beyond what those pages say.

An assistant with web search doing the legwork: it reads the licences, files a document of candidates with their sources, and says what the instructor still has to check.

Chapter 5Confidence intervals

Shared from a library on know. 8 findings.

In chapter 4 we saw that sample means vary from sample to sample. This chapter turns that variation into a range of plausible values for a population’s mean or proportion, and says what “95% confident” does and does not mean.

Sections marked Evidence are worked examples, Problem marks a common mistake, and Question marks exercises, with answers in the last section. Formulas are written in plain text in this draft edition.

Counting on It: Introductory Statistics by R. Delgado, Alder Valley Community College, is licensed under CC BY 4.0, except where otherwise noted.

Findings

  1. 1What a confidence interval estimatesObservation, high importance
  2. 2Critical values and the t distributionObservation, medium importance
  3. 3Confidence interval for a meanEvidence, high importance
  4. 4Confidence interval for a proportionEvidence, high importance
  5. 5What 95% confident does not meanProblem, high importance
  6. 6Choosing a sample sizeObservation, medium importance
  7. 7ExercisesQuestion, medium importance
  8. 8Answers to the exercisesObservation, low importance

Set with know.

Chapter 5 on its public link: the aims, a key to the finding types and the licence statement, then the sections. The release checklist is left out.

Prompts to try

  1. Your assistant, connected to know.sh (Claude, ChatGPT or a local model)

    Using know.sh, create a document called “Chapter 5 — Confidence intervals” on my Counting on It shelf from the lecture notes and R scripts I have attached. Put the chapter aims and this licence statement in the overview: [paste your statement]. Then add one finding per section in teaching order, keeping my worked examples, tables and code exactly as they are, with R code in fenced blocks. Do not write new explanations; mark any gap in my notes with “TO WRITE”.

  2. Your assistant, connected to know.sh (Claude, ChatGPT or a local model)

    Using know.sh, read “Chapter 5 — Confidence intervals” on my Counting on It shelf. List every section with no source link, every passage that looks adapted but has no attribution line, and every symbol or term used before it is defined. File the list as a new finding in that document called “Checks before release” and change nothing else.

  3. Your assistant, connected to know.sh (Claude, ChatGPT or a local model)

    Using know.sh, read “Chapter 5 — Confidence intervals” on my Counting on It shelf and give it back to me here as Markdown, section by section, keeping the tables, the R code blocks and the formulas exactly as written. Do not rewrite or summarise anything; I am pasting it into Pressbooks.

Variations

  • Adapting an existing open textbook rather than writing your own? Have your assistant make one document per adapted chapter, starting each section with what you changed; the attribution lines then write themselves.
  • Keep a Style sheet document on the shelf — notation, rounding, how datasets are cited, whether “data” is plural — and ask your assistant to check each new chapter against it.
  • Teach from the draft: the syllabus and course book recipe can link each week to the chapter students read that week.
  • Writing a book of worked R examples for a methods course? The technical book recipe keeps code notes in step with the software.

Where it falls short

  • There is no maths typesetting, no LaTeX and no equation editor. Formulas stay in plain text or code until layout.
  • There is no export. Layout happens in Pressbooks or a similar platform, and the text gets there by copying a chapter or asking your assistant to read it back as Markdown.
  • Figures and charts cannot be added; there is no image upload. Keep the R code that draws each figure in its section and make the figures at layout.
  • Readers cannot comment or suggest changes on a link, so errata reach you by email and you file them.
  • Web research needs an assistant with web search. Smaller local models call tools less reliably, so check what they file; Revisions shows every change.

A note on licences, adapted material and data

Indexed under

Open textbooksCreative CommonsAttributionLicence compatibilityR codeFormulasPressbooks