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

Managerial Computing Lab Manual

Uploaded by

Yash Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Managerial Computing Lab Manual

Uploaded by

Yash Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Managerial Computing Lab Manual

Experiment 1: SPSS Introduction


SPSS, which stands for "Statistical Package for the Social Sciences," is a software application
widely used for statistical analysis, data management, and data visualization. It was initially
developed by Norman H. Nie, C. Hadlai "Tex" Hull, and C. Willard "Bill" Horton in 1968. Over
the years, it has become one of the most popular tools for researchers, statisticians, social
scientists, and other professionals who work with data analysis.

SPSS provides a user-friendly graphical interface that allows users to perform a wide range of
tasks, including:

➢ Data Entry and Management: SPSS facilitates the entry of data from various sources,
such as surveys, questionnaires, or databases. It offers tools for data cleaning,
transformation, and organization.
➢ Descriptive Statistics: Users can generate summary statistics, such as means, medians,
standard deviations, and frequencies, to gain an initial understanding of their data.
➢ Inferential Statistics: SPSS offers a broad array of statistical tests to analyze relationships
between variables, compare groups, and make predictions. These tests include t-tests,
ANOVA, chi-square tests, correlation analysis, regression analysis, and more.
➢ Data Visualization: The software enables the creation of various types of graphs and
charts, such as bar charts, histograms, scatterplots, and pie charts. These visualizations
help to present data patterns and trends.
➢ Reporting: SPSS allows users to generate customized reports that include both statistical
results and visualizations. These reports can be exported to different formats for sharing
with others.
➢ Advanced Analysis: Beyond basic statistics, SPSS can handle more complex analyses
such as factor analysis, cluster analysis, and survival analysis.
➢ Integration with Other Software: SPSS can import and export data in various formats,
making it compatible with other data analysis tools and statistical software.
➢ Syntax Language: For advanced users, SPSS provides a syntax language that allows you
to write scripts to automate repetitive tasks and perform complex analyses. This is
particularly useful for reproducibility and efficiency.

SPSS has two main views to manage and manipulate data: Data View and Variable View.

Data View:

The Data View is where you can see your actual data. Each row in the view represents a case (or
observation), and each column represents a variable. In this view, you can enter or edit data, as
well as sort and filter cases. You can also select which variables to include in your analysis.

Variable View:

The Variable View is where you define and modify variables in your dataset. In this view, you
can specify the variable name, label, type, and format. You can also assign values and missing
values, define variables as categorical or continuous, and specify measurement level (nominal,
ordinal, interval, or ratio). Additionally, you can specify variable role, such as whether it is an
independent or dependent variable, or a factor variable.
Some common terms in Variable View include:

✓ Name: The variable name is used to refer to the variable in syntax or analysis commands.
Variable names must begin with a letter and can contain up to 64 characters.
✓ Label: The label is a descriptive name for the variable, which can help to identify its
meaning and purpose. Labels can contain up to 255 characters.
✓ Type: The variable type defines how the data is stored and analyzed. SPSS supports
various types, including numeric, string, date, and time.
✓ Width: The width is the maximum number of characters that can be stored for a variable.
✓ Decimals: Decimals specify how many decimal places to display for numeric variables.
✓ Values: Values define the possible values for categorical variables. Each value is
associated with a label, which provides a descriptive name for the value.
✓ Missing values: Missing values indicate that data is missing for a variable. You can
define various types of missing values, such as system missing, user-defined missing, or
range of missing values.

By using both views effectively, you can manage and manipulate your data effectively in SPSS.
Experiment 2: Scatter Plot

A scatter plot is a type of data visualization that uses individual data points to display the
relationship between two continuous variables. It helps you understand the correlation or trend
between these variables. Each data point on the scatter plot represents the values of both
variables for a single observation. In SPSS, you can create scatter plots using the "Graphs" menu
and the "Legacy Dialogs" option (as of my last update in September 2021). Here's how you can
create a scatter plot using SPSS:

✓ Load Data: Open your dataset in SPSS.

✓ Navigate to the Graphs Menu: Go to "Graphs" in the main menu at the top of the SPSS
window.
✓ Select Legacy Dialogs: From the "Graphs" menu, choose "Legacy Dialogs."

✓ Choose Scatter/Dot: Within "Legacy Dialogs," select "Scatter/Dot."

✓ Select Simple Scatter: Choose "Simple Scatter" and click "Define."

✓ Specify Variables: In the "Define Simple Scatter plot" dialog box, you'll see two sections:
"Y-Axis" and "X-Axis." In the "Y-Axis" section, select the dependent variable (the one
you want to plot on the vertical axis). In the "X-Axis" section, select the independent
variable (the one you want to plot on the horizontal axis).

✓ Customize Options (Optional): You can customize the appearance of the scatter plot by
clicking the "Options" button in the "Define Simple Scatter plot" dialog. Here, you can
choose to include labels, reference lines, fit lines, etc.

✓ Create the Scatter Plot: After selecting your variables and optionally customizing the
options, click "OK" to create the scatter plot.

✓ View and Save: The scatter plot will be generated in a separate output window. You can
view it, modify it further if needed, and then save it in different formats (e.g., image files,
PDF) for use in reports or presentations.

Experiment 2.1: The table shows the charge (£) by plumbers for jobs of different duration
(hours). Plot the data on the scatter Plot. (Excel & SPSS)

Given Dataset with two attributes:


Job Duration and Charge.
Solution 2.1:
2.1.a (Excel)

(Excel Generated Solution)


(Scatter Plot: Excel)

2.1.b (SPSS)

(SPSS Generated Solution)


(Scatter Plot: SPSS)

Interpretation: There is positive correlation between job duration and charge.

Experiment 2.2: The table below shows information about the monthly rent of an
apartment and the distance of the apartment from a city centre, in miles. Plot the data on
the scatter Plot. (Excel & SPSS)
Solution 2.2:
2.2.a (Excel)

(Scatter Plot: Excel)

2.2.b (SPSS)
(SPSS Generated Solution)
(Scatter Plot: SPSS)

Interpretation: There is negative correlation between distance and monthly rent.

Experiment 3: Calculate Karl Pearson's coefficient of correlation for the following series:

Price (in ) : 10,11, 12, 13, 14, 15, 16, 17, 18, 19
Demand (in kgs): 420, 410, 400, 310, 280,260, 240, 210, 210, 200
(Excel Generated Solution)
(Excel Generated Solution)
(SPSS)

Correlations

Price (in Rs.) Demand (in Kgs)

Price (in Rs.) Pearson Correlation 1 -.962**

Sig. (2-tailed) .000

N 10 10

Demand (in Kgs) Pearson Correlation -.962** 1

Sig. (2-tailed) .000

N 10 10

**. Correlation is significant at the 0.01 level (2-tailed).


(SPSS Generated Solution)

Experiment: 4: Discuss hypothesis testing in detail.


Hypothesis: A hypothesis is an assumption that is made based on some evidence. This is the
initial point of any investigation that translates the research questions into predictions. It includes
components like variables, population and the relation between the variables. A research
hypothesis is a hypothesis that is used to test the relationship between two or more variables.

Characteristics of Hypothesis:

✓ The hypothesis should be clear and precise to consider it to be reliable.

✓ If the hypothesis is a relational hypothesis, then it should be stating the relationship

between variables.

✓ The hypothesis must be specific and should have scope for conducting more tests.

✓ The way of explanation of the hypothesis must be very simple and it should also be

understood that the simplicity of the hypothesis is not related to its significance.

Parametric and nonparametric tests are two types of statistical tests used to analyze data and

make inferences about populations. The choice between these two types of tests depends on the

characteristics of your data and the assumptions you're willing to make. Here's an overview of

both:

Parametric Tests:

Parametric tests make certain assumptions about the underlying distribution of the data, typically

assuming that the data follows a specific distribution (usually the normal distribution). These

tests are more powerful when their assumptions are met, but they can be sensitive to violations of

those assumptions.

✓ t-Test: Used to compare means of two groups. There are variations like the independent

samples t-test and paired samples t-test.


✓ Analysis of Variance (ANOVA): Used to compare means of more than two groups. One-

way ANOVA is used for a single factor, while two-way ANOVA is used for two factors.

✓ Linear Regression: Assesses the relationship between a dependent variable and one or

more independent variables.

✓ F-test: Used to compare variances between two or more groups.

✓ Z-test: Similar to the t-test, but used when the population parameters are known and the

sample size is large.

Nonparametric Tests:

Nonparametric tests make fewer assumptions about the distribution of the data, and they are

often used when the data does not meet the assumptions of parametric tests. These tests are

generally less powerful but are more robust to deviations from assumptions.

✓ Mann-Whitney U Test: Nonparametric equivalent of the independent samples t-test.

✓ Wilcoxon Signed-Rank Test: Nonparametric equivalent of the paired samples t-test.

✓ Kruskal-Wallis Test: Nonparametric equivalent of one-way ANOVA.

✓ Mood's Median Test: Used to compare medians of two or more groups.

✓ Friedman Test: Nonparametric equivalent of two-way ANOVA for repeated measures.

✓ Chi-Square Test: Used for categorical data analysis, such as comparing observed and

expected frequencies in contingency tables.

✓ Kolmogorov-Smirnov Test: Used to assess whether a sample comes from a specific

distribution.

It's important to choose the right test based on the nature of your data and the research question

you're trying to answer. If your data meet the assumptions of parametric tests, they generally
provide more statistical power. However, if your data violate these assumptions or if you're

dealing with non-numerical data, nonparametric tests are often more appropriate. Always

consider the context and characteristics of your data before selecting a test.
(Applying Hypothesis Testing in SPSS)
(Applying Non- Parametric Hypothesis Testing in SPSS)

Experiment 5: Discuss Chi-Square Test in detail.

Solution 5: The chi-square (χ²) test is a statistical test used to analyze categorical data and
determine whether the observed distribution of frequencies in different categories is significantly
different from the expected distribution. It's often used to test the association or independence
between categorical variables. The test is based on comparing the observed frequencies in a
contingency table to the frequencies that would be expected under a null hypothesis of no
association or independence.

Contingency Table: A contingency table, also known as a cross-tabulation or a two-way table,


is a table that displays the frequency distribution of two or more categorical variables. The table
shows how the categories of one variable are distributed across the categories of another
variable.

Calculating Expected Frequencies:

Under the null hypothesis of independence, you calculate the expected frequencies for each cell
in the contingency table. The expected frequency for a cell is calculated by multiplying the row
total and the column total for that cell and then dividing by the overall total sample size.

Expected Frequency = (Row Total) × (Column Total) / (Total Sample Size)

Calculating the Test Statistic:

The chi-square test statistic is calculated using the formula:

χ² = Σ [(Observed Frequency - Expected Frequency)² / Expected Frequency]

Here, the sum is taken over all cells in the contingency table.

Degrees of Freedom:
The degrees of freedom for the chi-square test are calculated as (r - 1) × (c - 1), where r is the
number of rows in the table and c is the number of columns.

Critical Value or P-value:


Once you have calculated the chi-square test statistic, you can compare it to a critical value from
the chi-square distribution with the appropriate degrees of freedom. Alternatively, you can use
software to calculate the p-value associated with the test statistic. If the p-value is below a certain
significance level (e.g., 0.05), you reject the null hypothesis in favor of the alternative
hypothesis, indicating that there is a significant association between the variables.

Experiment 6: Suppose you wish to classify defects in the furniture produced by a


manufacturing plant based on the type of defects and the production shift. A total of 390
furniture defects were recorded, and the defects were classified as one of four types A, B, C, and
D. At the same time, each piece of defected furniture was identified according to the production
shift.

Solution 5:
(Excel Generated Solution)
(SPSS Generated Solution)

Result : As the P-value (0.004) is less than the standard alpha value of 0.05 it can be concluded
that the null hypothesis is rejected.

Experiment 7: Discuss LPP in detail.


Solution 7: LPP stands for "Linear Programming Problem." It's a mathematical optimization
technique used to find the best possible outcome in a given mathematical model with linear
relationships. In a linear programming problem, you have a set of variables that you want to
optimize (maximize or minimize) while adhering to a set of linear constraints.

The general form of a linear programming problem can be stated as follows:

Objective Function: Maximize or minimize a linear combination of variables.

Subject to: Linear constraints, which are inequalities or equations that the variables must satisfy.

Variables: The quantities that you can adjust to optimize the objective function.

Linear programming is widely used in various fields, including economics, engineering,


operations research, logistics, and more. It's an effective tool for making decisions in situations
where there are limited resources and various constraints. The Simplex algorithm is one of the
most common methods used to solve linear programming problems and find the optimal
solution.

Experiment 8: LPP numerical problem write any two from PPT attached.

SEE ATTACHEMENT

Experiment 9: Regression PPT attached write from there.

SEE ATTACHEMENT

You might also like