<jupyter_start><jupyter_text>Indicate the Following: Name: _____________________  SID: ________________________  GSI: _______________________                      Midterm 2021 - EEP/IAS 118 - Villas Boas **Instructions:** Please answer questions in the boxes and spaces provided. This is an open book midterm. To receive full credit, answers must include a correct answer, demonstrate all steps used to obtain the answer, and be uploaded to gradescope within the allotted deadline, correctly indicating on which pages your answers to each question can be found. This exam **does not require R**. R may be used as a calculator or to obtain critical values from statistical tables, but no credit will be given for the use of confidence interval or hypothesis test functions. If R is used to complete steps on a problem, make sure to include the utilized code. **Final answers must be placed in the appropriate text/Markdown cell** - text/comments in coding cells will not be graded. **75 Points Total**  Question 1 (Total: 10 Points) In May, September, and November 2020, Pew Research Center conducted waves of the American Trends Panel (ATP), a nationally-representative panel of randomly selected U.S. adults, focused on receptiveness to a coronavirus vaccine. Below are the results:  **(a) (5 points)** Please test at the 5% significance level whether the true proportion in November 2020 (12,648 respondents) that would not get a vaccine (that is, that answered either probably not or definitely not) is equal to 36%. Use the five steps of hypothesis testing. Round to 4 places. ➡️ Type your answer / steps for Q1-(a) here. (Markdown Cell)<jupyter_code># Include any code used for Q1-(a) here only. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>**(b) (5 points)** Within the subset of respondents in the Nov 2020 wave who answered that they would not get the vaccine, 46% stated that they would possibly get the vaccine once others began getting vaccinated and there is more information, while 53% were pretty certain they would still not get a vaccine.Construct a 99% confidence interval for the true proportion in this subpopulation that would not get the vaccine even once others start getting it and more information is available (denote this as p_b).Please round the sample size you use here to the nearest integer, and otherwise round to 4 places. ***Write Solution Here:*** 99% Confidence interval p_b  = [                  ,                  ] ➡️ Type your answer / steps for Q1-(b) here. (Markdown Cell)<jupyter_code># Include any code used for Q1-(b) here only. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>Question 2 (Total: 45 Points) **(a) - (g) (5 points each)** Please complete the missing elements in the Stata output below:  ➡️ Type your answer / steps for Q2-(a) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(b) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(c) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(d) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(e) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(f) here. (Markdown Cell) ➡️ Type your answer / steps for Q2-(g) here. (Markdown Cell)<jupyter_code># Include any code used for Q2-(a)~(g) here. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>**(h) (5 points)** If I were to run the same regression using a random sample of size N=1000 drawn from the same population, the standard errors of the coefficients must increase compared to the estimates for N=100 as the amount of variation in our data will increase.Indicate: True or False or Depends: TRUE / FALSE / DEPENDS. And concisely explain **in a maximum of 2 sentences**. ➡️ Type your answer / steps for Q2-(h) here. (Markdown Cell) **(i) (5 points)** Using the R output below, test whether the distance of an airline flight (`dist`) and the number of passengers (`passen`) jointly influence airline fares. Show your work using the five steps of hypothesis testing. Use a significance level of α=0.05.Left Regression: $$reg1 \text{ <- } lm(fare \sim dist + passen + bmktshr, ~mydata100)$$Right Regression: $$reg2 \text{ <- } lm(fare \sim bmktshr, ~mydata100)$$  ➡️ Type your answer / steps for Q2-(i) here. (Markdown Cell)<jupyter_code># Include any code used for Q2-(i) here. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>Question 3 (Total: 20 Points) A researcher wishes to understand the effect of recent events on airline stock prices. They collected data on stock prices for the major airline company in their country from October 2020 through February 2021. The testable hypothesis is whether, after controlling for other factors, the airline stock price (measured in dollars) was affected by the spread of COVID-19 in that country. The researcher ran the following regression, where $Y_d$ = the log of stock price of the major airline on day d. The researcher has N=500 days of data. $Log(Number Cases)_d$ is the log of daily COVID-19 cases in the country, and $Accidents_d$ is a dummy variable equal to one if an airline accident occurred somewhere in the world on that day, and equal to zero otherwise. These are the estimated parameters and standard errors in parentheses underneath.$$Y_D = 0.31 - 0.5 \log(Number~Cases)_d - 0.02 Accidents_d~~~~~~~~~ R^2 = 0.12$$$$~~~~~~~(0.07)~~(0.01)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(0.001)~~~~~~~~~~~~~~~~~~~~~N = 500$$ **(a) (5 points)** Interpret the coefficient on log(Number Cases) (remember to discuss Sign, Size, and Significance). ➡️ Type your answer / steps for Q3-(a) here. (Markdown Cell)<jupyter_code># Include any code used for Q3-(a) here. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>**(b) (5 points)** What would be the predicted level of the airline stock price (measured in dollars) on an accident day when the number of COVID-19 cases equals 5000?  Show your work/explain. ➡️ Type your answer / steps for Q3-(b) here. (Markdown Cell)<jupyter_code># Include any code used for Q3-(b) here. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output><jupyter_text>**(c) (5 points)** The researcher may be concerned that the economy as a whole is generally doing poorly, and that this general decline also affects stock prices. Therefore, the researcher decides to add a daily trend (Trend$_d$) to the above regression and obtains the new sample regression:$$Y_D = 0.05 - 0.5 \log(Number~Cases)_d - 0.04 Accidents_d - 0.004 Trends_d  ~~~~~~~R^2 = 0.42$$$$~~~~~~~(0.07)~~~~(0.01)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(0.001)~~~~~~~~~~~~~~~~~~(0.001)~~~~~~~~~~~~~~~~~N = 500$$Compare the coefficients on Accidents$_d$ in the two regressions (the regression immediately above versus the regression for parts (a) and (b)).  How does the coefficient change? Based on the estimated regression in (c), what can you say about the correlation between Accidents and the daily time variable?  Show your work/explain, using both an equation and words. ➡️ Type your answer / steps for Q3-(c) here. (Markdown Cell)<jupyter_code># Include any code used for Q3-(c) here. (Coding Cell) Final answers do not belong in this cell.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10310256062864111, 'fraction_numerical': 0.023709524454680938, 'mean_word_length': 4.661042944785276, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '391422', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 2149, 'n_tokens_neox': 1971, 'n_words': 1051, 'path': 'Spring2021-J/Midterm/Midterm_2021.ipynb', 'repo_name': 'ds-modules/ENVECON-118', 'size': '7381'}