Instructional Design for Computational Teaching and Learning#

We will outline design principles for constructing computational learning materials with Python and Jupyter. We will articulate learning goals, identify problems and examples which align with learning goals, explore different levels of scaffolding and how to embed meaningful feedback for students.

References#

Design Process#

Know Your Audience (and Other Things)#

  • Who are your students? How many are there?

  • What is the range of prior knowledge of your students?

  • What is the format of the course? What are the constraints?

  • How will you interact with students? What is the learning management system (LMS)?

  • What computational resources are available to students?

  • How are students interacting with the mathematics through the computational documents?

Big Ideas and Essential Questions#

  • What’s the big idea?

  • What is the core understanding that you want students to learn?

  • What essential questions engage students with the big idea?

Exercise. Choose a specific class in your program and answer the questions in both sections above. Who are your students and what is the big idea?

Learning Goals#

  • What knowledge and skills should students gain from this learning experience?

  • By the end of the course/unit/activity, students should know …

  • By the end of the course/unit/activity, students should be able to …

  • Are the learning goals aligned with the big idea?

Learning Plan#

  • What do you want students to do? What problem are they trying to solve?

  • Are students working individually or collaboratively?

  • Is the learning activity a formative or a summative assessment?

  • Will students submit their work for grades?

  • Is the learning plan aligned with the learning goals?

  • Does the learning plan lead students to the big idea?

Notebook Design#

  • What pedagogical patterns will you implement?

  • Review examples of pedagogical patterns and choose some that suit your learning plan.

  • How much scaffolding is required for your students?

  • What feedback can you give to students? How will students reflect on their learning?

  • Is the notebook aligned with the learning goals?

  • Does the notebook lead students to the big idea?

Computational Learning Goals#

Overview#

Level I

Level II

Level III

Numbers

Vectorization

Algorithms

Variables

Iteration

Packages

Functions

Branching

Objects

Arrays

Data I/O

Classes

Numbers#

  • Compare and contrast different numeric types: integer, float, complex

  • Compute arithmetic operations: addition, subtraction, multiplication, division and exponentiation

  • Compose arithmetic operations to compute mathematical expressions

Example. Approximate \(e\) by computing the first 6 terms of the Taylor series:

\[ e \approx \sum_{k=0}^5 \frac{1}{k!} = 1/0! + 1/1! + 1/2! + 1/3! + 1/4! + 1/5! \]
1 + 1 + 1/2 + 1/(2*3) + 1/(2*3*4) + 1/(2*3*4*5)
2.7166666666666663

Variables#

  • Assign values to variables

  • Construct mathematical expressions with variables

  • Decompose a mathematical expression into several simpler expressions using variables

Example. Compute the eigenvalues of the symmetric matrix:

\[\begin{split} A = \begin{bmatrix} a & b \\ b & c \end{bmatrix} \end{split}\]
# Define matrix entries
a = 1; b = -2; c = 1;

# Characteristic polynomial:
# p(x) = x^2 - (a + c)x + (ac - b^2)
#      = x^2 + Bx + C
B = -(a + c)
C = a*c - b**2

# Quadratic formula
eig1 = (-B + (B**2 - 4*C)**0.5)/2
eig2 = (-B - (B**2 - 4*C)**0.5)/2

print(eig1,eig2)
3.0 -1.0

Functions#

  • Define a Python function which represents a mathematical function

  • Use a function given a description of its input and output values

  • Identify datatypes of input parameters and output values of a function

Example. Define a function which represents \(f(x) = \displaystyle \frac{x}{x^2 + 1}\) and approximate \(f'(0)\) using the forward difference formula:

\[ f'(a) \approx \frac{f(a + h) - f(a)}{h} \]
f = lambda x: x/(x**2 + 1)

a = 0; h = 0.0001;
dfa = (f(a + h) - f(a))/h

print(dfa)
0.9999999900000002

Arrays#

  • Construct an array object to represent a mathematical object such as a sequence, vector or matrix

  • Access entries in an array using index syntax

  • Inspect an array by printing values to output and/or using a matrix plot

Vectorization#

  • Discretize an interval \([a,b]\) by creating a sequence of equally spaced values from \(a\) to \(b\)

  • Apply elementwise arithmetic operations to an array

  • Apply a vectorized function to an array

  • Describe the value at a given index in an array created with vectorized operations

Example. Create array \({\bf y} = [y_0,y_1,\dots,y_N]\) of values \(y_k = \cos(2 \pi x_k)\) for equally spaced values \(x_0,x_1,\dots,x_N\) from \(x_0 = 0\) to \(x_N = 1\) for \(N=12\).

import numpy as np

a = 0; b = 1; N = 12;
x = np.linspace(a,b,N+1)
y = np.cos(2*np.pi*x)

print(y)
print(y[1])
print(3**0.5/2)
[ 1.00000000e+00  8.66025404e-01  5.00000000e-01  6.12323400e-17
 -5.00000000e-01 -8.66025404e-01 -1.00000000e+00 -8.66025404e-01
 -5.00000000e-01 -1.83697020e-16  5.00000000e-01  8.66025404e-01
  1.00000000e+00]
0.8660254037844387
0.8660254037844386

Iteration#

  • Construct a recursive sequence \(x_{n+1} = f(x_n)\)

Example. Construct the recursive sequence \(x_{n+1} = \sqrt{1 + x_n}\), \(x_0 = 1\), up to \(x_6\).

N = 5
x = [0 for n in range(N+1)]
x[0] = 1
for n in range(N):
    x[n + 1] = (1 + x[n])**0.5

print(x)
[1, 1.4142135623730951, 1.5537739740300374, 1.5980531824786175, 1.6118477541252516, 1.616121206508117]

Create Computational Learning Material#

At this point, we have articulated the big idea, essential questions, and learning goals, and we have created a learning plan. Now we need to design the notebook!

Tell the Whole Story#

  • Compose a Jupyter notebook which solves the problem from start to finish

  • Include all the observations and reflections that you would like students to make

  • Identify the keys parts where you would like students to focus

  • Identify what should remain in the notebook to give direction to students

  • Identify what should be removed for students to discover on their own

Pedagogical Patterns#

Scaffolding and Feedback#

  • How much scaffolding do your students require?

  • Would it be helpful to include some helper functions at the top of the notebook?

  • Use “Read Only” cells to embed feedback computations.

  • How can students evaluate their solutions and determine whether they make sense?

Discovery and Reflection#

  • Engage students with the big idea.

  • Ask essential questions.

  • Anticipate common misconceptions and find ways to engage students with misconceptions

  • Provide opportunities for students to be creative and to demonstrate transfer of knowledge and skills.

Examples#

Group discussion. Let’s apply the steps of the design process to create notebooks for the following big ideas.

Derivatives#

Big Idea. The values of \(f'(x)\) determine the shape of the graph of \(f(x)\).

Elementary Row Operations#

Big Idea. Add equations together to isolate variables and find solutions.

Slopefields#

Big Idea. The right hand side of a first order equation \(y' = f(t,y)\) gives us complete information about the shape of solutions.