## Econ113 Week 1 Homework

Thank you very much to solve this questions!!! 2013Summer Econ113 Week 1 Homework _Qs_ 1. {Expected value calculation, discrete random event} Suppose you have a coin that lands on Heads with probability 0.6. Where the random variable X is the sum of two coin flips, (where heads count 1 and tails count 0 – two heads then X= 2, a head and a tail then X = 1 and two tails the X = 0). Compute the expected value of X. 2. {Expected value calculation, discrete random event} Suppose you have a fair coin. Where the random variable X is the sum of three coin flips, (where heads count 1 and tails count 0 – three heads then X= 3, two heads and a tail is X = 2, just one head has X=1, and with three tails X = 0). Compute the expected value of X. 3. {Probability} How many times do you need to flip a fair coin so that the probability of getting ALL heads is less than 0.001 4. {Expected value of mean and variance estimators, systematic error and mean zero error} You have a sample from a survey where people report how much they smoke. The problem is people under-report how much they smoke because they are embarrassed and they also don’t remember exactly how much they smoke. If is the number of cigarettes person reports smoking, then = ∗ + (where ∗ is the true number of cigarettes person smoked, and is their reporting error.) The misreporting is independent of the true number of cigarettes consumed and = and the = and is uncorrelated with the number of cigarettes actually smoked ( ∗, = 0) a. What is the expected value of the sample mean in terms of the population mean of cigarettes smoked? ̂ =?? a. What is the expected value of the sample mean in terms of the population mean of cigarettes smoked? ̂ =?? b. Is the sample mean an unbiased estimate of the number of cigarettes smoked? If not, how far off is it? c. What is (i.e. derive) the expected value of the variance of the variable , ( ) d. What is (i.e. derive) the expected value of the variance of the sample mean ̂ ? e. How does the misreporting affect the precision of your estimate of the mean? f. Now suppose the measurement error has a mean of zero (with the still equal to ). f2. What is the expected value of the sample variance now? f1. What is the expected value of the sample mean now? 5. {hand calc mean, variance and standard deviation, simple summary stats with R} The following table shows literacy rates among the youths (age 15- 24) for some of the countries in Sub Saharan Africa a. Calculate mean and median. Also calculate variance and standard deviation. b. Now let’s add one more country to the data Country Literacy Rate (%) Angola 72.2 Burundi 73.3 Democratic Republic of Congo 70.4 Rwanda 77.6 Kenya 80.3 Chad, Literacy Rate = 37.6% Repeat the exercise in A. c. Now calculate the mean, median, mode, variance and standard deviation in R. Do this for a and b. Show both sets of observations with a histogram as well. Show your code. 6. {Continuous random events, normal distribution, z-score probability calculation} Suppose the average wave height of waves coming in at Steamer Lane is characterized by a normal distribution, with mean 6 and standard deviation 2, ~ = 6, = 2 a. What is the probability that a randomly selected wave is 6ft high? b. What is the probability that a randomly selected wave is between 6 and 9 feet. c. What is the that a wave is between 2 and 7 feet? 7. {Hypothesis test with sample statistic} Test the hypothesis that the average student studies 14 hours per week. You have a random sample from the population and the students report honestly. Your sample mean . ̂ = 18, you have a sample size of 200, and the standard error of the mean is 2, ( ̂ = 2). a. State your null and alternative hypothesis. b. Estimate your t-statistic c. Conduct your significance test at the 5 percent level. Do you reject the null? d. Explain in non technical language what you conclude about the null hypothesis. e. If you had a sample size 10 rather than 200, would you still be able to conduct a significance test of the location of the mean? Why or why not? (hint – what distribution would you check your t-statistic against). I 8. {R! Load data, summary statistics, subsetting, measurement error revisited} Load the NHIS data from the course web page (data from people aged 30-40), restrict the sample to males and drop observations where height is missing or NAs are present. (Please show your code) Data: http://sites.google.com/site/curtiskephart/data/NHIS_2007.csv Data Documentation: https://sites.google.com/site/curtiskephart/data/NHIS_2007_doc.pdf a. Load the data. b. Remove missing heights and subset to men c. Find the mean (of the data frame subset to men in part b) d. Find the variance (of the data frame subset to men in part b) e. Find the Standard deviation (of the data frame subset to men in part b) f. Plot a histogram, (of the data frame subset to men in part b). Get fancy if you like. g. If heights were measured without error, do you believe your estimate from question 8c is an unbiased estimate of the average heights of an American male? Why or why not? h. Suppose NHIS participants are rounding up heights to the inch, how might this bias our estimate of the average height of US men aged 30 to 40? i. Suppose NHIS participants round to the nearest inch (that is, error in reported height is mean zero), how might this bias our estimate of the average height of US men aged 30 to 40? How about our estimate of variance? 9 {R continued, Unbiasedness assumptions, small sample hypothesis test } a. Given you NHIS sample you initially downloaded, drop observations where height is missing, restrict the sample to men and draw a sample of size 25. (Please show your sample and your code) b. Compute the mean and the standard error of the mean for this sample. (Please show your results and your code). c. Do you believe your estimate from part b is an unbiased estimate of the average weight of an American male? Why or why not? d. Use your sample from parts a & b to conduct a significance test at the 5 percent level to test the null hypothesis that the average height of men in the population is 68.5 inches. d1. State your null and alternative hypothesis, d2. Estimate the t-stat: d3. Conduct your significance test (under the assumption that weight is distributed normally) – Which distribution did you check your t-statistic against and why? d4. What do you conclude about the null hypothesis? e. Calculate the p-value (two-tailed, approximate value with an inequality is fine). I 10 {R continued, large-sample hypothesis test} a. Given you NHIS sample you initially downloaded at the start of problem 8, drop observations where height is missing, restrict the sample to men and draw a sample of size 200. (Please show your sample and your code) b. Compute the mean and the standard error of the mean for this sample. (Please show your results and your code). c. Use your sample from parts a & b to conduct a significance test at the 5 percent level to test the null hypothesis that the average height of men in the population is 68.5 inches. c1. State your null and alternative hypothesis, c2. Estimate the t-stat: c3. Conduct your significance test (under the assumption that weight is distributed normally) – Which distribution did you check your t-statistic against and why? c4. What do you conclude about the null hypothesis? d. Calculate and interpret the p-value (two-tailed).