0% found this document useful (0 votes)
23 views

Tutorial 02 WK 3 - Pivot Tables - Simple Linear Regression

Uploaded by

Dino. W
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Tutorial 02 WK 3 - Pivot Tables - Simple Linear Regression

Uploaded by

Dino. W
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

UCCB 3133, UCCG 3133 Business Analytics

(June 2023)

UNIVERSITI TUNKU ABDUL RAHMAN


FACULTY OF INFORMATION COMMUNICATIONS AND TECHNOLOGY
ACADEMIC YEAR 2023

UCCB 3133, UCCG 3133 - BUSINESS ANALYTICS

Tutorial 2 (Week 3 - Statistics for BA + Simple Linear Regression) - SUGGESTED


Activities / Answers

Activity 1:

Pivot Tables in EXCEL

 A cross-tabulation in Microsoft Excel is known as a PivotTable.


 To create a PivotTable in Excel, we follow these steps:
 Step 1. Click the INSERT tab on the Ribbon
 Step 2. Click PivotTable in the Tables group
 Step 3. When the Create PivotTable dialog box appears:
 Choose Select a Table or Range
 Enter A1:D301 in the Table/Range: box

1
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)
 Select New Worksheet as the location for the PivotTable Report
 Click OK
 The resulting initial PivotTable Field List and PivotTable Report are shown in Figure 3.9.

 The following steps show how to use Excel’s PivotTable Field List to assign the Quality
Rating field to the rows, the Meal Price ($) field to the columns, and the Restaurant field to
the body of the PivotTable report.
 Step 4. In the PivotTable Fields area, go to Drag fields between areas
below:
 Drag the Quality Rating field to the ROWS area
 Drag the Meal Price ($) field to the COLUMNS area
 Drag the Restaurant field to the VALUES area
 Step 5. Click on Sum of Restaurant in the VALUES area
 Step 6. Select Value Field Settings from the list of options
 Step 7. When the Value Field Settings dialog box appears:
 Under Summarize value field by, select Count
 Click OK

 Figure 3.10 shows the completed PivotTable Field List and a portion of the PivotTable
worksheet as it now appears.
 To complete the PivotTable, we need to group the columns representing meal prices and
place the row labels for quality rating in the proper order:
- Step 8. Right-click in cell B4 or any cell containing a meal price column label
- Step 9. Select Group from the list of options
- Step 10. When the Grouping dialog box appears:
- Enter 10 in the Starting at: box
- Enter 49 in the Ending at: box
- Enter 10 in the By: box Click OK
- Step 11. Right-click on “Excellent” in cell A5
- Step 12. Select Move and click Move “Excellent” to End

2
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)

 We can also use a PivotTable to create percent frequency distributions, as shown in the
following steps:
- Step 1. Click the Count of Restaurant in the VALUES area
- Step 2. Select Value Field Settings… from the list of options
- Step 3. When the Value Field Settings dialog box appears, click the tab for Show
Values As
- Step 4. In the Show values as area, select % of Grand Total from the drop-down
menu
- Click OK
Figure 3.12 displays the percent frequency distribution for the Restaurant data as a Pivot-Table

 We can easily modify the PivotTable in Figure 3.11 to display summary information on wait
times instead of meal prices.
- Step 1. Click the Count of Restaurant field in the VALUES area
- Select Remove Field
- Step 2. Drag the Wait Time (min) to the VALUES area
- Step 3. Click on Sum of Wait Time (min) in the VALUES area
- Step 4. Select Value Field Settings… from the list of options
- Step 5. When the Value Field Settings dialog box appears:
- Under Summarize value field by, select Average
- Click Number Format
- In the Category: area, select Number
- Enter 1 for Decimal places:

3
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)
- Click OK
- When the Value Field Settings dialog box reappears, click OK

Activity 2:

Recommended Pivot Table (Excel)

 Excel also has the ability to recommend PivotTables for your data set. To illustrate
Recommended PivotTables in Excel, we return to the restaurant data in Figure 3.8. To
create a Recommended PivotTable, follow the steps below using the file Restaurant
- Step 1. Select any cell in table of data (for example, cell A1)
- Step 2. Click the Insert tab on the Ribbon
- Step 3. Click Recommended PivotTables in the Tables group
- Step 4. When the Recommended PivotTables dialog box appears:
- Select the Count of Restaurant, Sum of Wait Time (min), Sum of Meal
- Price ($) by Quality Rating option (see Figure 3.14)
- Click OK

4
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)

 The Recommended PivotTables tool in Excel is useful for quickly creating commonly used
PivotTables for a data set, but note that it may not give you the option to create the
Displaying the sum of wait times and the sum of meal prices within each quality-rating
category, as shown in Figure 3.15, is not particularly useful here; the average wait times
and average meal prices within each quality-rating category would be more useful to us.

 But we can easily modify the PivotTable in Figure 3.14 to show the average values by
selecting any cell in the PivotTable to invoke the PivotTable Fields task pane, clicking on
Sum of Wait Time (min) and then Sum of Meal Price ($), and using the Value Field
Settings… to change the Summarize value field by option to Average. The finished
PivotTable is shown in Figure 3.16.

Activity 3:

PivotCharts in EXCEL

5
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)

 To summarize and analyze data with both a crosstabulation and charting, Excel pairs
PivotCharts with PivotTables. Using the restaurant data introduced in Table 3.7 and Figure
3.7, we can create a PivotChart by taking the following steps:
 Step 1. Click the INSERT tab on the Ribbon
 Step 2. In the Charts group, choose PivotChart
 Step 3. When the Create PivotChart dialog box appears:
 Choose Select a Table or Range
 Enter A1:D301 in the Table/Range: box
 Choose New Worksheet as the location for the PivotTable
Report
 Click OK

 Step 4. In the PivotChart Fields area, under Choose fields to add to


report:
 Drag the Quality Rating field to the AXIS (CATEGORIES)
area
 Drag the Meal Price ($) field to the LEGEND (SERIES) area
 Drag the Wait Time (min) field to the VALUES area
 Step 5. Click on Sum of Wait Time (min) in the Values area
 Step 6. Click Value Field Settings… from the list of options that appear

 Step 7. When the Value Field Settings dialog box appears:


 Under Summarize value field by, choose Average
 Click Number Format,
 In the Category: box, choose Number
 Enter 1 for Decimal places:
 Click OK
 When the Value Field Settings dialog box reappears, click
OK
 Step 8. Right-click in cell B2 or any cell containing a meal price column
label
 Step 9. Select Group from the list of options that appears

 Step 10. When the Grouping dialog box appears:


 Enter 10 in the Starting at: box
 Enter 49 in the Ending at: box
 Enter 10 in the By: box
 Click OK
 Step 11. Right-click on “Excellent” in cell A5
 Step 12. Select Move and click Move “Excellent” to End

6
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)

Activity 4:

Linear Regression (TRAVEL TIME (Y-axis) and MILES TRAVELLED (X-axis))

Using Excel’s Regression Tool to Develop the Estimated Single and Multiple
Regression Equation.

The following steps describe how to use Excel’s Regression tool to compute the estimated regression
equation using the data in the worksheet.

To perform the single linear regression for TRAVEL TIME (Y-axis) and MILES TRAVELLED (X-
axis), perform the following :

Step 1. Click the Data tab in the Ribbon


Step 2. Click Data Analysis in the Analysis group
Step 3. Select Regression from the list of Analysis Tools in the Data Analysis tools box (shown in
Figure 7.11) and click OK
Step 4. When the Regression dialog box appears (as shown below):
Enter D1:D301 in the Input Y Range: box
Enter B1:B301 in the Input X Range: box
Select Labels
Select Confidence Level:
Enter 99 in the Confidence Level: box
Select New Worksheet Ply:
Click OK

7
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)

Note : Display and interpret the scatter chart.

Activity 5:

Linear Regression (TRAVEL TIME (Y-axis) and No. DELIVERIES (X-axis))

(Data file : ButlerWithDeliveries )

Step 1. Click the Data tab in the Ribbon


Step 2. Click Data Analysis in the Analysis group
Step 3. Select Regression from the list of Analysis Tools in the Data Analysis tools box (shown in
Figure 7.11) and click OK
Step 4. When the Regression dialog box appears:
Enter D1:D301 in the Input Y Range: box
Enter C1:C301 in the Input X Range: box
Select Labels
Select Confidence Level:
Enter 99 in the Confidence Level: box
8
UCCB 3133, UCCG 3133 Business Analytics
(June 2023)
Select New Worksheet Ply:
Click OK

Note : Display and interpret the scatter chart.

You might also like