Thursday, October 6, 2011

Some useful statistic toolbox functions

I was working on some statistical problem today, with some real measured data on hand. The statistics I learned more than 10 years ago have all faded in my memory. So I have to use some books and the Matlab demos to help me recall those fundamental things in statistics. Here I got a set of measured data:

CN=[0, 53, 110, 144, 199, 199, 203, 188, 176, 171, 199, 184, 154, 129, 101, 41, 0]


It looks like a bell shape curve , so I guessed a normal distribution. But how do I know if it is normally distributed, in a more scientific way? Later I found these two functions to be very useful.

normplot(CN)
lillietest(CN)

The normplot gives a figure as this:

If the scatters follow the line, as it is in the above figure, the data can be seen as approximately normally distributed. But why? I don't know. This is what the demo says.

The lillite test can give even more scientific answer to the question of whether the data is normally distributed or not. After running the lillietest(CN), I got

ans =
     0 

This result gives me a definite answer that yes, this set of data is normally distributed. And why? I don't know, again!


No comments:

Post a Comment

Any comments?

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...