Читать книгу Data Science in Theory and Practice - Maria Cristina Mariani - Страница 29
3.3 Mean Vectors
ОглавлениеLet be random variables, where denotes the transpose of a matrix. The expected value of the random vector is defined as the vector of expectations i.e.
More generally, if is a matrix of random variables, then the is the matrix of expectations with elements , i.e.:
For a random vector , the mean vector consists of the means of each variable:
where . For example let be measurements on the first variable. Then the sample mean for the first variable is defined as follows:
The sample mean can be computed from the measurements on each of the variables. Therefore, in general for sample means, we have:
Example 3.2 Consider the following data matrix introduced in Example 3.1:
Each receipt yields a pair of measurements, total dollar sales, and number of movies sold. To find the sample mean , we calculate the average of each column as follows:
Therefore,
This implies that the average dollar sales for two movies is $40.00. Therefore, the average amount of dollars that cost a movie is 20 dollars.