0% found this document useful (0 votes)
7 views3 pages

Chi-Square Analysis of Programming Language Preferences

The experiment investigates the relationship between computer science students' areas of interest and their preferred programming languages using the Chi-Square test. Results indicate a significant difference in preferences (χ² = 25.053, p = 0.003), leading to the rejection of the null hypothesis and confirming that programming language choices vary by area of interest. This finding emphasizes the importance of aligning programming languages with industry-specific demands.

Uploaded by

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

Chi-Square Analysis of Programming Language Preferences

The experiment investigates the relationship between computer science students' areas of interest and their preferred programming languages using the Chi-Square test. Results indicate a significant difference in preferences (χ² = 25.053, p = 0.003), leading to the rejection of the null hypothesis and confirming that programming language choices vary by area of interest. This finding emphasizes the importance of aligning programming languages with industry-specific demands.

Uploaded by

ridemelikea69
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practical No: 4

Name of Experiment:
Investigating the relationship between students' areas of interest and their preferred
programming languages using the Chi-Square test
Question:
Is there a significant difference in the preferences of programming languages (Python, Java, C++, JavaScript)
among computer science students based on their area of interest (web development, mobile app development,
desktop application development, and embedded systems)? Use Chi-Square test.

Area of Programming Language


Interest Python Java C++ JavaScript
Web 15 10 5 20
Mobile 10 15 10 5
Desktop 5 5 15 10
Embedded 10 5 10 15

Working Expression:
 Chi-Square Test: The Chi-Square Test is a statistical test used to determine if there is a significant association
between two categorical variables. It compares the observed frequencies (actual data) with the expected
frequencies (what we would expect if there were no associations). The test is commonly used in two scenarios:
 Goodness of Fit Test: To see if a sample matches an expected distribution (e.g., rolling a fair die).
 Test of Independence: To check if two categorical variables are independent (e.g., whether gender and voting
preference are related).

The formula for the Chi-Square statistic is:

Where:
 is the observed frequency,
 is the expected frequency.
The result is compared to a critical value from the Chi-Square distribution table to determine statistical significance.

NEW FILE.
DATASET NAME DataSet4 WINDOW=FRONT.
WEIGHT BY Frequency.
CROSSTABS
/TABLES=Area_of_Interest BY Programming_Language
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ
/CELLS=COUNT EXPECTED
/COUNT ROUND CELL.

Crosstabs
Case Processing Summary
Cases
Valid Missing Total
N Percent N Percent N Percent
Web,Mobile,Desktop,Embed 165 100.0% 0 0.0% 165 100.0%
ded * Python,Java,C+
+,JavaScript
Web,Mobile,Desktop,Embedded * Python,Java,C++,JavaScript Crosstabulation
Python,Java,C++,JavaScript
Python Java C++
Web,Mobile,Desktop,Embed Web Count 15 10 5
ded Expected Count 12.1 10.6 12.1
Mobile Count 10 15 10
Expected Count 9.7 8.5 9.7
Desktop Count 5 5 15
Expected Count 8.5 7.4 8.5
Embedded Count 10 5 10
Expected Count 9.7 8.5 9.7
Total Count 40 35 40
Expected Count 40.0 35.0 40.0

Web,Mobile,Desktop,Embedded * Python,Java,C++,JavaScript Crosstabulation


Python,Java,C
++,JavaScript
JavaScript Total
Web,Mobile,Desktop,Embedded Web Count 20 50
Expected Count 15.2 50.0
Mobile Count 5 40
Expected Count 12.1 40.0
Desktop Count 10 35
Expected Count 10.6 35.0
Embedded Count 15 40
Expected Count 12.1 40.0
Total Count 50 165
Expected Count 50.0 165.0

Chi-Square Tests
Asymptotic
Significance (2-
Value df sided)
Pearson Chi-Square 25.053 a
9 .003
Likelihood Ratio 25.945 9 .002
Linear-by-Linear Association 1.447 1 .229
N of Valid Cases 165

a. 0 cells (0.0%) have expected count less than 5. The minimum


expected count is 7.42.
RESULT AND CONCLUSION:
The Chi-Square test results (χ² = 25.053, df = 9, p = 0.003) indicate a significant difference in programming language
preferences among computer science students based on their area of interest. Since p < 0.05, we reject the null hypothesis,
confirming that students' language choices vary across web development, mobile apps, desktop applications, and embedded
systems. This insight highlights the alignment of programming languages with industry-specific demands.

Submitted by: Submitted to:


Name: Niraj Ghale Sagar Gautam
Faculty: BSc. CSIT, 3rd Sem Department of Information Technology
Roll No.: 18

You might also like