12
.png
keyboard_arrow_up
School
American Military University *
*We aren’t endorsed by this school
Course
302
Subject
Computer Science
Date
Dec 6, 2023
Type
png
Pages
1
Uploaded by KidBatPerson945
Question
12
1/
1
point
An
electronics
store
has
4
branches
1n
a
large
city.
They
are
curious
if
sales
in
any
particular
department
are
different
depending
on
location.
They
take
a
random
sample
of
4
purchases
throughout
the
4
branches
—
the
results
are
recorded
below.
Run
an
independence
test
for
the
data
below
at
the
0.05
level
of
significance.
Appliances
™V
Computers
|
Cell
Phones
Branch
1
56
28
63
24
Branch
2
-
22
55
27
Branch
3
53
17
49
33
Branch
4
51
31
66
29
Enter
the
P-Value
-
round
to
4
decimal
places.
Make
sure
you
put
a
0
in
front
of
the
decimal.
Answer:
0.6099
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
One hundred students were asked whether they had taken courses in any of the three
subjects, Mathematics, Computer Science and Information Technology. The results
were given below. 45 had taken Mathematics; 18 had taken Mathematics and Computer
Science; 38 had taken Computer Science; 21 had taken Information Technology; 9 had
taken Mathematics and Information Technology.; 4 had taken Computer Science and
Information Technology and 23 had taken no courses in any of the subjects. Draw a
Venn diagram that will show the results of the survey.
arrow_forward
4, Use the given data to classify the record below using the k-NN algorithm for k=1 to 5.
Loan Purpose
Checking
Savings
Months
Customer
Months
Employed
Repairs
0
900
25
4
Complete the table below for the nearest neighbors and for the classification of the new record for each value of k.
k
Distance
Classification
1
enter your response here
▼
High
Low
Tie
2
enter your response here
▼
High
Low
Tie
3
enter your response here
▼
High
Low
Tie
4
enter your response here
▼
Low
High
Tie
5
enter your response here
▼
High
Tie
Low
(Round to four decimal places as needed.)
Loan Purpose
Checking
Savings
Months
Customer
Months
Employed
Credit
Risk
Business
322
578
10
14
Low
New Car
0
821
25
63
High
New Car
0
10723
11
15
Low
Small Appliance
0
407
13
2
Low
Business
16647
895…
arrow_forward
Show summary of statistics by region using summary() and groupby() function.
state abb region population total
1 Alabama AL South 4779736 135
2 Alaska AK West 710231 19
3 Arizona AZ West 6392017 232
4 Arkansas AR South 2915918 93
5 California CA West 37253956 1257
6 Colorado CO West 5029196 65
7 Connecticut CT Northeast 3574097 97
8 Delaware DE South 897934 38
9 District of Columbia DC South 601723 99
10 Florida FL South 19687653 669
11 Georgia GA South 9920000 376
12 Hawaii HI West 1360301 7
13 Idaho ID West 1567582 12
14 Illinois IL North Central 12830632 364
15 Indiana IN North…
arrow_forward
Question 46. The Titanic data set contains information, whether passengers of the Titanic survived the shipwreck,
based on their gender, age and passenger class. The following decision tree has been learned on this data. Which
of the statements are true?
died
0.38
100%
yes F sex = male - no
died
0.19
64%
survived
0.73
36%
age >= 9.5
pclass = 3rd
died
0.49
17%
survived
0.58
3%
pclass = 3rd
age >= 1.5
died
0.17
61%
died
0.38
2%
survived
1.00
1%
survived
0.86
1%
died
survived
0.48
16%
0.93
19%
a) Overall, 62% of the passengers in the data set died.
b) A 'new' passenger (female, 3rd class, 30 years old) is predicted to die in the shipwreck.
c) 62% of the passengers in the data set are female.
d) All male 3rd class passengers in the data set died.
arrow_forward
3. You are asked to calculate the weekly take home pay for a group of employees at your
company. The employees in this group have a wage rate of 35USD per hour and 65USD
per hour when they work overtime. The following table list the hours work by the
employees.
Employee ID Regular hours Overtime hours
87
40
3
43
40
8
99
32
0
5
40
15
arrow_forward
What is the result of the natural join of the following two tables: Airlines and Fleet
arrow_forward
• Show all the different positions in the Staff table.• Show all the different branchNo in the Staff table.• Show all the different hotelNo in the Room table.
arrow_forward
Composite datatypes can only have multi row &multi column values in them
Answers:
Yes
No
arrow_forward
I need b
arrow_forward
Find the number of employees hired in January of all years
arrow_forward
Create ERD for the given case study using Crows Feet Notation.
arrow_forward
Create ERD for the given case study using Crows Feet Notation.
arrow_forward
From the sale records of XYZ Groceries, Mr.
Francis wants to find out the most frequent
items, and
multiple item-sets. The sales-data is given
below.
T1 "Mushroom","Aloo Bhujia"
T2 "Mushroom","Pineapple Juice","rasgulla",
"Apple"
T3 "Aloo Bhujia","Pineapple
Juice","rasgulla","Almond"
T4 "Mushroom","Aloo Bhujia","Pineapple
Juice","rasgulla".
T5 "Mushroom","Aloo Bhujia","Pineapple Juice",
"Almond"
T6 "Mushroom","Pineapple Juice","Apple",
"rasgulla"
i. Mr. Francis plans to use a minimum support
of 50 percent and minimum confidence of 80
percent.
a. Build item-set combinations (of size 2) at
XYZ Groceries.
b. Build item-set combinations (of size 3) at
XYZ Groceries.
You must use the lift ratio, in case of a match.
arrow_forward
Find those job categories whose maximum salary among the people hired after 1980 is more than 2500
Find the average salary of those employees whose name starts with J in each department
Find the most recent employment among those hired before 1980 for each department
arrow_forward
Answer the following questions:
Assume that in cone-shaped structures, the measurements for the height and radius of 6 cones are given as 8.28, 8.04, 9.06, 8.70, 7.58, 8.34 and 2.27, 1.98, 1.69, 1.88, 1.64, 2.14
respectively.
Write R program for the scenario given below.
(a). Make vectors with the given values.
(b) The volume of a cone with radius R and height H is given by (1/ 3) TIR²H. Make a vector with the volumes of the 6 cones.
(c). Compute the mean, median and standard deviation of the cone volumes.
(d). Compute also the mean of volume for the cones with a height less than 8.5.
arrow_forward
A table called "game1" contains three columns and twenty rows, but "game2" has the same column as game1 (ie 3) and fifteen rows. Both tables have 5 rows in common. What is the degree and cardinality of the resulting table if we take union?
arrow_forward
A travel company would like to analyze its data in order to plan better promotional campaigns with its customers. More specifically, she would like to analyze the number and number of sales based on:
✓ Destination: hotel, city, country, region, region category (example: seaside, alpine. etc.), destination category (example: family or not), hotel category (ex: 1-4 stars);
✓ Date of purchase: day of the year, day of the week, month, year, tourist season (eg: low or high season);
✓Client: age group, sex, address, type of buyer (eg: new, recurring, etc.);
1. Provide a star schema which will allow the company to do these analyzes
2. Clearly identify the primary and foreign keys of fact and dimension tables;
3. Identify, for each dimension table, a hierarchy of levels of granularity (e.g.. attribute!
attribute2...);
arrow_forward
Consider the following customer records. Rescale the Age of the first customer using 0-1 normalization. Write your answer in the box to the nearest two decimal places.
Age Female Income Married Children
Loan
Mortgage
48
1
17546.00
0
1
0
0
40
0
30085.10
1
3
1
1
51
1
16575.40
1
0
1
0
23
1
20375.40
1
0
57
1
50576.30
1
0
57
1
37869.60
1
0
22
0
8877.07
0
0
58
0
24946.60
1
1
37
1
25304.30
1
1
54
0
24212.10
1
1
66
1
59803.90
1
0
52
1
26658.80
0
1
0
TOON NOO
0
0
2
2
0
0
1
arrow_forward
Do a normalization from 1NF to 3NF based on the table below
arrow_forward
Solve the given query using the two tables (EmployeeDetails, EmployeeSalary).
Dateof
Empld
FullName
Managerld
City
Joining
121
John Snow
321
01/31/2014
Toronto
321
Walter White
986
01/30/2015
California
421
Kuldeep Rana
876
27/11/2016
New Delhi
Empld
Project
Salary
Variable
121
P1
8000
500
321
P2
10000
1000
421
P1
12000
Write an SQL query to fetch common records between two tables.
i)
Write an SQL query to fetch records that are present in one table but not in another table.
iii)
Write an SQL query to fetch the Emplds that are present in both the tables
iv)
Write an SQL query to fetch the employee full names and replace the space with -'.
v)
Write an SQL query to find the employee id whose salary lies in the range of 9000 and 15000.
arrow_forward
Use relational algebra (operation like selection, procejection, etc.) to find names, age, rating of sailors who’ve reserved a green boat.
arrow_forward
Q1. Consider the following tables:
Table name: sales
salesman_id
5001
city
name
commission
John
Paris
0.15
James New York 0.13
Neel
5002
5005
Rome
0.11
5006
lla
Paris
0.13
5003
Jordan Mexico
0.12
Table name: customers
customer id Cust_name city
Nick
grade salesman_id
100
3002
Paris
5001
3007
David
New York 200
5001
3005
London
5002
Jozy
Julian
200
3008
Paris
300
5003
3004
Brad
New York 100
5003
Perform the following queries on the above tables:
1. Create the above tables using the validations of your choice. (4 Marks)
2. find the salesperson(s) and the customer(s) he handle. Return Customer
Name, city, Salesman, commission. (3 marks)
3. Display the customer information who have salesman associated with
them. (3 marks)
arrow_forward
For an attribute age that must be represnted as day, month and year. Then, attribute age is:
O Composite
O Single Value
Derived
O Multi-value
arrow_forward
Write an SQL query to fetch the count of employees working in project ‘P1’.
arrow_forward
Three columns and 20 rows make up 'game1' and 15 rows make up 'game2' in this example. Both tables have five rows in common. What is the table's degree and cardinality if we take union?
arrow_forward
If every student at a school is assigned a 4-digit person ID number, but 0 and 1 are not used in ID numbers and the numbers 8 and 9 are reserved for faculty, how many potential student ID numbers are there?
arrow_forward
consider the follocotng
tables :-
table names : sales
Salesman-id
city
paris
name
commission
5001
John
5002
James
New York
O•13
500 B5
Neel
Rome
O 11
500S
O:13
paris
500 3
Jorday
O •12
Maxico
table name : Customers
sales
man-1d
Customer
ia
city grade
Customer_name
3002
NicK
París
100
5001
3007
David
New-York
5001
200
3005
JOZY
Loudon
200
5002
3008
Julian
paris
300
5003
Brad
3004
New
yOok
5003
Perform
the followtng queries on the
tables usiug the
above tables
create
the
abore
valieations
of
your enoi'ce.
O Pind
aommPssion
those
sales persons
coho
receired
from
the
company more
Customer city, sales man,
than 120
Retuon
Customer
Name,
commiss fon.
find
those
salespersons
do
not ire
în the
uve
same
city
onere
thein
and
eustomers
commissfon from the
Retoon
1eceirea
company
more
than
12%
Customer
Name,
city,
• Salesman city,
cUstomer
saleşman
commissiou.
arrow_forward
Optimize the following SQL Query by using Query Tree and Heuristic Rules:
SELECT C.Fname, E.Fname
FROM Employee AS E, Customer AS C, Order AS O WHERE E.EMP_ID=0.E_ID AND C.City='Jeddah' AND C.Customer_ID=0.C_ID AND E.EMP_ID='12943'
You should show the Initial Query Tree and add a screenshot of the Query Tree after applying each rule.
Please do not give me answer from chat gpt or any Ai , the screenshot should be from draw io for example
arrow_forward
QUESTION 4
Write a report of all films shown in August 2021 more than 16 times, give the films name,
how many performances of these films there were and how much those films took in total
over that period. List the films by the film that took the most money first, and provide
meaningful headings to the columns in the output as shown in the Solution Test below.
Hint:
Solution Test:
FILM_NAME
Performances Total Takings
It Happened One Night
39
£63,571
£58,332
Modern Times
38
Parasite
£37,195
£34,362
23
Knives Out
22
Citizen Kane
25
£32,711
£21,716
The Wizard of Oz
18
Avengers: Endgame
18
£17,081
Type your query below:
arrow_forward
Consider you have the following 2 tables.
Employee_Table
Employee_ID Employee_Name Address Salary in
(Rs)
Department_id
01 Arshad Karachi 20,000 01
02 Sanaullah Peshawar 30,000 02
03 Imran Peshawar 110,000 02
04 Asfahan Peshawar 95,000 01
05 Ayesha Peshawar 95,000 01
Dept_Table
Dept_ID Dept_Name
01 Finance
02 IT
03 HR1. Write SQL Query for finding/displaying names and ids of employees
whose salary is greater than 50,000 RS in ascending order of their salary
2. Create a View showing Employee names, their department name and
salary of Employees from Peshawar only. Salary column should be
displayed as ‘Total Salary’
3. Delete employees’ data who are from Karachi.
4. Write SQL Right Outer Join query and its output on the given two tables.
arrow_forward
Solve both part
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- One hundred students were asked whether they had taken courses in any of the three subjects, Mathematics, Computer Science and Information Technology. The results were given below. 45 had taken Mathematics; 18 had taken Mathematics and Computer Science; 38 had taken Computer Science; 21 had taken Information Technology; 9 had taken Mathematics and Information Technology.; 4 had taken Computer Science and Information Technology and 23 had taken no courses in any of the subjects. Draw a Venn diagram that will show the results of the survey.arrow_forward4, Use the given data to classify the record below using the k-NN algorithm for k=1 to 5. Loan Purpose Checking Savings Months Customer Months Employed Repairs 0 900 25 4 Complete the table below for the nearest neighbors and for the classification of the new record for each value of k. k Distance Classification 1 enter your response here ▼ High Low Tie 2 enter your response here ▼ High Low Tie 3 enter your response here ▼ High Low Tie 4 enter your response here ▼ Low High Tie 5 enter your response here ▼ High Tie Low (Round to four decimal places as needed.) Loan Purpose Checking Savings Months Customer Months Employed Credit Risk Business 322 578 10 14 Low New Car 0 821 25 63 High New Car 0 10723 11 15 Low Small Appliance 0 407 13 2 Low Business 16647 895…arrow_forwardShow summary of statistics by region using summary() and groupby() function. state abb region population total 1 Alabama AL South 4779736 135 2 Alaska AK West 710231 19 3 Arizona AZ West 6392017 232 4 Arkansas AR South 2915918 93 5 California CA West 37253956 1257 6 Colorado CO West 5029196 65 7 Connecticut CT Northeast 3574097 97 8 Delaware DE South 897934 38 9 District of Columbia DC South 601723 99 10 Florida FL South 19687653 669 11 Georgia GA South 9920000 376 12 Hawaii HI West 1360301 7 13 Idaho ID West 1567582 12 14 Illinois IL North Central 12830632 364 15 Indiana IN North…arrow_forward
- Question 46. The Titanic data set contains information, whether passengers of the Titanic survived the shipwreck, based on their gender, age and passenger class. The following decision tree has been learned on this data. Which of the statements are true? died 0.38 100% yes F sex = male - no died 0.19 64% survived 0.73 36% age >= 9.5 pclass = 3rd died 0.49 17% survived 0.58 3% pclass = 3rd age >= 1.5 died 0.17 61% died 0.38 2% survived 1.00 1% survived 0.86 1% died survived 0.48 16% 0.93 19% a) Overall, 62% of the passengers in the data set died. b) A 'new' passenger (female, 3rd class, 30 years old) is predicted to die in the shipwreck. c) 62% of the passengers in the data set are female. d) All male 3rd class passengers in the data set died.arrow_forward3. You are asked to calculate the weekly take home pay for a group of employees at your company. The employees in this group have a wage rate of 35USD per hour and 65USD per hour when they work overtime. The following table list the hours work by the employees. Employee ID Regular hours Overtime hours 87 40 3 43 40 8 99 32 0 5 40 15arrow_forwardWhat is the result of the natural join of the following two tables: Airlines and Fleetarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education