10.7 LAB: Kruskal-Wallis test using kruskal() The purpose.csv file…

Question Answered step-by-step 10.7 LAB: Kruskal-Wallis test using kruskal() The purpose.csv file… 10.7 LAB: Kruskal-Wallis test using kruskal() The purpose.csv file contains data on the number of visitors to Taiwan classified by purpose of the visit. The columns of interest are Business, Pleasure, and Visit_Relatives.Read the file purpose.csv into a data frame.Assign the columns Business, Pleasure, and Visit_Relatives to the variables x, y, and z.Use kruskal() to perform a Kruskal-Wallis test on the variables x, y, and z.Print test statistic and p-value.Ex: If the column Conference is used instead of Visit_Relatives, the output is:H = 2.778622E+03p-value = 0.000000E+00 # import the necessary modulespurpose = # read in purpose.csvx = # assign the column Businessy = # assign the column Pleasurez = # assign the column Visit_RelativesH, p = # perform Kruskal-Wallis test on x, y, and zprint(f’H = {H:.6E}’)print(f’p-value = {p:.6E}’) Computer Science Engineering & Technology Python Programming CIS 461 Share QuestionEmailCopy link Comments (0)