Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Matthew Abdiel Tabalba

DCPET 2-2

Activity: Hypothesis Testing

Instruction. Conduct hypothesis testing on the given problems.

Problem 1: Manipulate the data on SAMPLE DATAV2 to compute the average of the
three subjects. Does the students’ relationship status affect their average grade? Use a
significance threshold of 0.10.

Step 1: State the null and alternative hypothesis.

Ho : The student’s relationship status does not affect their average


grade
Ha : The student’s relationship status affects their average grade

Step 2: Set the level of significance.

α = 0.10

Step 3: Determine the appropriate test to use.

Test the assumptions: If the data failed to satisfy the assumptions for the parametric
test, use a non parametric test.

Testing the Normality of Data


Use Shapiro Test to verify the Normality of Data

Data Test Used p-value Interpretation

Shapiro-Wilk Test 0.638 The data follows normal distribution.


In a relationship

The data does not follow normal


Single Shapiro-Wilk Test 1.454e-06
distribution.

Test for Homogeneity of Variances


Test Used p-value Interpretation

Levene’s Test 0.3935 Equal variances assumed.


Test: [1 point] Mann-Whitney U Test

Step 4: Determine the p - value. [2 points]


Syntax used: wilcox.test(average_in_a_relationship, average_single, alternative
= "two.sided", conf.level = 0.9, exact = FALSE)
p-value: 0.82

Step 5: Decision Rule [1 point]

- Since p-value (0.82) is greater than the level of significance, we failed to reject the null hypothesis.
Matthew Abdiel Tabalba
DCPET 2-2
Step 6: Draw conclusion. [1 point] - There is no sufficient evidence to conclude that the Relationship
status affects their average grade.

Problem 2: Determine if the students’ subject preference affects their grade in math recorded
in SAMPLE DATAV2.

Step 1: State the null and alternative hypothesis. [2 points]

Ho : The students’ subject preference does not affect their grade in math
Ha : The students’ subject preference affects their grade in math

Step 2: Set the level of significance. [1 point] α

= 0.05

Step 3: Determine the appropriate test to use.

Test the assumptions: If the data failed to satisfy the assumptions for the parametric
test, use non parametric test.

Testing the Normality of Data [3 points each line]

Data Test Used p-value Interpretation

Grade in Math Shapiro-Wilk Test 0.003219 Does not follow normal distribution.

Shapiro-Wilk Test 0.452 Follows normal distribution.


Grade in English

Shapiro-Wilk Test 0.005189 Does not follow normal distribution.


Grade in Science

Test for Homogeneity of Variances [3 points]


Test Used p-value Interpretation

Levene’s Test 0.8153 Equal variances assumed.


Test:[1 point] Kruskal Wallis Test

Step 4: Determine the p - value. [2 points]


Syntax used: kruskal.test(SAMPLE_DATAV2$GRADE_MATH ~ factor(Fav_Subject))

p-value: 0.0171

Step 5: Decision Rule [1 point]

- Since p-value (0.0171) is less than 0.05 level of significance, we reject the null hypothesis.
Matthew Abdiel Tabalba
DCPET 2-2
Step 6: Draw conclusion. [1 point] - There is sufficient evidence to conclude that the students’ subject
preference affects their grade in math.

You might also like