Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECON 400, Spring 2023

Assignment 2

Instructions

This assignment is due by 11:59pm on Wednesday, February 1.  It is your responsibility to allow enough time before submission to safeguard against technical glitches.  Submit your answers on Gradescope.

You must first attempt the entire assignment on your own. After that, you may work with classmates if you would like. This should be a bona fide collaboration, not simply sharing answers. You may use the textbook, slides, notes from class, etc. as you work on the problems.

Important: Follow the rounding and reporting guidelines as described on Sakai.  Questions for which you must upload a file are marked with an asterisk (*); for these questions, you must show your work. Files uploaded to Gradescope must be in pdf, jpg, or png format.

Part 1: Analytical problems

1. (9 points) You have a biased coin: on each flip of this coin, the probability of getting heads is

0.6. Suppose you flip this coin once, and let Y be the number of tails obtained. 1.1. What kind of random variable is Y?

(a) Continuous

(b) Bernoulli

(c) Discrete, but not Bernoulli

1.2. Suppose you also have a fair coin — that is, one for which the probability of heads is 0.5.

Are the sample spaces the same for flipping the biased coin once and flipping the fair coin once?

(a) Yes

(b) No

1.3. Let Z be the number of tails when the fair coin is flipped once. Are the pmfs of Y and Z the same?

(a) Yes

(b) No

2. You toss two six-sided dice.  Let N be the minimum of the two dice, so that N((1, 5)) = 1, N((3, 3)) = 3, and so on.  To answer the questions below, you will probably find it helpful to write out the sample space for this experiment, which we have used in a couple of examples in class.

2.1. (3 points) What is f (3)?

2.2. (3 points) What is F(3)?

2.3. (3 points) What is E(N)?

2.4. (10 points) * Carefully graph f (n) and F(n).

3. (7 points) * Let X be a Bernoulli random variable with probability of success p . Use the formula Var(X) = E(X ) − 22 to show that Var(X) = p(1 − p).

4. (9 points) Kush has a friend who attends a nearby school, and they make a bet about the next basketball game between UNC and Duke.  If UNC wins, Kush gets $20.  If UNC loses, Kush pays his friend $30. Kush believes that UNC has a 70 percent chance of winning the game.

4.1. Let X be an indicator of whether UNC wins the game. What kind of distribution does X have?

(a) Bernoulli

(b) Geometric

(c) Binomial

(d) We do not have a name for this distribution.

4.2. Let Y be the amount of money that Kush wins or loses from the bet.   What kind of distribution does Y have?

(a) Bernoulli

(b) Geometric

(c) Binomial

(d) We do not have a name for this distribution.

4.3. What does Kush think is the expected value of his bet?

(a) $14

(b) $5

(c) $0

(d) $10

5. (32 points) The table below describes the color distribution of plain M&M’s candies produced at the Cleveland, Tennessee factory as of 2017 (source here). Suppose all the M&M’s referenced in this problem are randomly selected from this distribution, and that all small “fun size”bags

of M&Ms have 20 candies.

Color               Proportion

Blue 0.207

Orange 0.205

Green 0.198

Yellow 0.135

Red 0.131

Brown 0.124

5.1. You randomly select M&M’s from a bottomless bowl. What is the probability you get your

first green one within the first five M&M’s?

5.2. You randomly select M&M’s from a bottomless bowl. What is the probability it takes you

more than three M&M’s to get an orange one?

5.3. You randomly select M&M’s from a bottomless bowl.  On average, how many selections

will it take to get your first brown M&M?

5.4. In a fun size bag, how many blue M&M’s are there, on average?

5.5. In a fun size bag, what is the probability that there are no red M&M’s?

5.6. In a fun size bag, what is the probability that there are at least two yellow M&M’s? 5.7. What is the standard deviation of the number of blue M&M’s in fun size bags?

5.8. If Mars Incorporated, the company that makes M&M’s, wanted to ensure that 98 percent of

all fun size bags have at least one red M&M, then they would have to change the proportion of red M&M’s in their manufacturing to what value?

Part 2: Empirical problems

The file acsnc .Rdata, available on Sakai, contains 71,553 observations on people ages 25 and older in North Carolina surveyed as part of the 2019 American Community Survey (ACS), which conducts an approximately 1 percent survey of the U.S. population each year.  To complete the questions

below, you should have access to RStudio with the tidyverse packages, which you would have installed as part of Assignment 1.

6. (12 points) Consider the experiment of sampling at random one North Carolina resident age

25 or older. (The data set acsnc .Rdata can be thought of as recording 71,553 iterations of this experiment.) Each of the following is a piece of information that could be recorded from this randomly selected person. In each case, assign the piece of information to one of the following categories: not a random variable; Bernoulli random variable; discrete random variable, but not Bernoulli; or continuous random variable. No programming is necessary to answer these questions.

6.1. Total personal income, inctot

6.3. Years of education, educ

6.4. Poverty status, inpov

7. (12 points) Modify the code from Assignment 1 to produce a new data frame containing the following summary statistics for each metro area (met2013):  mean and standard deviation of wage and salary income (incwage), mean years of education (educ), and the correlation between wage and salary income and years of education. Note: You may need to enter library(tidyverse) instead of library(dplyr) before your code for this question.  To find the correlation between wage and salary income and years of education, add the following to the list of statistics within the summarize function:  cor  =  cor(incwage,  educ).  Enter the

following statistics for the Raleigh metro area.

7.1. Mean wage and salary income

7.2. Standard deviation of wage and salary income

7.3. Mean years of education

7.4. Correlation between wage and salary income and years of education