MATH 314 Practice Exam 01
Exam 01 on 2026-02-26
I tried really hard to make exactly 5 things wrong in each code chuck of each of the problems below, but counting is hard.
Please cross out the wrong characters and write an ordered, comma
separated list of replacement characters after the comment #. If
you don't know the correct Python syntax for the replacement
characters you want, make something not unreasonable up. You will
not receive credit if you cross out an entire line, even if your fix
is correct.
You should assume the following import statements precede each code chunk in each question.
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as spicy
-
Suppose your company produces batches of 200 identical op-amp ICs (amplifiers). Historically, each chip passes a final test 96% of the time. Your boss believes that next month, all the op-amps that can be made will be sold. Each op-amp sells for $0.05. If the company factory can produce 100 batches, what is the expected revenue for next month?
-
In power systems, random voltage spikes happen for a variety of reasons. It is crucial for electrical engineers to understand the frequency of these spikes to design protective measures accordingly. Suppose that, on average, 5.1 voltage spikes are recorded on the grid every hour. What is the probability that there will be fewer than 2 or more than 7 voltage spikes in an hour?
-
Write a Python class named
OnlineMeanthat calculates online the mean of the data passed into the method namedupdate, where data is passed in one number at a time. The methodmeanshould return the calculated mean at any time the method is called. -
Use
matplotliband the classOnlineMeanabove to make a convergence plot of an estimate ofwhere . -
Suppose you’re modeling the time until failure of an LED from a company for which the mean lifetime of their LEDs is 100,000 hours. For how many hours will the longest lasting 2% of their LEDs last?