Overview#
Google Sheets is excellent for its low scare-factor and its free availability. Google Sheets will get you from point A to point B and with only an internet browser. Microsoft Excel can do a bit more. In the context of this class, the only advantage of Excel is the availability of the Analysis ToolPak plugin for regression analysis. Python or R can do a lot more. You might get a job from your Python abilities alone, but that won’t happen with Excel/Sheets.
Use Google Sheets if you are someone who needs to manipulate data or make statistical calculations, but not so often that you should suffer the investment required to use languages like Python or R or to learn/pay for other applications.
Basics#
Formulas: Not 1+1
but =1+1
#
Arithmetic can be done as you would expect, as long as you enter =
and then the formula. Without the equals sign, you will only have text.
Cell References: A1
and Sheet1!A1
#
You can reference the value of another cell using its column and row coordinate. For example, A1
refers to the value in column A, row 1.
If you would like to reference the value in another sheet named Sheet1
(another tab in the same workbook), you can do that with the syntax =Sheet1!A1
.
Cell Ranges: A1:A2
, A:A
and A1:B2
#
You can select a range of cells with the mouse or by specifying a range of cell coordinates. When using coordinates, there are three types of ranges you might use:
Single column subset,
A1:A2
. This will select the cells in column A from row 1 to row 2.An entire column,
A:A
. This will select every cell in column A.Rectangular selection,
A1:B2
, This will selectA1:A2
andB1:B2
. Note, you can useA1:C1
to select all cells in row 1 for columns A-C.An entire row,
1:1
. This will select the entirety of row 1.
Selecting a range of cells will be useful later when we use formulas. Note, if you use the reference =A1:B2
by itself, as shown below, you will get back an error because the 2x2 range cannot be inserted into a single cell.
Copying and Pasting Cell References ($A$1
vs A1
)#
To leverage the power of Sheets, you should be copying and pasting your references and formulas as much as possible. There are three types of references that behave differently when copying and pasting. A plain =A1
reference:
=A1
, relative referencing=A$1
, mixed referencing where the column is relative and the row is absolute=$A1
, mixed referencing where the row is relative and the column is absolute=$A$1
, absolute referencing
Fig. 60 Absolute Row referencing.#
Rows are numbered and columns are lettered. A dollar sign in front of the number will make the row referencing absolute. Similarly, a dollar sign in front of the letter will make the column referencing absolute.
Fig. 61 Absolute Column referencing.#
Formulas#
Google Sheets offers hundreds of functions across several categories. We are especially interested in the statistical, math, and logical categories.
Mathematical and Statistical#
Below is a selection of commonly used functions in Google Sheets. Their purpose should be apparent from the name:
Function |
Sample Usage |
Notes |
---|---|---|
|
||
|
Correlation, same as |
|
|
||
|
||
|
||
|
This is SD\({^{+}}^2\). |
|
|
||
|
||
|
This is SD\(^{+}\), not SD, per [FPP07]. |
|
|
This is SD, per [FPP07]. |
Probability Distributions#
Function |
Sample Usage |
Notes |
---|---|---|
|
||
|
||
|
Right-tailed |
|
|
Left-tailed |
|
|
||
|
||
|
Two-tailed inverse |
Logical#
Function |
Syntax |
Example |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lookup Functions#
Function |
Syntax |
Example |
---|---|---|
|
|