ECON 2370 University of Houston Introduction Economic Data Analysis Project
ECON 2370 Homework 5Out of 100 points.Turn in one pdf file. Other file formats will not be accepted.Answer all questions inside this document and in the same order. Questions answered out of order will not be graded. All questions should appear in the homework.Copy&Paste tables/graphs from R below each question. You will need to delete blank lines as you do this. Be careful not to delete any questions or change the format of the number list.There is a penalty for up to 10 points for not following any of the instructions aboveA Dataset on Birth Weight (60 points)Please find attached the North Carolina Birth Records (birthnc.csv) and the pdf file describing each variable name (birthnc_desc.pdf). This dataset contains birth records in North Carolina in 2001 that statistician John Holcomb selected from the North Carolina State Center for Health and Environmental Statistics.Each question below asks you to calculate a statistic for a variable. I give you an example code for a different variable than the one asked. You need to modify the code to get the statistics for the variable that the question asks. Change the variable name, the chart title, etc.Show the descriptive statistics.Calculate a 90% confidence interval for birth weight (BirthWeightOz).Is there an association between mother’s age (MomAge in X axis) and birth weight (BirthWeightOz in Y axis)? Is smoking associated with low-weight births (Low)? Show a two-way frequency table with Smoke in rows and Low in columns displaying the column percentages. Copy and paste the table here. Format the table by adding a title and changing the lables of the variables so it is not just showing a “0” and “1” . Do not forget to answer the question (5p).# R codeattach(birthnc)summary(birthnc)# R code example. 95% Confidence interval for mother’s age (MomAge). # You must change the variable of this code to answer question #2.t.test(MomAge, alternative = "two.sided", mu = 0, conf.level = 0.95)a)Draw a scatterplot to show visually if there is any relationship. b)Add a fitted line.c)Calculate the correlation coefficient.d)Comment on the correlation.# R code example. Scatterplot between Weeks (X axis) and BirthWeightOz (Y axis)# You must change the variable and title of this code to answer question #3.plot(Weeks, BirthWeightOz, main="Weeks and Birth Weight(oz)" )# R code example. Adds the fitted line in color redabline(lm(BirthWeightOz~Weeks), col="red")# R code example. Calculates the correlation between Weeks and BirthWeightOzcor(Weeks, BirthWeightOz)# R code example:# Is smoking associated with premature births (Premie)? # You must change the variables of this code to answer question #4.# Two-way frequency between Smoke (Rows) and Premie (Columns)table1 <- table(Premie, Smoke)table1# Two way frequency with column proportion of “table1”ptable <- prop.table(table1, 2) # Column proportionsptable
z-Test: An additional p-value QuestionIn a study entitled How Undergraduates Use Credit Cards, it was reported that undergraduate students have a mean credit card balance of $3173 (Sallie Mae, April 2009). This figure was an all-time high and had increased 44% over the previous five years. Assume that a current study is being conducted to determine if it can be concluded that the mean credit card balance for undergraduate students has continued to increase from the April 2009 report. A sample of 180 students showed a sample mean credit card balance of $3325. Based on previous studies, use a population standard deviation of . Test the null hypothesis .Show the five steps of hypothesis testing using the critical value approach at the 5% significance level.What is the p-value? What do you conclude using the p-value approach.The mean annual premium for automobile insurance in the United States is $1503 (Insure.com website, March 6, 2014). Being from Pennsylvania, you believe automobile insurance is cheaper there and wish to develop statistical support for your opinion. A sample of 25 automobile insurance policies from the state of Pennsylvania showed a mean annual premium of $1440 with a standard deviation of s = $165. Test the hypothesis that mean annual premium in Pennsylvania is lower than the national mean annual premium. That is, test .Use the critical value approach to test the hypothesis at . Show the five steps. What is your conclusion?Using the table for the t-distribution, what is the range for the p-value? Using the p-value approach, show the decision rule and conclude.The national mean annual salary for a school administrator is $90,000 a year (The Cincinnati Enquirer, April 7, 2012). A school official took a sample of 25 school administrators in the state of Ohio to learn about salaries in that state to see if they differed from the national average. Suppose you have a sample data for 25 Ohio administrators showing a mean salary of $85,272 and a standard deviation of $11,039. Test to determine whether the population mean annual administrator salary in Ohio differs from the national mean of $90,000. That is, test Show the five steps of the critical value approach to test the null hypothesis. Use .Repeat the preceding hypothesis test using the p-value value approach. (Show steps 4 and 5 only.) Develop an appropriate hypothesis test such that rejection of will support the conclusion that a smaller proportion of American families own stocks or stock funds in 2012 than 10 years ago. (Answer, )Confirm that we can use the standard normal distribution as an approximation to the test statistic for a population proportion. That is, confirm that and .Use the critical value approach to test the hypothesis at the 1% significance level. Show the five steps. Repeat the exercise using the p-value approach.
t-Test: Hypothesis Test About Population Mean with Population Standard Deviation () Unknown:
z-Test: Hypothesis Test about Population Proportion:Ten years ago, 53% of American families owned stocks or stock funds. A sample of 300 observations collected by the Investment Company Institute indicate that the percentage is now 46% (The Wall Street Journal, October 5, 2012).