Due 9/20/2024 Friday before the class begins.

Problem 1

Four buses carrying 100 students from the same school arrive at a football stadium. The buses carry, respectively, 10, 20, 30, and 40 students. One of the students is randomly selected. Let \(X\) denote the number of students who were on the bus carrying the randomly selected student. Now one of the 4 buses is randomly selected, and let \(Y\) denote the number of students on the bus.

(a) Which of \(\mathbb{E}[X]\) or \(\mathbb{E}[Y]\) do you think is larger? Why?

Your answer here.

(b) Compute \(\mathbb{E}[X]\) and \(\mathbb{E}[Y]\).

Your answer here.

(c) Explain (without any computation) which of \(\text{Var}(X)\) or \(\text{Var}(Y)\) you think is smaller? Why?

Your answer here.

(d) Compute \(\text{Var}(X)\) and \(\text{Var}(Y)\) to confirm your guess.

Your answer here.

(e) On their way back, they need to give a ride to other students in a nearby school and decide to carry 20, 30, 40, and 50 students respectively. One of the 4 buses is randomly selected and let \(Z\) be the number of students on the bus. What is \(\text{Var}(Z)\)?

(Hint: you don’t need any extra computation. Note that \(Z=Y+10\).)

Your answer here.

Problem 2 Poisson Distribution

The number of typos per page of a certain book has a Poisson distribution of rate \(\lambda=5\). What is the probability that there is no typo on the page?

Your answer here.

Problem 3 Poisson Approximation

Mass-produced needles are packed in boxes of 1000. On overage 1 needle in 2000 is defective.

(a) Find the probability that a box contains 2 or more defectives using the binomial distribution (you may want to use R to compute the actual probability.)

# Your code here

(b) Use the Poisson approximation to estimate the probability that 2 or more are defective.

Your answer here.

Problem 4 Overbooking Problem

Here is an example where the binomial distribution is used in real life-how most airlines use overbooking to maximize their revenue. Watch the video before you proceed. \[ \href{https://www.youtube.com/watch?v=ZFNstNKgEDI}{\text{Why do airlines sell too many tickets? - Nina Klietsch, TED-Ed}}. \] In this problem, you will find an optimal number of airline tickets that maximizes revenue. Here is a setup. In a certain airline route, there are 500 seats and each ticket is sold at $1000. It costs $2500 for the airline for each bumped passenger for accommodations. For simplicity, we assume that each person travels individually rather than in groups, and all airline tickets are sold completely. The probability that each person who purchases a ticket shows up on time at the airport is \(p=95\%\).

Theoretic derivation

(a) What is the total revenue (the money that the airline earns) without any overbooking?

Your answer here.

(b) Assume that the airline sells \(n\) tickets with \(n\geq 500\) (they decide to overbook). Let \(X\) be the number of customers who show up at the airport on time. What is the distribution of \(X\)?

Your answer here.

(c) Let \(Y\) be the amount of money to pay for all bumped passengers. Find an expression for \(Y\) in terms of \(X\).

Your answer here.

(d) Find the expression for \(\mathbb{E}[Y]\).

Your answer here.

Monte-Carlo simulation

(a) Suppose that the airline sells 520 tickets. Write down a code that computes the expected revenue for the airline. Does the airline earn or lose money on average by selling 20 extra tickets?

# Your code here

(b) Now use the previous code to compute the expected revenue for the airline if they sell \(n\) tickets where \(n\) ranges from 500 to 550. Make a chart that shows the expected revenue for each value of \(n\).

# Your code here

(c) What is the optimal value of the number of tickets that maximizes the revenue? You must provide a full revenue chart to show that your answer maximizes the expected revenue.

Your answer here.