x = (1, 1, 1, 1), y = (2, 2, 2, 2) cosine, correlation, Euclidean

COSINE

cos (x, y)= (x.y)/(||x|| ||y||)

x.y = 1*2 + 1*2 + 1*2 + 1*2 = 8

||x||= √(1*1 + 1*1 + 1*1 + 1*1) = √4 = 2

||y||= √(2*2 + 2*2 + 2*2 + 2*2) = √16 = 4

Hence, cos (x,y) = 8/(2*4) 1

CORRELATION corr(x, y) = (covariance(x,y))/([standard deviation(x) * standard deviation(y)])

Mean of x = (1+1+1+1)/4 = 1 ; Mean of y = (2+2+2+2)/4 = 2 covariance(x,y) = 1/(4-1) * [(1-1)(2-2) + (1-1)(2-2) + (1-1)(2-2) + (1-1)(2-2)] = 0

Standard deviation (x) = √(1/((4-1))* {(1-1)^2 + (1-1)^2 + (1-1)^2 + (1-1)^2} ) = 0

Standard deviation (y) =√(1/((4-1))* {(2-2)^2 + (2-2)^2 + (2-2)^2 + (2-2)^2}) = 0

Hence, corr (x,y)= 0/0 Not Defined

EUCLIDEAN d(x, y) = √((1-2)^2 +
*…show more content…*

as 1 and y was 1

J= 0/(2+2+0) = 0

Hence, Jaccard 0

(c) x = (0,-1,0,1), y = (1,0,-1,0) cosine, correlation, Euclidean

COSINE cos (x, y)= (x.y)/(||x|| ||y||)

x.y = 0*1 + (-1)*0 + 0*(-1) + 1*0 = 0

||x||= √(0*0 + (-1)*(-1) + 0*0 + 1*1) = √2

||y||= √(1*1 + 0*0 + (-1)*(-1) + 0*0) = √2

Hence, cos (x,y) = 0/2 0

CORRELATION corr(x, y) = (covariance(x,y))/([standard deviation(x) * standard deviation(y)])

Mean of x = (0+(-1)+0+1)/4 = 0

Mean of y = (1+0+(-1)+0)/4 = 0 covariance(x,y) = 1/(4-1) * [(0-0)(1-0) + (-1-0)(0-0) +(0-0)(-1-0) +(1-0)(0-0)] = 1/3 * 0 = 0

Since Covariance == 0 ;

Hence, corr (x,y ) 0

EUCLIDEAN d(x, y) = √((0-1)^2 + (-1-0)^2 + (0+1)^2 + (1-0)^2) = √4 = 2

Hence, Euclidean Distance 2

(d) x = (1,1,0,1,0,1), y = (1,1,1,0,0,1) cosine, correlation, Jaccard

COSINE cos (x, y)= (x.y)/(||x|| ||y||)

x.y = 1*1 + 1*1 + 0*1 + 1*0 + 0*0 + 1*1 = 3

||x||= √(1*1 + 1*1 + 0*0 + 1*1 + 0*0 + 1*1) = √4 =2

||y||= √(1*1 + 1*1 + 1*1 + 0*0 + 0*0 + 1*1) = √4 = 2

Hence, cos (x,y) = 3/(2*2) 0.75

CORRELATION corr(x, y) = (covariance(x,y))/([standard deviation(x) * standard deviation(y)])

Mean of x = (1+1+0+1+0+1)/6 = 4/6

Mean of y = (1+1+1+0+0+1)/6 = 4/6 covariance(x,y) =

= 1/(6-1) * [(1-4/6)(1-4/6) + (1-4/6)(1-4/6) +(0-4/6)(1-4/6) +(1-4/6)(0-4/6) + (0-4/6)(0-4/6) + (1-4/6)(1-4/6) ]

= 1/15

Standard deviation (x) =√(1/((6-1))* {(1-4/6)^2 + (1-4/6)^2 + (0-4/6)^2 + (1-4/6)^2 + (0-4/6)^2 +

Related

- Decent Essays
## Standardized Testing Controversy

- 615 Words
- 3 Pages

Mean is the average of a group of scores (Woolfolk, 2014). Mean and average are used interchangeably. To find the mean, a teacher will add all of the scores together and divided by the number of tests. For example, a teacher wants to find the mean of the spelling test, the spelling test scores are as the following, 10, 8, 7, 8, 10, 10, 6, 5, 7, and 5. The first step is to add all of the scores together (76). The second step is to divided by the number of tests (10), the quotient is the mean (7.6). The first math equation is 10+8+7+8+10+10+6+5+7+5=76. The second math equation is 76/10=7.6. The mean of the

- 615 Words
- 3 Pages

Decent Essays - Decent Essays
## Biology 30: Module 2: Lesson 4

- 836 Words
- 4 Pages

| |This Module 2: Lesson 4 Assignment is worth 15 marks. The value of each assignment and each question is stated in the left margin. |

- 836 Words
- 4 Pages

Decent Essays - Decent Essays
## A3 5 AppliedStatistics

- 1136 Words
- 5 Pages

4. Calculate the following measures of central tendency for the set of cube measurement data. Show your work or explain your procedure for each.

- 1136 Words
- 5 Pages

Decent Essays - Better Essays
## Ilab Week 6 Math 221 Essay

- 818 Words
- 4 Pages

5. Give the standard deviation for the mean and median column. Compare these and be sure to identify which has the least variability?

- 818 Words
- 4 Pages

Better Essays - Satisfactory Essays
## Essay about Ilab Week 6 Devry

- 667 Words
- 3 Pages

5. Give the standard deviation for the mean and median column. Compare these and be sure to identify which has the least variability?

- 667 Words
- 3 Pages

Satisfactory Essays - Decent Essays
## Psy 315 Final

- 1043 Words
- 5 Pages

correlation, (c) small positive linear correlation, (d) large but not perfect negative linear correlation, (e) no correlation, (f) clear curvilinear correlation.

- 1043 Words
- 5 Pages

Decent Essays - Decent Essays
## Pt1420 Unit 2

- 557 Words
- 3 Pages

I think I need to understand the symbols better and how they work in Python, right now my head is thinking as I usually use them as in (1+1) = 2 , (5-2) =7 , 2*7 =14 ...but the answer is 8. how?

- 557 Words
- 3 Pages

Decent Essays - Decent Essays
## Nt1310 Unit 3 Research Paper

- 406 Words
- 2 Pages

Each angle in the corner of $ABCD$ is $90^{\circ}$\hfill ---\ since $ABCD$ is a square.\\

- 406 Words
- 2 Pages

Decent Essays - Better Essays
## PSY315 Week Two Practice Problems

- 1080 Words
- 5 Pages

12. For the following scores, find the mean, median, sum of squared deviations, variance, and standard deviation:

- 1080 Words
- 5 Pages

Better Essays - Decent Essays
## Nt1330 Unit 1 Assignment

- 847 Words
- 4 Pages

We are using two FOR Loop to traverse the input and create a 2 dimensional array for printing the output.

- 847 Words
- 4 Pages

Decent Essays - Satisfactory Essays
## Pt1420 Week 1 Lab Report

- 336 Words
- 2 Pages

X = - (-6)/2x (1) in this case I insert a = 1, b = -6

- 336 Words
- 2 Pages

Satisfactory Essays - Decent Essays
## Number Grid Investigation

- 3888 Words
- 16 Pages

formulae? I shall keep the size of the square at a constant (2 x 2)

- 3888 Words
- 16 Pages

Decent Essays - Satisfactory Essays
## Trigonometry Research Paper

- 582 Words
- 3 Pages

This course uses transformations and constructions to cover properties of lines, planes, angles, triangles, quadrilaterals, circles, similarity, and congruence. Students will master formal proof and prove statements and theorems using deductive reasoning. This course introduces basic concepts of trigonometry using ratios and proportions. Geometry Honors requires a student to adhere to an accelerated pace of teaching. Freshmen enrolled in this course should complete Algebra 2 Honors, Pre-Calculus, and Calculus before graduation. This course requires a scientific calculator, compass, and straightedge. This course is a full-year, one credit course for grades nine through ten with a prerequisite of a C- or better in Algebra I

- 582 Words
- 3 Pages

Satisfactory Essays - Satisfactory Essays
## College Admission Essay: What Is Square One You Ask?

- 127 Words
- 1 Pages

What is square one you ask? Square one is the very beginning. The start of an idea, a problem; even a solution to a problem. There are many different times in a person’s life where the will find themselves at square one, but more often than not, you will not find yourself back at that point. Once you’ve started, there is no going back.

- 127 Words
- 1 Pages

Satisfactory Essays - Better Essays
## Bp Sustainability Essay

- 28986 Words
- 116 Pages

0 14 408 0.193 1,284 0.61 168 255 418 261 142 1.7d 0.8d 60.2f 10.0f 0.22f 64.9f 1,671f 573 52.5 18,400i 79,700 482 14 24 7 19 15 742 552 11,772 14

- 28986 Words
- 116 Pages

Better Essays