Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Why is my chi-squared distribution such a rubbish representation?Have I done something wrong?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have data from 1994-2014 for births by mothers ages. I want to test the distribution for the Under20's mother ages. I have plotted a histogram with the information and tried to test the chi2pdf.
figure
x2=[];
[n,x2] = hist(x2,28); %Compute histogram
hbar2 = bar(x2, n/trapz(x2,n)); %Bar plot of histogram
hold on
%chi-distriution theoretical overlay
Ychi2 = chi2pdf(80000:1:150000,20);
hchi2 = line(80000:1:150000,Ychi2,'Color','b','LineWidth', 2);
댓글 수: 0
답변 (1개)
Star Strider
2016년 12월 18일
‘I want to test the distribution for the Under 20's mother ages.’
Test them for what?
Plot this first:
t = 1994:0.5:2004;
x2=[108111,112615,119719,132456,134946,137312,136012,135971,130784,127828,122145,121072,116622,110959,108844,107741,110722,113537,118589,125732,130744];
figure(1)
plot(t, x2)
grid
Then figure out what you want to do with your data.
댓글 수: 1
Star Strider
2016년 12월 18일
The Fourier transform will give you the frequency content of your data. That may be irrelevant information in your situation.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!