STK110 - Practical 1 - 2024

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

STK110 Practical 1 2024

Instructions for all practicals


 In order to complete an attempt in the allocated time, you will need to prepare properly
before opening an attempt. Work through each of the case studies and make sure that you
have mastered the techniques involved. You should also understand your results and be
able to interpret them.
 You will be allowed a limited number of attempts for each practical, each with a fixed time
limit. The best attempt will count. Each attempt will contain different questions.
 Each attempt needs to be done in one sitting, in other words, you cannot save and continue
later. Should you exit the attempt before entering all your answers, you will be unable to
complete the attempt and will have to start a new attempt. It is your responsibility to not
submit an empty/incomplete attempt and no additional attempts will be provided.
 You need to complete your practical on a computer (desktop or laptop) NOT a phone or
tablet. Use Google Chrome or Mozilla FireFox. DO NOT use Internet Explorer as your
assignment may not open correctly in this browser.

Overview of the “Daytrips” dataset


For this practical you will be using sample data obtained by STATS SA in 2017 through the
Domestic Tourism survey. The dataset (Daytrips.xlsx) contains information related to individuals
who have taken day trips in the past three months, their households and living conditions, as well
as information related to their most recent day trip. The original dataset (in coded format) can be
downloaded from http://nesstar.statssa.gov.za:8282/webview/. However, the dataset has already
been decoded with irrelevant variables and observations removed. The Daytrips.pdf document on
MindTap/ClickUP contains descriptions of the variables found in the dataset. A few things to take
note of:
 Only respondents who made at least one day trip in the three months prior to taking part in
the survey are included in the dataset.
 A day trip is defined as a trip where the respondent travelled further than 40km from their
home.
 Some of the respondents left some of the questions unanswered.

Objectives
In this practical you will be expected to apply the theory learned in STK110 to a dataset in Excel in
terms of
 graphical and tabular representations of data, and
 the interpretation of the above.

Functions and tools included in this practical


In this practical you may be expected to make use of the following functions/tools.
PivotTable tool Chart tool Histogram tool
CORREL COVARIANCE.S

1
STK110 Practical 1 202 4
Instructions
• Submit your solutions on ClickUP before Friday, 08 March 2024, 16:00. No late
submissions will be possible or accepted.
• You will be allowed three attempts. Only the best attempt will count.
• You will be allowed 60 minutes to complete an attempt.

Case Study 1: Crosstabulations


We would like to investigate the relationship between a respondent’s type of dwelling (column J)
and whether or not they have access to a home/landline telephone (column U). This can be done
by setting up a crosstabulation using Excel’s PivotTable tool. The result is shown below:

Hints:
 Click on any cell in the original dataset, then click on Insert -> PivotTable. The entire
dataset should be selected automatically to be included in the PivotTable. You can then
drag the required variables to the rows, columns and values boxes. This procedure is
explained in Section 2.1 of your Practical Guide.
 The order of your columns and rows can be changed by right-clicking on the relevant
column/row and selecting the appropriate “Move” option.
 Blank responses can be filtered out if required, leading to the output below:

What will be expected of you on ClickUP?


You will be provided with 2 variables to use in your crosstabulation. Use this to:
 complete the crosstabulation on ClickUP, and
 answer questions on ClickUP based on the results of your crosstabulation.

2
Case Study 2: Scatter plots and Trendlines
Use the guidelines given in Section 2.5 of your Practical Guide to set up the scatter plot below.

We would like to investigate a possible relationship between the amount of money spent on land
transport (column BQ) and on shopping (column BW) during a day trip. Place shopping on your
horizontal axis and land transport on the vertical axis (see hints below).

Calculate the covariance and correlation between these two variables and check that your
answers correspond to the values below.
 Covariance: 42972.88
 Correlation: 0.11209

Hints:
 If you highlight land transport and shopping and insert a scatter plot, Excel will automatically
place land transport on the horizontal axis and shopping on the vertical axis. This happens
because the land transport column occurs first in the Excel sheet. To place land transport
on the horizontal axis, copy both columns into a new sheet, but paste shopping in the first
column and land transport in the second. When you now highlight these new columns and
insert the scatter plot, shopping will be on the horizontal axis.
 When you insert your trendline, select the boxes to display the equation of the trendline as
well as the 𝑅 value on the chart.

What will be expected of you on ClickUP?


You will be provided with 2 variables to use in your scatterplot. Use this to:
 create a scatterplot with appropriate and descriptive labels and titles,
 find the covariance and correlation between these variables, and
 fit a linear trendline to the scatterplot.

3
Case Study 3: Histograms
Section 2.4 of your Practical Guide outlines the steps for setting up a histogram using the
Histogram tool. A tutorial video for the histogram tool is provided on ClickUP.

We would like to investigate the amount of money spent in land transport (column BQ) during a
day trip. Start the intervals for your histogram at 0 with the last interval having an upper
limit of 600 and classes having a width of 50.

Steps:
1. Copy the entire column into a new sheet. To highlight the entire column, place the curser
over the column label (BQ) and a black arrow pointing down will appear. Now click and then
copy the data. Create a new worksheet, click in the first cell and paste the data here.
2. Create a column for the class limits (typically called bin values).
3. Select Data Analysis in the Data Ribbon and select the Histogram tool.

4. Select the data and class limits and indicate where the output needs to be placed. Also
indicate that a chart should be created. In the screenshot below, note that
 The entire column A has been selected as input. It is much faster to select the entire
column than to select the data itself (all empty cells will be ignored).
 Only the cells containing the “Bin” values should be selected, not the entire column.
Selecting the entire column of “Bin” values may lead to your computer crashing.
 If the columns have titles, it is important to select the Labels box. An error will occur
if this is not done.

4
The histogram obtained through this process is shown below:

A histogram should not have gaps between the different bars, so close these by right clicking on
any of the bars, selecting Format Data Series... and setting the gap width to 0%.

Note that the histogram should have an appropriate, descriptive title and labels.

What will be expected of you on ClickUP?


You will be provided with a variable to use in your histogram. Use this to:
 create a histogram with appropriate and descriptive labels and titles,
 identify the distribution shape of the data based on the histogram, and
 answer questions on ClickUP based on your histogram.

You might also like