update_param {ocd}R Documentation

compute new mean and sd from old ones with one additional observation

Description

compute new mean and sd from old ones with one additional observation

Usage

update_param(old_mean, old_sd, x_new, n_obs)

Arguments

old_mean

vector of old means

old_sd

vector of old standard deviation

x_new

new observation vector

n_obs

total number of observations (including x_new)

Value

list of two vectors: new mean and new standard deviation


[Package ocd version 1.1 Index]