# Exercise Templates

Brief descriptions of all exercise templates shipped within the R/exams package. Exercise templates along with their PDF and HTML output can be downloaded and inspected as inspiration for new exercises. Demo code for replication is also included.

## lm3: Simple Linear Regression (Cloze with Theory, Application, Essay, and File Upload)

templates

Exercise template with both theory and applied questions, as well as interpretation and code upload, about simple linear regression based on a randomly-generated CSV file. Read More ›

## lm2: Simple Linear Regression (Cloze with Theory and Application)

templates

Exercise template with both theory and applied questions about simple linear regression based on a randomly-generated CSV file. Read More ›

## essayreg2: Linear Regression (Cloze with Essay and File Upload)

templates

Exercise template for interpreting a regression with two explanatory variables based on randomly-generated data (with either a linear, semi-logarithmic, or log-log relationship) in form of a cloze including essay and file upload. Read More ›

## capitals: Knowledge Quiz Question about Capitals around the World

templates

Exercise template for a multiple-choice knowledge quiz question with flexible shuffling of the alternatives. Read More ›

## confint3: 2-Sided Confidence Interval (Extended Moodle Version)

templates

Exercise template for computing the 2-sided confidence interval (with extended Moodle processing) for the mean based on a random sample. Read More ›

## fruit2: Image-Based Systems of Linear Equations (Single-Choice)

templates

Exercise template for solving a system of three linear equations (single-choice) with a problem description based on shuffled images. Read More ›

## fruit: Image-Based Systems of Linear Equations (Numeric)

templates

Exercise template for solving a system of three linear equations (numeric answer) with a problem description based on shuffled images. Read More ›

## logic: Interpretation of Logic Gates (Using TikZ)

templates

Exercise template for matching logic gate diagrams (drawn with TikZ) to the corresponding truth table. Read More ›

## automaton: Interpretation of Automaton Diagrams (Using TikZ)

templates

Exercise template for assessing the interpretation of an automaton diagram (drawn with TikZ) based on randomly generated input sequences. Read More ›

## ttest: Interpretation of 2-Sample t Test

templates

Exercise template for assessing the interpretation of a randomly-generated 2-sample t test (including significance and type of alternative). Read More ›

## tstat2: 1-Sample t-Test Statistic (Single-Choice)

templates

Exercise template for computing the t-test statistic (single-choice) from given hypothesized mean and empirical mean and variance. Read More ›

## tstat: 1-Sample t-Test Statistic

templates

Exercise template for computing the t-test statistic (numeric answer) from given hypothesized mean and empirical mean and variance. Read More ›

## switzerland: Knowledge Quiz Question about Switzerland

templates

Exercise template for a multiple-choice knowledge quiz question with basic shuffling of the alternatives. Read More ›

## swisscapital: Knowledge Quiz Question about the Swiss Capital

templates

Exercise template for a single-choice knowledge quiz question with basic shuffling of correct and false alternatives. Read More ›

## scatterplot: Interpretation of a Scatterplot

templates

Exercise template for assessing the interpretation of a randomly-generated scatterplot regarding the joint and marginal distributions. Read More ›

## relfreq: Interpretation of Relative Frequency Tables

templates

Exercise template for assessing the interpretation of a table with relative frequencies where either total, row, or column frequencies are selected randomly. Read More ›

## regression: Simple Linear Regression (by Hand)

templates

Exercise template for computing the prediction from a simple linear prediction by hand, based on randomly-generated marginal means/variances and correlation. Read More ›

## lm: Simple Linear Regression (with CSV Data)

templates

Exercise template for conducting a simple linear regression based on a randomly-generated CSV file. Read More ›

## lagrange: Method of Lagrange Multipliers

templates

Exercise template for minimizing a linear objective function with two arguments subject to a Cobb-Douglas-type constraint. Both the parameters of the functions and the exact question (argument 1 vs. argument 2 vs. function value in optimum) are drawn randomly. Read More ›

## hessian: 2x2 Hessian Matrix (Single-Choice)

templates

Exercise template for computing the Hessian for a given function with randomly-drawn parameters. Read More ›

## gaussmarkov: Knowledge Quiz Question about Gauss-Markov Assumptions

templates

Exercise template for a multiple-choice knowledge quiz question about the assumptions in the Gauss-Markov theorem. Read More ›

## function: String Question about R Functions

templates

Exercise template for a knowledge quiz question (about glm-related R functions) where the correct answer has to match exactly a given string. Read More ›

## fourfold2: Fourfold Table (Flexible Formatting)

templates

Exercise template for computing a fourfold table of joint and marginal probabilities based on three randomly-drawn conditional or marginal probabilities. Read More ›

## fourfold: Fourfold Table

templates

Exercise template for computing joint probabilities from a 2x2 table based on three randomly-drawn conditional or marginal probabilities. Read More ›

## essayreg: Linear Regression (Essay Question)

templates

Exercise template for interpreting a simple regression based on randomly-generated data (with either a linear, semi-logarithmic, or log-log relationship) in form of an essay. Read More ›

## dist3: Distances and the Pythagorean Theorem (Single-Choice)

templates

Exercise template for computing the distance (single-choice) between two randomly-drawn points in a Cartesian coordinate system. Read More ›

## dist2: Three Distances in a Cartesian Coordinate System

templates

Exercise template for computing the Manhattan, Euclidean, and maximum distance (cloze with three numeric answers) between two randomly-drawn points in a Cartesian coordinate system. Read More ›

## dist: Distances and the Pythagorean Theorem

templates

Exercise template for computing the distance (numeric answer) between two randomly-drawn points in a Cartesian coordinate system. Read More ›

## deriv2: Product Rule for Derivatives (Single-Choice)

templates

Exercise template for computing the derivative (single-choice) of a product function with factors of type xa and exp(b * x) at a given point c, with randomly-drawn a, b, and c. Read More ›

## deriv: Product Rule for Derivatives

templates

Exercise template for computing the derivative (numeric answer) of a product function with factors of type xa and exp(b * x) at a given point c, with randomly-drawn a, b, and c. Read More ›

## currency8: Convert Currencies (UTF-8 Encoding)

templates

Exercise template for converting currencies (EUR, USD, GBP) with various symbols in UTF-8 encoding. Read More ›

## countrycodes: String Question about ISO Country Codes

templates

Exercise template for a knowledge quiz question (about three-letter ISO country codes) where the correct answer has to match exactly a given string. Read More ›

## confint2: 2-Sided Confidence Interval

templates

Exercise template for computing the 2-sided confidence interval for the mean based on a random sample. Read More ›

## cholesky: Cholesky Decomposition

templates

Exercise template for computing the Cholesky decomposition of a simple randomly-generated 3x3 or 4x4 matrix (by hand). Read More ›

## boxplots: Interpretation of 2-Sample Boxplots

templates

Exercise template for assessing the interpretation of two randomly-generated parallel boxplots regarding location, scale, etc. Read More ›

## boxhist2: Univariate Exploration of a CSV File (Flexible Formatting)

templates

Exercise template with more flexible formatting for assessing the interpretation of exploratory statistics (quantiles) and graphics (boxplot and histogram) based on a randomly-generated CSV file. Read More ›

## boxhist: Univariate Exploration of a CSV File

templates

Exercise template for assessing the interpretation of exploratory statistics (quantiles) and graphics (boxplot and histogram) based on a randomly-generated CSV file. Read More ›

## anova: 1-Way Analysis of Variance

templates

Exercise template for assessing the interpretation of an analysis-of-variance (ANOVA) table in multiple-choice form. Read More ›

## Rlogo: Knowledge Quiz Question about the R Logo

templates

Exercise template for a simple knowledge quiz question including a static graphics file (the R logo). Read More ›