Statistics Problem and Solution Generator
For an Undergraduate Level Statistics in Psychology Course
1 About the Project
This is a project, under development, to produce accessible documents that meet the Web Content Accessibility Guidelines (WCAG) 2.1 Level AA standard consisting of randomly generate problems and their fully worked solutions for use in an undergraduate statistics in psychology course.
1.1 Development History
The first version began with the goal of providing a way for students to access unlimited practice problems to encourage practice until mastery. The code was originally deployed on google colab and was written with the goal of making it as simple as possible to use from the student’s perspective. It was designed such that an initial block of code could be run once and then minimized/hidden to get it out of the way. Then subsequent blocks could be used to call the class and methods using a simple, single line, of pre-populated code. Each call would produce a new problem and display the fully worked solution. The solution would display the result as if being worked by hand and rounding to 2 decimal places for every calculation (when necessary)
As I began updating my course materials to meet the WCAG 2.1 Levell AA guidelines, I realized that the google colab option would not work. Thus, I started developing a new version that would adapt the existing codebase to produce static documents and ensure that the text (including the math) would meet the accessibility standards. That version is what is being used to render each of the chapters within this document. The code is written in python and the documents are quarto. So far, I’ve used this version to render sample problems into book formats (as in this document), .html documents, and slide decks using a combination of quarto and revealjs (using a scrollable slide for each problem).
1.1.1 Current Status
The current task/goal is to fully document this version of the code on this site. Once it’s fully documented, I’d like to add links to some example documents in other formats to illustrate the different ways I’ve successfully used this version. This should include a guide on how to use the generator as it is currently designed.
1.1.2 Next Steps
After completing the above tasks, I will start working version 3.0 (branch name tbd). The third version will consist of a major rewrite and restructuring of the underlying codebase. The current version is too inflexible, many of the methods are doing too many things. The individual tasks necessary to achieve the software’s goals need to be better managed and more efficiently delegated.
The rewrite should seperate the question from the solution. The new version needs to group questions into their own document need to be created (converting into an assingment and/or exam generator). It also needs to be able to produce a key to go along with any assignment generated. There needs to be a way to display the solution in small pieces so that additional text can be added. For example, creating an initial walkthrough that contains detailed step-by-step instructions.
1.1.3 Future Goals
as this site expands to include step-by-step guides along with the sample problems. I’d like to start introducing solutions that rely on coding in addition to ones designed to be calculated by hand. Have a question at the top followed by different types of solutions: by hand, Python, and R.
Another future goal is to really expand the content included with the question being generated. Using more text, adding specific variables, using known distributions, and other factors.
1.2 information below is old and needs update
1.2.1 Documents to produce accessible .html practice problems
Each document will produces 30 practice problems in a .html slideshow rendered with revealjs. Each slide is scrollable and contains a single problem. Problems are generated with a randomly determined sample size between 5 and 15 per group. When more than one group, sample size is equivalent between groups.
- 08 - Hypothesis_Test_z-Scores.qmd: hypothesis testing with z-scores
- 09 - Single-Sample_t-Tests.qmd: one-sample t-tests
- 10 - Independent-Samples_t-Tests.qmd: independent-samples t-tests
- 11 - Dependent-Samples_t-Tests.qmd: dependent-samples t-tests
- 12 - one-way_ANOVA.qmd: one-way ANOVA
- 13 - repeated-measures_ANOVA: repeated-measures ANOVA
- 14 - factorial_ANOVA: two-factor ANOVA
1.2.2 Title II Updates in the immediate queue
One-Way ANOVARepeated-Measures ANOVA
1.2.3 Title II Updates remaining
- standard deviation exercises
- basic z-scores and using z-scores with sample means
1.2.4 Functionality to add
- correlation
- regression
two-factor ANOVA- Post-hoc testing for ANOVA
- Alt-text for figures. Can the alt- and descriptive-text be auto generated based on the matplotlib input?
include specifying the hypotheses for NHST (null and alternative)
1.2.5 Future directions
- seperate defining question from displaying the results
- consider adding:
class Question:that will hold the question (this might not be necessary) - consider adding:
class Assignment:to hold a collection of question objects.- will output a formatted assignment and it’s answer key
- consider adding:
- add functionality to specify some details when creating the question such as the distribution
- add common standardized distributions as options
- expand the text of the question, inlcude a list of common variables
- switch from slide-based format to a book
- combine all into a single book style document.
- add instructions and a full walkthrough for each problem type