# normal distribution test

조회 수: 135 (최근 30일)
eri . 2012년 1월 2일
답변: Linda Lin . 2020년 12월 12일
i have historic data (daily) of 30 stock from 250 day (i make 30x250 matrix from it), now i want to test whether this data is normally distributed or not, how to do this? and if its not normally distributed how to normalize it?

댓글을 달려면 로그인하십시오.

### 답변 (5개)

Richard Willey 2012년 1월 3일
Statistics Toolbox offers a number of hypothesis tests that you can use to (formally) test whether your data is normally distributed. With this said and done, I strongly recommend starting with some visualization techniques.
Functions like "normplot" will provide you with a much better feel for the nature of your data and why it does/does not match a normal distribution.
##### 댓글 수: 2이전 댓글 1개 표시이전 댓글 1개 숨기기
Richard Willey 2012년 1월 4일
Probability plots are a very standard way to check whether data is normally distributed. Arguably, these charts provide better information than a formal hypothesis tests.
The following code might prove helpful
% Generate a vector of 500 normally distributed random numbers with mean =
% 10 and standard deviation =5
foo = 10 + 5*randn(500, 1);
% Use a normplot to see whether the sample appears to be normally
% distributed
normplot(foo)
figure
% Generate a vector of 500 random numbers drawn from a gamma distribution
% with aplha = 5 and beta = 3
bar = gamrnd(5,3, 500,1)
% Use a normplot to see whether the sample appears to be normally
% distributed
normplot(bar)

댓글을 달려면 로그인하십시오.

the cyclist 2012년 1월 2일
Do you have access to the Statistics Toolbox? There are at least two normality tests included there: jbtest() and lillietest().
I don't have the Finance Toolbox, but I am guessing that there may be something there as well.
You can type "docsearch normality" to poke around in the documentation.
I am not sure what you mean by normalizing it, if it is not normally distributed. Sounds like a dangerous game. Maybe you could provide some more details on what you are trying to do.
##### 댓글 수: 3이전 댓글 2개 표시이전 댓글 2개 숨기기
Richard Willey 2012년 1월 3일
MathWorks provides dedicated functions for portfolio optimization. The best content that I am aware of is the following downloads from MATLAB Central. (There is an associated webinar that you can view to get an introduction to the techniques)
http://www.mathworks.com/matlabcentral/fileexchange/31290-using-matlab-to-optimize-portfolios-with-financial-toolbox

댓글을 달려면 로그인하십시오.

bym 2012년 1월 2일
for normalization you can try the Box-Cox transformation
or just fit it with a non-normal distribution
##### 댓글 수: 1없음 표시없음 숨기기
eri 2012년 1월 3일
can you give the detail of how to use them in matlab?

댓글을 달려면 로그인하십시오.

Léon 2012년 1월 3일
Are you talking about prices or returns? Or even something different from that? Regarding returns you should be aware of a leptokurtic distribution of your data. Anyway I wouldn't rely on a normal distribution, but I would definitely use some bootstrapping technique to derive an accurate estimator for the moments.
##### 댓글 수: 1없음 표시없음 숨기기
eri 2012년 1월 3일
price

댓글을 달려면 로그인하십시오.

Linda Lin 2020년 12월 12일
kstest

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Noncentral t Distribution에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by