How can I plot the square root of normally distributed data?

7 ビュー (過去 30 日間)
AK
AK 2017 年 2 月 1 日
編集済み: John Chilleri 2017 年 2 月 1 日
I have a Gaussian distributed data with mean zero. I first want to take the square root of that data and then trying to find the standard deviation. I have the following issue with this:
By taking the square root of the data I am getting some imaginary numbers which are expected, so I am converting all data into real numbers by taking real(data)-imag(data). But if I look at the histogram of that data, it is no longer a Gaussian. I was expecting it to be Gaussian because if we take the square root of a Gaussian function it should be a Gaussian with increased standard deviation. I am not sure what am I missing here? A sample code is as follows
x= randn(1000); figure;histfit(x(1,:)); y=sqrt(x(1,:));
y1=real(y)-imag(y);figure;histfit(y1(1,:))
If the data is not normally distributed, is there any way to convert it into equivalent normal distribution? I am interested in three sigma rule of normal distribution.
I would be really thankful for suggestions.
Best regards
Ashok
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 2 月 1 日
I have never seen real(y)-imag(y) used to convert numbers to real. I would not expect the result to be gaussian.

サインインしてコメントする。

採用された回答

John Chilleri
John Chilleri 2017 年 2 月 1 日
編集済み: John Chilleri 2017 年 2 月 1 日
Hello,
The problem is that transforming data with a square root does not necessarily maintain the normal distribution, this is especially true if you consider numbers in the -1 to 1 range, as their square roots increase their magnitude. So a normal distribution around 0 would appear bimodal after taking the square root.
With large numbers, a simple, somewhat "solution" would be:
Data = sign(Data).*sqrt(abs(Data));
This maintains the signs of the Data, while square rooting their magnitudes.
The distribution will change because it was square rooted, but it will retain its signage, while doing what I believe you desire.
Hope this helps!
  3 件のコメント
Walter Roberson
Walter Roberson 2017 年 2 月 1 日
exp(-x^2) can never be negative.
AK
AK 2017 年 2 月 1 日
Thanks Walter!
Do you have any suggestion about how can I report the error ( three sigma) in such distribution.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by