Professional Documents
Culture Documents
erimkoyun@gmail.com
In[312]:=
Clear@x, y, n, xy, sumx, sumx2, sumxy, sumy, xav, yav, a1, a0, fD
x = 80, 2, 3, 4, 5, 6, 7, 8, 9, 10<;
x ve y
y = 827, 30, 33, 34, 35, 37, 38, 39, 41, 42<;
deerlerini
n = Abs@Dimensions@xD@@1DDD;
xy = Table@0, 8i, n<, 8j, 2<D;
xy deikeninde
Do@xy@@i, 1DD = x@@iDD; xy@@i, 2DD = y@@iDD, 8i, 1, n<D
matris olarak yazma
data = ListPlot@xy, PlotStyle PointSize@0.02D,
PlotLabel -> "Given y vs x data points", TextStyle 8FontSize 11<D
sumx = 0; Do@sumx = x@@iDD + sumx, 8i, 1, 10<D; Print@"sum of x: ", sumxD
sumxy = 0; Do@sumxy = x@@iDD * y@@iDD + sumxy, 8i, 1, 10<D;
Print@"sum of xi *yi : ", sumxyD
sumy = 0; Do@sumy = y@@iDD + sumy, 8i, 1, 10<D; Print@"sum of yi : ", sumyD
xy matrisini
grafikte
gsterme
En kk
kareler kodu
Tablo ve grafikleri
gsterme
TableHeadings 98"", "", "", ""<, 9"xi ", "yu ", "Hyi -yavL2 ", "Hyi -a0 -a1 xi L2 "==E
Sonular
Out[318]=
34
32
30
2
10
least-sqr.nb
sum of x: 54
sum of xi *yi : 2059
sum of yi : 356
sum of xi 2 : 384
avarage of xi :
avarage of yi :
27
5
178
Denklem katsaylar
a1 : 1.47835
a0 : 27.6169
standart error: 0.554156
correlation coefficient: 0.993972
xi
yu
Hyi -yavL2
27
73.96
3.80545 10-1
30
31.36
3.29009 10-1
33
6.76
8.98802 10-1
34
2.56
2.20615 10-1
35
0.36
7.49611 10-5
37
1.96
2.63156 10-1
38
5.76
1.19938 10-3
39
11.56
1.9689 10-1
41
29.16
6.07185 10-3
10
42
40.96
1.60347 10-1
Out[332]//TableForm=
42
40
38
36
Out[333]=
34
32
30
10
least-sqr.nb
40
Out[334]=
35
10