# Mathematical Formula

## Recommended Posts

Hello,

So what I am trying to do is have autoit try to see if there is a correlation between two sets of data.

`[url="http://www.autoitscript.com/forum/topic/137404-is-possible-use-math-symbols-in-autoit/page__p__961813__hl__sqrt__fromsearch__1#entry961813"]http://www.autoitscript.com/forum/topic/137404-is-possible-use-math-symbols-in-autoit/page__p__961813__hl__sqrt__fromsearch__1#entry961813[/url]`

But am still kindof lost......

Here is the formula I am trying to get it to use

```[color=#000000]Correlation(r) =[ NΣXY - (ΣX)(ΣY) / Sqrt([NΣX[/color][sup]2[/sup][color=#000000] - (ΣX)[/color][sup]2[/sup][color=#000000]][NΣY[/color][sup]2[/sup][color=#000000] - (ΣY)[/color][sup]2[/sup][color=#000000]])] [/color]
[color=#000000]where [/color]
[color=#000000]              N = Number of values or elements [/color]
[color=#000000]              X = First Score[/color]
[color=#000000]              Y = Second Score[/color]
[color=#000000]              ΣXY = Sum of the product of first and Second Scores[/color]
[color=#000000]              ΣX = Sum of First Scores[/color]
[color=#000000]              ΣY = Sum of Second Scores[/color]
[color=#000000]              ΣX[/color][sup]2[/sup][color=#000000] = Sum of square First Scores[/color]
[color=#000000]              ΣY[/color][sup]2[/sup][color=#000000] = Sum of square Second Scores[/color]
[color=#000000]```

but I cant seem to get it to work

##### Share on other sites

`\$CorrelationFunction = (\$N*\$E*\$X*\$Y-(\$E*\$X)*(\$E*\$Y)/Sqrt(\$N*\$E*\$X^2 - (\$E*\$X^2`

sorry I forgot to show what I had done so far but it isnt much cause I cant seem to get anything to work any help is greatly appreciated.

##### Share on other sites

I don't think there is enough information here. We only have the first and second scores. To get the sum of the product of first and second scores, I believe you need all the scores. My assumption is based on reading part of the following page: http://easycalculation.com/statistics/learn-regression.php

Edited by czardas

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...