Professional Documents
Culture Documents
I was asked by the faculty to include some take-home exercises in this class to show you how to
use excel (a program you presumably all have!) to do basic statistical comparisons. Many of you
may already know how to do all of these; however, these exercises ensure that everyone is able
to do some basic types of analyses before leaving this class. Although we won’t really be going
over these in class, the exercises will be graded, so that I can ensure you all are able to do them.
Since they are fairly simple, they are an easy “A” for part of the class.
These assignments occur over the course of several weeks, you will continue to use the same
dataset for all of them. You each will be given your own, unique dataset, so you won’t get the
same answers as one another. Be sure to report your dataset # on all assignments, or I won’t
know what your answers should have been! The particular instructions are below.
In all cases, you have data from two groups of participants (groupA & groupB), each of whom
gave you results from three different tasks (taskA, taskB, and taskC). If it makes it easier for
you, you can rename them (i.e., adults with and without hearing loss on tasks of speech
perception and word recognition; children with and without SLI on tasks of working memory
and grammar production, what-have-you). Since you’ll continue to use the same set of data for
multiple exercises, it is best to enter it all into a spreadsheet that you continue to use. (That way,
the assignments after the first one won’t take more than a few minutes to do.) I would
recommend the following format:
Participant Group TaskA TaskB TaskC
1 A score score score
2 A score score score
3 A score score score
etc.
16 B score score score
17 B score score score
18 B score score score
etc.
For each exercise, there are just a few numbers you actually need to report back to me – I don’t
need the full file, or an excel print out. Indeed, I don’t want that – just hand in a sheet of paper
with the answers. You will presumably get all the answers correct – if you miss any, then you
should come show me what you did, or email me your spreadsheet.
Often, I ask you to do the same thing two ways. Admittedly, I wouldn’t know if you did or not.
But the idea is that these exercises will walk you through the steps so that you could do things
either way in the future – so while I have no way of checking, its really to your benefit to try and
do the analyses both ways.
Also, if any result gives you the answer in scientific format (with a number including an E, then
a negative sign, then 2 digits) you can get the number in a more typical format by selecting the
cell, going to formatcell picking number, and then telling it how many numbers after the
decimal points you want… (as many as the 2 digits after the E….)
Exercise one: Descriptive statistics.
Part A. Find the mean, standard deviation, and standard error for each of the 4
task/group combinations using tasks A & B (ignoring task C): (groupAtaskA,
groupBtaskA, groupAtaskB, groupBtaskB).
Standard deviation works the same way, but it is stdev, not average
Standard error is what we typically use in figures for the error bars, so its an important
statistic to be able to calculate in our field, but excel does not give it directly. The formula for
standard error is the standard deviation (which you just did) divided by the square root of the
sample size (which you know). The formula for square root is =SQRT(_).
If you didn’t want to count out the sample size, you could have excel count the cells for
you: =count(cella:cellz). So the full formula would be
=(stdev(cella:cellz)/sqrt(count(cella:cellz)))
Part C. Counts. One particularly useful function for grading is to have excel tell you
how many As, Bs, Cs, etc. you have on an exam. This isn’t really a stats thing, but is good to
know how to do anyway. This can be done with the COUNTIF function. Pretend for the
moment that all of the scores in task C were exam grades. Lets say you want to know how many
people got an A (90% or better). At the bottom of the column, enter =COUNTIF( Then you
have to highlight the section you want it to count over (i.e, the column). Add a comma after that.
Now you need to give the “rule” for what it should count. In this case, lets say 90 is an A. So it
would be “>=90” (greater than or equal to 90). Then add the end paren. It should count the
number of scores >90. Now, to do the Bs, you can do the same thing, but then you have to
subtract out the As. That is, if you type =countif(range, “>=80”) it would give you As and Bs
combined, so you need to subtract the earlier cell (or make the condition be that the score is both
>=80 & <90). Using either approach, tell me the number of As and Bs in the column.
Exercise 2: correlations
To do this exercise, we’re going to ignore the group difference.
Part B. Next, find the correlations among all three. To do this, do the same thing,
but select all three columns. You should get a larger table this time, with 3 values (one
identical to the one before).
Part C. Just like with the other tests, there is also a function for this. Try it out by
doing the correlation for only group A (15 people) on tasks A & B:
=correl(range1, range2).
To do both parts A & C, you need to decide which type of t-test you want to do (paired or
unpaired). Go to tools data analysis and select the right choice. (Assume equal variance for
this). In each case, it asks you for the range for variable 1 and variable 2: click in the box, then
highlight the appropriate region in your spreadsheet.
Part A. Assume for the moment that you only had one group of 30 people, rather than
two groups of 15 each. Each person does still does both tasks, A & B. Do a t-test to determine
if the tasks give different results (i.e, if one task is easier).
Part B. Now do a t-test to see if task A was different than “chance” where chance is
50%. (A one-tailed t-test). Excel won’t do this, but it’s a simple formula. For a one group t-test,
you take the mean of the group you tested, subtract the known value (here, chance), and divide
by the standard error. To see if this is significant, use your table. Do the same thing for task B,
as well.
Part C. Assume that A & B were two different studies (rather than two different tasks);
each study has two groups of people who did the same single task. Do two t-tests (one for each
experiment) in which you determine whether the two groups of 15 people differed.
Part D. There is another way to do a t-test in excel, though. Excel also has a t-test
function. If you’re entering data in once, and then analyzing it, the way we did it above is fine.
But if you’re testing a series of participants and looking at the data repeatedly over the course of
the study, you’d have to keep doing this over and over. (It doesn’t automatically update as you
add in new data). So in that case, you’re better off doing the t-test function. It just isn’t quite as
intuitive, in some ways. To demonstrate this, I want you to compare tasks A & B to C (using
paired t-tests) using the ttest function. This is a function of the format
= TTEST(array1,array2,tails,type)
So click in the cell where you want the results. Type in the equal sign, then ttest, then
highlight the first set of cells you want analyzed, then the second set. For tails, you enter 1 for a
1-tailed test, 2 for a 2-tailed test. (Do 2-tailed ones here). Then for type, you enter 1 for paired, 2
for unpaired (assuming equal variance). Since this is a function, it updates itself (recalculates)
every time you change the data or add more in. But, it actually doesn’t tell you the t-value itself
– it gives you p (the probability). If you want the t-value, you need to do a second function,
called TINV, on the results of the ttest function. This function is in the format
=TINV(probability,degrees_freedom).
So in a neighboring cell, type in =TINV( Then, for the probability, click on the cell that
gave you the TTEST result. For df, you need to enter in the number.
So first, do this for A vs. C, and then again for B vs. C. Report both the probability and
ttest results in the correct manner. Then, do it for A vs. B. You should get the same thing you
got in part A, above. But then change the numbers for the following 5 subjects’ A values to be
10 points higher than they were: Harry, Barney, Sally, David, Fred. The t-value and probability
should change. Report those, as well. (Remember to go back and undo the data changes
afterwards!)
Let’s pretend all your values are percentages. Take Task C, and do arcsine transformations of
each number – then report the average of these arcsin values. How much does this differ from
the average of the “percentages” you’d had before?
Note: Excel does arcsines in radians, not in degrees, so you need to account for this!
Step 1: Turn each percentage into a proportion (i.e., divide by 100)
Step 2: Take the square root of each number. = SQRT(cell)
Step 3: Take the arcsine of each number. = ASIN (cell)
Step 4: Convert into degrees DEGREES (cell)
Or, to do this all at once, the formula is:
=degrees(ASIN(SQRT(cell/100))))
If you want to test that your formula works, the transformation of 100 should give you 90, the
transformation of 10 should give you 18.4-something.