critical_value <-qchisq(p =0.05, # probability (area under curve)df =4, # degrees of freedomlower.tail =FALSE) # calculate boundary where 0.05 is to the rightcritical_value
[1] 9.487729
c. calculating p-value
Code
p_value <-pchisq(q =15.276, # test statisticdf =4, # degrees of freedomlower.tail =FALSE) # calculate probability (area under the curve) to the RIGHT of the test statisticp_value