STAD29

Statistics for the Life and Social Sciences

Ken Butler

bad picture

Welcome to the home page for STA 1007 / STAD29. This is the place to look for things course-related (notes, code, old exams etc., linked above) except for assignment hand-ins, marks, and ancient lecture videos, which is on Quercus.

News (newest first)

  • 2026-04-17 11:35: I have calculated and submitted grades. They need to be approved by the department, and then they go to the Registrar’s office and then to you. Some comments:

    • I have been generous to you in two ways:
      • The final exam was actually out of 85 but I have counted it as if it was out of 80.
      • Along with that, I moved the must-get down a little bit from 40% (your final exam mark counted as if out of 80 needed to be at least 37%).
    • If your final exam % was bigger than your midterm %, I counted the final in place of the midterm.
    • There were a number of A+ grades; if that is you, congratulations.
    • If you did not write the final exam, I have submitted the grade you have earned so far, which will look like a failing grade. When you write a deferred final exam, your grade will be recalculated.
    • If you are disappointed with your grade, you will need to consult with the Registrar’s office to learn about any options you have. I can no longer make any changes. In particular, do not ask me for special treatment.
    • I wish everybody a good summer, and, if you are graduating, a successful future. It has been a pleasure to work with you.
  • 2026-04-16 22:30: final exam is marked. Grades tomorrow.

  • 2026-04-15 21:00: the end is in sight: 90% done.

  • 2026-04-14 23:20: a late night pop-in to say that the exam is now 74% marked.

  • 2026-04-13 22:30: I am officially done marking the final exam, and your TAs are hard at work, and so as I write the exam is 53% marked.

  • 2026-04-13 11:00: Assignment 8 is indeed marked, marks coming your way shortly. As for assignment 6, appeals are limited to work that was not marked at all (according to the rubric).

  • 2026-04-12 22:00: The exam is 44% marked, and I am almost done my share. It looks as if there will shortly be marks for Assignment 8 as well. My solutions, slightly updated as I have been marking.

  • 2026-04-11 22:20: I’ve had a high-quality Saturday (joking), with the consequence that the exam is 26% marked. I managed to keep going without music tonight, but the music tends to become more necessary as the marking proceeds. I gave myself 17 questions to mark (the two TAs have the rest), of which I seem to have marked 10. I am hoping to finish my share of the marking by about Tuesday, and asked the TAs to finish by Wed night so that I can submit grades on Thursday (which means they would get to you on about the following Monday). If you’ll excuse me, I’m going to watch some mindless YouTube before I go to bed.

  • 2026-04-10 22:00: Day 1 of exam marking is done. We (well, I) are 10% done. I tackled questions 10 through 13 (the ones about the babies with birth defects). My solutions, with the Figures at the back (in case you didn’t keep yours). A pleasing number of students followed the logic all the way through to question 13. Musical accompaniment to tonight’s marking: Mozart’s piano concerto no. 9, a piano concerto by his son Franz Xaver, and French Suites by Bach (one that my grandfather used to play).

  • 2026-04-10 11:50: Friday update:

    • Assignment 6 has been marked and I will post the marks shortly. Assignment 8 is on the way. Because I need to get the final exams marked and the course grades in, the only appeals I will consider for these assignments are where a question was not marked at all (that is, no item from the rubric was checked). For Assignment 6, appeals on Mon Apr 13 only.
    • The final exams written in HL B101 yesterday have all been scanned (so I will shortly start marking those), with the Accessability exams to follow (maybe later today).
    • Now that the final exam has been written, it is entirely inappropriate to contact me about the final exam or your course grade, and in particular any sort of appeal for special treatment makes you look bad.
  • 2026-04-08 12:00: the Registrar’s office appears to be unable to work their own system to tell you where the final exam is. See this morning’s announcement on Quercus for location.

  • 2026-04-07 13:00: assignment 7 is marked, grades coming your way shortly. Any appeals on April 8 only (we are running out of time).

  • 2026-04-07 12:00: two small things:

    • the time and place for our final exam should be on your Acorn. You’ll note that we have a better time of day than for the midterm. (The rationale is that final exams are arranged by the university, but midterms are under the control of the professor, so it is my job to tell you where and when midterms are.)
    • on worksheet 11, there were some questions on “need for cognition”. This was a principal components problem; I did not talk about this this time, so you do not need to know about it. I just put a new version of worksheet 11 on the worksheets page, with only two problems: a maps one, and a log-linear modelling one. We did do both of those.
  • 2026-04-02 22:00: in case any doubt: the rules for our final exam are as for all of my exams: open book, bring the (organized) material of your choice; the exam is officially cumulative, but expect the majority of the material to be from after the midterm.

  • 2026-03-30 19:35: not a great deal else to report:

    • Lecture this week is two or three more examples of log-linear models (frequency tables). I’ll try not to go more than an hour and will stick around for questions after.
    • All the worksheet and assignment solutions are now up on the appropriate pages.
    • I seem to have settled on 39 questions for the final exam (total 85 points). The exam is more or less in its final form but I want to wait until after our last lecture before I send it for printing, to make sure that everything on it is something you have a fair shot at doing.
    • I will lean on the TAs in the hopes of getting all the assignments marked before the final exam.
  • 2026-03-24 11:25: my worksheet 10 solutions and worksheet 11 questions are up on the worksheets page. Sorry for the delay in the former. Added 16:35: assignment 7 solutions are up on the assignment solutions page.

  • 2026-03-20 15:45: Assignment 5 is marked; marks and marked assignments to be released shortly. Appeals by usual procedure between Mar 23 and Mar 30.

  • 2026-03-20 12:10: I have taken a look at the midterm appeals. Any adjustments to marks should now be reflected in Quercus, and if you look again at your marked exam, you should see an additional comment (from me) on any questions you appealed.

  • 2026-03-19 20:30: A Thursday night update for a change:

    • I’ve decided not to talk about principal components or factor analysis this time, so they won’t be on the final exam. This leaves a plan like this, which should allow us to finish early in week 12:
      • week 11 (Mar 25): drawing maps and the start of multiway frequency tables. For “drawing maps”, the HTML slides are probably better than the PDF ones.
      • week 12 (Apr 1): the rest of multiway frequency tables.
      • neither of these topics should be too demanding; the map stuff is fun, and the frequency tables stuff has a lot in common with regression modelling, but with a few things that you have to look at the right way.
      • There will be a worksheet 11 on these two things (that will cover the last two weeks), and PASIAS chapters 38 and 42 offer you extra practice.
    • My motivation for this plan is that we have an early final exam this year, and I want to give you a decent chance of being able to prepare for it (without too much new stuff near the end of the course).
    • I have a very early draft of our final exam. It has 8 scenarios and 42 questions right now, but there will be a lot of editing happening between now and when you see it, so expect things to change.
    • You will probably find that old final exams do have questions on one or both of principal components and factor analysis (likely near the end of the exam). If a question doesn’t look anything like what we’ve done, you should be safe skipping it.
  • 2026-03-16 14:30: Monday update:

    • Assignments:
      • #4 is marked, appeals by usual process between Mar 19 and Mar 26
      • #6 closed last night; my solutions are up on the assignment solutions page.
      • #7 is due on Friday. There will be a #8, which will be the last one.
    • Lecture:
    • Worksheet:
      • #10 is on the worksheets page on this week’s lecture material (which will be on Assignment 8).
      • There will be worksheets 11 and 12 on the last two weeks’ material, even though there won’t be an assignment on this (but expect it to be on the final exam).
  • 2026-03-13 14:20: worksheet 9 solutions are up on the worksheets page. (I messed up one of the questions: “the previous question” meant “on last week’s worksheet”.)

  • 2026-03-10 15:55: my solutions to assignment 5 are up on the assignment solutions page.

  • 2026-03-09 14:30: Monday update:

    • it looks as if we have marked midterms:
      • I will shortly be posting the marks (on Quercus) and the marked exams (in a Module in Quercus. Look for the one that says Crowdmark. You will probably have to click a link that opens in a new window.)
      • Look at my solutions to see where you earned less than full marks and why.
      • Stats: Q3 44/58 (76%), median 37/58 (64%), Q1 30/58 (52%).
      • Appeals by the same procedure as for assignments, between Mar 12 and Mar 19. Bear in mind that appeals are to correct errors in marking, and I will not overrule marker’s judgement. (There is a lot of judgement in marking exams; sometimes you will be lucky and sometimes you won’t, and it all evens out.)
    • This week’s lecture is the rest of repeated measures, and then at least some of discriminant analysis.
    • There will at some point be a Worksheet 9 on this material, but it is not finished yet (I may have been otherwise occupied). Added later: it’s now up on the worksheets page.
    • Extra practice problems: PASIAS chapter 34 (repeated measures) and 35 (discriminant analysis).
    • Assignment 5 closed last night; assignment 6 is due Friday night. There will be an Assignment 7 on this week’s material up by Friday of this week.
  • 2026-03-08 21:50: the midterm is now 95% marked. (By the looks of it, questions 16 and 17 remain as I write.)

  • 2026-03-07 23:00: Saturday night exam marking update: 76% done. All being well, we’ll have marks on Monday.

  • 2026-03-06 22:40: 54% done (progress today: my last question, plus a bit from the TAs.)

  • 2026-03-06 13:15:

    • I have finished marking question 7 on the midterm, so it is now down to the TAs. Progress report tonight.
    • I wanted to say something about the comments that you will see on your marked exam when you get it back: I pre-populated Crowdmark with a bunch of comments that are the same as the “Points” in my solutions. These say “this is where you got to, and this is the number of points you get for doing that”. So you will need to read your marked exam with my solutions to see why you earned what you did. On the other hand, we cannot exactly anticipate what you are going to say, so the markers may need to add other comments to clarify eg. what you were missing or what was not clear enough.
    • Now I need to make sure you have a worksheet and an assignment for next week. Talking of which, my solutions to this week’s worksheet 8 are up on the worksheets page.
  • 2026-03-05 22:20: A busy day of marking (for me, anyway). We are now at 50% done, and I have one question left that I will finish tomorrow. Expect your TAs to continue over the weekend. Updated midterm solutions. Also, if you are working on this week’s worksheet (#8), we haven’t talked about mixed models yet, but the rest of it you should be able to have a go at.

  • 2026-03-04 21:50: I wasn’t sure how awake I was tonight, but I was able to mark questions 20 and 21 of the midterm just now. So the progress report is 26% done. I’m hoping to make some better progress tomorrow. Today was rather more taken up with some heavyweight lecture material, not to mention brownies!

  • 2026-03-04 12:50: exam marking progress: now at 19% done. (I have marked the battery questions, and one of the TAs has started work on question 1). My exam solutions, to be edited as things come up while marking.

  • 2026-03-03 11:20: my department is conducting a survey of our graduating students, and the Applied Statistics Minor is part of this: we would like to find out what your plans are after graduation, and how those plans are coming along (as well as how this program is helping you). During our break in class on Wednesday, you will have an opportunity to complete this survey; also, there will be treats.

  • 2026-03-02 11:10: Monday update:

    • the midterm exams are being scanned; by about tomorrow the marking should start.
    • lecture this week: multivariate analysis of variance and some fraction of repeated measures.
    • there is a Worksheet 8 on this week’s material on the worksheets page, along with my solutions to Worksheet 7 (on the material in the pre-midterm lecture).
    • Further practice problems: PASIAS chapters 33 (MANOVA) and 34 (repeated measures).
    • Assignments: #5 is due on Mar 6; #6 opens on Mar 6 and will be due on Mar 13.
    • Worksheets and assignments are now off by two, so that Assignment 6 will be based on Worksheets 7 and 8.
  • 2026-02-27 11:30: “exam rules are the same as for C32” includes these:

    • if you miss the midterm, the weight automatically goes to the final exam
    • if you do better on the final exam than the midterm, the final exam score replaces the midterm score.
  • 2026-02-22 19:00: we appear to have a Sunday night “Monday update” this week:

    • Lecture this week is on contrasts, ANOVA revisited slides 73 on, and on analysis of covariance. I added a second example to the analysis of covariance notes, so you might like to re-download those.
    • There is a Worksheet 7 on this material, on the worksheets page.
    • Extra practice on this in PASIAS chapter 31 and Chapter 32.
    • Midterm reminder:
      • see Quercus announcement for where and when
      • rules and coverage: see note 2026-02-11 16:55.
      • I am hoping this week’s lecture will not go too long. I will stick around afterwards to field any lingering questions.
    • Assignment 5 is not due until Mar 6, but you would do well to work on it as preparation for the midterm.
    • Looking further ahead, the March 4 lecture may be heavy going, since we have both multivariate analysis of variance and repeated measures on the slate. I thought this was better planning than giving you a longer lecture right before the midterm. (Correspondingly, expect Assignment 6 to be longer because it will cover two weeks’ worth of material.)
  • 2026-02-18 17:00: Assignments 2 and 3 are marked, and I will release the marks in a moment. I added something to my solutions to Assignment 2 (now on the assignment solutions page), so you might like to grab the latest version. Appeals for both assignments by usual procedure between Feb 20 and Feb 27.

  • 2026-02-18 14:30: the midterm exam has gone for printing. It has 28 questions based on 5 scenarios, worth a total of 58 points.

  • 2026-02-17 12:10: a sort-of Monday update (actually on Tuesday) during reading week:

    • the weather forecast for tomorrow is calling for freezing rain and/or snow, so I will be on campus on Thursday instead, and my reading week office hours will be Thursday 2:00-3:00pm.
    • assignment 4 is closed. My solutions are up on the assignment solutions page.
    • assignment 5 is open if you want to make a start on it. It is not due until Mar 6, but the material on it is on the midterm.
    • it doesn’t look as if I posted my worksheet 6 solutions, but they are now up on the worksheets page.
    • looking ahead, the Feb 25 lecture will be on some or all of contrasts (in ANOVA), analysis of covariance, multivariate analysis of variance. I don’t want to go too long before the midterm, but the less I do on the 25th, the harder going the following week’s lecture will be (repeated measures is hard, and it depends on understanding multivariate analysis of variance).
  • 2026-02-11 16:55: two more items:

    • the rules for our midterm are the same as for C32: open book, bring your notes or whatever you think will be useful. The time and place is in an announcement on Quercus. The material is up to and including today’s lecture.
    • I am likely to be around during reading week. I’m thinking that I may hold extra office hours on about Wed afternoon.
  • 2026-02-11 12:10: I decided to make some edits to today’s lecture notes, which are going up on the lecture notes page shortly:

    • for the rat diet example, I decided to plot the residuals vs rat size and diet differently (slides 35 and 36)
    • for the auto noise example, I realized I hadn’t plotted the residuals at all (new slides 48 through 51).
  • 2026-02-09 20:00: a late Monday update tonight, but it is still a Monday update:

    • Assignment 3 is closed; Assignment 4 is due on Friday; Assignment 5 opens on Feb 13 but is not due until Mar 6 because a reading week and then a midterm get in the way. (Nonetheless, you are advised to spend some time on Assignment 5 before then, because material from it will be on the midterm.)
    • Lecture this week is ANOVA revisited, up to about simple effects (the auto noise example). As with regression, there will be some familiar ideas and some new ones.
    • Worksheet 6 on this week’s material is up on the worksheets page. Solutions to that go up on Friday.
    • More practice problems (added 2026-21-11): PASIAS chapter 31 problems 31.1 and 31.2.
    • A reminder that the week of Feb 16-20 is reading week; no lecture that week.
    • Looking further ahead: the material in the lecture on Feb 25 is not on the midterm, though you can count on it being on the final exam. I will try not to go too long that day, but we have to make the most of the 12 lectures we have.
  • 2026-02-05 15:00: worksheet 5 solutions are up on the worksheets page. (It isn’t Friday yet, but they are up.)

  • 2026-02-02 09:55: Monday update:

    • Assignments:
      • #1 is marked, and I will shortly post the marks. Any appeals by the same procedure as for C32, between Feb 5 and Feb 12 (inclusive). See the STAC32 website, note on 2025-09-29 11:00, if you have forgotten the procedure.
      • #2 is closed, and my solutions are up on the assignment solutions page.
      • I messed up opening #3, so you have an extra day to do that (now due on Saturday night next week).
    • Lecture: survival analysis.
    • Worksheet #5 on the lecture material on the worksheets page.
  • 2026-01-30 15:30: worksheet 4 solutions are up on the worksheets page. I am currently working on Worksheet 5 for next week.

  • 2026-01-28 12:10: I made a few edits to today’s lecture notes. Will try to mention the changes in class.

  • 2026-01-26 16:30: we have a midterm time. See the announcement on Quercus (I am not broadcasting it in public).

  • 2026-01-26 11:30: the actual Monday update:

  • 2026-01-26 10:15: campus is closed all day today, so office hours are cancelled. I will be keeping an eye on the Quercus discussions page in case there are any questions there.

  • 2026-01-25 22:00: you probably just got an alert that campus is closed until noon on Monday, to allow for clearance of the large amount of snow that fell today. This affects my office hours, which will change in time or possibly modality. Depending on travel conditions tomorrow, I plan to be on campus in the afternoon, but will revisit things in the morning. In any case, you and I can access the quercus discussion board whatever ends up happening.

  • 2026-01-23 15:30: my solutions to worksheet 3 are up on the worksheets page. Worksheet 4, which is also there, is for next week, so you don’t need to look at it yet.

  • 2026-01-22 15:45: progress report:

    • we are actually ahead of my plan for the course, so next week we are onto dates and times, and possibly also survival analysis, depending how much of the dates and times stuff I decide to talk about.
    • I was reading through the penguins question (on worksheet 3). This originally came from an assignment, and so the discussion had some stuff about “points” which makes no sense on a worksheet. I don’t think this affects any of the questions, but there is an updated version of the worksheet on the worksheets page anyway. Solutions to this worksheet go up tomorrow.
    • next week’s worksheet (#4) revisits one of the logistic regression problems, and has some stuff with dates and times (which gives you a hint about what to expect on assignment 3 when it comes).
    • reminder that Assignment 1 is due tomorrow night, and Assignment 2 opens tomorrow and will be due next week Friday.
  • 2026-01-21 16:05: it looks as if I did get all the way through the logistic regression stuff, so worksheet 3 (and assignment 2 to follow) are good to go.

  • 2026-01-21 10:30: it is snowing, but I am in the office and campus is open, so, unless something dramatic happens between now and then, class goes ahead.

  • 2026-01-20 22:00: as I write (Tuesday night), the weather forecast is not looking good for tomorrow: snow starting in the morning until the afternoon, and flurries after that. Keep an eye on the campus status page before you head to campus. As I write, it looks as if the campus will be open and thus you should expect our class to go ahead.

  • 2026-01-19 11:00: Monday update, updated 14:00:

    • I forgot to post my solutions to worksheet 2 (sorry), but they are on the on the worksheets page now.
    • this week’s lecture is the second half of logistic regression. I think we’ll be able to get the rest of the way through it, although this stuff sometimes takes more than two hours and I need to make sure I don’t go too fast.
    • there is a worksheet 3 on this stuff on the worksheets page. You can do “log odds and poisoning rats” now (it’s on the material at the tail end of the last lecture). How much sense Palmer Penguins and Choice-box make will depend on how far we get on Wednesday.
    • further practice is in PASIAS chapter 28 (ordinal) and chapter 29 (nominal).
    • Assignment 2 (no link yet) will be on the material in Worksheet 3. It opens on Jan 23 (Friday) and will be due on Jan 30.
  • 2026-01-12 12:15: Monday update:

    • this week’s lecture is on logistic regression. I am expecting to get to simple and multiple logistic regression and odds and log-odds, but intend to leave ordinal and multinomial logistic regression, where the ideas are more challenging, to next week.
    • a Worksheet 2 on this material is on the worksheets page.
    • further practice is in PASIAS chapter 27.
    • Assignment 1 will be on the material in Worksheets 1 and 2. It opens on Jan 16 (Friday) and will be due on Jan 23.
  • 2026-01-09 17:45: my solutions to worksheet 1 are now up on the worksheets page.

  • 2026-01-08 11:55: some notes to add to yesterday’s class:

    • the course outline properly formatted. The weights are 25% assignments, 30% midterm, 45% final.
    • Worksheet 1 is on the worksheets page, with solutions going up on Friday.
    • if you want extra examples/practice, the place to look is PASIAS. Chapter 26 covers this week’s material.
    • looking ahead, next week’s lecture is on logistic regression. There is a lot here; these slides usually take about two weeks to get through, so expect us to get about halfway next week. (added later) I updated the lecture notes, having made a few changes.
    • looking further ahead: there will be a worksheet 2 on this material. After that, meaning on Jan 16, the first assignment will open, which will be on the material from the first two weeks.
  • 2026-01-02 13:45: Week 1 is coming up:

    • Wednesday’s lecture:
      • a very brief overview of the course outline (since procedures are basically the same as in C32)
      • the regression revisited notes (probably highlights of this large number of slides). This is partly review, and partly some ideas on predictions and multicollinearity. Prediction ideas will crop up frequently in the first half of the course, so I want to introduce this in a familiar setting.
      • my usual procedure is to take a ten-minute break around the middle of the 2 hours, at what seems to be a good point to leave off. The IA building has a coffee place now.
      • expect me not to have much voice left by the end, but I should be able to deal with some quick questions after class.
    • There is a worksheet 1 on the worksheets page, which will make sense after class on Wednesday. Solutions to this will be posted on Friday.
    • There is no assignment in week 1; the material on worksheets 1 and 2 will be on assignment 1, which will open on Jan 16 and be due on Jan 23.
    • This course is more about the statistics and less about the coding than C32 was; I will assume that you have a good understanding of what we did in C32, so that I can use ideas from that course without having to review them.
  • 2025-12-29 16:40: doing some planning here. Here’s where I got to:

    • lectures on Wednesday, 2 hours, starting on Jan 5
    • no tutorial
    • worksheet on the lecture material opens on Wednesday, solutions posted on Friday
    • assignment opens on Friday, subject matter the same as the worksheet you just completed, due the Friday of the following week
    • first assignment opens in week 2, due in week 3
    • office hours on Monday, something like 11:30-12:30am. Purpose of office hours is to talk about the previous week’s lecture material and/or the previous week’s worksheet.
    • reading week is after week 6 of classes.
    • my planning google sheet. There will be a midterm at some point, and as usual I will not have an assignment due close to it. So expect some of the assignments to be moved later.
  • 2025-12-02 14:30: here is this year’s version of the site. Class meets once a week for two hours, starting on Wed January 7, 2026.