+1 917 8105386 [email protected]

DEPARTMENT OF ECONOMICS, UBC OKANAGAN

DEPARTMENT OF ECONOMICS, UBC OKANAGAN Assignment 12 ECON 327 Text Reference: Chapter 13 1. NHST Hypothesis Testing, Number of Successes, Binomial Distribution You are estimating a binomial proportion (º) by conducting 50 independent Bernoulli trials and counting the number of successes. You are evaluating two different statistical hypotheses: H0 : º = 0.15 and H1 : º = 0.30. Write an R script to: 1. Determine the critical value of X, the number of successes, such that if the number of successes in 50 trials is greater than or equal to the critical value you will reject H0 (the null) and accept H1, with a probability of a Type I error = 0.05. 2. Calcuate the probability of a Type II error. 3. Graph the null and alternative distributions and indicate the critical value of X with a vertical line. Hint 1. Because the binomial distribution is a discrete distribution the critical value of X will be the smallest value of X for which the probability of a Type I error is not greater than 0.05. 2. Because the binomial distribution is a discrete distribution the null and alternative distributions will look like histograms, so use type=“h” to get good looking graphs. 1 3. Because the critical value of X will not be precisely where Æ = .05 and 1 ° Æ = .95 the graph will look better if you draw the vertical line between the highest value of X in the acceptance region and the lowest value of X in the rejection region. 2. NHST Hypothesis Testing, Binomial Proportion, Binomial Distribution You are estimating a binomial proportion (º) by conducting 500 independent Bernoulli trials and calculating the sample proportion pˆ. You are evaluating two different statistical hypotheses: H0 : º = 0.15 and H1 : º = 0.20. The sampling distribution of pˆ is approximately normal with mean º and variance º(1°º) n . Write an R script to: 1. Determine the critical value of pˆ, the sample proportion, such that if pˆ in 500 trials is greater than or equal to the critical value you will reject H0 (the null) and accept H1, with a probability of a Type I error = 0.05. 2. Calcuate the probability of a Type II error. 3. Graph the null and alternative distributions and shade the areas equal to the probability of Type I and Type II error. Rules 1. Produce a document that includes both commands and the output, including the figures, that is created by the commands. 2. The due date for the assignment will be announced in class. 2

Ready To Get Started?

GET STARTED TODAY