IST ChiSquare Sample
IST ChiSquare Sample
Mechanical engineers testing a new arc welding technique, classified welds both with respect to
appearance and an X-ray inspection
Appearance
Bad Normal Good
X-RAY Bad 20 7 3
Normal 13 51 16
Good 7 12 21
Test for independence using 0.05 level of significance.
To test for independence between appearance and X-ray inspection, we can use a chi-squared test of
independence. The null hypothesis is that the two variables are independent, while the alternative
hypothesis is that they are dependent.
Appearance
Bad Normal Good Row Total
X-RAY Bad 20 7 3 30
Normal 13 51 16 80
Good 7 12 21 40
Column
Total 40 70 40 150
Next, we calculate the expected frequencies under the assumption of independence. To do this, we
calculate the row and column totals and use them to calculate the expected frequencies:
Now, we can calculate the test statistic using χ² = Σ( (Oᵢⱼ - Eᵢⱼ)² / Eᵢⱼ ):
where Oᵢⱼ is the observed frequency and Eᵢ ⱼ is the expected frequency for each cell in the contingency
table.
Finally, we can compare the test statistic to the critical value from the chi-squared distribution with
degrees of freedom (df) equal to (r - 1) x (c - 1), where r is the number of rows and c is the number of
columns. At a 0.05 level of significance and df = 4, the critical value is 9.488.
Since the test statistic (47.87) > (9.488), we reject the null hypothesis and conclude that there is
evidence of dependence between appearance and X-ray inspection at the 0.05 level of significance.
Therefore, appearance and X-ray inspection are not independent of each other.
Calculate the two regression equations on X on Y and Y on X from the data given below, taking
deviations from a actual means of X and Y
Price (Rs) 10 12 13 12 16 15
Amount Demanded 40 38 43 45 37 43
To calculate the regression equations, we need to first calculate the mean and deviations of X and Y:
Price (X) Deviation from mean (X) Amount Demanded (Y) Deviation from mean (Y)
10 -3 40 -1
12 -1 38 -3
13 0 43 2
12 -1 45 4
16 3 37 -4
15 2 43 2
Regression equation of Y on X:
The formula for the regression equation of Y on X is: Y = a + bX, where a is the intercept and b is the
slope of the regression line.
Using the above formulae, we can calculate the slope and intercept of the regression line:
b = (-3*-1) + (-1*-3) + (0*2) + (-1*4) + (3*-4) + (2*2) / (-3²) + (-1²) + (0²) + (-1²) + (3²) + (2²)
b = -6 / 24
b = -0.25 (approx)
a = 41 - (-0.25 * 13)
a = 44.25
Regression equation of X on Y:
The formula for the regression equation of X on Y is: X = a + bY, where a is the intercept and b is the
slope of the regression line.
Using the above formulae, we can calculate the slope and intercept of the regression line:
b = (-3*-1) + (-1*-3) + (0*2) + (-1*4) + (3*-4) + (2*2) / (-1²) + (-3²) + (2²) + (4²) + (-4²) + (2²)
b = -6 / (50)
b = -0.12 (approx)
a = 13 - (-0.12 * 41)
a = 17.92