Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATH 121 BAIC PROBABILITY& STATISTICS Spring 2017-2018 Homework assignment 1-2 C

ID: 3057389 • Letter: M

Question

MATH 121 BAIC PROBABILITY& STATISTICS Spring 2017-2018 Homework assignment 1-2 CHAPTER 2 Part2: Descriptive Statistics-Quantitative (Numeric) Q4. Suppose a sample of 20 hotels and their quality services and their star ratings in Kuwait was collected as the following: Hotel Rating in star Hotel Rating in star Excellent Very Good 4 12 Good Excellent Very Good4 Very Good 3 Very Good 3 16 Very Good4 Very Good 4 Very Good 4 18 Excellent Develop a cross tabulation for the data with quality services and hotel.

Explanation / Answer

Cross Tabulation of the data is as follows

This can be done in R as follows

xtabs(~Quality, data=hotel_quality)

where hotel_quality is the dataframe where the data is stored with columns Hotel, Quality and Rating in star.

Quality Excellent Good Very Good No. of Hotels 4 9 7