You are on page 1of 32

IT NOTES SEM II

Topics Covered

1. On Excel
 Measure of Central Tendency/ Dispersion
 Correlation
 Assignment Problem (using solver add in and sum product)
 Box and Whisker plot
2. On SPSS
 Handling SPSS sheet
 Data coding/Import of data
 Descriptive Statistics
 Chart Builder
 Correlation
 Frequency tables/cross tabs

Measure of Central Tendency/ Dispersion

You can use the Analysis Toolpak add-in to generate descriptive statistics. For
example, you may have the scores of 14 participants for a test.

I hope you all know to download toolpak go to file options –addins tool pak click
data analysis tool pak and click go
To generate descriptive statistics for these scores, execute the following steps.

1. On the Data tab, in the Analysis group, click Data Analysis.

2. Select Descriptive Statistics and click OK.

3. Select the range A2:A15 as the Input Range.


4. Select cell C1 as the Output Range.
5. Make sure Summary statistics is checked.

6. Click OK.
Result:
You can easily interpret all your measures of central tendency and dispersion.
Interpretation very important.

CALCULATING PEARSON’S R CORRELATION COE

FFICIENT WITH EXCEL

CALCULATING PEARSON’S R CORRELATION COEFFICIENT WITH EXCEL


Use the solver in Excel to find the assignment of persons to tasks that minimizes the total cost.

Formulate the Model

The model we are going to solve looks as follows in Excel.


1. To formulate this assignment problem, answer the following three questions.

a. What are the decisions to be made? For this problem, we need Excel to find out which person to
assign to which task (Yes=1, No=0). For example, if we assign Person 1 to Task 1, cell C10 equals 1. If
not, cell C10 equals 0.

b. What are the constraints on these decisions? Each person can only do one task (Supply=1). Each
task only needs one person (Demand=1).

c. What is the overall measure of performance for these decisions? The overall measure of
performance is the total cost of the assignment, so the objective is to minimize this quantity.

2. To make the model easier to understand, name the following ranges.

3. Insert the following functions.


Explanation: The SUM functions calculate the number of tasks assigned to a person and the number
of persons assigned to a task. Total Cost equals the sumproduct of Cost and Assignment.

Trial and Error

With this formulation, it becomes easy to analyze any trial solution.

For example, if we assign Person 1 to Task 1, Person 2 to task 2 and Person 3 to Task 3, Tasks
Assigned equals Supply and Persons Assigned equals Demand. This solution has a total cost of 147.

It is not necessary to use trial and error. We shall describe next how the Excel Solver can be used to
quickly find the optimal solution.

Solve the Model

To find the optimal solution, execute the following steps.

1. On the Data tab, in the Analyze group, click Solver.

Note: can't find the Solver button? Click here to load the Solver add-in.

Enter the solver parameters (read on). The result should be consistent with the picture below.
You have the choice of typing the range names or clicking on the cells in the spreadsheet.

2. Enter TotalCost for the Objective.

3. Click Min.

4. Enter Assignment for the Changing Variable Cells.

5. Click Add to enter the following constraint.


Note: binary variables are either 0 or 1.

6. Click Add to enter the following constraint.

7. Click Add to enter the following constraint.

8. Check 'Make Unconstrained Variables Non-Negative' and select 'Simplex LP'.

9. Finally, click Solve.

Result:

The optimal solution:


Conclusion: it is optimal to assign Person 1 to task 2, Person 2 to Task 3 and Person 3 to Task 1. This
solution gives the minimum cost of 129. All constraints are satisfied.
CREATING A SCATTERPLOT

OF CORRELATION DATA WITH EXCEL


CREATING A SCATTERPLOT OF CORRELATION DATA WITH EXCEL
f you’re doing statistical analysis, you may want to create a standard box plot to show
distribution of a set of data. In a box plot, numerical data is divided into quartiles, and a box
is drawn between the first and third quartiles, with an additional line drawn along the
second quartile to mark the median. In some box plots, the minimums and maximums
outside the first and third quartiles are depicted with lines, which are often called whiskers.
While Excel 2013 doesn't have a chart template for box plot, you can create box plots by
doing the following steps:

1. Calculate quartile values from the source data set.

2. Calculate quartile differences.

3. Create a stacked column chart type from the quartile ranges.

4. Convert the stacked column chart to the box plot style.

In our example, the source data set contains three columns. Each column has 30 entries
from the following ranges:

 Column 1 (2013): 100–200

 Column 2 (2014): 120–200

 Column 3 (2015): 100–180


 Step 1: Calculate the quartile values

 Step 2: Calculate quartile differences

 Step 3: Create a stacked column chart

 Step 4: Convert the stacked column chart to the box plot style

o Hide the bottom data series

o Create whiskers for the box plot

o Color the middle areas

Step 1: Calculate the quartile values

First you need to calculate the minimum, maximum and median values, as well as the first
and third quartiles, from the data set.

1. To do this, create a second table, and populate it with the following formulas:

Value Formula

Minimum value MIN(cell range)

First quartile QUARTILE.INC(cell range, 1)

Median value QUARTILE.INC(cell range, 2)

Third quartile QUARTILE.INC(cell range, 3)

Maximum value MAX(cell range)

2. As a result, you should get a table containing the correct values. The following
quartiles are calculated from the example data set:
Top of Page

Step 2: Calculate quartile differences

Next, calculate the differences between each phase. In effect, you have to calculate the
differentials between the following:

 First quartile and minimum value

 Median and first quartile

 Third quartile and median

 Maximum value and third quartile

1. To begin, create a third table, and copy the minimum values from the last table
there directly.

2. Calculate the quartile differences with the Excel subtraction formula (cell1 – cell2),
and populate the third table with the differentials.

For the example data set, the third table looks like the following:

Top of Page

Step 3: Create a stacked column chart

The data in the third table is well suited for a box plot, and we'll start by creating a stacked
column chart which we'll then modify.

1. Select all the data from the third table, and click Insert > Insert Column
Chart > Stacked Column.
At first, the chart doesn't yet resemble a box plot, as Excel draws stacked columns by default
from horizontal and not vertical data sets.

2. To reverse the chart axes, right-click on the chart, and click Select Data.

3. Click Switch Row/Column.

Tips:

o To rename your columns, on the Horizontal (Category) axis labels side,


click Edit, select the cell range in your third table with the category names

you want, and click OK.

o To rename your legend entries, on the Legend Entries (Series) side,


click Edit, and type in the entry you want.

4. Click OK.

The graph should now look like the one below. In this example, the chart title has also been
edited, and the legend is hidden at this point.
Top of Page

Step 4: Convert the stacked column chart to the box plot style

Hide the bottom data series

To convert the stacked column graph to a box plot, start by hiding the bottom data series:

1. Select the bottom part of the columns.

Note: When you click on a single column, all instances of the same series are selected.

2. Click Format > Current Selection > Format Selection. The Format panel opens on
the right.

3. On the Fill tab, in the Formal panel, select No Fill.

The bottom data series are hidden from sight in the chart.
Create whiskers for the box plot

The next step is to replace the topmost and second-from-bottom (the deep blue and orange
areas in the image) data series with lines, or whiskers.

1. Select the topmost data series.

2. On the Fill tab, in the Formal panel, select No Fill.

3. From the ribbon, click Design > Add Chart Element > Error Bars > Standard
Deviation.

4. Click one of the drawn error bars.


5. Open the Error Bar Options tab, in the Format panel, and set the following:

o Set Direction to Minus.

o Set End Style to No Cap.

o For Error Amount, set Percentage to 100.

6. Repeat the previous steps for the second-from-bottom data series.

The stacked column chart should now start to resemble a box plot.
Color the middle areas

Box plots are usually drawn in one fill color, with a slight outline border. The following steps
describe how to finish the layout.

1. Select the top area of your box plot.

2. On the Fill & Line tab in Format panel click Solid fill.

3. Select a fill color.

4. Click Solid line on the same tab.

5. Select an outline color and a stroke Width.

6. Set the same values for other areas of your box plot.

The end result should look like a box plot.


ON SPSS

http://academic.udayton.edu/gregelvers/psy216/spss/descript1.htm

(Cntrl and click link)

 Click Graphs > Chart Builder... on the top menu as shown below:

Published with written permission from SPSS Statistics, IBM Corporation.

 You will be presented with the following screen:


Published with written permission from SPSS Statistics, IBM Corporation.

 Under the Gallery Tab ( ), select the Scatter/Dot option and the simple
scatterplot icon (top-left icon). Drag-and-drop this icon into the Chart Preview
Area (as shown by the in the diagram below).
Published with written permission from SPSS Statistics, IBM Corporation.

 You will be presented with the following dialog boxes: Chart Builder and Element
Properties. As you can see, the Chart Preview Area has been populated with a
template of a simple scatterplot.
Published with written permission from SPSS Statistics, IBM Corporation.

 Transfer the independent (predictor) variable, Income, into the "X-Axis?" box, and
the dependent (outcome) variable, Price, into the "Y-Axis?" box within the Preview
Chart Area by drag-and-dropping the variables from the Variables: box.
Published with written permission from SPSS Statistics, IBM Corporation.

 If you wish to change the axis labels, select "X-Axis1 (Point1)" and/or "Y-Axis1
(Point1)" in the Element Properties dialog box and type in the new axis title. Below
we demonstrate changing the X-Axis label from "Income" to "Total Income (US

Dollars)". Remember to click the button after each label change. Repeat
with the Y-Axis by changing the label from "Price" to "Car Purchase Price (US
Dollars)", and again, click the button.
Enter pairs of scores in SPSS using the data editor. Enter each subject’s scores on a
single row. If you only had two variable, enter one variable in the first column and the
other variable in the second column. Once the data are entered, select Correlate from
the Analyze tab and select Bivariate from the Correlate options.
A dialog box will appear listing your variables. In this example, we have two variables.
Most data files would contain a range of variables. Click on the first variable in the dialog
box that you wish to include in your correlation analysis and press the –> to move it into
the Variables box. You could also double click on the variable name to move it into
the Variable box.
Once you have moved the two variables you wish to analyze to the Variables box, click
on OK. By default, the system has selected Pearson and two-tailed significance.
Your output will appear in a separate window. The output shows Pearson’s correlation
coefficient (r=.988), the two-tailed statistical significance (.000 — SPSS does not show
values below .001. In actuality, there is always a chance of error, so you should report
the value as p<.001 if SPSS reports .000), and the number of pairs (N=9).

********************************

You might also like