Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem B [50 Marks]: Consider the following data given in Tables 1 and 2: Answer the following questions: use python please, and I need answers

Problem B [50 Marks]: Consider the following data given in Tables 1 and 2: Answer the following questions:

use python please, and I need answers as text not photos so I can copy the cod

image text in transcribed

B-1. List all the variables shown in Table 1. What is the use of Table 2's data? (Print output in two separate lines) (5 marks)

B-2. Classify the variables in Table 1 into field types (5 marks)

B-3. Classify the variables in Table 1 into the following terminology: Independent and dependent variables. (5 marks)

B-4. Draw the histogram for Day. Name the x-axis label Days, y-axis label Count and title Histogram for Days. (5 marks)

# Answers to B-4 %matplotlib inline # %matplotlib notebook Day = ['Thur','Sun', 'Sun', 'Sat','Sat','Sun', 'Sun','Thur','Sun', 'Sun','Thur','Sun','Sat','Sun']

B-5. From the Day's histogram, on which day waiters gets most frequent tips? (2 marks)

B-6. Draw the pie chart for Size. Print the data labels consisting of percentages (one decimal place) along with counts in parentheses. For example, 10.9% (12). Moreover, calculate the mode of Size? (6 marks)

# Answers to B-6 Size = ['2', '2', '3', '3', '2', '4', '4', '4', '2', '2', '2', '4', '2', '4']

B-7. Find the mean, median, and mode for the Tip with three decimal places. Then, crosscheck the results using manual calculations. (5 marks) ISE-291: Homework 01 Page 5 of 6

# Answers to B-7

Tip = [2, 1.01, 1.66, 3.5, 3.31, 3.61, 4.71, 3.12, 1.96, 3.23, 1.71, 5, 1.57, 3]

B-8. Find the range, variance, and standard deviation for Total_bill with two decimal places. Crosscheck the results using manual calculations. (6 marks)

# Answers to B-8 Total_bill = [8.77, 16.99, 10.34, 21.01, 23.68, 24.59, 25.29, 26.88, 15.04, 14.78, 10.27, 35.26, 15.42, 18.43]

B-9. Find the 55th and 69th percentiles (i.e., P55 and P69) for Total_bill with two decimal places. (5 marks)

B-10. Draw the box plot for Total_bill. Further, set the title of the plot Box Plot for Total Bill. Moreover, calculate the upper and lower whisker's values and comment on whether there are any outliers.

image text in transcribed

Table 1. Tip Data \begin{tabular}{|ccccccc|} Total bill & Tip & Gender & Smoker & Day & Time & Size \\ \hline 8.77 & 2 & Male & No & Thur & Lunch & 2 \\ 16.99 & 1.01 & Female & No & Sun & Dinner & 2 \\ 10.34 & 1.66 & Male & No & Sun & Lunch & 3 \\ 21.01 & 3.5 & Male & No & Sat & Dinner & 3 \\ 23.68 & 3.31 & Male & Yes & Sat & Dinner & 2 \\ 24.59 & 3.61 & Female & No & Sun & Lunch & 4 \\ 25.29 & 4.71 & Male & No & Sun & Lunch & 4 \\ 26.88 & 3.12 & Male & No & Thur & Dinner & 4 \\ 15.04 & 1.96 & Male & Yes & Sun & Dinner & 2 \\ 14.78 & 3.23 & Male & No & Sun & Dinner & 2 \\ 10.27 & 1.71 & Male & No & Thur & Lunch & 2 \\ 35.26 & 5 & Female & Yes & Sun & Lunch & 4 \\ 15.42 & 1.57 & Male & No & Sat & Dinner & 2 \\ 18.43 & 3 & Male & Yes & Sun & Dinner & 4 \\ \hline \end{tabular} Table 2. Data Description Fields Description Total_bill The bill in dollars Tip The tip in dollars Gender Gender of the bill payer Smoker Whether there were smokers in the party Day The day of the week Time The time of day Size The size of the party B-1. List all the variables shown in Table 1. What is the use of Table 2's data? (Print output in two separate lines) (5 marks) B-2. Classify the variables in Table 1 into field types (5 marks) B-3. Classify the variables in Table 1 into the following terminology: Independent and dependent variables. (5 marks) B-4. Draw the histogram for Day. Name the x-axis label "Days", y-axis label "Count" and title "Histogram for Days". (5 marks) B-5. From the Day's histogram, on which day waiters gets most frequent tips? (2 marks) B-6. Draw the pie chart for Size. Print the data labels consisting of percentages (one decimal place) along with counts in parentheses. For example, 10.9\% (12). Moreover, calculate the mode of Size? (6 marks) B-7. Find the mean, median, and mode for the Tip with three decimal places. Then, crosscheck the results using manual calculations. (5 marks) Page 4 of 6 E-291: Homework 01 B-8. Find the range, variance, and standard deviation for Total_bill with two decimal places. Crosscheck the results using manual calculations. (6 marks) B-9. Find the 55th and 69th percentiles (i.e., P55 and P69) for Total_bill with two decimal places. (5 marks) B-10. Draw the box plot for Total_bill. Further, set the title of the plot 'Box Plot for Total Bill'. Moreover, calculate the upper and lower whisker's values and comment on whether there are any outliers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

Describe how the Kanban concept works.

Answered: 1 week ago