Register to reply

Need help with Matlab standard deviation

by spoonyluv
Tags: matlab
Share this thread:
spoonyluv
#1
Aug9-09, 04:34 PM
P: 10
Hello,

I seriously need some help as I cant figure out what to do here. I am working on coding a vaccination simulation that measures rates of infection for period of 100 days.

I have this variable delta, which is the number of days the infection period lasts. Delta is 5, or at least on average it is 5, which means it could be occasionally be 1 day for a random individual or 3 days for some other random individual or even 7, but on average it is 5.

I have 10 individuals and run the simulation for 100 days. for each individual i need matlab to create a random standard deviation that is part of a normal distribution. So for example if I have a lognormal formula

R = lognrd (5, ?, 100, 10)

This formula creates a perfect matrix of 100x10 with lognormal distribution values for each cell, with 5 being the mean. The problem is with the ?, which is where the standard deviation goes. How do I get matlab to churn out a std dev of a normal distribution that will then feed into the R = lognrd (5, ?, 100, 10)

Thanks
Phys.Org News Partner Science news on Phys.org
New type of solar concentrator desn't block the view
Researchers demonstrate ultra low-field nuclear magnetic resonance using Earth's magnetic field
Asian inventions dominate energy storage systems
KLoux
#2
Aug10-09, 01:56 PM
P: 175
There is no "standard" standard deviation for a log-normal distribution. See: http://en.wikipedia.org/wiki/Log-normal_distribution. This is another input that you need to give to MATLAB, not the other way around.

I other words, you can have a distribution where 99% of the population has an infection period of 4-6 days, with the other 1% being "other." You could also have a distribution where 50% of the population has an infection period of 4-6 days, with the other half being "other." In both cases it is possible for the distribution to be log-normal.

-Kerry
KLoux
#3
Aug10-09, 02:08 PM
P: 175
Oooh, I think I'm wrong in the above post (or at least I'm not sure I'm right). I responded because I've been looking at normal distributions recently and they were fresh in my mind - but these are NOT the same as a log-normal distribution.

My advice - ignore the above post :-)

Sorry for the confusion...

-Kerry


Register to reply

Related Discussions
Standard deviation versus absolute mean deviation Set Theory, Logic, Probability, Statistics 3
Mean Absolute Deviation/Standard Deviation Ratio Set Theory, Logic, Probability, Statistics 6
Standard Deviation General Math 4
Standard Deviation Precalculus Mathematics Homework 16
Changes to Standard Deviation? Set Theory, Logic, Probability, Statistics 8