How can I explain the correlation between variables in the bar 3D?

I have different figures that I plot them from MATLAB with different parameters. I know that if the x values increase and y values increase, thats mean strong liner correlation between variables and it is clear from scatter plot. on the other hand, if I have bar 3D ( which involve x,y and z axises ), how can I explain the correlation? Thanks advance.

 Accepted Answer

The correlation remains however you represent your data.

4 Comments

for this figure, if the values of x increase, y values decrease? It is confusing.
Only the sign of the correlation is dependent on the direction of the change in y with respect to x. The value remains the same.
For instance:
x = linspace(1, 20, 25);
y1 = 1./x + 0.1*randn(size(x)); % Decreasing
y2 = fliplr(y1); % Increasing
r1 = corrcoef(x,y1)
r2 = corrcoef(x,y2)
figure(1)
plot(x, y1, x, y2)
grid
r1 =
1.0000e+000 -628.8384e-003
-628.8384e-003 1.0000e+000
r2 =
1.0000e+000 628.8384e-003
628.8384e-003 1.0000e+000
So if y increases with increasing x, the correlation will be positive, if y decreases with increasing x, the correlation will be negative.

Sign in to comment.

More Answers (0)

Categories

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!