Unit 7: Topics covered in videos

  • Immediate assignment vs delayed assignment. (RandomReal, Histogram. Making a list containing 20 random real numbers. Delayed assignment with := Looking at the distribution of the sum of three uniformly distributed random real numbers.)
  • A coin landing heads ten straight times. (RandomChoice, Count. Interfacing with Wolfram Alpha using Control and Equals. Simulating the following experiment: each undergraduate at UC Irvine flips a coin 10 times.)
  • Functions in Mathematica. (Writing functions in Mathematica. An example to show why we need the underline, and a (less common but still important) example of why we need the colon.)
  • Piecewise functions. (Piecewise. Making the absolute value function. The importance of clearing variable names before defining functions. What takes precedence when there is overlap in the conditions for a piecewise function? The earlier piece takes precedence.)
  • Investment activity preview. (The idea behind the investment activity: write a function which takes as input your total amount of money, and as output returns how much you want to invest. You can't invest more than your total money, and you can't invest less than one cent. You get to make 100 investments, and you want the final value to be as large as possible. Your performance will be evaluated using the median of your final values.)
  • returnedMoney analysis. (Investigating the returnedMoney function from the investment activity. Mean, Median, Count, Histogram.)
  • Nest. (Nest, NestList)
  • NestWhileList. (NestWhile, NestWhileList. They stop when the third condition stops being true; phrased another way, the first function gets evaluated as long as the third condition is true. Pure functions.)
  • Random walks with a fixed number of steps. (Using NestList to make a random walk. RandomChoice, Mean, Abs. Using Table to study the outcome of many random walks.)
  • Random walks with NestWhileList. (Using NestWhileList to make a different sort of random walk, the kind where we keep going until we get a fixed distance from the origin. Again using Table to study the outcome of many random walks.)
  • ListPlot with random walk data. (Not equals by using an exclamation point before the equals sign. Making a function with input n to produce random walks that end when a distance of n is reached. Plotting data for the average length on the same axes as y = x^2 using Show.)