Docsity

Lab 7: Confidence Intervals and Hypothesis Testing in Excel, Lab Reports of Statistics

Toggle sidebar
bg1
STAT 280 spring 2006
Lab 7
Labs must be printed out and may be dropped off to your TA’s mailbox located in Duncan Hall
1092.
Labs are to be written up in legible reports with all graphs labeled. It is possible to insert graphs
and spreadsheets into a Microsoft word document.
You also need to make sure the Analysis ToolPak add-in is installed on Excel. In Excel, go to
Tools Add-Ins and make sure Analysis ToolPak is checked and click Ok.
Data
You will be generating your own data for this lab.
Objectives
The purpose of this lab is to give an introduction to confidence intervals and hypothesis testing.
Tasks
1. (10 points) First we concentrate on how to simulate data coming from a normal
distribution.
a.) Using Excel, generate 1000 random numbers between 0 and 1 (using RAND
function). These will be used in the next step as probabilities to generate random
normal distribution variates.
b.) Use NORMINV function generate inverse of normal cumulative distribution with
mean 0 and standard deviation of 1. Use the random numbers you have generated
in the previous step
c.) Plot a histogram of the Normal (0,1) random variates you’ve created in part b.
Does it look approximately normal?
d.) The steps outlined in a-c will allow us to simulate arbitrarily large samples from a
normal distribution with any mean and standard deviation. Use what you have
learned to simulate 250 observations from a Normal Distribution with mean of
300 and standard deviation of 10. Plot the histogram.
pf2

Partial preview of the text

Download Lab 7: Confidence Intervals and Hypothesis Testing in Excel and more Lab Reports Statistics in PDF only on Docsity!

STAT 280 spring 2006

Lab 7

Labs must be printed out and may be dropped off to your TA’s mailbox located in Duncan Hall

Labs are to be written up in legible reports with all graphs labeled. It is possible to insert graphs and spreadsheets into a Microsoft word document. You also need to make sure the Analysis ToolPak add-in is installed on Excel. In Excel, go to ToolsAdd-Ins and make sure Analysis ToolPak is checked and click Ok. Data You will be generating your own data for this lab. Objectives The purpose of this lab is to give an introduction to confidence intervals and hypothesis testing. Tasks

  1. (10 points) First we concentrate on how to simulate data coming from a normal distribution. a.) Using Excel, generate 1000 random numbers between 0 and 1 (using RAND function). These will be used in the next step as probabilities to generate random normal distribution variates. b.) Use NORMINV function generate inverse of normal cumulative distribution with mean 0 and standard deviation of 1. Use the random numbers you have generated in the previous step c.) Plot a histogram of the Normal (0,1) random variates you’ve created in part b. Does it look approximately normal? d.) The steps outlined in a-c will allow us to simulate arbitrarily large samples from a normal distribution with any mean and standard deviation. Use what you have learned to simulate 250 observations from a Normal Distribution with mean of 300 and standard deviation of 10. Plot the histogram.
  1. (10 points) Here we use our ability to simulate data to better understand confidence intervals. a.) Simulate a random sample of 500 observations from a Normal (300, 10) distribution. b.) Compute the 95% Confidence interval about your sample mean. Does your Confidence Interval contain the true mean of 300? c.) Generate 19 more samples from a Normal (300,10), each containing 500 observations. Note that you can use NORMINV(RAND(),300,10) and CONFIDENCE(.05,10,500) functions to make things go faster. How many of your confidence intervals include the true mean? d.) How many observations would you need to half the size of your confidence interval? Try it.
  2. (10 points) This exercise will help you better understand hypothesis testing. a.) Generate 50 observations from a Normal (80, 5) distribution. b.) For the rest of the problem assume that the standard deviation is known and the mean is not. Suppose you wish to test whether the true mean is equal to 80 or not. What is the Null Hypothesis, what is the alternative hypothesis? c.) Compute the z-score for the above test. Would you reject the test at alpha of 0.05? d.) Now suppose you were testing the hypothesis that the true mean is equal to 90. What is the Null Hypothesis and alternative Hypothesis? Use Excel to perform the test (ZTEST function would be useful here, but please read the help file in excel to know how to use it correctly). Would you reject the Null hypothesis at alpha 0.05 level? e.) Repeat step d for values of the population mean of 77 and 79. Summary By completing this lab, you are now able to compute confidence intervals and hypothesis tests in Excel..