Studies-Computer Lab 1-2013-2014

advertisement
Name ______________________________________________
Date: Jan. 2014
IB Math Studies – Computer Lab #1
This lab is designed for further practice using Microsoft Excel, including performing calculations, calculating
“correlation,” and making graphs/charts.
I. To start today, open up the “Microsoft Excel” program by going into “Start> All Programs> Microsoft Office>
Microsoft Excel.” A new, clean spreadsheet should open up.
II. To save and open today’s data set, “studies – student data – ht, wt, sleep.xls.”:
Follow these directions:
 The document for today’s class, “studies – student data – ht, wt, sleep.xls”, should appear after you log in
 Choose “File” > “Save As…” and save it to your network drive, so that you can access this data set later
A spreadsheet is composed of many “cells” (little boxes), arranged into rows and columns. For example, in the data
set you will look at today, the cell “B5” means the 2nd column (B) and the 5th row, which has the value 10.7.
III. Saving Your Work: As you enter and manipulate data in Excel, as when you do work in any computer
program, it is important to SAVE YOUR WORK REGULARLY. Very important when you are working on your own
project, and entering and updating data in your Excel worksheet! You don’t want to lose your work!



To save your “worksheet” (the name of file in Excel), go to the File menu (top left), and chose “Save As…”
This will bring up a window that allows you to choose a folder or drive to save your file to (I would
recommend your network drive or a flash drive, if you have one)
Then name your file. Call this file something like “Math Studies – Computer Lab.xls”. (All Excel files end
with the file extension “.xls”.)
IV. Performing Calculations.
Excel has many built-in formulas that it can use to make your life easier. For example, “maximum” and “minimum”
values, average, median, quartiles, etc., can all be found for you, if you learn how to “ask” Excel to give you those
values.
A formula always starts by typing “=.” Then you usually click and drag on all your data values for Excel to look at
(when calculating the average, finding the minimum, etc.).
Some formulas look like this:
=MEDIAN(D2:D78)
=QUARTILE(D2:D78,1)
=QUARTILE(D2:D78,2)
=AVERAGE(D2:D78)
=D59–D2
=D59*D2
->
->
->
->
->
->
This will give you the median for the data list
This will give you the 1st quartile (notice the “,1” in the command) of a list
This will give you the 2nd quartile (equal to the median) for the data list
Guess what this will give you…
This will subtract the value in D2 from the value in D59
This will multiply the values in D59 and D2
V. Manipulating Data.
 One very useful tool in Microsoft Excel is the “Sort” feature, which can arrange data in your spreadsheet
according to the values/entries in any column (or columns) that you specify.
 To SORT your data, first select (highlight) all the data you want to sort.
 CAUTION: IF YOU ONLY HIGHLIGHT SOME ROWS OR
COLUMNS, THESE WILL BE SORTED AND EVERYTHING
ELSE WILL NOT! HIGHLIGHT THE WHOLE DATA SET
WHENEVER YOU SORT.




Once you’ve selected (highlighted) your data, go to Data>Sort…
Next, choose which columns to sort by. If you want to sort by multiple variables, select multiple
variables in the order you want to sort them. (You can do this by “adding a level…”)
For practice, sort by “Height – Ascending (least to greatest),” and see what happens.
Now, sort by “Gender” and then by “Sleep” (Data > Sort > by Gender > “add a level…” > by Sleep).
Take a moment to pause and look at how this sorted your data – it should show all the females (in
order of sleep), and then all the males (in order of sleep).
Another common “manipulation” is moving the decimal point – either to “round more,” or to find “more
precision” (more significant figures). To do this, highlight the cells you want to change, and then click one
of these two buttons from the “Home” toolbar:
VI. Charts and Graphs.
 Many options are available to present your data in charts and graphs.
 To make a graph, select (click and highlight) the data you want to show in your graph
 Then select “Insert>Chart…” and then peruse your options (bar graph, line graph, etc.).
 Some charts or graphs require special forms of data (for example, “Scatter Plots” require two columns of
data, side-by-side, for the x- and y-values).
 You can play with these charts today, after you’ve completed the Assignment below.
VII. Today’s Assignment:
a) I’ve set up a frequency table (right) for summarizing the long list of data into a
more succinct format. “Frequency” just means “how many times” a value occurs in
your data set. After sorting by “Sleep,” make a careful count of the frequency
(how many times) of each sleep amount for the students in this sample.
b) By using Excel formulas, or otherwise, find each of the following statistics for the
heights in this data set:
i)
ii)
iii)
iv)
v)
vi)
vii)
Interval
<9 hours
9-13 hours
14-17 hours
18-21 hours
22-25 hours
26-29 hours
30+ hours
Frequency
mean (“=average(select data)”) (use 3 s.f.) = ___________
minimum (“=min(select data)”) = ___________
1st Quartile (“=quartile(select data,1)”) ___________
median (“=median(select data)”)= ___________
3rd Quartile (“=quartile(select data,3)”) = ___________
maximum (“=max(select data)”)= ___________
range = ___________
(in Excel, you have to use “=max(E2:E78) – min(E2:E78)” to find
the range – there’s no built-in formula for the range)
c) After sorting by “gender” and “sleep,” make a contingency table that could be used for a chi-square test:
(Consider two or three categories of “sleep” – low/high, or low/medium/high, and be sure you define them
appropriately and clearly.)
Sleep
Male
Female
Total:
Download