The mean of means
You want to know what the average number of users (num_users
) is per deal, but you want to know this number for the entire company so that you can see if Amir's deals have more or fewer users than the company's average deal. The problem is that over the past year, the company has worked on more than ten thousand deals, so it's not realistic to compile all the data. Instead, you'll estimate the mean by taking several random samples of deals, since this is much easier than collecting data from everyone in the company.
The user data for all the company's deals is available in all_deals
.
Questo esercizio fa parte del corso
Introduction to Statistics in R
Istruzioni dell'esercizio
- Set the random seed to
321
. - Take 30 samples of size 20 from
all_deals$num_users
and take the mean of each sample. Store the sample means insample_means
. - Take the mean of
sample_means
. - Take the mean of the
num_users
column ofamir_deals
.
Esercizio pratico interattivo
Prova questo esercizio completando il codice di esempio.
# Set seed to 321
___
# Take 30 samples of 20 values of num_users, take mean of each sample
sample_means <- ___(___, ___(___, ___) %>% mean())
# Calculate mean of sample_means
___
# Calculate mean of num_users in amir_deals
___