# MA Soc: Lab Materials Week 7

## Spreadsheets and the standard deviation

Spreadsheets are occasionally very useful for manipulating data and presenting numbers. They have a completely different way of working from Stata, however. You can enter text, numbers and formulas in the cells. The formulas can be simple (e.g. `=5+6`, which will display `11` in the cell) or arbitrarily complex (e.g. `=A1+A2`, which adds the values of two other cells; `=normsdist((A1-B1)/B2)` which returns the area of the normal distribution to the right of the value in cell A1, for a distribution with a mean of the value in cell B1, and a standard deviation in cell B2).

### Exercise 1: Calculating a Standard deviation

If we have the following data about 10 people (minutes spent in domestic work per day), how do we calculate the standard deviation:

``` 1: 44
2: 36
3: 41
4: 36
5: 46
6: 49
7: 43
8: 44
9: 41
10: 54
```
These are the Xs, i.e. X1 to X10 The steps are as follows:

1. Enter the data in a spreadsheet in a single column
2. Calculate the total at the bottom of the column (`=sum(...)`)
3. Calculate the mean (total divided by 10) -- this is X-bar
4. In the next column calculate the deviation (Xi minus X-bar)
5. In the next column calculate the squared deviations, (Xi minus X-bar)2
6. Sum the squared deviations
7. From these calculate the standard deviation, using the formula sheet