This preview shows page 1. Sign up to view the full content.
Unformatted text preview: .. num2str(median(x_realizations))]); % Repeat 100 times num_rep = 100; sample_means = zeros(1, num_rep); sample_medians = zeros(1, num_rep); for repetitions = 1:num_rep for n = 1:100 x_realizations(n) = randn() * sigma + mu; end sample_means(repetitions) = mean(x_realizations); sample_medians(repetitions) = median(x_realizations); end The sample mean of the X realizations is 1.0293 The sample median of the X realizations is 1.0158 >>...
View Full Document
This note was uploaded on 07/19/2008 for the course BENG 449 taught by Professor Richardcarson during the Spring '08 term at Yale.
- Spring '08