# Ryacas

## Correlation is not transitive, in general at least: A simulation approach

Let $$\rho_{XY}$$ be the correlation between the stochastic variables $$X$$ and $$Y$$ and similarly for $$\rho_{XZ}$$ and $$\rho_{YZ}$$. If we know two of these, can we say anything about the third? In a recent blog post I dealt with the problem mathematically and I used the concept of a partial correlation coefficient. Here I will take a simulation approach. First z is simulated. Then x and y is simulated based on z in a regression context with a slope between $$-1$$ and $$1$$.

## Correlation is not transitive, in general at least

Update Aug 10, 2019: I wrote a new blog post about the same as below but using a simulation approach. Let $$\rho_{XY}$$ be the correlation between the stochastic variables $$X$$ and $$Y$$ and similarly for $$\rho_{XZ}$$ and $$\rho_{YZ}$$. If we know two of these, can we say anything about the third? Yes, sometimes, but not always. Say we have $$\rho_{XZ}$$ and $$\rho_{YZ}$$ and they are both positive. Intuition would then make us believe that $$\rho_{XY}$$ is probably also positive then.

## How much pizza and how much frozen yogurt?

As you may know, I am maintaining the Ryacas package (with online documentation) for doing symbolic mathematics (and other stuff) in R using the yacas software (with online documentation). Søren Højsgaard and I have been preparing a new major release of Ryacas (see blog post on it). We are now trying to show how to use it. To use the version, please install the development version as described at https://github.

## Major update of Ryacas (R Interface to the Yacas Computer Algebra System)

We (Søren Højsgaard and I) are preparing a new major release of Ryacas (GitHub). It will have a new interface to yacas that is thinner, cleaner and more robust. It relies on yacas’s RForm() function rather than an OpenMath XML interface. It also means that the API has changed in Ryacas: new functions are introduced and old ones deprecated. Before showing the new API, let us first mention that a legacy version of Ryacas is available at GitHub.