Description Usage Arguments Details Value Author(s) Examples
The function updates the mean of a dataset when we have a new data by recursive formula
1 | update_mean(old_mean, m, newx)
|
old_mean |
the mean of previous dataset |
m |
the number of data in your previous dataset |
newx |
value of your new data |
update_mean() can be used to update the mean of a large data set without recalculating the whole data set to make compuation easier. The function can be used to update univariate or multivariate data set.
new mean
Xiulin Xie
1 | update_mean(mean(c(1:13)),13,14)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.