Homework 6

CHE 116: Numerical Methods and Statistics

2/21/2019


1. Plotting Distributions (20 Points)

For the following problems, choose the distribution that best fits the process and plot the distribution. State whether the sample space is discrete, the range of the sample space, and then use that to justify your choice of distribution. Make sure your axes labels are descriptive and not just the variable letters.

1.1

About 3 deer cross through my yard each day in winter. What is the distribution that could explain the random variable of number of deer? Remember to read the instructions above!

1.2

You sleep about 8 hours per night with standard deviation of 2. What distribution could explain the random variable of number of hours slept?

1.3

You are going out to read your poetry. You can go to only one of three different poetry readings. At each poetry reading, they randomly select a poet to read for a given number of timeslots. You can read multiple times, since you have many poems to read. At CLUB POET, there will be 11 poem reading timeslots and your probability of reading at particular timeslot is 0.4. At THE DEAD HEDGEHOG, there will be 5 timeslots and your probability of reading will be 0.5. At THE DANCING CLOUD, there are 7 timeslots and your probability of reading will be 0.7. Plot each of the distributions representing number of poems read for the different poetry readings. You should plot three distributions.

1.4

You recently got a boyfriend. Your boyfriend texts you about every 20 minutes. What distribution could represent the time between text messages?

2. Loops (20 Points)

For the following problems, use loops to solve them. You cannot use numpy arrays. Justify your choice of distribution, state what quantity is being asked (probability of sample, interval, or prediction interval), and answer the prompt in words. The only formula you may use for expected value is $E[x] = \sum P(x) x$.

2.1 (Warmup)

Show that the binomial distribution sums to one over the whole sample space.

2.2

You ask your students questions during lecture and offer candy bars if they get problems correct. You ask 12 questions per lecture and the students get the questions right with probability 0.7. How many candy bars should you bring to have enough for 90% of the lectures?

2.3

About 25 per 100,000 people die per year in a car accident. How many years can you drive before there is a 10% chance of dying?

2.4

In a computer program, each line of code can cause a security vulnerability. A particular company finds that after 1 year, there are 25 security vulnerabilities per 10,000 lines of code. After inspecting a new program which contains 23,000 lines of code, they find 11 secutity vulnerabilities. What is the probability that they found all vulnerabilities?

3. Normal Distribution (18 Points)

3.1 (2 Points)

Take $\mu = 3$ and $\sigma = 4$. What is $P(-4 < x < 0)$?

3.2 (2 Points)

You spend 111 minutes per day thinking about what to eat, with a standard deviation of 30. What is the probability you spend 43 minutes thinking about food?

3.3 (2 Points)

Using the numbers from 3.2, what is the probability that you spend more than 2 hours thinking about food in a day?

3.4 (4 Points)

What is unphysical about the sample space implicitly defined in problem 3.2? Compute a quantity to prove that the unphysical part of the sample space is negligible.

3.5 (2 Points)

Take $\mu = -2$, $\sigma = 4$. Convert the following interval to z-scores: $(-4, 4)$.

3.6 (4 Points)

Can $\sigma$ be negative? Why or why not?

3.7 (2 Points)

How much probability is covered between Z-scores $-3$ to $3$?