0% found this document useful (0 votes)
43 views4 pages

Computing 1: Introducing EXCEL: Here Here

This document provides instructions for an Excel lab involving data analysis tasks. The goals are to get familiar with Excel, build skills for upcoming assessments, and link to learning outcomes involving summarizing and exploring large datasets using graphs and statistics. The tasks involve downloading data, using formulas to calculate summaries, formatting cells, using autofill, sorting data, and creating scatter plots. Key tasks include finding total males, average weight, CBMI for crab 153, female crab with most males, and relationship between weight and males in a scatter plot. Formatting and references are also covered.

Uploaded by

Jason Zeng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views4 pages

Computing 1: Introducing EXCEL: Here Here

This document provides instructions for an Excel lab involving data analysis tasks. The goals are to get familiar with Excel, build skills for upcoming assessments, and link to learning outcomes involving summarizing and exploring large datasets using graphs and statistics. The tasks involve downloading data, using formulas to calculate summaries, formatting cells, using autofill, sorting data, and creating scatter plots. Key tasks include finding total males, average weight, CBMI for crab 153, female crab with most males, and relationship between weight and males in a scatter plot. Formatting and references are also covered.

Uploaded by

Jason Zeng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

KMA153 - Data Handling and Statistics 1 Week 1

Computing 1: Introducing EXCEL


The aims of this first lab are to
 Make sure you can log into the course page on MyLO
 Get you familiar with using Excel and start to build the skills you will need for Quiz 1 and Project 1.

This lab links to two of the unit’s Learning Outcomes


 Summarize and explore large data sets using appropriate numeric and graphical tools
 Perform common statistical analyses in a statistical computing package.

There are short videos available online to help you navigate through these tasks. The links to the relevant
videos are included in each task. You may like to start by watching the video on downloading a data file
from MyLO and navigating Excel here, and a video on how to install the data analysis toolpack here.

Task 1. Log into MyLO and download the file crabs.xls from the Computer Labs folder on MyLO.
Save it on the desktop. Open it in Excel. Video link: Introducing the Crabs data. The dataset contains 5
variables.

Variable Type of Variable


color 2: light medium, 3: medium, 4: dark medium, 5: dark Choose an item.
spine 1: both good, 2: one worn or broken, 3 both worn or broken Choose an item.
width carapace width in cm Choose an item.
weight of female crab in grams Choose an item.
males number of satellites (male crabs near the female crab) Choose an item.

a) For each variable say if you think it is scaled or categorical.


b) Which variable makes sense to have as the response Click or tap here to enter text.
and which are explanatory? Click or tap here to enter text.

Task 2. Using formulas. Video link: Using Formula


Cells in Excel can contain words or formulas. For instance, we could sum the number of male crabs in column F
to find the total number of males.

Pick an empty cell in the spreadsheet (say I2) and type =SUM(F2:F174)
This tells Excel to sum up the values of the cells in the given range of cells from F2 to F174 and to store the
answer in cell I2.

c) The total number of male crabs is 173

What’s the average weight of the female crabs? Use a formula of the form =AVERAGE(cell_range)

d) Average weight of female crabs is 2437.190751

Notice that you can type either directly into the cell or into the formula bar at the top of the spreadsheet.

Task 3. Formatting a cell. Video link: Formatting a cell

How many decimal places did Excel give to the average weight? Too many probably. To change the way Excel
formats a cell or group of cells, select them and look for the Number panel as part of the Home tab. There is a
also a drop-down menu with different formatting options; if you change the format from General (the default) to
Number it will give you 2 decimal places.

1/4
KMA153 - Data Handling and Statistics 1 Week 1
Task 4. Using autofill. Video link: Using Autofill

Somewhat analogous to human body mass index, we might be interested in finding out if some crabs are
relatively heavy for their width. We could define the CBMI (Crab body mass index) as CBMI =
weight .
¿¿

First let’s give the new column a label, in cell G1 type CBMI.
In cell G2 enter the formula =D2/(E2*E2) (or D2/E2^2)

It would be tedious to reenter the formula for all 173 crabs, fortunately there is a better way. If you select cell G2
you will notice a little square in the bottom right corner of the cell outline. Click on this and drag downwards.
The formula should be filled into the cells G3, G4 etc automatically as you drag the mouse down the column.
You can also double-click on the little square in the bottom right corner.

Check that you have created the CBMI for all the crabs. How many decimal places is the answer? Adjust this by
selecting the column and formatting it to have only 1 or 2 decimal places.

e) The CBMI for the crab 153 is 3.748055696

Task 5. Sorting data. Video link: Sorting data

Which female crab has attracted the most satellite males? We could use the formula =MAX(F2:F174) to find out
the largest number of satellite males and then scroll down to work out which crabs have this many.

Another way is to select all the columns A through G and sort them based on the number of satellite males. To do
this, go to the Data tab and look for the Sort & Filter panel. Click on the Sort button and choose to sort by males
in the order Largest to Smallest. At the top right of the dialogue box make sure you have ticked the box ‘My data
range has headers’ (this tells Excel that the first row of the spreadsheet contains labels rather than data). Note
that each row contains information for a particular crab. Be careful to select all column A to G when you Sort, so
that information for each crab remains correct.

f) The ID number of the female crab with the most males is 56


She has 15 satellite males.

Alternative way of sorting is using Filter. Select all of your data (click on cell A1, then press ctrl+Shift+Arrow
right then Arrow down, and this will quickly select all the data for you) then click on Filter. Each of the columns
in the first row will have little arrows on the right-hand side to access a drop down menu. You can use Filter to
sort data, or show data that belongs to a particular category of a value.

Task 6. Scatter-plots. Video link: Scatterplots

To see if there is any relationship between weight of crabs and number of satellite males we could make a
scatter-plot. Select columns D and F; note that to get two columns that are not adjacent you need to use the Ctrl
button. First click on column D, then hold down Ctrl and click on column F. Then select the Insert tab, and pick
the Scatter option from the range of available charts.

g) The number of satellite males tends to Choose an item. with increasing weight of the female crab.

2/4
KMA153 - Data Handling and Statistics 1 Week 1

Relative and absolute referencing, bar charts

Task 1. Log into MyLO and download the file HairAndEyeColor.xls from the Computer Labs folder
on MyLO. Save it on the desktop. Open it in Excel. Video link: Introducing the Hair and Eye Colour data

Task 2. Relative references. Video link: Relative Referencing

The table shows the counts of people with different combinations of hair and eye color. Let’s start by
working out how many of the people sampled have black hair. In cell F2 type =sum(B2:E2)

Note that you can also use the mouse to select the range of cells that you want to sum over instead of typing
them in directly.

To get the sums of people with the other three hair colors we can drag the formula in F2 down through cells
F3, F4 and F5.

Look in cell F3, see how the formula has changed from what was in F2. The formula is using cells (B3:E3)
that are the same relative distance from F3 as B2:E2 were from F2.

a) The number of people with red hair is 71

Task 3. Fill in cells B6:E6 in a similar way to get the numbers of people with each different eye color.

b) The number of people with blue eyes is 215

Task 4. Absolute references: Video link: Absolute Referencing

Sometimes it is more useful to have percentages or proportions than counts. Let’s make a copy of the table
that we can then adjust. Select the cells A1:E5, type Ctrl-C (or go to Edit -> Copy). Click on cell A8 and
type Ctrl-V (or go Edit -> Paste).
You should now have a copy of the table without the row and column sums.

Click in cell B9 (which should currently contain the number 68). Type =B2/F2

You should get 0.62… to some number of decimal places.

What happens if you drag this formula across into cell C9? You’ll see that you get an error message in C9.
Click on this cell and look at the formula it’s using. Can you see the problem? It is trying to divide C2 by
G2, but G2 is empty. In this case we don’t want Excel to use relative reference (its default) we want it to
always divide by the row sum in F2.

To fix this problem go back to cell B9. In the formula bar put a $ in front of the F. This tells Excel to leave
this part of the reference fixed when the formula is copied to a different cell (it’s called an absolute reference
as opposed to a relative reference). (if you click on F2 in the formula bar and keep pressing function key F4
on your keyboard it will cycle through F2, F$2, $F2 and $F$2 for easy absolute referencing)

Now try dragging the formula across into cells C9:E9. To fill in the rest of the table select the cells B9:E9
and drag them down.

c) The proportion of people with blond hair that have green eyes is 0.125984252

Task 5. At the moment the table probably contains numbers with far too many decimal places, let’s change
the format from proportion to Percentage and fix the decimal place problem at the same time.
3/4
KMA153 - Data Handling and Statistics 1 Week 1

Select cells B9:E12. Go to the Home tab and pick percentage from the list of options in the Number panel.
This should give 2 decimal places.

The rows should now sum to 100% - check that they do.

Task 6. Now we are going to explore a few of the graphing options in Excel for making bar charts.

Select cells A1:E5. Go to the Insert tab and pick the Column option from the range of chart types. There are
many chart sub-types to choose from.

Try out the side-by-side 2D bar chart (first option) and a 3D bar chart.

d) Do you prefer the 2D or the 3D bar chart? Or do you find it easier just to look at the table of
numbers?

Task 7.
e) What is the difference between the two types of stacked bar chart (top row 2nd along top row third
along)?

Task 8. In general, Excel’s default formatting is pretty awful.


f) Use the formatting options to try and make a chart that you’d be happy to put in a report.

We’ll talk more about how to make effective tables and figures in the lectures.

For an example of CHARTJUNK see ‘ChartJunk’ sheet in the HairAndEyeColor datafile. This is NOT a
style that you should aim to emulate in your report!

Now that you have completed the week 1 lab have a go at the
practice quiz on MyLO to check your answers. Note that this
does not form part of your final grade.

4/4

You might also like