Sie sind auf Seite 1von 8

Excel Tutorial 1 – Descriptive Statistics

1. Open the Excel file. I have already input the data (the xi’s) into row C. I have also numbered the
100 observations (the i’s). Your goal is to calculate various descriptive statistics including the
mean, median, mode, variance, and standard deviation.

2. Your first task is to calculate the mean of the xi’s. We will use a formula. Highlight the cell G3 by
left clicking the mouse. We need to type a formula into the cell, so type =sum(C3:C102) and
hit enter. This formula returns the sum of all of the values in column C between rows 3 and 102.

3. In order to calculate the mean (xbar) we also need to determine the number of observations n.
So we can either manually count the number of observations or look for the largest value of i. If
we had a lot of data and if the data weren’t numbered, this might be difficult. Instead, try using
another formula. Into cell H3 type =count( and then highlight all of the data in column C
using the mouse (i.e., left click in cell C3 and then highlight all of the cells down to C102). Now
hit enter.
4. Now figure out a formula for the mean on your own. Remember that you have to type an equal
sign to start a formula. Also remember that the symbol for division is the forward slash ( / ).
Hint: you can either manually enter the numbers we have already calculated in the formula, or
you can refer to the cells themselves (G3 and H3).

5. Now we will calculate the variance step by step. We need to first figure out the deviations of
each observation from the mean. So we need to calculate the difference between each xi and
xbar . For the first observation, type =C3-I3 into cell D3 and hit enter. Now we need to copy
the formula for all of the xi’s, which is much easier than typing it out 100 times. In Excel you can
drag the bottom right corner of a cell down to copy all of the cell’s either vertically or
horizontally. So left click in cell D3 and hover your mouse pointer over the bottom left corner of
the cell, it should turn into a dark plus symbol. Now left click on the plus symbol and drag the
formula down one row.

Is the value in cell D4 correct? Probably not. This error occurred because Excel uses relative cell
references when copying formulas. If you click back in cell D4 and then left click the formula bar,
Excel will color code the cell references in the formula.
Notice how we should always refer to xbar in all 100 of our formulas. Instead, when we dragged
the formula down, the references moved down as well. That is okay for the xi’s, but we need to
lock in the absolute reference to xbar (cell I3). To lock in the absolute reference, we need to
amend the formula in cell D3 before copying it down. Left click in cell D3 and hit the delete
button. Now type the formula =C3-I$3 and hit enter. The dollar sign in between the I and
the 3 tells Excel to always refer to row 3 when copying the formula down. Now drag the formula
down all the way to the bottom of the data (row 102) as before. Verify that the formula is
returning the correct values.

6. Can you verify that the sum of the values in cells D3 through D102 is indeed 0 as it should be?
You can either use the summation formula, or you can use a shortcut. Simply highlight all of the
cells D3 through D102. When multiple data cells are highlighted, Excel will automatically show
some basic descriptive statistics in the bottom right side of the page.

7. Now we can square each of the deviations we just calculated. In cell E3 type =D3^2. Remember
that the exponent operator is the carrot symbol ^. Copy this formula all the way down through
cell E102. In this case, do you need to change the relative references as we did before?
8. On your own type a formula into cell G6 for the number of observations minus 1.

9. For the variance, we will need to calculate the sum of all the squared deviations in column E and
then divide that number by n-1. In cell H6 type =sum(E3:E102)/G6 . What is the
variance and what does it mean?

10. In cell I6 we need to calculate the standard deviation by taking the square root of the variance.
You can use the exponent operator ( ^ ) and remember that taking the square root is the same
as raising a number to 0.5 . Or you can use the square root function by typing =sqrt(H6)
into cell I6.

11. Great, we have successfully calculated the mean, standard deviation, and variance. Now I will
show you two easier ways of doing this.
12. To calculate the mean easily we can use a formula. In cell G9 type =average(C3:C102) .

13. To calculate the variance easily, type =var.s(C3:C102) into cell H6. What do you think the
s stands for in the formula?

14. To calculate the standard deviation easily, type =stdev.s(C3:C102) into cell I6.

15. Do the statistics match?

16. For an even easier and quicker method to generate descriptive statistics, we can use the data
analysis toolkit. Click on the file tab and then options

17. Now click on add-ins on the screen that pops up.


Now click on the GO button at the bottom

On the next screen check the box next to Analysis ToolPak and then click OK

18. To use the data analysis tookit, navigate to Excel’s data tab
and then click on Data analysis on the right

19. On the screen that pops up click on descriptive statistics and then hit OK.
20. Make sure you tell the dialog box where the data is and then check the other options as follows:

21. Hit enter and see what happens.

Das könnte Ihnen auch gefallen