## 6.7.4 Understanding the Facet Pairs view with correlation values 

With the Facet Pairs view, you can identify a high correlation of keywords from the selected facets. Content Analytics requires two sets of search results to calculate a correlation. Accordingly, you select two facets that represent the two search result sets of the document set. 

This section explains how the correlation value is calculated in Figure 6-19 on page 191 by using the Product facet as the row and Verb facet as the column. 

## Calculating the correlation value 

To calculate the correlation value, first you must know the following information: 

GLYPH<SM590000> The total number of occurrences of “orange juice” is 86. 

GLYPH<SM590000> The total number of occurrences of “leak” is 123. 

GLYPH<SM590000> The entire number of documents in the corpus is 852. 

Therefore, about 14% of the documents ( 123/852 ) contain the keyword “leak.” This value is referred as the density  of the keyword in a given document set. 

Next, you must look at the intersection cells of the keywords, “orange juice” and “leak.” You see that the total number of occurrences of documents that includes both the keywords “orange juice” and “leak” is 67. Thus the density of the keyword “leak” in the document set for the keyword “orange juice” is 78% (that is 67/86 ). 

When you calculate the correlation value, you must consider the ratio of these two density values as the correlation value: 

GLYPH<SM590000> The density of the given set of documents that includes the specific keyword 

GLYPH<SM590000> The density of the entire set of the documents in the whole collection 

That is, you are interested in the ratio of the following items: 

GLYPH<SM590000> The density of the keyword “leak” in the document set for the keyword “orange juice” ( 67/86 = 78% ) 

GLYPH<SM590000> The density of the keyword “leak” in the entire document set ( 123/852 = 14% ) 

In this example, the correlation value of orange juice and leak is calculated as 5.5 (roughly 77%/14% ). 

The correlation value calculated in this manner is not reliable especially when the number of documents, which includes both keywords, is relatively small. For example, the number of documents that includes keyword B is 2, while the number of documents that includes keyword C is 100. Then, consider the number of documents that include keyword A in both document sets. The density is 50% for both document sets. Which value is more reliable? 

