# Regression and Economics Questionnaire

Description

5 attachmentsSlide 1 of 5attachment_1attachment_1attachment_2attachment_2attachment_3attachment_3attachment_4attachment_4attachment_5attachment_5.slider-slide > img { width: 100%; display: block; }
.slider-slide > img:focus { margin: auto; }

Unformatted Attachment Preview

Name ________________________________
Kuehn
Economics 310
Fall 2021
Homework 1
DUE DATE: Monday, September 13
1) A common test for AIDS is called the ELISA (Enzyme-Linked Immunosorbent Assay)
test. Among 1,000,000 people who are given the ELISA test, we can expect results
similar to those given in the table.
A1: Test Positive
A2: Test Negative
Totals
B1: Carry AIDS
Virus
3,595
205
3,800
B2: Do Not Carry
AIDS Virus
65,241
930,959
996,200
Totals
68,836
931,164
1,000,000
If one of these 1,000,000 people is selected randomly, find the following
probabilities:
a) P(B1) (i.e. probability carry the AIDS virus)
3800/1000000 = 0.0038
b) P(A1) (i.e. probability person tests positive)
68836/1000000 = 0.0688
c) P(A1|B2) (i.e. probability person tests positive given they do not carry)
65241/996200 = 0.0655
d) P(B1|A1) (i.e. probability person carries given they test positive)
3595/68836 = 0.0522
2) Suppose you have an 8-sided die that lands on the numbers 1-8 with equal
probability. Let X be the random variable equal to the number rolled on the die.
a) Calculate E[X].
E[X] = (1+2+3+4+5+6+7+8)/8 = 4.5
b) What is the variance of X?
[(1-4.5)2 + (2-4.5)2 + (3-4.5)2 + (4-4.5)2 + (5-4.5)2 + (6-4.5)2 + (7-4.5)2 + (84.5)2]/8 = 5.25
3) Compute the following probabilities:
a) If Y is distributed N(5,49), find Pr(Y ? 12).
Pr (Y ? 12) = Pr((Y-5)/7 ? (12-5)/7) = Pr (Z ? 1) = 0.84134
b) If Y is distributed N(6,16), find Pr(Y > 1).
Pr(Y>1) = Pr((Y-6)/4 > (1-6)/4) = Pr(Z > -1.25) = 1  Pr(Z ? -1.25) = 0.89435
c) If Y is distributed N(2,25), find Pr(0 ? Y ? 5).
Pr(0?Y?5)=Pr(Y?5)Pr(Y?0)=Pr((Y-2)/5?(5-2)/5)Pr((Y-2)/5?(0-2)/5)
= Pr(Z ? 0.6)  Pr(Z ? -0.4)
= 0.72575  0.34458 = 0.38117
4) The following table lists the height in inches and weight in pounds of four college
Height
Weight
65
145
68
160
69
155
73
170
Average Height = 68.75
Average Weight = 157.5
?Height = sqrt(8.1875) = 2.86138
?Weight = sqrt(81.25) = 9.01388
?HeightWeight = 24.375
corr(H,W) = 24.375/(2.86138*9.01388) = 0.9451
5) DATA Question: The dataset alabama.xlsx has standardized test scores from 127
public school districts in the state of Alabama. You should download it to your
computer from the Blackboard course webpage. The file contains the following
variables:
 score89: Average reading and math standardized test score for 8-9 grade
students (in standard deviation units)
 pcy: Per capita income in the district
 syscde: The code used to identify the district.
Use the dataset to answer the following questions:
a) How many observations are in the dataset?
127 observations
b) What are the mean, min, and max for per capita income?
Mean: 10,709.68
Min: 6,306
Max: 39,610
c) What are the mean, min, and max for test scores?
Mean: 0.083917
Min: -3.2238
Max: 4.7221
d) What is the median for per capita income and test scores?
Median PCI: 10,127
Median Test Score: 0.01617
e) What is the standard deviation for per capita income and test scores?
StDev PCI: 3,613.81
StDev Test Score: 1.2666
0
.1
Density
.2
.3
.4
f) Create a histogram showing the distribution of test scores?
-4
-2
0
score89
2
4
g) What is the average test score in districts with per capita income at or above
the median? What is the average test score in districts with per capita
income below the median?
Districts with Above Median Income: 0.6253451
Districts with Below Median Income: -0.4661048
h) What is the standard deviation of test scores in districts with per capita
income at or above the median? What is the standard deviation of test scores
in districts with per capita income below the median?
Districts with Above Median Income: 1.216266
Districts with Below Median Income: 1.071052
i) What is the correlation coefficient between per capita income and test
scores?
0.6480
-4
-2
score89
0
2
4
j) Create a scatterplot with per capita income on the x-axis and test scores on
the y-axis. Comment on the relationship you see between per capita income
and test scores.
0
10000
20000
pcy
30000
40000
Name ________________________________
Kuehn
Economics 310
Fall 2021
Homework 2
DUE DATE: Wednesday, September 22
1) Below are the 3-point shooting performances for some of the top 3-point shooters in the
NBA during the 2020-2021 NBA season.
Player
Stephen Curry
Buddy Hield
Damian Lillard
Duncan Robinson
Terry Rozier
Field Goals Attempted
801
721
704
613
571
337
282
275
250
222
For a given player, the outcome of a particular shot can be modeled as a discrete random
variable: if Yi is the outcome of shot i, then Yi = 1 if the shot is made and Yi = 0 if the shot is
missed. Let p denote the probability of making any particular 3-pt shot attempt. The
natural estimator of p is W = FGM/FGA.
a) Estimate p for all 5 players. Which player has the highest estimate?
Player
Estimate
Stephen Curry
0.421
Buddy Hield
0.391
Damian Lillard
0.391
Duncan Robinson
0.408
Terry Rozier
0.389
b) What is the standard deviation of the estimator for Stephen Curry (i.e. sd(WSC))?
(Hint: The variance of a random variable Y that only takes the values 0 and 1 and
has mean ?Y, is given by var(Y) = ?Y(1-?Y).)
????!” =
0.421(1 ? 0.421)/801 = 0.01744
c) Are we able to get a more accurate estimate of Stephen Currys or Buddy Hields
ability to shoot 3-pointers? Why is that?
Steph Curry, because he takes more shots and so we have a larger sample size.
d) Construct a 95% confidence interval for the true probability that Stephen Curry
makes a 3-point shot.
[0.421-1.96*0.01744, 0.421+1.96*0.01744] = [0.3868, 0.4552]
e) Using a 1% significance level, test whether Stephen Currys true 3-point shooting
percentage is 45% against the alternative that it is less than 45% (i.e. H0: p = 0.45
against H1: p < 0.45). t = (0.421-0.45)/0.01744 = -1.6628 Fail to reject the null hypothesis that Stepen Currys true 3-point shooting percentage is 45% against the 1-sided alternative at the 1% level. 2) Suppose that your high school friend at San Jose St. claims that the average Math SAT scores of CSU East Bay undergraduates is 540. To verify this claim, you collect a dataset of the Math SAT scores of 50 randomly selected CSUEB undergraduates. You calculate a sample mean of W = 552, and a sample variance sY2 = 1500. a) Set up a hypothesis test to test your friends claim by stating the null hypothesis and a 2-sided alternative hypothesis. ??! : ?? = 540, ??! : ?? ? 540 b) Suppose you choose a significance level of 5%. Compute the t-statistic for this test and perform the test. What do you tell your friend? t-stat = 2.1909, 2.1909 > 1.96 à Reject the null (i.e. your friend is wrong)
c) What would you tell your friend if you chose a significance level of 0.01 instead?