Page 194 - Artificial Intellegence_v2.0_Class_11
P. 194
Ans. Class m=(11+12)/2 F fm cf
0-10 5 16 80 16
10-20 15 8 120 24
20-30 25 35 875 59
30-40 35 36 1260 95
40-50 45 5 225 100
Total 125 100 2560
Mean = 2560 = 25.6
100
th
N/2 = 100/2 = 50 item which lies in class 20-30 (as per cf)
50 – 24
Median = 20+ 35 x 10
=20+7.4 = 27.4
Modal class = 20 – 30 (as per grouping Analysis)
35 – 8
Mode = 20 + x 10
2(35)–8–36
= 20+10.38 = 30.38
5. Describe the different types of joins with diagrams.
Ans. There are four types of joins:
• Inner Join: Those records are selected that have matching values in both tables. In an inner join, only those
tuples that satisfy the matching condition are included, while the remaining tuples are excluded.
Syntax: SELECT table1.column1, table1.column2, table2.column1, ....
FROM table1
INNER JOIN table2
ON table1.matching_column = table2.matching_column;
where table1: First table, table2: Second table and matching_column: Column common to both the tables.
• Left Outer Join: This join returns all records from the left table, and the matching records from the right table.
Syntax: SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
LEFT JOIN table2
ON table1.matching_column = table2.matching_column;
• Right Outer Join: It returns all records from the right table, and the matching records from the left table.
Syntax: SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
RIGHT JOIN table2
ON table1.matching_column = table2.matching_column;
• Full Outer Join: Combines the result of both LEFT JOIN and RIGHT JOIN. It returns all records which match in either
left or right table.
Syntax: SELECT table1.column1,table1.column2,table2.column1,....
FROM table1
FULL JOIN table2
ON table1.matching_column = table2.matching_column;
192 Touchpad Artificial Intelligence (Ver. 2.0)-XI

