# Statisfaction

## Last and final on Richter’s painting

Posted in Art, Project, R by Julyan Arbel on 22 August 2011

For a quick recap, Pierre and I supervised a team project at Ensae last year, on a statistical critique of the abstract painting 1024 Colours by painter Gerhard Richter. The four students, Clémence Bonniot, Anne Degrave, Guillaume Roussellet and Astrid Tricaud, did an outstanding job. Here is a selection of graphs and results they produced.

1. As a preliminary descriptive study, the following scatter plots come and complete the triangle plot.The R function $\texttt{scatterplot3D}$, from the package of the same name, displays the pixels with their coordinates in the RGB cube. It shows that, as a joint law, the triplets are somehow concentrated along the black-white diagonal of the cube. The same occurs when the points are projected on the sides of the cube. Here is a comparison with uniform simulations. 2. It is interesting to see what happens in other color representations. HSL and HSV are two cylindrical models, succintly described by this Wikimedia picture: The points parameterized in these model were projected on the sides as well; here, the sides of the cylinder are to be seen as the circular top (or bottom), the lateral side, and the section of the cylinder by a half-plane from its axis. Its shows that some colors in the hue coordinate (rainbow-like colors) are missing, for instance green or purple.

For the HSL model, and the HSV model. The histograms complete this first analysis. For HSL, and HSV. 3. The students built a few ad-hoc tests for uniformity, either following our perspective or on their own. They used a Kolmogorov-Smirnov test, a $\chi^2$ test, and some entropy based tests.

4. We eventually turned to testing for spatial autocorrelation. In other words, is the color of one cell related to the color of its neighbors (in which case you can predict the neighbors’ colors given one cell), or is it “non informative”? A graphical way to check this is to plot average level of a color coordinate of the neighbors of a pixel with respect to its own coordinate. Then to fit a simple regression on this cloud: if the slope of the regression line is non zero, then there is some correlation, of the sign of the slope. We tried various combinations of coordinates, and different radii for the neighborhood’s definition, with no significant correlation. A (so-called Moran) test quantified this assessment. Here is for example the plot of the average level of red of the eight closer neighbors of each pixel with respect to its level of red. Thanks again to the students for their enthusiasm!

## Random Colours (part 3)

Posted in Art by Julyan Arbel on 24 September 2010

Thanks to Pierre, we now have a new playground for saptial stats, see this post. Before that, let’s see if we can see basic stuff without spatial information.

Data consist in three 32*32 tables, R, G and B, of numbers between 0 and 255. Certainly, the tables should be considered together as a 32*32 table of (r,g,b) vectors. Still, the first basic thing to do is to plot three separate histograms for R, G and B:     compared to uniformly simulated data We see that the painter has a bias for darker colors, and rather misses light green and light blue ones.

Then, what can we do for representing (r,g,b) vectors? I guess that a good visualization is the color triangle A few words to explain where it comes from. Say (r,g,b) data is normalized in the unit cube. Then the corners of the color triangle correspond to (plain) red, green and blue, from bottom left, right, to top. It is a section of the cube, with two opposite and equidistant points: black (0,0,0) and white (1,1,1). This triangle is said to be a simplex: any of its points’ coordinates sum to 1. Now the data in the triangle is obtained as (r,g,b) points, diveded by (r+g+b). It took me a while to compute the coordinates (x,y) of those points in a basis of the triangle (I did that stuff more easily back in highschool!). It should give something like that:

x=(1-r+g)/2
y=1/sqrt(3)*((1-r-g)/2+b)

What do we see? The colors do not look like uniformly distributed, because 1) points are much more concentrated in the center, and 2) the painter favoured red colors in comparison with green ones (very few in the bottom right corner) and blue ones (in a minor extent). Arguing aginst point 1) could be that projecting (r,g,b) points on the simplex naturally implies a higher density in the center. That is right, but it would not be that dense, as we see with uniformly simulated data: So colors are not uniform in the RGB model. There should be a cognitive interpretation out there, no? It is not obvious that human eyes comprehend colors on the same scale as the RGB model does. If not, there is no reason for human sight to comprehend uniformity in the same way as a computer. As Pierre pointed out, what we find in the RGB model might be different in the HSV model.We’ll see this model later.

Next step, spatial autocorrelation tests?

## 256 (random ?) colors

Posted in Art by Julyan Arbel on 27 August 2010 This painting by Gerhard Richter is called 256 colors. The painter is fully committed to this kind of work, as you can see here. When visiting the San Francisco Museum of Modern Art (SFMOMA) (I’m getting literate…), the guide asked the following question:

Do you think the colors are positioned randomly or not?

Not a trivial question, is it? And you, would you say it is random? This work dates back to 1974, when computer screens mainly displayed green letters on a black background. So it seems the artist did not benefit of computer assistance.

There are many ways to interpret this plain English statement into statistic terms. For example, are the colors, with no ordering, uniformly distributed? (OK, this doesn’t mean at all (true) randomness, but this is a question…) It would be nice to have the 256 colors in RGB. In this color model, (0,0,0) is black, and (255,255,255) is white. I think that there are rather more dark colors than light ones, ie more data points near the (0,0,0) vertex than near  the opposite one, in the RGB cube. So a test of uniformity would probably be rejected.

A more subtle way to interpret uniformity in the painting would be to take into account the position of the colors… Any idea how to check that? I have no clue.

Here is a larger one, 1024 colors… 