We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af4fb3a commit 033db0aCopy full SHA for 033db0a
LSRL-Calc.py
@@ -0,0 +1,10 @@
1
+xBar = float(input("Enter the mean of x: "))
2
+Sx = float(input("Enter the Std of x: "))
3
+yBar = float(input("Enter the mean of y: "))
4
+Sy = float(input("Enter the Std of y: "))
5
+R = float(input("Enter the correlation coefficient(r): "))
6
+
7
+b = R * (Sy / Sx)
8
+a = yBar - b * xBar
9
+print("The LSRL is: y-hat = %.3f + %.3fx" % (a, b))
10
0 commit comments