Hello everyone,
here I am not a light in maths, I wanted to know if there is a formula to determine a linear fit on a point cloud of a statistical study with 3 variables.
If so, could you give me the formula?
Thank you in advance.
Math: 3-variable statistics
-
- I understand econologic
- posts: 183
- Registration: 18/03/08, 14:30
-
- Moderator
- posts: 79114
- Registration: 10/02/03, 14:06
- Location: Greenhouse planet
- x 10972
-
- I understand econologic
- posts: 183
- Registration: 18/03/08, 14:30
-
- Moderator
- posts: 79114
- Registration: 10/02/03, 14:06
- Location: Greenhouse planet
- x 10972
-
- I understand econologic
- posts: 183
- Registration: 18/03/08, 14:30
I take the case of a statistic with 2 variables Xi and Ni with n points in the cloud.
The linear fit line is an affine function of the form:
Ni = aXi + b
We have:
mXi = average of the points Xi
mNi = average of Ni points
€ XiNi = sum of the products XiNi
€ Xi² = sum of Xi²
€ Ni² = sum of Ni²
We obtain a the directing coefficient of the linear adjustment line by:
a = (€ XiNi - n mXi mNi) / (€ Xi² - n (mXi) ²)
we obey b by the following formula:
b = mNi - a mXi
In addition, it is possible to check whether there is a functional link between the two parameters by determining the linear correlation coefficient.
This can only be between -1 and 1.
If it is close to 1 (eg 0,87) there is a possible linear correlation therefore a link between the parameters.
It is calculated as follows:
r = aa '
with a the previous formula and a ':
a '= a = (€ XiNi - n mXi mNi) / (€ Ni² - n (mNi) ²)
So I wanted to know if we could get a correlation calculation in a 3-variable statistic.
The linear fit line is an affine function of the form:
Ni = aXi + b
We have:
mXi = average of the points Xi
mNi = average of Ni points
€ XiNi = sum of the products XiNi
€ Xi² = sum of Xi²
€ Ni² = sum of Ni²
We obtain a the directing coefficient of the linear adjustment line by:
a = (€ XiNi - n mXi mNi) / (€ Xi² - n (mXi) ²)
we obey b by the following formula:
b = mNi - a mXi
In addition, it is possible to check whether there is a functional link between the two parameters by determining the linear correlation coefficient.
This can only be between -1 and 1.
If it is close to 1 (eg 0,87) there is a possible linear correlation therefore a link between the parameters.
It is calculated as follows:
r = aa '
with a the previous formula and a ':
a '= a = (€ XiNi - n mXi mNi) / (€ Ni² - n (mNi) ²)
So I wanted to know if we could get a correlation calculation in a 3-variable statistic.
0 x
Hi Harry,
Does your three-dimensional point cloud is grouped around a line (in the space).
If not, there is no way it will work.
If so, I see 2 solutions:
- make a projection in the plane and find 3 directing coefficients: 1 in the xy plane, 1 in the yz plane, 1 in the xz plane: you can reuse the classical linear regression formulas in the plane. By the way, you find the y-intercepts x0, y0, z0
- try to tweak the formulas to directly find the directing cosines of a collinear vector on your right (3 coefficient) + the y-intercept ... I admit that I never thought about the question, but if a mathematician wants to stick to it
If you want to go fast, I recommend the first method ...
Does your three-dimensional point cloud is grouped around a line (in the space).
If not, there is no way it will work.
If so, I see 2 solutions:
- make a projection in the plane and find 3 directing coefficients: 1 in the xy plane, 1 in the yz plane, 1 in the xz plane: you can reuse the classical linear regression formulas in the plane. By the way, you find the y-intercepts x0, y0, z0
- try to tweak the formulas to directly find the directing cosines of a collinear vector on your right (3 coefficient) + the y-intercept ... I admit that I never thought about the question, but if a mathematician wants to stick to it
If you want to go fast, I recommend the first method ...
0 x
-
- I understand econologic
- posts: 183
- Registration: 18/03/08, 14:30
Go back to "The bistro: site life, leisure and relaxation, humor and conviviality and Classifieds"
Who is online ?
Users browsing this forum : No registered users and 292 guests