Page 1

‫اﻟﻔﺻل اﻟراﺑﻊ‬ ‫اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط واﻻرﺗﺑﺎط‬

‫‪١‬‬


‫)‪ (١-٤‬ﻣﻔﺎھﯾم أﺳﺎﺳﯾﺔ‬ ‫ﯾﮭ ﺗم ﺗﺣﻠﯾ ل اﻻﻧﺣ دار ﺑﺎﻟﻌﻼﻗ ﺔ ﺑ ﯾن ﻣﺗﻐﯾ ر ﻛﻣ ﻲ ﻣوﺿ ﻊ اﻟدراﺳ ﺔ‪ ،‬ﯾﺳ ﻣﻰ اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ أو‬ ‫ﻣﺗﻐﯾ ر اﺳ ﺗﺟﺎﺑﺔ ‪ response variable‬وواﺣ د أو أﻛﺛ ر ﻣ ن ﻣﺗﻐﯾ رات أﺧ رى ﺗﺳ ﻣﻰ ﻣﺗﻐﯾ رات‬ ‫ﻣﺳ ﺗﻘﻠﺔ ‪ independent variables‬أو ﻣﺗﻐﯾ رات ﻣﻔﺳ ره ‪ explanatory variables‬أو‬ ‫ﻣﺗﻐﯾرات ﺗﻧﺑؤ ‪. predictor variables‬‬ ‫ﻏﺎﻟﺑﺎ ﻣﺎ ﯾﺳﺗﺧدم ﺗﺣﻠﯾل اﻻﻧﺣدار ﻓﻲ اﻟﺗﻧﺑؤ ﺑﺎﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻣن اﻟﻣﻌﻠوﻣﺎت ﻋن واﺣ د أو أﻛﺛ ر‬ ‫ﻣن اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ‪ .‬ﻓﻲ ھ ذا اﻟﻔﺻ ل ﺳ وف ﻧﻘ دم ﺑﻌ ض اﻟﻣﻔ ﺎھﯾم اﻷﺳﺎﺳ ﯾﺔ وط رق اﻻﺳ ﺗدﻻل‬ ‫ﻟﺗﺣﻠﯾل اﻻﻧﺣدار اﻟﺑﺳﯾط ﺣﯾث ﯾﻌﺗﻣد اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻋﻠﻰ ﻣﺗﻐﯾر ﻣﺳﺗﻘل واﺣد‪.‬‬

‫)‪ (٢-٤‬ﻣﻘدﻣﺔ ﻓﻲ اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط‬ ‫ﺑﻔرض ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم ‪ n‬ﻣﻣﺛﻠﺔ ﺑﺄزواج اﻟﻣﺷﺎھدات }‪{(x i , yi );i  1,2,...,n‬‬ ‫ﻟﻌﯾﻧﺎت ﻣﺗﻛررة ﻓﺈﻧﻧﺎ ﺳوف ﻧﺄﺧذ ﺑﺎﻟﺿﺑط ﻗﯾم ‪ x‬وﻧﺗوﻗﻊ ﺗﻐﯾر ﻓﻲ ﻗﯾم ‪ . y‬وﻋﻠﻰ ذﻟك ﻗﯾﻣﺔ ‪ yi‬ﻓﻲ‬ ‫اﻟزوج اﻟﻣرﺗب ) ‪ (x i , yi‬ﺗﻣﺛل ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ ‪ . Yi‬أي أن اﻟﻧﺗﯾﺟﺔ اﻟﺗﻲ ﯾﺄﺧذھﺎ ‪ Yi‬ﻏﯾر‬ ‫ﻣؤﻛدة ‪ uncertain‬وﻻ ﯾﻣﻛن اﻟﺳﯾطرة ﻋﻠﯾﮭﺎ ﺑواﺳطﺔ اﻟﺑﺎﺣث ‪ .‬ﺳوف ﻧُﻌرف ‪ Y | x‬ﻟﺗﻣﺛل‬ ‫ﻣﺗﻐﯾر ﻋﺷواﺋﻲ ‪ Y‬ﯾﻘﺎﺑل ﻗﯾﻣﺔ ﺛﺎﺑﺗﺔ ‪ ، x‬وﻧﻌرف ﻣﺗوﺳطﺔ ﺑﺎﻟرﻣز ‪  Y|x‬وﺗﺑﺎﯾﻧﮫ ﺑﺎﻟرﻣز ‪. 2Y|x‬‬ ‫ﻣن اﻟواﺿﺢ أﻧﮫ ﻋﻧدﻣﺎ ‪ x  x i‬ﻓﺈن اﻟرﻣز ‪ Y | x i‬ﯾﻣﺛل اﻟﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ ‪ Yi‬ﺑﻣﺗوﺳط ‪ Y| x‬‬ ‫وﺗﺑﺎﯾن ‪. 2Y|x‬‬ ‫‪i‬‬

‫‪i‬‬

‫أن اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ﯾﻌﻧﻲ أن ‪  Y|x‬ﺗرﺗﺑط ﺧطﯾﺎ ﺑـ ‪ x‬ﺑﻣﻌﺎدﻟﺔ اﻧﺣدار اﻟﻣﺟﺗﻣﻊ اﻟﺗﺎﻟﯾ ﺔ‬ ‫‪:‬‬

‫‪Y|x  0  1x‬‬ ‫ﺣﯾ ث ﻣﻌ ﺎﻣﻼت اﻻﻧﺣ دار ‪ ، 0 , 1‬ﯾﻣ ﺛﻼن ﻣﻌﻠﻣﺗ ﯾن ﻣطﻠ وب ﺗﻘ دﯾرھﻣﺎ ﻣ ن ﻣﺷ ﺎھدات اﻟﻌﯾﻧ ﺔ‬ ‫ﺣﯾث ‪ b0‬ﺗﻘدﯾر ﻟﻠﻣﻌﻠﻣﺔ ‪ 0‬و ‪ b1‬ﺗﻘدﯾر ﻟﻠﻣﻌﻠﻣﺔ ‪ . 1‬أي أﻧﻧﺎ ﻧﻘدر ‪  Y|x‬ﺑـ ˆ‪ y‬ﻣن اﻧﺣ دار اﻟﻌﯾﻧ ﺔ‬ ‫أو ﺧط اﻻﻧﺣدار اﻟﻣﻘدر اﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪yˆ  b 0  b1x .‬‬

‫)‪ (٣-٤‬ﺷﻛل اﻻﻧﺗﺷﺎر‬ ‫اﻷﺳ ﻠوب اﻟﻣﻔﯾ د ﻟﺑ دء ﺗﺣﻠﯾ ل اﻻﻧﺣ دار ھ و ﺗﻣﺛﯾ ل اﻟﺑﯾﺎﻧ ﺎت ﺑﯾﺎﻧﯾ ﺎ ً وھ و ﻣ ﺎ ﯾﻌ رف ﺑﺷ ﻛل‬ ‫اﻻﻧﺗﺷ ﺎر‪ scatter plot‬وذﻟ ك ﻣ ن ﻓﺋ ﺔ اﻟﻣﺷ ﺎھدات }‪ .{( x i , yi ); i  1,2,..., n‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﺷ ﻛل‬ ‫اﻻﻧﺗﺷ ﺎر ﯾﺧﺻ ص ﻣﺣ ور ‪) x‬اﻟﻣﺣ ور اﻷﻓﻘ ﻲ( ﻟﻠﻣﺗﻐﯾ ر ﻟﻠﻣﺳ ﺗﻘل ﺑﯾﻧﻣ ﺎ ﯾﺧﺻ ص ﻣﺣ ور ‪) y‬‬ ‫اﻟﻣﺣور اﻟرأﺳﻲ ( ﻟﻠﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ ‪ .‬ﻟﻛ ل زوج )‪ ( x, y‬ﻣ ن أزواج اﻟﻣﺷ ﺎھدات اﻟﺗ ﻲ ﻋ ددھﺎ ‪ n‬ﻧﻘ وم‬ ‫ﺑﺗوﻗﯾ ﻊ ﻧﻘط ﺔ ﻋﻠ ﻰ اﻟرﺳ م ‪ .‬ﺗﺗ وﻓر ﻛﺛﯾ ر ﻣ ن ﺑ راﻣﺞ اﻟﺣﺎﺳ ب اﻵﻟ ﻲ اﻟﺟ ﺎھزة واﻟﺧﺎﺻ ﺔ ﺑﺎﻻﻧﺣ دار‬ ‫ﻣﺛ ل ﺑرﻧ ﺎﻣﺞ ‪ SPSS‬و ‪ Statistica‬و ‪ Minitab‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ أﺷ ﻛﺎل اﻻﻧﺗﺷ ﺎر‪ .‬ﯾﻔﯾ د ﺷ ﻛل‬ ‫اﻻﻧﺗﺷﺎر ﻓﯾﻣﺎ ﯾﻠﻲ ‪:‬‬ ‫) أ ( ﯾوﺿﺢ ﻋﻣوﻣﺎ ً ﻓﯾﻣﺎ إذا ﻛﺎﻧت ھﻧﺎك ﻋﻼﻗﺔ ظﺎھرة ﺑﯾن اﻟﻣﺗﻐﯾرﯾن أم ﻻ ‪.‬‬ ‫)ب( ﻋﻧد وﺟود ﻋﻼﻗﺔ ﯾوﺿﺢ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﯾﻣﺎ إذا ﻛﺎﻧت اﻟﻌﻼﻗﺔ ﺧطﯾﺔ أم ﻻ ‪.‬‬

‫‪٢‬‬


‫)ج ( إذا ﻛﺎﻧت اﻟﻌﻼﻗﺔ ﺧطﯾﺔ ﻓﺈن ﺷﻛل اﻻﻧﺗﺷﺎر ﯾوﺿﺢ ﻓﯾﻣﺎ إذا ﻛﺎﻧ ت ﺳ ﺎﻟﺑﺔ )ﻋﻛﺳ ﯾﺔ( أو ﻣوﺟﺑ ﺔ‬ ‫)طردﯾﮫ(‪.‬‬

‫ﻣﺛﺎل )‪(١-٤‬‬ ‫ﻓﻲ إﺣدى اﻟﺗﺟﺎرب وزن ﻗرون ﻋدد ﻣن اﻟﻐ زﻻن اﻟﻣﺧﺗﻠﻔ ﺔ اﻷﻋﻣ ﺎر وﻛﺎﻧ ت اﻟﻧﺗ ﺎﺋﺞ ﻛﻣ ﺎ ھ ﻲ ﻣﻌط ﺎة ﻓ ﻲ‬ ‫اﻟﺟدول اﻟﺗﺎﻟﻰ‪ .‬اﻟﻣطﻠوب رﺳم ﺷﻛل اﻻﻧﺗﺷﺎر وﺗﺣدﯾد ﺷﻛل اﻟﻌﻼﻗﺔ ﺑﯾن اﻟﻣﺗﻐﯾرﯾن ‪.‬‬ ‫‪70‬‬

‫‪69‬‬

‫‪55‬‬

‫‪53‬‬

‫‪46‬‬

‫‪43‬‬

‫‪42‬‬

‫‪34‬‬

‫‪30‬‬

‫‪22‬‬

‫‪20‬‬

‫اﻟﻌﻤﺮ ‪x‬‬

‫‪0.49‬‬

‫‪0.48‬‬

‫‪0.40‬‬

‫‪0.35‬‬

‫‪0.30‬‬

‫‪0.25‬‬

‫‪0.26‬‬

‫‪0.20‬‬

‫‪0.15‬‬

‫‪0.10‬‬

‫‪0.08‬‬

‫اﻟﻮزن ‪y‬‬

‫اﻟﺣــل‪:‬‬ ‫ﯾﺗﺿ ﺢ ﻣ ن ﺷ ﻛل )‪ (١-٤‬أن اﻟ ﻧﻘط ﻋﻣوﻣ ﺎ ‪ ،‬ﻟ ﯾس ﺑﺎﻟﺿ ﺑط ‪ ،‬ﺗﻘ ﻊ ﻋﻠ ﻰ ﺧ ط ﻣﺳ ﺗﻘﯾم‪ .‬ھ ذا‬ ‫ﯾﺟﻌﻠﻧﺎ ﻧﻘﺗرح أن اﻟﻌﻼﻗﺔ ﺑﯾن اﻟﻣﺗﻐﯾرﯾن ﯾﻣﻛن وﺻﻔﮭﺎ ) ﻛﺗﻘرﯾب أوﻟﻲ( ﺑﻣﻌﺎدﻟﺔ ﺧط ﻣﺳﺗﻘﯾم ‪.‬‬

‫ﺷﻛل )‪(١-٤‬‬

‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫;}‪x={20,22,30,34,42,43,46,53,55,69,70‬‬ ‫‪y={0.08,0.10,0.15,0.20,0.26,0.25,0.30,0.35,0.40,0.48,0.49‬‬ ‫;}‬ ‫]}‪t1=Transpose[{x,y‬‬ ‫‪{{20,0.08},{22,0.1},{30,0.15},{34,0.2},{42,0.26},{43,0.25‬‬ ‫}}‪},{46,0.3},{53,0.35},{55,0.4},{69,0.48},{70,0.49‬‬ ‫‪٣‬‬


‫}}‪c=PlotRange{{0,70},{0,.5‬‬ ‫}}‪PlotRange{{0,70},{0,0.5‬‬ ‫}]‪c2=Prolog{PointSize[0.03‬‬ ‫}]‪Prolog{PointSize[0.03‬‬ ‫]‪l=ListPlot[t1‬‬ ‫‪0.5‬‬

‫‪0.4‬‬

‫‪0.3‬‬

‫‪0.2‬‬

‫‪70‬‬

‫‪50‬‬

‫‪60‬‬

‫‪30‬‬

‫‪40‬‬

‫‪Graphics‬‬

‫]‪w2=ListPlot[t1,c,c2‬‬ ‫‪0.5‬‬ ‫‪0.4‬‬ ‫‪0.3‬‬ ‫‪0.2‬‬ ‫‪0.1‬‬

‫‪70‬‬

‫‪60‬‬

‫‪50‬‬

‫‪40‬‬

‫‪30‬‬

‫‪20‬‬

‫‪10‬‬

‫‪Graphics‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫)اﻟﻮزن( ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y .‬اﻟﻤﺴﻤﻰ )اﻟﻌﻤﺮ( ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﺑدون ﺧﯾﺎرات ﻣن اﻻﻣر‬ ‫]‪l=ListPlot[t1‬‬

‫‪٤‬‬


‫وﺑﺈﺳﺗﺧدام اﻻﻣر ‪ w2‬ﻧﺣﺻل ﻋﻠﻰ ﺷﻛل اﻻﻧﺗﺷﺎر ﺣﯾث اﻟﺧﯾﺎر ‪ c‬ﯾﺣدد اﻟﻣدى ﻟﻘﯾم اﻟﻣﺗﻐﯾر‬ ‫اﻟﻣﺳﺗﻘل وھو ﻣن ‪ 0.0‬إﻟﻰ ‪ 70‬و اﻟﻣدى ﻟﻘﯾم اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻣن ‪ 0.0‬إﻟﻰ ‪ . 0.5‬واﻟﺧﯾﺎر ‪c2‬‬ ‫واﻟذى ﯾﺣدد ﺣﺟم اﻟﻧﻘﺎط ﻓﻰ ﺷﻛل اﻻﻧﺗﺷﺎر ‪.‬‬

‫ﻣﺛﺎل )‪(٢-٤‬‬ ‫اﻟﺑﯾﺎﻧ ﺎت اﻟﺗﺎﻟﯾ ﺔ ﺗﻣﺛ ل ﻣﺗوﺳ ط ﺿ رﺑﺎت اﻟﺧﺻ م ‪ x‬وﻧﺳ ﺑﺔ اﻟﻔ وز ﻟﻔرﯾ ق ﻣ ﺎ وذﻟ ك ﻓ ﻰ ﻟﻌﺑ ﺔ ﻛ رة اﻟﺳ ﻠﺔ‬ ‫واﻟﻣطﻠوب رﺳم اﻻﻧﺗﺷﺎر وﺗﺣدﯾد ﺷﻛل اﻻﻧﺗﺷﺎر‪.‬‬ ‫‪X‬‬ ‫‪0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.264,0‬‬ ‫‪.280,0.266,0.268,0.286,‬‬ ‫‪Y‬‬ ‫‪0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405,0‬‬ ‫‪.450,0.480,0.456,0.506.‬‬

‫اﻟﺣل ‪:‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ‬

‫‪ Mathematica‬وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬

‫`‪Statistics`LinearRegression‬‬

‫وذﻟك ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰ ‪:‬‬ ‫`‪<<Statistics`LinearRegression‬‬ ‫ﯾﺗم ادﺧﺎل اﻟﺑﯾﺎﻧﺎت اﻟﺗﻰ ﺗﺧص اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل ﻓﻰ ﻗﺎﺋﻣﺔ ﺗﺳﻣﻰ‬ ‫‪ oppbavg‬ﻛﻣﺎ ﯾﺗم ادﺧﺎل اﻟﺑﯾﺎﻧﺎت اﻟﺗﻰ ﺗﺧص اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻓﻰ ﻗﺎﺋﻣﺔ ﺗﺳﻣﻰ‬ ‫‪ winpct‬وﺷﻛل اﻻﻧﺗﺷﺎر ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪. dots‬‬ ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪:‬‬ ‫`‪<<Statistics`LinearRegression‬‬ ‫‪oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,‬‬ ‫;}‪0.274,0.264,0.280,0.266,0.268,0.286‬‬ ‫‪winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0‬‬ ‫;}‪.512,0.405,0.450,0.480,0.456,0.506‬‬ ‫‪dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp‬‬ ‫]}]‪ct‬‬ ‫{‪{{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},‬‬ ‫‪0.25,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.2‬‬ ‫‪74,0.512},{0.264,0.405},{0.28,0.45},{0.266,0.48},{0.268,0‬‬ ‫}}‪.456},{0.286,0.506‬‬ ‫]‪Clear[dots‬‬ ‫]}]‪dots=ListPlot[dpoints,Prolog->{PointSize[0.02‬‬

‫‪٥‬‬


‫‪0.6‬‬

‫‪0.55‬‬

‫‪0.5‬‬

‫‪0.45‬‬

‫‪0.27‬‬

‫‪0.28‬‬

‫‪0.26‬‬

‫‪0.25‬‬

‫‪Graphics‬‬

‫)‪ (٤-٤‬ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط‬ ‫ﻓﻲ ﺣﺎﻟ ﺔ اﻻﻧﺣ دار اﻟﺧط ﻲ اﻟﺑﺳ ﯾط ﺣﯾ ث ﯾوﺟ د ﻣﺗﻐﯾ ر ﻣﺳ ﺗﻘل واﺣ د ‪ x‬وﻣﺗﻐﯾ ر ﺗ ﺎﺑﻊ ‪ Y‬ﻓ ﺈن‬ ‫اﻟﺑﯾﺎﻧ ﺎت ﺗﻣﺛ ل ﺑ ﺄزواج اﻟﻣﺷ ﺎھدات }‪{(.x i , yi ); i  1,2,..., n‬ﺳ ﻧﻌرف ﻛ ل ﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ‬ ‫‪ Yi  Y | x i‬ﺑﻧﻣ وذج إﺣﺻ ﺎﺋﻲ ‪ Statistical model‬وذﻟ ك ﺗﺣ ت ﻓ رض أن ﻛ ل اﻟﻣﺗوﺳ طﺎت‬ ‫‪  Y| x‬ﺗﻘﻊ ﻋﻠ ﻰ ﺧ ط ﻣﺳ ﺗﻘﯾم ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪ .(٢-٤‬وﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن ﻛ ل ﻣﺗﻐﯾ ر ‪Yi‬‬ ‫ﯾﻣﻛن وﺻﻔﮫ ﺑﻧﻣوذج اﻧﺣدار ﺑﺳﯾط ﻛﺎﻟﺗﺎﻟﻲ‪:‬‬ ‫‪i‬‬

‫)‪(١-٤‬‬

‫‪Yi   Y|xi  i   0  1x i   i ,‬‬

‫ﺣﯾث اﻟﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ ‪ ،  i‬ﺧطﺄ اﻟﻧﻣوذج ‪ ،‬ﻻﺑد أن ﯾﻛون ﻟﮫ ﻣﺗوﺳط ﯾﺳﺎوي ﺻﻔر‪.‬‬

‫ﺷﻛل )‪(٢-٤‬‬ ‫ﺗﺷﯾر اﻟﻣﻌﻠﻣﺔ ‪ 1‬ﻓﻲ ﻧﻣوذج اﻻﻧﺣدار )‪) (١-٤‬واﻟﺗﻲ ھﻲ ﻣﯾل ﺧط اﻻﻧﺣ دار( إﻟ ﻰ اﻟﺗﻐﯾ ر ﻓ ﻲ‬ ‫ﻣﺗوﺳ ط اﻟﺗوزﯾ ﻊ اﻻﺣﺗﻣ ﺎﻟﻲ ﻟﻠﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ ‪ Y‬ﻟﻛ ل وﺣ دة زﯾ ﺎدة ﻓ ﻲ ‪ .x‬أﻣ ﺎ اﻟﻣﻌﻠﻣ ﺔ ‪ 0‬ﻓﺗﻣﺛ ل‬ ‫اﻟﺗﻘﺎطﻊ اﻟﺻ ﺎدي ﻟﺧ ط اﻻﻧﺣ دار‪ .‬وإذا اﺣﺗ وى ﻣ دى اﻟﻧﻣ وذج ﻋﻠ ﻰ اﻟﻘﯾﻣ ﺔ ‪ x  0‬ﻓ ﺎن ‪ 0‬ﺗﻌط ﻲ‬ ‫ﻣﺗوﺳط اﻟﺗوزﯾﻊ اﻻﺣﺗﻣﺎﻟﻲ ﻟﻣﺗﻐﯾر ‪ Y‬ﻋﻧدﻣﺎ ‪ . x  0‬وﻟﯾس ﻟﻠﻣﻌﻠﻣﺔ ‪ 0‬أي ﺗﻔﺳﯾر ﺧﺎص ﺑﮭ ﺎ ﻛﺣ د‬ ‫ﻣﻧﻔﺻل ﻓﻲ ﻧﻣوذج اﻻﻧﺣدار إذا ﻟم ﯾﺗﺿﻣن ﻣﺟﺎﻟﮫ اﻟﻘﯾﻣﺔ ‪. x  0‬‬ ‫ﯾﻘﺎل ﻋن اﻟﻧﻣوذج )‪ (١-٤‬اﻧﮫ ﺑﺳ ﯾط وﺧط ﻲ ﻓ ﻲ اﻟﻣﻌ ﺎﻟم وﺧط ﻲ ﻓ ﻲ اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل‪ .‬ﻓﮭ و‬ ‫ﺑﺳﯾط ﻷﻧﮫ ﯾﺳﺗﺧدم ﻣﺗﻐﯾرا ﻣﺳﺗﻘﻼ واﺣدا ﻓﻘط‪ ،‬وﺧط ﻲ ﻓ ﻲ اﻟﻣﻌ ﺎﻟم ﻷﻧ ﮫ ﻻ ﺗظﮭ ر أي ﻣﻌﻠﻣ ﮫ ﻛ ﺄس‬ ‫أو ﻣﺿروﺑﺔ ﺑﻣﻌﻠﻣﮫ أﺧ رى‪ ،‬وﺧط ﻲ ﻓ ﻲ اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ﻻن ھ ذا اﻟﻣﺗﻐﯾ ر ﻻ ﯾظﮭ ر إﻻ ﻣرﻓوﻋ ﺎ‬ ‫‪٦‬‬


‫ﻟ ﻸس اﻟواﺣ د‪ .‬أﯾﺿ ﺎ ﯾﻌ رف اﻟﻧﻣ وذج )‪ (١-٤‬ﺑ ﺎﻟﻧﻣوذج ﻣ ن اﻟرﺗﺑ ﺔ اﻷوﻟ ﻰ واﻟ ذي ﯾﺧﺗﻠ ف ﻋ ن‬ ‫اﻟﻧﻣوذج اﻟﺑﺳﯾط اﻟﺗﺎﻟﻲ‪:‬‬ ‫‪Yi   0  1x 2   i‬‬

‫واﻟذي ﯾﻛون ﺧطﻲ ﻓﻲ اﻟﻣﻌﺎﻟم وﻏﯾر ﺧطﻲ ﻓﻲ اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ﻻن ھ ذا اﻟﻣﺗﻐﯾ ر ﯾظﮭ ر ﻣرﻓوﻋ ﺎ‬ ‫ﻟﻸس ‪ 2‬وﯾﻣﺛل ﻧﻣوذج ﺧطﻲ ﻓﻲ اﻟﻣﻌﺎﻟم وﻣن اﻟرﺗﺑﺔ اﻟﺛﺎﻧﯾﺔ ﻓﻲ ‪.x‬‬ ‫ﻛل ﻣﺷﺎھدة ) ‪ ( x i , yi‬ﻓﻲ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم ‪ n‬ﺗﺣﻘق اﻟﻌﻼﻗﺔ ‪:‬‬ ‫‪yi   0  1x i  e*i‬‬

‫ﺣﯾ ث ‪ e *i‬ﻗﯾﻣ ﺔ ﻣﻔﺗرﺿ ﺔ ﻟﻠﻣﺗﻐﯾ ر ‪  i‬ﻋﻧ دﻣﺎ ‪ Yi‬ﺗﺄﺧ ذ اﻟﻘﯾﻣ ﺔ ‪ . yi‬اﻟﻣﻌﺎدﻟ ﺔ اﻟﺳ ﺎﺑﻘﺔ ﯾﻧظ ر إﻟﯾﮭ ﺎ‬ ‫ﻛﻧﻣوذج ﻟﻣﺷﺎھده ﻣﻔرده ‪ . yi‬ﺑﻧﻔس اﻟﺷﻛل ‪ ،‬ﺑﺎﺳﺗﺧدام ﻣﻌﺎدﻟﺔ ﺧط اﻻﻧﺣدار اﻟﻣﻘدرة ﻓﺈن ‪:‬‬ ‫‪y i  b 0  b1 x i  e i ,‬‬

‫ﺣﯾ ث ‪ e i  y i  yˆ i‬ﺗﺳ ﻣﻰ اﻟﺑ ﺎﻗﻲ ‪ residual‬واﻟ ذي ﯾﺻ ف ﺧط ﺄ ﻓ ﻲ ﺗوﻓﯾ ق اﻟﻧﻣ وذج ﻋﻧ د ﻧﻘط ﺔ‬ ‫اﻟﻣﺷﺎھدة رﻗم ‪ . i‬اﻟﻔ رق ﺑ ﯾن ‪ e i‬و ‪ e*i‬ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪.(٣–٤‬و ﯾوﺿ ﺢ ﺷ ﻛل )‪ (٣ -٤‬اﻟﺧ ط‬ ‫اﻟﻣﻘدر ﻣ ن ﻓﺋ ﺔ اﻟﺑﯾﺎﻧ ﺎت واﻟﻣﺳ ﻣﻰ ‪ yˆ b 0  b1 x‬وﺧ ط اﻻﻧﺣ دار اﻟﺣﻘﯾﻘ ﻲ ‪ .  Y|x   0  1x‬اﻵن‬ ‫ﺑ ﺎﻟطﺑﻊ ‪  0 ,1‬ﻣﻌﻠﻣﺗ ﯾن ﻏﯾ ر ﻣﻌﻠ وﻣﺗﯾن‪ .‬ﯾﻌﺗﺑ ر اﻟﺧ ط اﻟﻣﻘ در ﺗﻘ دﯾر ﻟﻠﺧ ط ‪ .  Y|x‬وﻣﻣ ﺎ ﯾﺟ در‬ ‫ﯾﻣﻛ ن ﻣﻼﺣظﺗﮭ ﺎ‪ ،‬أﻣ ﺎ ‪e*i‬ﻓ ﻼ ﯾﻣﻛ ن ﻣﻼﺣظﺗﮭ ﺎ ﻷن اﻟﺧ ط ‪  Y|x‬ﻣﻔﺗ رض‬ ‫اﻹﺷ ﺎرة إﻟﯾ ﮫ أن ‪e i‬‬ ‫وﻏﯾر ﻣﻌروف‪.‬‬

‫ﺷﻛل )‪(٣-٤‬‬

‫)‪ (٥-٤‬ﻓروض ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط‬ ‫ﻟﺗﻘ دﯾر ﻣﻌ ﺎﻟم ﻧﻣ وذج اﻻﻧﺣ دار )‪ (١– ٤‬ﺗوﺿ ﻊ اﻟﻔ روض اﻟﺗﺎﻟﯾ ﺔ ﻟﺣ د اﻟﺧط ﺄ ‪ i‬واﻟﻣﺳ ﻣﺎة‬ ‫ﻓروض ﺟﺎوس ـ ﻣﺎرﻛوف ‪.Gauss-Markov‬‬ ‫‪, E(i )  0‬‬

‫‪E(i j )  0 , E ( i2 )   2‬‬ ‫ﺣﯾث ‪ i  j‬ﻟﻛل ‪ i, j  1,..., n‬أي أن ‪  j , i‬ﻏﯾر ﻣرﺗﺑطﺗﯾن‪.‬‬ ‫وﻋﻠﻰ ذﻟك‪:‬‬ ‫‪E ( Yi )  0  1 x i , Var ( Yi )   2 .‬‬

‫‪٧‬‬


‫ھﻧ ﺎك ﻓ روض أﺧ رى ﻧﺣﺗ ﺎج ﻟﮭ ﺎ ﻋﻧ د إﺟ راء ﻓﺗ رات ﺛﻘ ﺔ واﺧﺗﺑ ﺎرات ﻓ روض ﺗﺧ ص‬ ‫اﻟﻣﻌﻠﻣﺗﯾن ‪  0 ,1‬وھﻲ أن ‪  i‬ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺑﻣﺗوﺳط ﺻﻔر وﺗﺑﺎﯾن ‪ ، 2‬أي أن‪:‬‬ ‫‪ i ~ N ( 0,  2 ) .‬‬

‫ﺗوزﯾﻊ ‪  i‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪. ( ٤– ٤‬‬

‫ﺷﻛل )‪( ٤– ٤‬‬

‫)‪ (٦-٤‬طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى‬ ‫‪Squares‬‬

‫‪Least‬‬

‫‪of‬‬

‫‪Method‬‬

‫‪The‬‬

‫ﺑ ﺎﻟرﻏم ﻣ ن وﺟ ود اﻟﻌدﯾ د ﻣ ن اﻟط رق ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﺗﻘ دﯾرات ﻟﻠﻣﻌﻠﻣﺗ ﯾن ‪ 0 , 1‬إﻻ أن‬ ‫أﻓﺿل ھذه اﻟطرق ھﻲ طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى‪.‬‬ ‫ﺗﺗطﻠب طرﯾﻘﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى اﻟﺣﺻ ول ﻋﻠ ﻰ اﻟﺗﻘ دﯾرﯾن ‪ b 0 , b1‬وذﻟ ك ﻟﻠﻣﻌﻠﻣﺗ ﯾن ‪0 ,1‬‬ ‫ﻋﻠﻰ اﻟﺗواﻟﻲ اﻟﻠذﯾن ﯾﺟﻌﻼن ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻷﺧط ﺎء )اﻟﺑ واﻗﻲ( ‪ SSE‬اﻗ ل ﻣ ﺎ ﯾﻣﻛ ن‪ ،‬أي اﻟﻠ ذﯾن‬ ‫ﯾﺣﻘﻘ ﺎن اﻟﻧﮭﺎﯾ ﺔ اﻟﺻ ﻐرى ﻟﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻲ‪ ،‬ﺣﯾ ث ﯾﻌ رف ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻲ‬ ‫ﻛﺎﻵﺗﻲ‪:‬‬ ‫‪n‬‬

‫‪n‬‬

‫‪n‬‬

‫‪i 1‬‬

‫‪i 1‬‬

‫‪SSE   e i2    y i  yˆ i    y i  b 0  b1 x i  .‬‬ ‫‪2‬‬

‫‪i 1‬‬

‫‪2‬‬

‫ﯾﻣﻛن ﺣﺳﺎب ‪ b1‬ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ واﻟﻣﻧﺎﺳﺑﺔ ﻻﺳﺗﺧدام اﻵﻟﺔ اﻟﺣﺎﺳﺑﺔ ‪:‬‬ ‫‪SXY‬‬ ‫‪b1 ‬‬ ‫‪SXX‬‬ ‫ﺣﯾث ‪:‬‬ ‫‪2‬‬ ‫‪‬‬ ‫‪ xi ‬‬ ‫‪‬‬

‫‪2‬‬ ‫‪ xi‬‬

‫‪SXX ‬‬

‫‪,‬‬ ‫‪n‬‬ ‫‪ x i  yi‬‬ ‫‪SXY   x i yi ‬‬ ‫‪.‬‬ ‫‪n‬‬ ‫ﻛﻣﺎ ﯾﻣﻛن ﺣﺳﺎب ‪ b 0‬ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪b 0  y  b1 x .‬‬

‫‪٨‬‬


‫ﺣﯾ ث ‪ x , y‬ﯾرﻣ زان ﻟﻠوﺳ ط اﻟﺣﺳ ﺎﺑﻲ ﻟﻠﻌﯾﻧ ﺔ ﻟﻠﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ‪ x‬واﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ ‪ Y‬ﻋﻠ ﻰ‬ ‫اﻟﺗواﻟﻲ‪.‬‬

‫ﻣﺛﺎل )‪(٣-٤‬‬ ‫أﺟرﯾت ﺗﺟرﺑﺔ ﻟدراﺳﺔ اﻟﻌﻼﻗﺔ ﺑﯾن اﻟﺗﺳﻣﯾد وﻣﺣﺻ ول اﻟ ذرة‪ .‬اﻟﺑﯾﺎﻧ ﺎت اﻟﺗ ﻲ ﺗ م اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ‬ ‫ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬ ‫‪0.3‬‬ ‫‪0.6‬‬ ‫‪0.9‬‬ ‫‪1.2‬‬ ‫‪1.5‬‬ ‫‪1.8‬‬ ‫‪2.1‬‬ ‫‪2.4‬‬ ‫‪ x‬اﻟﺳﻣﺎد‬ ‫‪10‬‬ ‫‪15‬‬ ‫‪30‬‬ ‫‪35‬‬ ‫‪25‬‬ ‫‪30‬‬ ‫‪50‬‬ ‫‪45‬‬ ‫‪ y‬اﻟﻣﺣﺻول‬ ‫أوﺟد ﻣﻌﺎدﻟﺔ ﺧط اﻻﻧﺣدار اﻟﻣﻘدرة‬

‫اﻟﺣــل‪:‬‬ ‫ﻧﻔﺗرض اﻟﻧﻣوذج اﻟﺧطﻰ اﻟﺑﺳﯾط ‪:‬‬ ‫ﺑﻣﺎ أن ‪ 0 , 1‬ﻣﺟﮭوﻟﺗﺎن ﻓﺈﻧﻧﺎ ﻧﻘدرھﻣﺎ ﻣن ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ﺣﯾث ‪:‬‬ ‫‪ x i2  18.36‬‬

‫‪ x i  10.8‬‬ ‫‪,‬‬

‫‪x  1.35‬‬

‫‪n 8‬‬ ‫‪,‬‬

‫‪ x i yi  385.5‬‬

‫‪y  30,‬‬ ‫‪ y i  240.‬‬ ‫‪x y‬‬ ‫‪x i yi  i i‬‬ ‫‪SXY‬‬ ‫‪n‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪SXX‬‬ ‫‪(x i ) 2‬‬ ‫‪2‬‬ ‫‪x i ‬‬ ‫‪n‬‬ ‫)‪(10.8)(240‬‬ ‫‪385.5 ‬‬ ‫‪8‬‬ ‫‪‬‬ ‫‪(10.8)2‬‬ ‫‪18.36 ‬‬ ‫‪8‬‬ ‫‪61.5‬‬ ‫‪‬‬ ‫‪ 16.27,‬‬ ‫‪3.78‬‬ ‫‪b 0  y  b1x  30  (16.27)(1.35)  8.036.‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪yˆ  8.036  16.27 x.‬‬

‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫;}‪x={.3,.6,.9,1.2,1.5,1.8,2.1,2.4‬‬ ‫‪٩‬‬


y={10,15,30,35,25,30,50,45}; a[x_]:=Length[x] k[x_]:=Apply[Plus,x]

wx_ :

kx ax

lx_, y_ : kx  y 

kx  ky ax

n=a[x] 8 xb=w[x] 1.35 yb=w[y] 30 sxx=l[x,x] 3.78 sxy=l[x,y] 61.5

b1 

sxy sxx

16.2698 b0=yb-b1*xb 8.03571 t=Transpose[{x,y}] {{0.3,10},{0.6,15},{0.9,30},{1.2,35},{1.5,25},{1.8,30},{2 .1,50},{2.4,45}} c=PlotRange{{0,4},{0,60}} PlotRange{{0,4},{0,60}} c2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} w=ListPlot[t,c,c2] 60 50 40 30 20 10

0.5

1

1.5

2

2.5

3

Graphics w2=Plot[b0+b1*x,{x,0,4}]

١٠

3.5

4


‫‪70‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬ ‫‪3‬‬

‫‪4‬‬

‫‪1‬‬

‫‪2‬‬

‫‪Graphics‬‬ ‫]‪Show[w,w2‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬

‫‪4‬‬

‫‪3.5‬‬

‫‪3‬‬

‫‪2.5‬‬

‫‪2‬‬

‫‪1.5‬‬

‫‪1‬‬

‫‪0.5‬‬

‫‪Graphics‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪y .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫‪ x‬ﻣن اﻻﻣر‬ ‫]‪xb=w[x‬‬

‫و ‪ y‬ﻣن اﻻﻣر‬ ‫]‪yb=w[y‬‬ ‫اﻟﺗﻘدﯾر ‪ b1‬ﻣن اﻻﻣر‬

‫‪sxy‬‬ ‫‪sxx‬‬ ‫‪b‬‬ ‫واﻟﺗﻘدﯾر ‪ 0‬ﻣن اﻻﻣر‬ ‫‪b1 ‬‬

‫‪b0=yb-b1*xb‬‬

‫وﺷﻛل اﻻﻧﺗﺷﺎر ﻣن اﻻﻣر‬ ‫]‪w=ListPlot[t,c,c2‬‬

‫وﺗﻣﺛﯾل ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار ﺑﯾﺎﻧﯾﺎ ﻣن اﻻﻣر‬ ‫]}‪w2=Plot[b0+b1*x,{x,0,4‬‬

‫وﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار ﺑﯾﺎﻧﯾﺎ ﻣن اﻻﻣر ]‪.Show[w,w2‬‬ ‫‪١١‬‬


(٤-٤) ‫ﻣﺛﺎل‬ . ‫( اﻟﻣطﻠوب إﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة‬٢-٤)‫ﻟﻠﻣﺛﺎل‬

‫ وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ‬ . ‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬Statistics`LinearRegression` <<Statistics`LinearRegression` oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp ct]}] {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{ 0.25,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.2 74,0.512},{0.264,0.405},{0.28,0.45},{0.266,0.48},{0.268,0 .456},{0.286,0.506}} Clear[dots] dots=ListPlot[dpoints,Prolog->{PointSize[0.02]}] 0.6

0.55

0.5

0.45

0.25

0.26

0.27

0.28

Graphics Regress[dpoints,{1,x},x,RegressionReport->BestFit] {BestFit1.07813 -2.2171 x} lsq[x_]=Fit[dpoints,{1,x},x] 1.07813 -2.2171 x plotline=Plot[lsq[x],{x,0.24,0.29}, DisplayFunction->Identity]; Show[dots,plotline,DisplayFunction->$DisplayFunction]

١٢


‫‪0.6‬‬

‫‪0.55‬‬ ‫‪0.5‬‬

‫‪0.45‬‬

‫‪0.29‬‬

‫‪0.27‬‬

‫‪0.28‬‬

‫‪0.26‬‬

‫‪0.25‬‬

‫‪Graphics‬‬ ‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫ﯾﺳﺗﺧدام اﻻﻣر ‪:‬‬ ‫]‪Regress[dpoints,{1,x},x,RegressionReport->BestFit‬‬ ‫ﻟﻠﺣﺻول ﻋﻠﻰ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة واﻟﻣﺧرج ھو ‪:‬‬ ‫}‪.{BestFit1.07813 -2.2171 x‬‬

‫وﻧﺣﺻل ﻋﻠﻰ ﻧﻔس اﻟﻧﺗﯾﺟﺔ ﻣن اﻻﻣر ‪:‬‬ ‫]‪lsq[x_]=Fit[dpoints,{1,x},x‬‬

‫وﺑﺎﻻﻣرﯾن اﻟﺗﺎﻟﯾﯾن ‪:‬‬ ‫‪plotline=Plot[lsq[x],{x,0.24,0.29},‬‬ ‫;]‪DisplayFunction->Identity‬‬ ‫]‪Show[dots,plotline,DisplayFunction->$DisplayFunction‬‬

‫ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺑﯾﺎﻧﯾﺎ‪.‬‬

‫)‪ (٧-٤‬ﺗﺣﻠﯾل اﻻﻧﺣدار‬

‫‪Analysis of Variance‬‬

‫ﻻﺧﺗﺑﺎر ﻣﻌﻧوﯾﺔ ﻣﻌﺎﻣل اﻻﻧﺣدار ‪ 1‬أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 1  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 1  0‬‬ ‫ﯾﺟب دراﺳﺔ ﻣﻛوﻧﺎت ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠﻰ وﯾﻣﻛن اﻟرﻣز اﻟﯾﮫ ﺑﺎﻟﻣﺗﺳﺎوﯾﺔ اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫‪SSTO = SSR+ SSE .‬‬ ‫ﺣﯾ ث ﻣﺟﻣ وع اﻟﻣرﺑﻌ ﺎت اﻟﻛﻠ ﻰ ‪ SSTO‬ﯾﺳ ﺎوى ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻻﻧﺣ دار‪ SSR‬ﻣﺿ ﺎف إﻟ ﻰ‬ ‫ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت ﺣول اﻻﻧﺣدار‪: SSE‬‬ ‫ﺣﯾث ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠـﻲ ھو ‪:‬‬ ‫‪2‬‬ ‫‪2 yi‬‬ ‫‪SSTO  SYY  yi ‬‬ ‫‪,‬‬ ‫‪n‬‬ ‫وﻣﺟﻣوع ﻣرﺑﻌﺎت اﻻﻧﺣدار ھو ‪:‬‬ ‫‪2‬‬ ‫)‪(SXY‬‬ ‫‪SSR ‬‬ ‫‪,‬‬ ‫‪SXX‬‬ ‫وﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطـﺄ ھو ‪:‬‬ ‫‪١٣‬‬


‫‪SSE = SSTO – SSR .‬‬ ‫ﻣ ن اﻟﻧﺎﺣﯾ ﺔ اﻹﺣﺻ ﺎﺋﯾﺔ ﻧﺟ د أن ﻟﻛ ل ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت درﺟ ﺎت ﺣرﯾ ﺔ ﺧﺎﺻ ﺔ ﺑ ﮫ ‪ ،‬ﻓ ﺈذا ﻛ ﺎن‬ ‫ﻟ دﯾﻧﺎ ‪ n‬ﻣ ن اﻟﻣﺷ ﺎھدات ﻓ ﺈن ﺗوزﯾ ﻊ درﺟ ﺎت اﻟﺣرﯾ ﺔ ﯾﻛ ون ﻋﻠ ﻰ اﻟﺷ ﻛل اﻟﻣوﺿ ﺢ ﻓ ﻲ اﻟﺟ دول‬ ‫اﻟﺗﺎﻟﻰ‪:‬‬ ‫درﺟﺎت اﻟﺣرﯾﺔ‬ ‫ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت‬ ‫‪1‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻻﻧﺣدار‬ ‫‪n-2‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطـﺄ‬ ‫‪n–1‬‬ ‫ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠـﻲ‬ ‫ﺑﻘﺳﻣﺔ ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت ﺑدرﺟﺎت اﻟﺣرﯾﺔ اﻟﺧﺎﺻﺔ ﺑﮫ ﻧﺣﺻ ل ﻋﻠ ﻰ ﻣ ﺎ ﯾﺳ ﻣﻲ ﻣﺗوﺳ ط اﻟﻣرﺑﻌ ﺎت‬ ‫‪ mean squares‬وﯾﻌﺗﺑ ر ﺗﺑ ﺎﯾن اﻟﻌﯾﻧ ﺔ ‪ s2‬ﻣﺛ ﺎل ﻟﻣﺗوﺳ ط اﻟﻣرﺑﻌ ﺎت‪ .‬وﻋﻠ ﻰ ذﻟ ك ﻣﺗوﺳ ط‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻻﻧﺣدار ﻧرﻣز ﻟﮫ ﺑﺎﻟرﻣز ‪ ، MSR‬ھو ‪:‬‬ ‫‪SSR‬‬ ‫‪.‬‬ ‫‪MSR ‬‬ ‫‪1‬‬ ‫وﻣﺗوﺳط ﻣرﺑﻌﺎت اﻟﺧطﺄ ‪ ،‬ﻧرﻣز ﻟﮫ ﺑﺎﻟرﻣز ‪ ، MSE‬ھو ‪:‬‬ ‫‪SSE‬‬ ‫‪.‬‬ ‫‪MSE ‬‬ ‫‪n2‬‬ ‫ﻣن اﻟﻧﺗﺎﺋﺞ اﻟﺳﺎﺑﻘﺔ ﯾﻣﻛ ن اﺷ ﺗﻘﺎق ﺟ دول ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾن ‪، ANALYSIS OF VARIANCE‬‬ ‫ﻟﻼﺧﺗﺻﺎر ﺟدول ‪ ، ANOVA‬واﻟﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫ﻣﺗوﺳط ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت‬

‫‪SSR‬‬ ‫‪1‬‬ ‫‪SSE‬‬ ‫‪MSE ‬‬ ‫‪n2‬‬ ‫‪MSR ‬‬

‫اﻻﺧﺗﻼف‬

‫ﻣﺟﻣوع‬ ‫اﻟﻣرﺑﻌﺎت‬ ‫‪SSR‬‬

‫درﺟﺎت‬ ‫اﻟﺣرﯾﺔ‬ ‫‪1‬‬

‫اﻻﻧﺣدار‬

‫‪SSE‬‬

‫‪n-2‬‬

‫اﻟﺧطـﺄ‬

‫‪SSTO‬‬

‫‪n–1‬‬

‫اﻟﻛﻠﻲ‬

‫اﻵن ‪:‬‬ ‫ﻻﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 : 1  0‬وﺑﺎﻋﺗﺑ ﺎر أن ﻓ رض‬ ‫اﻟﻌدم ﺻﺣﯾﺢ ﻓﺈن ‪:‬‬ ‫‪MSR‬‬ ‫‪f‬‬ ‫‪,‬‬ ‫‪MSE‬‬ ‫ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ ‪ F‬ﯾﺗﺑﻊ ﺗوزﯾﻊ ‪ F‬ﺑدرﺟﺎت ﺣرﯾ ﺔ ‪ . 1  1,  2  n  2‬ﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ‬ ‫‪ ‬ﻣﻧطﻘﺔ اﻟرﻓض )‪ F  f  (1, n  2‬ﺣﯾث )‪ f  (1,n  2‬ﺗﺳﺗﺧرج ﻣن ﺟ دول ﺗوزﯾ ﻊ ‪ F‬ﻓ ﻲ‬ ‫ﻣﻠﺣق )‪ (٤‬أو ﻣﻠﺣق )‪ (٥‬ﺑدرﺟﺎت ﺣرﯾﺔ ‪. 1  1,  2  n  2‬ﻛﻣﺎ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠ ﻰ ﻗ ﯾم‬ ‫‪ f‬ﺑﺎﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ‪ Mathematica‬ﻛﻣ ﺎ اوﺿ ﺣﻧﺎ ﻓ ﻰ اﻟﻔﺻ ل اﻟﺧ ﺎص ﺑ ﺎﻟﺗوزﯾﻊ اﻟﻌﯾﻧ ﻰ ‪.‬إذا‬ ‫وﻗﻌت ‪ f‬ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻧرﻓض ‪.H0‬‬

‫ﻣﺛﺎل )‪(٥-٤‬‬ ‫‪١٤‬‬


‫ﻗﺎم ﺑﺎﺣث ﺑﺟﻣﻊ اﻟﺑﯾﺎﻧﺎت ﻋن ﻋدد اﻷﻗراص اﻟﻣﻣﻐﻧطﺔ اﻟﻣﺳﺗﺧدﻣﺔ ) ‪ ( x‬وزﻣن اﻟﺧدﻣﺔ ) ‪ ( y‬ﺑﺎﻟدﻗﺎﺋق‬ ‫ﻟﻌﻣﻼء ﻋددھم ‪ 12‬واﻟﺑﯾﺎﻧﺎت ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫اﻟﻣطﻠوب ‪) :‬أ( إﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﺧطﻰ اﻟﻣﻘدرة ‪.‬‬ ‫)ب( اﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 : 1  0‬ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ‬ ‫‪.   0.05‬‬ ‫‪5‬‬ ‫‪239‬‬

‫‪1‬‬ ‫‪66‬‬

‫‪3‬‬ ‫‪142‬‬

‫‪5‬‬ ‫‪238‬‬

‫‪8‬‬ ‫‪377‬‬

‫‪3‬‬ ‫‪148‬‬

‫‪6‬‬ ‫‪279‬‬

‫‪7‬‬ ‫‪327‬‬

‫‪5‬‬ ‫‪228‬‬

‫‪2‬‬ ‫‪100‬‬

‫‪6‬‬ ‫‪272‬‬

‫‪x‬‬ ‫‪y‬‬

‫‪4‬‬ ‫‪197‬‬

‫اﻟﺣــل‪:‬‬ ‫‪n  12  x i  55  x i yi  14060‬‬ ‫‪ yi  2613 ,‬‬ ‫‪x  4.58333 ,‬‬ ‫‪y  217.75,‬‬ ‫‪x i2  299 , yi2  661865 ،‬‬ ‫‪x  y‬‬ ‫‪SXY  x i yi  i i‬‬ ‫‪n‬‬ ‫)‪(55)(2613‬‬ ‫‪ 14060 ‬‬ ‫‪ 2083.75,‬‬ ‫‪12‬‬ ‫‪2‬‬ ‫) ‪2 (xi‬‬ ‫‪SXX  x i ‬‬ ‫‪n‬‬ ‫‪2‬‬ ‫‪55‬‬ ‫‪‬‬ ‫‪ 299 ‬‬ ‫‪ 46.91667,‬‬

‫‪12‬‬ ‫‪SXY 2083.75‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪ 44.41385 ,‬‬ ‫‪SXX 46.91667‬‬ ‫‪b 0  y  b1 x‬‬ ‫)‪= 217.75 – (44.41385)(4.58333‬‬ ‫‪= 14.187‬‬ ‫وﻋﻠﻰ ذﻟك ﻓﺈن ﻣﻌﺎدﻟﺔ ﺧط اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ  14.187  44.41385.‬‬ ‫واﻟﻣوﺿﺣﺔ ﻓﻲ ﺷﻛل )‪. (٥-٤‬‬

‫‪١٥‬‬

‫‪.‬‬


‫ﺷﻛل )‪(٥-٤‬‬ ‫اﻵن ﻧﺣﺳب ‪:‬‬ ‫‪2‬‬

‫) ‪(yi‬‬ ‫‪n‬‬ ‫‪2‬‬ ‫)‪(2613‬‬ ‫‪ 92884.25,‬‬ ‫‪=661865 ‬‬ ‫‪12‬‬ ‫‪(SXY)2 (2083.75)2‬‬ ‫‪SSR ‬‬ ‫‪‬‬ ‫‪SXX‬‬ ‫‪46.91667‬‬

‫‪SSTO  SYY  yi2 ‬‬

‫‪ 92547.362.‬‬

‫وﺑطرح ‪ SSR‬ﻣن ‪ SSTO‬ﻧﺣﺻل ﻋﻠﻰ ‪:‬‬ ‫‪SSE = SSTO – SSR‬‬ ‫‪= 92884.25 – 92547.362‬‬ ‫‪= 336.888,‬‬ ‫‪SSR 92547.362‬‬ ‫‪MSR ‬‬ ‫‪‬‬ ‫‪ 92547.362.‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪SSE 336.888‬‬ ‫‪MSE ‬‬ ‫‪‬‬ ‫‪ 33.6888.‬‬ ‫‪n2‬‬ ‫‪10‬‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬

‫درﺟﺎت اﻟﺣرﯾﺔ‬ ‫‪1‬‬ ‫‪10‬‬ ‫‪11‬‬

‫ﻣﺗوﺳط ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت‬ ‫‪92547.362‬‬ ‫‪92547.362‬‬ ‫‪336.888‬‬ ‫‪33.6888‬‬ ‫‪92884.25‬‬

‫ﻣﺻدر اﻻﺧﺗﻼف‬ ‫اﻻﻧﺣدار‬ ‫اﻟﺧطﺄ‬ ‫اﻟﻛﻠﻲ‬

‫‪MSR 92547.362‬‬ ‫‪‬‬ ‫‪MSE‬‬ ‫‪33.6888‬‬ ‫‪= 2747.126.‬‬ ‫‪ f0.05 (1,10)  4.96‬واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ ‪ F‬ﻓ ﻲ ﻣﻠﺣ ق )‪ (٤‬ﺑ درﺟﺎت ﺣرﯾ ﺔ‬ ‫‪ . 1  1,  2  10‬ﻣﻧطﻘ ﺔ اﻟ رﻓض ‪ . F  4.96‬وﺑﻣ ﺎ ن ‪ f‬ﺗﻘ ﻊ ﻓ ﻲ ﻣﻧطﻘ ﺔ اﻟ رﻓض ﻧ رﻓض‬ ‫‪.H0‬‬ ‫‪f‬‬

‫)‪ (٨-٤‬ﺗﻘدﯾر‬

‫‪2‬‬

‫‪Estimating‬‬

‫‪2‬‬

‫اﻟﺗﻘدﯾر ﻟﻠﻣﻌﻠﻣﺔ ‪ ‬ﯾﻌﺗﻣد ﻋﻠﻰ اﻟﻧﻣوذج ‪ ،‬أي ﯾﻛون داﻟﺔ ﻓ ﻲ ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻷﺧط ﺎء ‪، SSE‬‬ ‫وﯾﺣﺳب ﻣن اﻟﻣﻌﺎدﻟﺔ اﻵﺗﯾﺔ ‪:‬‬ ‫‪SSE‬‬ ‫‪s2 ‬‬ ‫‪ MSE,‬‬ ‫‪n2‬‬ ‫‪2‬‬

‫‪١٦‬‬


‫أي أن ‪ s2‬ﯾﺳﺎوى ﻣﺗوﺳط ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺧط ﺄ‪ .‬اﻟﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ ‪ ‬ھ و ‪ s 2‬واﻟ ذي‬ ‫ﯾﺳﻣﻲ اﻟﺧطﺄ اﻟﻣﻌﯾﺎري ﻟﻼﻧﺣ دار ‪ .standard error of regression‬ﻟﻠﻣﺛ ﺎل ) ‪ (٥-٤‬ﻓ ﺈن‬ ‫‪:‬‬ ‫‪s  MSE  33.6888‬‬ ‫‪= 5.804.‬‬

‫)‪ (٩-٤‬ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﺑﺳﯾط ‪Coefficient of Simple Determination‬‬ ‫ﯾﻌرف ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﺑﺳﯾط ‪ r 2‬ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪SSR SSTO  SSE‬‬ ‫‪SSE‬‬ ‫‪r2 ‬‬ ‫‪‬‬ ‫‪1‬‬ ‫‪SSTO‬‬ ‫‪SSTO‬‬ ‫‪SSTO‬‬ ‫ﯾﺄﺧذ ‪ r 2‬اﻟواﺣد اﻟﺻﺣﯾﺢ ﻋﻧدﻣﺎ ﺗﻘﻊ اﻟﻘﯾم ‪ y1, y 2 ,..., y n‬ﻋﻠﻰ ﺧط اﻻﻧﺣدار اﻟﻣﻘدر ‪.‬‬ ‫ﻋﻧدﻣﺎ ‪ r 2  0‬ﻓﮭذا ﯾدل ﻋﻠﻰ ﻋدم وﺟود ﻋﻼﻗﺔ ﺧطﯾﮫ ﺑﯾن اﻟﻣﺗﻐﯾرﯾن‪.‬‬ ‫ﻣﻌﺎﻣل اﻟﺗﺣدﯾد داﺋﻣﺎ ﻣوﺟب وﺗﺗراوح ﻗﯾﻣﺗﮫ ﺑﯾن اﻟﺻﻔر واﻟواﺣد اﻟﺻﺣﯾﺢ أي أن ‪:‬‬ ‫‪0  r2  1‬‬

‫ﻣﺛﺎل )‪(٦-٤‬‬ ‫ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل )‪ (٥-٤‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪ H 0 : 1  0‬ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪ H1 : 1  0‬ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪   0.05‬و ﺣﺳﺎب اﻟﺧطﺄ اﻟﻣﻌﯾﺎري ﻟﻼﻧﺣدار و ﻣﻌﺎﻣل‬ ‫اﻟﺗﺣدﯾد اﻟﺑﺳﯾط وذﻟك ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪=.05‬‬ ‫‪0.05‬‬ ‫}‪x1={4,6.,2,5,7,6,3,8,5,3,1,5‬‬ ‫}‪{4,6.,2,5,7,6,3,8,5,3,1,5‬‬ ‫}‪y1={197.,272,100,228,327,279,148,377,238,142,66,239‬‬ ‫}‪{197.,272,100,228,327,279,148,377,238,142,66,239‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪4.58333‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪217.75‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪44.4139‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪14.1865‬‬ ‫‪١٧‬‬


t1=Transpose[{x1,y1}] {{4,197.},{6.,272},{2,100},{5,228},{7,327},{6,279},{3,148 },{8,377},{5,238},{3,142},{1,66},{5,239}} a=PlotRange{{0,9},{0,400}} PlotRange{{0,9},{0,400}} a1=Prolog{PointSize[.03]} Prolog{PointSize[0.03]} g= ListPlot[t1,a,a1] 400 350 300 250 200 150 100 50 2

4

6

8

Graphics

d=Plot[b0+b1*x,{x,0,5}] 200 150 100 50

1

2

3

4

Graphics Show[g,d]

١٨

5


400 350 300 250 200 150 100 50 2

4

Graphics n=l[x1] 12 ssto=c[y1,y1] 92884.3 ssr=c[x1,y1]^2/c[x1,x1] 92547.4 sse=ssto-ssr 336.881 dto=n-1 11 msr=ssr/1 92547.4 dse=n-2 10 mse=sse/(n-2) 33.6881 f1=msr/mse 2747.18

6

8

th=TableHeadings{{source,regression,residual,total},{ano va}} TableHeadings{{source,regression,residual,total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,msr,f1] {1,92547.4,92547.4,2747.18} rt3=List[dse,sse,mse,"---"] {10,336.881,33.6881,---} rt4=List[dto,ssto,"---","---"] {11,92884.3,---,---} tf=TableForm[{rt1,rt2,rt3,rt4},th]

١٩


‫‪F‬‬ ‫‪2747.18‬‬

‫‪MS‬‬ ‫‪92547.4‬‬ ‫‪33.6881‬‬

‫‪‬‬ ‫‪‬‬

‫‪SS‬‬ ‫‪92547.4‬‬ ‫‪336.881‬‬ ‫‪92884.3‬‬

‫‪‬‬

‫‪anova‬‬ ‫‪df‬‬ ‫‪1‬‬ ‫‪10‬‬ ‫‪11‬‬

‫‪source‬‬ ‫‪regression‬‬ ‫‪residual‬‬ ‫‪total‬‬

‫`‪<<Statistics`ContinuousDistributions‬‬ ‫]‪f=Quantile[FRatioDistribution[1,10],1-‬‬ ‫‪4.9646‬‬ ‫]]"‪If[f1f,Print["reject H0"],Print["Accept H0‬‬ ‫‪reject H0‬‬ ‫‪‬‬

‫‪mse‬‬

‫‪s‬‬

‫‪5.80415‬‬

‫‪ssr‬‬ ‫‪ssto‬‬

‫‪r‬‬

‫‪0.996373‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ ‪:‬اﻟﻣدﺧﻼت‬ ‫ﻋدد اﻟﻣﺗﻐﯾرات ﻣن اﻻﻣر‬ ‫‪p=1‬‬ ‫ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر‬ ‫‪=.05‬‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪y1 .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﺟدول ﺗﺣﻠﯾل اﻻﻧﺣدار ﻣن اﻻﻣر‬ ‫]‪tf=TableForm[{rt1,rt2,rt3,rt4},th‬‬

‫‪ f‬اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر‬ ‫‪f1=msr/mse‬‬

‫‪ f‬اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬ ‫]‪f=Quantile[FRatioDistribution[1,10],1-‬‬

‫واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[f1f,Print["reject H0"],Print["Accept H0‬‬

‫واﻟﻣﺧرج‬ ‫‪reject H0‬‬ ‫اى رﻓﺾ رﻓﺾ اﻟﻌﺪم ‪.‬اﻟﺨﻄﺎ اﻟﻤﻌﯿﺎرى ﻟﻼﻧﺤﺪار ﻧﺤﺼﻞ ﻋﻠﯿﮫ ﻣﻦ اﻻﻣﺮ‬ ‫‪‬‬

‫‪mse‬‬

‫‪s‬‬

‫وﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﺑﺳﯾط ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪ssr‬‬ ‫‪ssto‬‬

‫‪r‬‬

‫)‪ (١٠-٤‬اﺳﺗدﻻﻻت ﺗﺧص ﻣﻌﺎﻣﻼت اﻻﻧﺣدار‬ ‫‪Inferences concerning the regression coefficients‬‬ ‫ﺑﺟﺎﻧ ب ﺗﻘ دﯾر اﻟﻌﻼﻗ ﺔ اﻟﺧطﯾ ﺔ ﺑ ﯾن ‪ Y, x‬ﻷﻏ راض اﻟﺗﻧﺑ ؤ ﻓ ﺈن اﻟﻘ ﺎﺋم ﻋﻠ ﻰ اﻟﺗﺟرﺑ ﺔ ﯾﮭ ﺗم‬ ‫ﺑﺎﻟوﺻ ـول إﻟ ﻰ اﺳ ﺗدﻻﻻت ﺗﺧ ص اﻟﻣﯾ ل واﻟﺟ زء اﻟﻣﻘط وع‪ .‬إن إﺟ راء اﺧﺗﺑ ﺎرات ﻓ روض‬ ‫‪٢٠‬‬


‫واﻟﺣﺻ ول ﻋﻠ ﻰ ﻓﺗ رات ﺛﻘ ﺔ ﻟﻛ ل ﻣ ن ‪ 0 ، 1‬ﯾﺣﺗ ﺎج إﻟ ﻰ وﺿ ﻊ ﻓ روض إﺿ ﺎﻓﯾﺔ ﻋﻠ ﻰ ﻧﻣ وذج‬ ‫اﻻﻧﺣدار )‪ (١ –٤‬ﺣﯾث ﯾﻔﺗرض أن ﻛل ﻣن ‪ ،  i‬ﺣﯾث ‪ ، i=1 ,2... , n‬ﺗﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً‪.‬‬

‫‪1 Confidence interval for‬‬

‫)‪ (١-١٠-٤‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪1‬‬

‫‪ (1   )100%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ 1‬ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻲ ‪:‬‬

‫‪s2‬‬ ‫‪s2‬‬ ‫)‪b1  t  2 (n  2‬‬ ‫)‪ 1  b1  t  2 (n  2‬‬ ‫‪.‬‬ ‫‪SXX‬‬ ‫‪SXX‬‬

‫ﺣﯾث ‪ t  2  n  2 ‬ﺗﺳ ﺗﺧرج ﻣ ن ﺟ دول ﺗوزﯾ ﻊ ‪ t‬ﻓ ﻲ اﻟﻣﻠﺣ ق )‪ (٢‬واﻟﺗ ﻲ ﺗوﺟ د ﻋﻠ ﻰ اﻟﻣﺣ ور‬ ‫اﻷﻓﻘ ﻲ ﺗﺣ ت ﻣﻧﺣﻧ ﻰ ﺗوزﯾ ﻊ ‪ t‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ) ‪ ( n - 2‬واﻟﺗ ﻲ اﻟﻣﺳ ﺎﺣﺔ ﻋﻠ ﻰ ﯾﻣﯾﻧﮭ ﺎ ﻗ درھﺎ‬ ‫‪  2‬ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺷﻛل )‪. (٦-٤‬‬

‫‪‬‬ ‫‪2‬‬

‫‪2‬‬

‫‪t‬‬ ‫ﺷﻛل )‪(٦-٤‬‬

‫ﻣﺛﺎل )‪(٧-٤‬‬

‫‪٢١‬‬


‫ﺗﻌﺗﺑر ﻛﻣﯾﺔ اﻟرطوﺑﺔ ﻓﻲ ﻣﻧﺗﺞ ﻣﺎ ﻟﮭﺎ ﺗﺄﺛﯾر ﻋﻠﻰ ﻛﺛﺎﻓﺔ اﻟﻣﻧ ﺗﺞ اﻟﻧﮭ ﺎﺋﻲ‪ ،‬ﺗ م ﻣراﻗﺑ ﺔ اﻟﻣﻧ ﺗﺞ وﻗﯾ ﺎس‬ ‫ﻛﺛﺎﻓﺗﮫ و اﻟﺑﯾﺎﻧﺎت اﻟﻣﺳﺟﻠﺔ ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻓﻲ ﺷﻛل ﺷﻔرة ‪.‬‬ ‫‪x2‬‬

‫‪xy‬‬ ‫‪14.1‬‬ ‫‪15‬‬ ‫‪20.8‬‬ ‫‪52.‬‬ ‫‪11.8‬‬ ‫‪42.3‬‬ ‫‪17.7‬‬ ‫‪36.4‬‬ ‫‪35.4‬‬ ‫‪33.6‬‬ ‫‪20.‬‬ ‫‪299.1‬‬

‫‪y‬‬

‫‪22.09‬‬ ‫‪25‬‬ ‫‪27.04‬‬ ‫‪27.04‬‬ ‫‪34.81‬‬ ‫‪22.09‬‬ ‫‪34.81‬‬ ‫‪27.04‬‬ ‫‪34.81‬‬ ‫‪31.36‬‬ ‫‪25.‬‬

‫‪3‬‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪10‬‬ ‫‪2‬‬ ‫‪9‬‬ ‫‪3‬‬ ‫‪7‬‬ ‫‪6‬‬ ‫‪6‬‬ ‫‪4‬‬

‫‪311.09‬‬

‫‪57‬‬

‫‪x‬‬ ‫‪4.7‬‬ ‫‪5‬‬ ‫‪5.2‬‬ ‫‪5.2‬‬ ‫‪5.9‬‬ ‫‪4.7‬‬ ‫‪5.9‬‬ ‫‪5.2‬‬ ‫‪5.9‬‬ ‫‪5.6‬‬ ‫‪5.‬‬ ‫‪58.3‬‬

‫ﻗدر ﻣﻌﺎﻟم ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط وأوﺟد ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﮫ ‪. 1‬‬

‫اﻟﺣــل‪:‬‬ ‫‪ x y‬‬ ‫‪ xy ‬‬ ‫‪SXY‬‬ ‫‪n‬‬ ‫=‬ ‫‪b1 ‬‬ ‫‪2‬‬ ‫‪SXX‬‬ ‫‪x‬‬ ‫‪‬‬ ‫‪2‬‬ ‫‪x ‬‬ ‫‪n‬‬ ‫‪ 58.3 57 ‬‬ ‫‪299.1 ‬‬ ‫‪11‬‬ ‫‪‬‬

‫‪‬‬

‫‪‬‬

‫‪2‬‬

‫‪58.3 ‬‬ ‫‪311.09 ‬‬ ‫‪11‬‬

‫‪3‬‬ ‫‪ 1.42857‬‬ ‫‪2.1‬‬ ‫‪b0  y  b1x  5.18182   1.42857  5.3‬‬ ‫‪=12.7532 .‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪ˆy  12.7532  1.42857 x‬‬ ‫‪,‬‬

‫واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ً ًﻓﻲ ﺷﻛل )‪ (٧-٤‬ﻣﻊ ﺷﻛل اﻹﻧﺗﺷﺎر ‪.‬‬

‫‪٢٢‬‬


‫ﺷﻛل )‪(٧-٤‬‬ ‫اﻟﻘﯾم اﻟﻼزﻣﺔ ﻟﺣﺳﺎب ‪ s 2‬ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪y  yˆ 2‬‬ ‫‪9.23528‬‬ ‫‪6.81413‬‬ ‫‪1.75476‬‬ ‫‪21.8587‬‬ ‫‪5.40412‬‬ ‫‪8.76775‬‬ ‫‪1.75476‬‬ ‫‪2.80671‬‬ ‫‪2.80671‬‬ ‫‪1.55439‬‬ ‫‪2.59335‬‬

‫‪65.3506‬‬

‫‪yˆ -y‬‬ ‫‪- 3.03896‬‬ ‫‪- 2.61039‬‬ ‫‪- 1.32468‬‬ ‫‪4.67532‬‬ ‫‪- 2.32468‬‬ ‫‪2.96104‬‬ ‫‪- 1.32468‬‬ ‫‪1.67532‬‬ ‫‪1.67532‬‬ ‫‪1.24675‬‬ ‫‪- 1.61039‬‬

‫ˆ‪y‬‬ ‫‪6.03896‬‬ ‫‪5.61039‬‬ ‫‪5.32468‬‬ ‫‪5.32468‬‬ ‫‪4.32468‬‬ ‫‪6.03896‬‬ ‫‪4.32468‬‬ ‫‪5.32468‬‬ ‫‪4.32468‬‬ ‫‪4.75325‬‬ ‫‪5.61039‬‬

‫‪2.66454× 10-15‬‬

‫‪y‬‬

‫‪3‬‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪10‬‬ ‫‪2‬‬ ‫‪9‬‬ ‫‪3‬‬ ‫‪7‬‬ ‫‪6‬‬ ‫‪6‬‬ ‫‪4‬‬

‫‪57‬‬

‫‪57‬‬

‫اﻵن ‪:‬‬ ‫‪2‬‬

‫‪  yi  yˆ i ‬‬ ‫‪65.3506‬‬ ‫‪s ‬‬ ‫‪‬‬ ‫‪ 7.26118 .‬‬ ‫‪n2‬‬ ‫‪9‬‬ ‫وﺑﺎﺳﺗﺧدام ﺟ دول ﺗوزﯾ ﻊ ‪ t‬ﻓ ﻲ اﻟﻣﻠﺣ ق )‪ (٢‬ﻓ ﺈن ‪ . t .025 9   2.262‬إذا ً ‪ 95 %‬ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ‬ ‫‪ 1‬ﺗﺣﺳب ﻛﺎﻵﺗﻲ ‪:‬‬ ‫‪2‬‬

‫‪s2‬‬ ‫‪s2‬‬ ‫)‪b1  t  2 (n  2‬‬ ‫)‪ 1  b1  t  2 (n  2‬‬ ‫‪.‬‬ ‫‪SXX‬‬ ‫‪SXX‬‬ ‫أي أن ‪:‬‬ ‫‪7.26118‬‬ ‫‪7.26118‬‬ ‫‪1.42857  2.262‬‬ ‫‪ 1  1.42857  2.262‬‬ ‫‪.‬‬ ‫‪2.1‬‬ ‫‪2.1‬‬ ‫وﻋﻠﻰ ذﻟك ‪:‬‬ ‫‪٢٣‬‬


‫‪1.42857  2.262 1.85949   1  1.42857  2.262 1.85949  .‬‬ ‫واﻟﺗﻲ ﺗﺧﺗﺻر إﻟﻰ ‪:‬‬

‫‪5.63503  1  2.77789 .‬‬ ‫)‪(٢-١٠-٤‬اﺧﺗﺑﺎرات ﻓروض ﺗﺧص اﻟﻣﯾل‪Hypothesis Testing on the Slope‬‬ ‫*‬

‫ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬

‫‪ 0 : 1  1‬‬

‫ﺿد ﻓرض ﺑدﯾل ﻣﻧﺎﺳب ‪:‬‬ ‫*‬ ‫‪1‬‬

‫‪H1 : 1  ‬‬

‫أو‬ ‫*‬ ‫‪1‬‬

‫‪H1 : 1  ‬‬

‫أو‬ ‫‪H1 : 1  1* .‬‬

‫ﯾﻣﻛﻧﻧﺎ اﺳﺗﺧدام ﺗوزﯾ ﻊ ‪ t‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ‪ n  2‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﻣﻧطﻘ ﺔ رﻓ ض ‪ .‬ﻗرارﻧ ﺎ ﺳ وف‬ ‫ﯾﻌﺗﻣد ﻋﻠﻰ اﻟﻘﯾﻣﺔ‪:‬‬ ‫‪.‬‬

‫*‪b1  1‬‬ ‫‪SXX‬‬

‫‪s2‬‬

‫‪t‬‬

‫ﺣﺎﻟﺔ ﺧﺎﺻﺔ ﻣن ﻓرض اﻟﻌدم *‪  0 :  1  1‬ھﻲ ‪ 0 :  1  0 :‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪1 :  1  0 .‬‬

‫ﻓ ﻲ اﻟﻣﺛ ﺎل )‪ (٧ – ٤‬اﺧﺗﺑ ر ﻓ رض اﻟﻌ دم أن‬ ‫ﺑﺎﺳ ﺗﺧدام ﻗﯾﻣ ﺔ‪b1  1.42857‬‬ ‫‪ H 0 : 1  0‬ﺿد اﻟﻔرض اﻟﺑدﯾل ‪. H 0 : 1  0‬‬

‫اﻟﺣــل‪:‬‬ ‫‪,  0 : 1  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪,  1 : 1  0‬‬ ‫‪,   0 .05‬‬ ‫‪ t .025 9   2.262‬وﻣﻧطﻘﺔ اﻟرﻓض ‪ T  2 . 262‬أو ‪T   2 . 262‬‬ ‫‪b1  0‬‬ ‫‪s2‬‬ ‫‪SXX‬‬

‫‪ 1.42857‬‬ ‫‪1.8594 .‬‬

‫‪‬‬

‫‪t‬‬

‫‪ 1.42857‬‬ ‫‪7.26118‬‬ ‫‪2.1‬‬ ‫‪٢٤‬‬

‫‪‬‬

‫‪  0 . 768259‬‬


‫وﺑﻣﺎ أن ﻗﯾﻣﺔ ‪ t‬اﻟﻣﺣﺳوﺑﺔ ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل ‪. H 0‬‬ ‫اﻟﻔ رض اﻟﺳ ﺎﺑق ﯾ رﺗﺑط ﺑﻣﻌﻧوﯾ ﺔ اﻻﻧﺣ دار ﻓﻌﻧ د ﻗﺑ ول ﻓ رض اﻟﻌ دم ‪ H 0 :  1  0‬ﻓﮭ ذا ﯾﻌﻧ ﻲ‬ ‫ﻋ دم وﺟ ود ﻋﻼﻗ ﺔ ﺧطﯾ ﺔ ﺑ ﯾن ‪ . x , Y‬وﯾﺟ ب أن ﻧﻌﻠ م أن ھ ذا ﯾﻌﻧ ﻲ إﻣ ﺎ أن ‪ x‬ﻟﮭ ﺎ ﻗﯾﻣ ﺔ‬ ‫ﺻﻐﯾرة ﻓﻲ ﺗﻔﺳﯾر اﻻﺧﺗﻼف ﻓﻲ ‪ y‬وأن أﻓﺿ ل ﺗﻘ دﯾر ﻟ ـ ‪ y‬ﻋﻧ د أي ﻗﯾﻣ ﺔ ﻟ ـ ‪ x‬ھ و ‪yˆ  y‬‬ ‫ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪ a (٨-٤‬أو أن اﻟﻌﻼﻗ ﺔ اﻟﺣﻘﯾﻘﯾ ﺔ ﺑ ﯾن ‪ x , Y‬ﻟﯾﺳ ت ﺧطﯾ ﺔ ﻛﻣ ﺎ ھ و‬ ‫ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ . b (٨ – ٤‬أو ﻛﺑدﯾل وﻋﻧدﻣﺎ ﻧرﻓض ﻓرض اﻟﻌ دم ‪ ، H 0 : 1  0‬ﻓ ﺈن ھ ذا‬ ‫ﯾﻌﻧ ﻲ أن ‪ x‬ﻟﮭ ﺎ ﻗﯾﻣ ﺔ ﻓ ﻲ ﺗﻔﺳ ﯾر اﻻﺧ ﺗﻼف ﻓ ﻲ ‪ . y‬إن رﻓ ض ‪ H 0 : 1  0‬ﻗ د ﯾﻌﻧ ﻲ أﻣ ﺎ أن‬ ‫ﻧﻣ وذج اﻟﺧ ط اﻟﻣﺳ ﺗﻘﯾم ھ و اﻷﻧﺳ ب ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪ a (٩-٤‬أو أن ﻧﺗ ﺎﺋﺞ أﻓﺿ ل‬ ‫ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﺑﺈﺿﺎﻓﺔ ﺣدود ﻣن رﺗﺑﺔ ﻋﻠﯾﺎ ﻣن ﻛﺛﯾرات اﻟﺣدود ﻓﻲ ‪ x‬ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ‬ ‫ﺷﻛل )‪. b (٩ -٤‬‬

‫ﺷﻛل )‪(٨-٤‬‬

‫ﺷﻛل )‪(٩-٤‬‬

‫)‪ (٣-١٠-٤‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ‬

‫‪0‬‬

‫‪Confidence interval for 0‬‬

‫‪ (1   )100%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ 0‬ﺗﺄﺧذ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪x2 ‬‬ ‫‪x2 ‬‬ ‫‪  0  b 0  t  2 (n  2) s 2  ‬‬ ‫‪ .‬‬ ‫‪b 0  t  2 (n  2) s 2  ‬‬ ‫‪ n SXX ‬‬ ‫‪ n SXX ‬‬ ‫واﻵن ﻹﯾﺟﺎد ‪ 95 %‬ﻓﺗرة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ ‪ 0‬ﻓ ﻲ ﺧ ط اﻻﻧﺣ دار ‪  Y x  0  1x‬ﺑﺎﻻﻋﺗﻣ ﺎد ﻋﻠ ﻰ‬

‫اﻟﺑﯾﺎﻧﺎت اﻟﺧﺎﺻﺔ ﺑﺎﻟﻣﺛﺎل )‪ (٧ -٤‬ﻧﺗﺑﻊ اﻵﺗﻲ ‪:‬‬ ‫‪٢٥‬‬


‫‪ x  5 . 3‬و ‪ SXX  2 .1‬و ‪s 2  7.26118‬‬ ‫‪. b 0  12 .7532‬‬

‫وﻋﻠﻰ ذﻟك ﻓﻲ ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ 0‬ﺗﻌطﻰ ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪1‬‬ ‫‪x2‬‬ ‫‪1‬‬ ‫‪x2‬‬ ‫‪b0  t  2 (n  2)s 2 [ ‬‬ ‫‪]   0  b 0  t  2 ( n  2) s 2 [ ‬‬ ‫‪] .‬‬ ‫‪n SXX‬‬ ‫‪n SXX‬‬

‫وﻋﻠﻰ ذﻟك ‪:‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬

‫‪.‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬

‫‪2‬‬

‫‪ 1 5. 3‬‬ ‫‪12.7532  2.262 7.26118  ‬‬ ‫‪ 11 2.1‬‬

‫‪2‬‬

‫‪ 1 5. 3‬‬ ‫‪ 0  12.7532  2.262 7.26118  ‬‬ ‫‪ 11 2.1‬‬

‫أي أن ‪:‬‬ ‫‪.‬‬ ‫واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ ‪:‬‬

‫‪12 .7532  2.262 9.88873    0  12 .7532  2.262 9.88873 ‬‬

‫)‪ (٤-١٠-٤‬اﺧﺗﺑﺎرات ﻓروض‬

‫‪ 9.61663   0  35.1231 .‬‬ ‫ﺗﺧص ‪0‬‬ ‫‪testing for‬‬

‫‪Hypothesis‬‬

‫‪0‬‬

‫ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم *‪  0 : 0  0‬ﺿد أي ﻓرض ﺑدﯾل ﻣﻧﺎﺳب ﻓﺈﻧﻧﺎ ﻣرة أﺧ ري ﺳ وف‬ ‫ﻧﺳ ﺗﺧدم ﺗوزﯾ ﻊ ‪ t‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ‪ n  2‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﻣﻧطﻘ ﺔ اﻟ رﻓض وﺑﺎﻟﺗ ﺎﻟﻲ ﻓ ﺈن ﻗرارﻧ ﺎ‬ ‫ﺳوف ﯾﻌﺗﻣد ﻋﻠﻰ اﻟﻘﯾﻣﺔ ‪:‬‬ ‫*‬ ‫‪b0 0‬‬ ‫‪t‬‬ ‫‪.‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪x ‬‬ ‫‪s2  ‬‬ ‫‪‬‬ ‫‪ n SXX ‬‬ ‫اﻟطرﯾﻘ ﺔ اﻟﻣﺗﺑﻌ ﺔ ﻻﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم ﻣوﺿ ﺣﺔ ﺑﺎﺳ ﺗﺧدام ﺑﯾﺎﻧ ﺎت اﻟﻣﺛ ﺎل )‪ (٧ – ٤‬ﻋﻧ د ﻣﺳ ﺗوى‬ ‫ﻣﻌﻧوي ‪   0.05‬ﺣﯾث ﻓرض اﻟﻌدم‪:‬‬ ‫‪ 0 : 0  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪1 : 0  0 .‬‬ ‫‪b 0  0.0‬‬ ‫‪t‬‬ ‫‪x2 ‬‬ ‫‪2 1‬‬ ‫‪s  ‬‬ ‫‪‬‬ ‫‪ n SXX ‬‬ ‫‪12.7532  1.28967016 .‬‬ ‫‪9.88873‬‬

‫‪‬‬

‫‪12.7532‬‬ ‫‪ 1 5.32 ‬‬ ‫‪ ‬‬ ‫‪‬‬ ‫‪11 2.1 ‬‬

‫‪‬‬

‫‪ t .025 (9)  2.262‬وﻣﻧطﻘ ﺔ اﻟ رﻓض ‪ T  2.262‬أو ‪ . T   2.262‬وﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ ‪t‬‬ ‫اﻟﻣﺣﺳوﺑﺔ ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل ‪. H 0‬‬

‫ﻣﺛﺎل )‪(٨-٤‬‬ ‫‪٢٦‬‬


‫ ﻓ ﻲ ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار‬1 , 0 ‫ ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ‬95% ‫اﻟﻣطﻠ وب ﻋﻣ ل ﺑرﻧ ﺎﻣﺞ ﻻﯾﺟ ﺎد‬  0 : 1  0 ‫( وأﺧﺗﺑر ﻓ رض اﻟﻌ دم‬٥-٤) ‫ ﺑﺎﻻﻋﺗﻣﺎد ﻋﻠﻰ اﻟﺑﯾﺎﻧﺎت ﻓﻲ ﻣﺛﺎل‬ y|x  0  1x . 1 : 1  0 ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ . 1 : 0  0

‫ ﺿد اﻟﻔرض اﻟﺑدﯾل‬ 0 : 0  0 ‫ﺛم أﺧﺗﺑر ﻓرض اﻟﻌدم‬

‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ =.05 0.05 x1={4.7,5,5.2,5.2,5.9,4.7,5.9,5.2,5.9,5.6,5.} {4.7,5,5.2,5.2,5.9,4.7,5.9,5.2,5.9,5.6,5.} y1={3.,3,4,10,2,9,3,7,6,6,4} {3.,3,4,10,2,9,3,7,6,6,4} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] n=l[x1] 11 xb=h[x1]/l[x1] 5.3 yb=h[y1]/l[y1] 5.18182 b1=c[x1,y1]/c[x1,x1] -1.42857 b0=yb-b1*xb 12.7532 sxx=c[x1,x1] 2.1 ssto=c[y1,y1] 69.6364 ssr=c[x1,y1]^2/c[x1,x1] 4.28571 sse=ssto-ssr 65.3506 mse=sse/(n-2) 7.26118 msr=ssr/1 4.28571 mse=sse/(n-2) 7.26118 <<Statistics`ContinuousDistributions`

t1  QuantileStudentTDistributionn  2, 1  2.26216

mse z   sxx ٢٧

2


‫‪1.85949‬‬ ‫‪e=t1*z‬‬ ‫‪4.20646‬‬ ‫‪l=b1-e‬‬ ‫‪-5.63503‬‬ ‫‪u=b1+e‬‬ ‫‪2.77789‬‬

‫‪1 xb^2‬‬ ‫‪z1  ‬‬ ‫‪mse ‬‬ ‫‪‬‬ ‫‪n‬‬ ‫‪sxx‬‬ ‫‪9.88873‬‬ ‫‪e1=t1*z1‬‬ ‫‪22.3699‬‬ ‫‪l=b0-e1‬‬ ‫‪-9.61663‬‬ ‫‪u=b0+e1‬‬ ‫‪35.1231‬‬ ‫‪tt1=b1/z‬‬ ‫‪-0.768259‬‬

‫‪a1  If Abstt1  t1, Print"Reject H0",‬‬ ‫‪Print"Accept H0 "‬‬ ‫‪Accept H0‬‬ ‫‪tt0=b0/z1‬‬ ‫‪1.28967‬‬

‫‪a2  If Abstt0  t1, Print"Reject H0",‬‬ ‫‪Print"Accept H0 "‬‬ ‫‪Accept H0‬‬

‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر‬ ‫‪=.05‬‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1 .‬اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﮫ ‪ 1‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرﺟﺎت‬ ‫‪l=b1-e‬‬ ‫‪-5.63503‬‬ ‫‪u=b1+e‬‬ ‫‪2.77789‬‬

‫‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﮫ ‪ 0‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرﺟﺎت‬ ‫‪l=b0-e1‬‬ ‫‪-9.61663‬‬ ‫‪u=b0+e1‬‬ ‫‪35.1231‬‬

‫ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪ 0 :  1  0 :‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪1 :  1  0‬‬ ‫ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ‬ ‫‪٢٨‬‬


‫‪a1  If Abstt1  t1, Print"Reject H0",‬‬ ‫‪Print"Accept H0 "‬‬ ‫واﻟﻣﺧرج‬ ‫‪Accept H0‬‬ ‫اى ﻗﺒﻮل ﻓﺮض اﻟﻌﺪم ‪.‬‬

‫ﺣﯾث ﻗﯾﻣﺔ ‪ t‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪‬‬ ‫‪t1  QuantileStudentTDistributionn  2, 1  ‬‬ ‫‪2‬‬

‫ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪ 0 : 0  0 :‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪1 : 0  0 .‬‬ ‫ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ‬

‫‪a2  If Abstt0  t1, Print"Reject H0",‬‬ ‫‪Print"Accept H0 "‬‬ ‫واﻟﻣﺧرج‬ ‫‪Accept H0‬‬ ‫اى ﻗﺒﻮل ﻓﺮض اﻟﻌﺪم ‪.‬‬

‫)‪ (١١ -٤‬اﻟﺗﻧﺑـؤ‬

‫‪Prediction‬‬

‫ﯾﻣﻛ ن اﺳ ﺗﺧدام اﻟﻣﻌﺎدﻟ ﺔ ‪ yˆ x  b 0  b1x‬ﻟﻠﺗﻧﺑ ﺄ ﺑﻘﯾﻣ ﺔ ' ‪ ، Y|x‬ﺣﯾ ث ‪ x‬ﻟ ﯾس ﻣ ن‬ ‫اﻟﺿرورى أن ﺗﻛون واﺣدة ﻣ ن ‪ x1, x 2 ,..., x n‬ﻓ ﻲ اﻟﻌﯾﻧ ﺔ اﻟﻌﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م ‪ n‬ﻟﻠﻣﺷ ﺎھدات‬ ‫) ‪ . (x1, y1 ),(x 2 , y 2 ),...,(x n , y n‬أﯾﺿ ﺎ ﯾﻣﻛ ن اﺳ ﺗﺧدام اﻟﻣﻌﺎدﻟ ﺔ ‪ yˆ x  b 0  b1x‬ﻟﻠﺗﻧﺑ ﺄ‬ ‫ﺑﻘﯾﻣ ﺔ واﺣ دة ‪ y x ‬ﻟﻠﻣﺗﻐﯾ ر ‪ . Y | x ‬ﺳ وف ﻧﺗوﻗ ﻊ أن ﺧط ﺄ اﻟﺗﻧﺑ ﺄ ﺳ وف ﯾﻛ ون أﻋﻠ ﻰ ﻓ ﻲ ﺣﺎﻟ ﺔ‬ ‫ﻗﯾﻣﺔ واﺣدة ﻣﺗﻧﺑﺄ ﺑﮭﺎ ﻋﻧﮫ ﻓﻲ ﺣﺎﻟﺔ اﻟﺗﻧﺑﺄ ﺑﺎﻟﻣﺗوﺳط وھذا ﺳوف ﯾؤﺛر ﻋﻠﻰ طول ﻓﺗرة اﻟﺛﻘ ﺔ ﻟﻠﻣﻌ ﺎﻟم‬ ‫اﻟﻣراد ﺗﻘدﯾرھﺎ‪.‬‬ ‫ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ‪ (1   )100%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ' ‪ Y|x‬ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪1 (x ' x) 2 ‬‬ ‫‪(x ' x) 2 ‬‬ ‫‪2 1‬‬ ‫‪s ( ‬‬ ‫‪)    Y|x '  yˆ  t  / 2 s ( ‬‬ ‫‪).‬‬ ‫‪n‬‬ ‫‪SXX‬‬ ‫‪n‬‬ ‫‪SXX‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪2‬‬

‫‪yˆ  t  / 2‬‬

‫اﯾﺿﺎ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ‪ (1   )100%‬ﻓﺗرة ﻟﻘﯾﻣﺔ ﻣﻔردة ' ‪ y x‬ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬

‫‪٢٩‬‬


‫‪1 (x ' x) 2‬‬ ‫‪1 (x ' x) 2‬‬ ‫‪‬‬ ‫‪ y x '  yˆ  t  / 2 (n  2) 1  ‬‬ ‫‪.‬‬ ‫‪n‬‬ ‫‪SXX‬‬ ‫‪n‬‬ ‫‪SXX‬‬

‫‪yˆ  t  / 2 (n  2) 1 ‬‬

‫ﻣﺛﺎل )‪(٩-٤‬‬ ‫ﺑﺎﺳﺗﺧدام اﻟﺑﯾﺎﻧﺎت ﻟﻠﻣﺛﺎل )‪ (٥-٤‬أوﺟد ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪  Y|4‬؟‬

‫اﻟﺣــل‪:‬‬ ‫ﻣن ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻓﺈن ‪:‬‬ ‫)‪yˆ 4  14.187  (44.41385)(4‬‬ ‫‪= 191.84.‬‬ ‫ﻋرﻓﻧﺎ ﻣﻣﺎ ﺳﺑق أن ‪:‬‬ ‫‪2‬‬ ‫‪SXX  46.91667 , x  4.58333 , s  33.6888,‬‬ ‫‪ t.025 =2.228‬ﺑدرﺟﺎت ﺣرﯾﺔ ‪ . 10‬وﻋﻠﻰ ذﻟك ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪  Y|4‬ھﻲ ‪:‬‬ ‫‪ 1 (4  4.58333) 2 ‬‬ ‫‪191.84  2.228 33.6888  ‬‬ ‫‪   Y|4 ‬‬ ‫‪12‬‬ ‫‪46.91667‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪ 1 (4  4.58333) 2 ‬‬ ‫‪191.84  2.228 33.6888  ‬‬ ‫‪ .‬‬ ‫‪12‬‬ ‫‪46.91667‬‬ ‫‪‬‬ ‫‪‬‬ ‫أي أن ‪:‬‬

‫)‪191.84  (2.228)(1.7469)  Y|4  191.84  (2.228)(1.7469‬‬ ‫واﻟﺗﻲ ﺗﺧﺗﺻر إﻟﻰ ‪:‬‬ ‫‪187.94791  Y|4  195.73209.‬‬

‫ﻣﺛﺎل )‪(١٠-٤‬‬ ‫ﺑﺎﺳﺗﺧدام اﻟﺑﯾﺎﻧﺎت ﻟﻠﻣﺛﺎل )‪ (٥-٤‬أوﺟد ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟـ ‪y 4‬‬

‫اﻟﺣــل‪:‬‬ ‫)ا( ‪ n  12 , s2  33.6888 , x  4.58333‬وﻋﻠﻰ ذﻟك ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟـ ‪ y4‬ھﻲ ‪:‬‬ ‫‪‬‬ ‫‪1 (4  4.58333) 2 ‬‬ ‫‪191.84  2.228 33.6888 1  ‬‬ ‫‪  y4 ‬‬ ‫‪12‬‬ ‫‪46.91667‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪٣٠‬‬


‫‪‬‬ ‫‪1 (4  4.58333)2 ‬‬ ‫‪191.84  2.228 33.6888 1  ‬‬ ‫‪‬‬ ‫‪12‬‬ ‫‪46.91667‬‬ ‫‪‬‬ ‫‪‬‬ ‫أي أن ‪:‬‬ ‫)‪191.84 - 2.228(6.061) < y4 < 191.84 + 2.228 (6.06‬‬ ‫واﻟﺗﻲ ﺗﺧﺗﺻر إﻟﻰ ‪:‬‬ ‫‪178.3 < y4 < 205.3‬‬

‫ﻣﺛﺎل )‪(١١-٤‬‬ ‫ﻟﻠﺑﯾﺎﻧ ﺎت اﻟﺧﺎﺻ ﺔ ﺑﺎﻟﻣﺛ ﺎل )‪ (٥-٤‬اﻟﻣطﻠ وب ﻋﻣ ل ﺑرﻧ ﺎﻣﺞ ﻻﯾﺟ ﺎد ‪ 95%‬ﻓﺗ رة ﺛﻘ ﺔ ﻟ ـ ‪ Y|4‬و‬ ‫‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟـ ‪. y 4‬‬

‫اﻟﺣــل‪:‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪=.05‬‬ ‫‪0.05‬‬ ‫}‪x1={4,6.,2,5,7,6,3,8,5,3,1,5‬‬ ‫}‪{4,6.,2,5,7,6,3,8,5,3,1,5‬‬ ‫}‪y1={197.,272,100,228,327,279,148,377,238,142,66,239‬‬ ‫}‪{197.,272,100,228,327,279,148,377,238,142,66,239‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪n=l[x1‬‬ ‫‪12‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪4.58333‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪217.75‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪44.4139‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪14.1865‬‬ ‫]‪sxx=c[x1,x1‬‬ ‫‪46.9167‬‬ ‫]‪ssto=c[y1,y1‬‬ ‫‪92884.3‬‬ ‫]‪ssr=(c[x1,y1]^2)/c[x1,x1‬‬ ‫‪92547.4‬‬ ‫‪sse=ssto-ssr‬‬ ‫‪336.881‬‬ ‫)‪mse=sse/(n-2‬‬ ‫‪٣١‬‬


33.6881 <<Statistics`ContinuousDistributions`

t1  QuantileStudentTDistributionn 2, 1

2

2.22814 xxb=4 4

1 xxb  xb^2 z1   mse   n sxx 1.7469 e1=t1*z1 3.89235 yy=b0+(b1*xxb) 191.842 ll=yy-e1 187.95 u=yy+e1 195.734

1 xxb  xb ^2  z2   mse1    n sxx 6.06133 e2=t1*z2 13.5055 l2=yy-e2 178.336 u2=yy+e2 205.347

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫اﻟﻣدﺧﻼت‬: ‫اوﻻ‬ ‫ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر‬ =.05 ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬x‫ اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‬y ‫اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ و‬

x ‫ﻣﻦ اﻻﻣﺮ‬ xxb=4

‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرج ﻟﻛل اﻣر‬Y|4

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬ ‫ ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ‬95%

ll=yy-e1 187.95 u=yy+e1 195.734

‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرج ﻟﻛل اﻣر‬y 4 ‫ ﻓﺗرة ﺛﻘﺔ ﻟﻘﯾﻣﺔ‬95% l2=yy-e2 178.336 u2=yy+e2 205.347 ٣٢


(١٢-٤) ‫ﻣﺛﺎل‬ ‫ ﺿ د اﻟﻔ رض اﻟﺑ دﯾل‬ 0 : 1  0 ‫( أﺧﺗﺑ ر ﻓ رض اﻟﻌ دم‬٢-٤) ‫ﺑﺎﻻﻋﺗﻣﺎد ﻋﻠﻰ اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ ﻣﺛ ﺎل‬ 1 : 1  0 . 1 : 0  0 ‫ ﺿد اﻟﻔرض اﻟﺑدﯾل‬ 0 : 0  0 ‫ﺛم أﺧﺗﺑر ﻓرض اﻟﻌدم‬

: ‫اﻟﺣــل‬ ‫ وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬Mathematica

‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ‬ <<Statistics`LinearRegression`

. ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp ct]}] {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{ 0.25,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.2 74,0.512},{0.264,0.405},{0.28,0.45},{0.266,0.48},{0.268,0 .456},{0.286,0.506}} Clear[dots] dots=ListPlot[dpoints,Prolog->{PointSize[0.02]}] 0.6

0.55

0.5

0.45

0.25

0.26

Graphics Regress[dpoints,{1,x},x]

0.27

٣٣

0.28


ParameterTable 1

x

Estimate 1.07813 2.2171

SE 0.25596 0.979963

TStat 4.21211 2.26243

PValue 0.00120568,RSquared0.299008, 0.0430218

AdjustedRSquared0.240592, EstimatedVariance0.00236213,ANOVATable

Model Error Total

DF 1 12 13

SumOfSq 0.0120908 0.0283456 0.0404364

MeanSq 0.0120908 0.00236213

FRatio 5.11859

Regressdpoints, 1, x, x, RegressionReport  ParameterTable, BasisNames  b0, b1 ParameterTable  b0

b1

Estimate 1.07813 2.2171

SE 0.25596 0.979963

TStat 4.21211 2.26243

PValue 0.00120568 0.0430218 : ‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫وﺑﺈﺳﺗﺧدام اﻻﻣر‬

Regress[dpoints,{1,x},x]

‫اﻟﺟ دول اﻻول ﯾﺣﺗ وى ﻋﻠ ﻰ اﻟﺗﻘ دﯾرﯾن‬: ‫ﯾ ﺗم اﻟﺣﺻ ول ﻋﻠ ﻰ ﺟ دوﻟﯾن‬ ‫ اﻟﺧط ﺎ‬SE ‫ وﺗﺣ ت اﻟﻌﻧ وان‬Estimate ‫ ﺗﺣ ت اﻟﻌﻧ وان‬b 0  1.07813,b1  2.2171 s2 ( ) SXX

0 ‫اﻟﻣﻌﯾﺎرى ﻟـ‬

1 x2 1 ‫اﻟﺧطﺎ اﻟﻣﻌﯾﺎرى ﻟـ‬. 0.25596 ‫وﯾﺳﺎوى‬ s (  ) n SXX ‫ ﺗﺣ ت اﻟﻌﻧ وان‬p ‫ﻗ ﯾم‬. TStat ‫ اﻟﻣﺣﺳ وﺑﺔ ﺗﺣ ت اﻟﻌﻧ وان‬t ‫اﯾﺿ ﺎ ﻗ ﯾم‬.0.979963 ‫وﯾﺳ ﺎوى‬ .PVlue ‫ﻛﻣﺎ ﯾوﺟد ﻓﻰ اﻟﺟدول ﻣﻌﺎﻣل اﻟﺗﺣدﯾد و اﯾﺿﺎ ﯾوﺟد ﻣﺎ ﯾﺳﻣﻰ ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﻌدل‬ . ‫أﻣﺎ اﻟﺟدول اﻟﺛﺎﻧﻰ ﻓﯾﺣﺗوى ﻋﻠﻰ ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن‬ ‫وﻣن اﻻﻣر‬ Regressdpoints, 1, x, x, RegressionReport  ParameterTable, BasisNames  b0, b1 2

٣٤

PValue 0.0430218


‫ﻧﺣﺻل ﻋﻠﻰ ﻣﻛوﻧﺎت اﻟﺟدول اﻻول وﻟﻛن ﺑﺷﻛل اﺧر‬

(١٣-٤) ‫ﻣﺛﺎل‬ Y|x  0  1x ‫ ﻓﻲ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار‬1 , 0 ‫ ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ‬95% ‫( أوﺟد‬٢-٤) ‫ﻟﻠﻤﺜﺎل‬ ‫ وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ‬ Statistics`LinearRegression`

. ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp ct]}] {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{ 0.25,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.2 74,0.512},{0.264,0.405},{0.28,0.45},{0.266,0.48},{0.268,0 .456},{0.286,0.506}} Clear[dots] Regress[dpoints,{1,x},x,RegressionReport>ParameterCITable]

ParameterCITable  1

x

Estimate 1.07813 2.2171

SE 0.25596 0.979963

CI 0.520442, 1.63582  4.35225, 0.0819426

Regress[dpoints,{1,x},x,RegressionReport>ParameterCITable,ConfidenceLevel->0.90]

ParameterCITable  1

x

Estimate 1.07813 2.2171

SE 0.25596 0.979963

CI 0.621937, 1.53433  3.96367, 0.470523 : ‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ : ‫وﺑﺈﺳﺗﺧدام اﻻﻣر‬

Regress[dpoints,{1,x},x,RegressionReport>ParameterCITable]

.CI ‫ ﺗﺣت اﻟﻌﻧوان‬1 , 0 ‫ ﻓﺗرة ﺛﻘﺔ ﻟﻛل ﻣن‬95% ‫ﺳوف ﻧﺣﺻل ﻋﻠﻰ ﺟدول ﯾﺣﺗوى‬ : ‫ﺑﺈﺳﺗﺧدام اﻻﻣر‬ Regress[dpoints,{1,x},x,RegressionReport>ParameterCITable,ConfidenceLevel->0.90]

: ‫ﺣﯾث أﺿﯾف اﻟﺧﯾﺎر‬

٣٥


‫]‪ ConfidenceLevel->0.90‬وذﻟك ﻟﻠﺣﺻول ﻋﻠﻰ ﺟدول ﯾﺣﺗوى ‪ 99%‬ﻓﺗرة ﺛﻘ ﺔ ﻟﻛ ل‬ ‫ﻣن ‪ 1 , 0‬ﺗﺣت اﻟﻌﻧوان ‪.CI‬‬ ‫ﻛﻣﺎ ﯾﺗﺿﺢ ﻣن ﻣﺧرﺟﺎت اﻻﻣر ‪.‬‬

‫ﻣﺛﺎل)‪(١٤-٤‬‬ ‫ﯾﻌط ﻰ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﻣﺗوﺳ ط ﺿ رﺑﺎت اﻟﺧﺻ م )‪ (x‬وﻧﺳ ﺑﺔ اﻟﻔ وز ﻟﻔرﯾ ق ﻣ ﺎ )‪ (y‬وذﻟ ك ﻓ ﻲ ﻟﻌﺑ ﺔ‬ ‫ﻛرة اﻟﺳﻠﺔ واﻟﻣطﻠوب‪:‬‬

‫)أ( رﺳم ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﺧط اﻻﻧﺣدار اﻟﻣﻘدر ‪.‬‬ ‫)ب( إﯾﺟﺎد ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ل ‪  Y x‬ﻟﻌدة ﻗﯾم ﻣن ‪ x‬ووﺿﺣﮭﺎ ﺑﯾﺎﻧﯾﺎ ‪.‬‬ ‫‪xy‬‬

‫‪x2‬‬

‫‪y‬‬

‫‪x‬‬

‫‪0.15‬‬ ‫‪0.130048‬‬ ‫‪0.121512‬‬ ‫‪0.12838‬‬ ‫‪0.147‬‬ ‫‪0.1197‬‬ ‫‪0.130302‬‬ ‫‪0.12501‬‬ ‫‪0.140288‬‬ ‫‪0.10692‬‬ ‫‪0.126‬‬ ‫‪0.12768‬‬ ‫‪0.122208‬‬ ‫‪0.144716‬‬

‫‪0.0576‬‬ ‫‪0.064516‬‬ ‫‪0.062001‬‬ ‫‪0.060025‬‬ ‫‪0.0625‬‬ ‫‪0.063504‬‬ ‫‪0.064516‬‬ ‫‪0.0729‬‬ ‫‪0.075076‬‬ ‫‪0.069696‬‬ ‫‪0.0784‬‬ ‫‪0.070756‬‬ ‫‪0.071824‬‬ ‫‪0.081796‬‬

‫‪0.625‬‬ ‫‪0.512‬‬ ‫‪0.488‬‬ ‫‪0.524‬‬ ‫‪0.588‬‬ ‫‪0.475‬‬ ‫‪0.513‬‬ ‫‪0.463‬‬ ‫‪0.512‬‬ ‫‪0.405‬‬ ‫‪0.45‬‬ ‫‪0.48‬‬ ‫‪0.456‬‬ ‫‪0.506‬‬

‫‪0.24‬‬ ‫‪0.254‬‬ ‫‪0.249‬‬ ‫‪0.245‬‬ ‫‪0.25‬‬ ‫‪0.252‬‬ ‫‪0.254‬‬ ‫‪0.27‬‬ ‫‪0.274‬‬ ‫‪0.264‬‬ ‫‪0.28‬‬ ‫‪0.266‬‬ ‫‪0.268‬‬ ‫‪0.286‬‬

‫‪1.81976‬‬

‫‪.9551‬‬

‫‪6.997‬‬

‫‪3.652‬‬

‫اﻟﺣــل ‪:‬‬ ‫) أ ( ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﺧ ط اﻻﻧﺣ دار اﻟﻣﻘ در ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪ (١٠-٤‬ﺣﯾ ث ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار‬ ‫اﻟﻣﻘدرة ﺛم ﺣﺳﺎﺑﮭﺎ ﺑﺎﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ‪ Mathematica‬وﻛﺎﻧت ﻛﺎﻟﺗﺎﻟﻰ‪:‬‬ ‫‪. y  1 .07813  2.2171 x‬‬

‫‪٣٦‬‬


‫ﺷﻛل )‪(١٠-٤‬‬ ‫)ب( ﯾﻌطﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﻓﺗ رات ﺛﻘ ﺔ ﻟ ـ ‪  Y x‬وذﻟ ك ﻟﻌ دة ﻗ ﯾم ﻣ ن ‪ x‬و ﺗ م اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ‬ ‫ﺑﺎﺳﺗﺧدام اﻟﺣزم اﻟﺟﺎھزة ﻟﺑرﻧ ﺎﻣﺞ ‪ Mathematica‬ﺣﯾ ث ‪ CI‬ﯾرﻣ ز ل ‪ 95 %‬ﻓﺗ رة ﺛﻘ ﺔ‬ ‫ﻟـ ‪ .  Y x‬وﺗﻠك اﻟﻔﺗرات ﻣوﺿﺣﺔ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل )‪.(١١-٤‬‬ ‫‪CI‬‬ ‫}‪{0.493263,0.598793‬‬ ‫}‪{0.483124,0.546853‬‬ ‫}‪{0.488102,0.564047‬‬ ‫}‪{0.490814,0.579071‬‬ ‫}‪{0.487273,0.560441‬‬ ‫}‪{0.485385,0.553461‬‬ ‫}‪{0.483124,0.546853‬‬ ‫}‪{0.445134,0.513896‬‬ ‫}‪{0.430791,0.510502‬‬ ‫}‪{0.463732,0.521904‬‬ ‫}‪{0.407629,0.507059‬‬ ‫}‪{0.458027,0.51874‬‬ ‫}‪{0.4518,0.516098‬‬ ‫}‪{0.383354,0.504729‬‬

‫‪SE‬‬ ‫‪0.0242175‬‬ ‫‪0.0146246‬‬ ‫‪0.0174281‬‬ ‫‪0.0202533‬‬ ‫‪0.0167906‬‬ ‫‪0.0156224‬‬ ‫‪0.0146246‬‬ ‫‪0.0157797‬‬ ‫‪0.0182922‬‬ ‫‪0.0133495‬‬ ‫‪0.0228174‬‬ ‫‪0.0139328‬‬ ‫‪0.0147553‬‬ ‫‪0.0278533‬‬

‫اﻟﻘﻴﻢ اﻟﻤﺘﻨﺒﺄ ﺑﻬﺎ‬ ‫‪Predicted‬‬ ‫‪0.546028‬‬ ‫‪0.514989‬‬ ‫‪0.526074‬‬ ‫‪0.534943‬‬ ‫‪0.523857‬‬ ‫‪0.519423‬‬ ‫‪0.514989‬‬ ‫‪0.479515‬‬ ‫‪0.470647‬‬ ‫‪0.492818‬‬ ‫‪0.457344‬‬ ‫‪0.488383‬‬ ‫‪0.483949‬‬ ‫‪0.444042‬‬

‫‪٣٧‬‬

‫اﻟﻤﺸﺎﻫﺪﻩ‬ ‫‪Observed‬‬ ‫‪0.625‬‬ ‫‪0.512‬‬ ‫‪0.488‬‬ ‫‪0.524‬‬ ‫‪0.588‬‬ ‫‪0.475‬‬ ‫‪0.513‬‬ ‫‪0.463‬‬ ‫‪0.512‬‬ ‫‪0.405‬‬ ‫‪0.45‬‬ ‫‪0.48‬‬ ‫‪0.456‬‬ ‫‪0.506‬‬

‫‪{Mean Prediction‬‬ ‫‪CTTable‬‬


0.6 0.55 0.5 0.45

0.25

0.26

0.27

0.28

(١١-٤) ‫ﺷﻜﻞ‬ :‫ﺳﻮف ﯾﺘﻢ ﺣﻞ ھﺬا اﻟﻤﺜﺎل ﺑﺈﺳﺘﺨﺪام اﻟﺤﺰﻣﺔ اﻟﺠﺎھﺰة‬

Statistics`LinearRegression

.‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬

<<Statistics`LinearRegression` oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp ct ]}]

{{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{ 0.25,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.2 74,0.512},{0.264,0.405},{0.28,0.45},{0.266,0.48},{0.268,0 .456},{0.286,0.506}} Clear[dots] Regress[dpoints,{1,x},x,RegressionReport>MeanPredictionCITable]

٣٨


Observed 0.625 0.512 0.488 0.524 0.588 0.475 MeanPredictionCITable 0.513 0.463 0.512 0.405 0.45 0.48 0.456 0.506

Predicted 0.546028 0.514989 0.526074 0.534943 0.523857 0.519423 0.514989 0.479515 0.470647 0.492818 0.457344 0.488383 0.483949 0.444042

SE 0.0242175 0.0146246 0.0174281 0.0202533 0.0167906 0.0156224 0.0146246 0.0157797 0.0182922 0.0133495 0.0228174 0.0139328 0.0147553 0.0278533

CI 0.493263,0.598793 0.483124,0.546853 0.488102,0.564047 0.490814,0.579071 0.487273,0.560441 0.485385,0.553461 0.483124,0.546853 0.445134,0.513896 0.430791,0.510502 0.463732,0.521904 0.407629,0.507059 0.458027,0.51874 0.4518,0.516098 0.383354,0.504729

Regress[dpoints,{1,x},x, RegressionReport->SinglePredictionCITable]

Observed 0.625 0.512 0.488 0.524 0.588 0.475 SinglePredictionCITable 0.513 0.463 0.512 0.405 0.45 0.48 0.456 0.506

Predicted 0.546028 0.514989 0.526074 0.534943 0.523857 0.519423 0.514989 0.479515 0.470647 0.492818 0.457344 0.488383 0.483949 0.444042

SE 0.0543012 0.0507544 0.0516321 0.0526529 0.0514204 0.0510509 0.0507544 0.0510992 0.0519301 0.0504018 0.0536914 0.0505594 0.0507922 0.0560173

CI 0.427716,0.66434 0.404404,0.625573 0.413578,0.638571 0.420222,0.649663 0.411822,0.635892 0.408193,0.630653 0.404404,0.625573 0.368179,0.590851 0.357501,0.583793 0.383002,0.602634 0.340361,0.574328 0.378224,0.598543 0.373283,0.594616 0.32199,0.566093

rtable=Regress[dpoints,{1,x},x, RegressionReport->MeanPredictionCITable]; {obs,pred,se,ci}=Transpose[(MeanPredictionCITable/.rtable )[[1]]] {{0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0 .405,0.45,0.48,0.456,0.506},{0.546028,0.514989,0.526074,0 .534943,0.523857,0.519423,0.514989,0.479515,0.470647,0.49 2818,0.457344,0.488383,0.483949,0.444042},{0.0242175,0.01 46246,0.0174281,0.0202533,0.0167906,0.0156224,0.0146246,0 .0157797,0.0182922,0.0133495,0.0228174,0.0139328,0.014755 ٣٩


3,0.0278533},{{0.493263,0.598793},{0.483124,0.546853},{0. 488102,0.564047},{0.490814,0.579071},{0.487273,0.560441}, {0.485385,0.553461},{0.483124,0.546853},{0.445134,0.51389 6},{0.430791,0.510502},{0.463732,0.521904},{0.407629,0.50 7059},{0.458027,0.51874},{0.4518,0.516098},{0.383354,0.50 4729}}} predpts=Transpose[{oppbavg,pred}]

{{0.24,0.546028},{0.254,0.514989},{0.249,0.526074},{0.245 ,0.534943},{0.25,0.523857},{0.252,0.519423},{0.254,0.5149 89},{0.27,0.479515},{0.274,0.470647},{0.264,0.492818},{0. 28,0.457344},{0.266,0.488383},{0.268,0.483949},{0.286,0.4 44042}} lowerCI=Transpose[{oppbavg,Map[First,ci]}] {{0.24,0.493263},{0.254,0.483124},{0.249,0.488102},{0.245 ,0.490814},{0.25,0.487273},{0.252,0.485385},{0.254,0.4831 24},{0.27,0.445134},{0.274,0.430791},{0.264,0.463732},{0. 28,0.407629},{0.266,0.458027},{0.268,0.4518},{0.286,0.383 354}} upperCI=Transpose[{oppbavg,Map[Last,ci]}]

{{0.24,0.598793},{0.254,0.546853},{0.249,0.564047},{0.245 ,0.579071},{0.25,0.560441},{0.252,0.553461},{0.254,0.5468 53},{0.27,0.513896},{0.274,0.510502},{0.264,0.521904},{0. 28,0.507059},{0.266,0.51874},{0.268,0.516098},{0.286,0.50 4729}} <<Graphics`MultipleListPlot` MultipleListPlot[dpoints,predpts,lowerCI,upperCI,SymbolSh ap

e->{PlotSymbol[Diamond],None,None,None},PlotJoined>{False,True,True,True},PlotStyle>{Automatic,GrayLevel[0.5],Dashing[Dot],Dashing[Dot]}]

Graphics

٤٠


‫‪0.6‬‬ ‫‪0.55‬‬ ‫‪0.5‬‬ ‫‪0.45‬‬

‫‪0.28‬‬

‫‪0.27‬‬

‫‪0.26‬‬

‫‪0.25‬‬

‫ﺟدول ﻓﺗرات ﺛﻘﺔ ﻟـ ‪  Y x‬وذﻟك ﻟﻌدة ﻗﯾم ﻣن ‪ x‬ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪Regress[dpoints,{1,x},x,RegressionReport‬‬‫]‪>MeanPredictionCITable‬‬

‫وﺗﻠك اﻟﻔﺗرات اﻟﻣوﺿﺣﺔ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل )‪ (١١-٤‬ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪MultipleListPlot[dpoints,predpts,lowerCI,upperCI,SymbolSh‬‬ ‫‪ap‬‬ ‫‪e->{PlotSymbol[Diamond],None,None,None},PlotJoined‬‬‫‪>{False,True,True,True},PlotStyle‬‬‫]}]‪>{Automatic,GrayLevel[0.5],Dashing[Dot],Dashing[Dot‬‬

‫ﺟدول ﻓﺗرات ﺛﻘﺔ ﻟـ ‪ yx‬وذﻟك ﻟﻌدة ﻗﯾم ﻣن ‪ x‬ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪Regress[dpoints,{1,x},x,‬‬ ‫]‪RegressionReport->SinglePredictionCITable‬‬

‫)‪ (١٢-٤‬ﻣﺧﺎﻟﻔﺎت ﻧﻣوزج اﻻﺗﺣدار وﻛﯾﻔﯾﺔ اﻛﺗﺷﺎﻓﮭﺎ ﺑﺎﻟﺑواﻗﻰ‬ ‫ﺎھدات‪ ( x i , y i‬ﺣﯾ ث ‪ i=1,2,…,n‬اﻟﺧط وة‬ ‫ﯾﻌﺗﺑ ر ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﻻزواج اﻟﻣﺷ‬ ‫)‬ ‫اﻻوﻟ ﻰ اﻟﺿ رورﯾﺔ ﻓ ﻲ اﺗﺧ ﺎذ ﻗ رار ﺑﺷ ﺎن اﻟﺷ ﻛل اﻟرﯾﺎﺿ ﻲ ﻟﻠﻌﻼﻗ ﺔ ﺑ ﯾن ‪٠x,Y‬ﻓ ﻲ‬ ‫اﻟﺗطﺑﯾ ق وﺑﻣﺟ رد ﺗوﻓﯾ ق اﻟداﻟ ﺔ ذات اﻟﺷ ﻛل اﻟﻣﺧﺗ ﺎر ﯾﻛ ون ﻣ ن اﻟﺿ روري ﻓﺣ ص‬ ‫ﺻ ﻼﺣﯾﺔ اﻟﻧﻣ وذج ‪ ٠‬ﻓ ﻲ اﻟﺣﻘﯾﻘ ﺔ ﻧﺣﺗ ﺎج اﻟ ﻰ ﻓﺣ ص ﻋ دة ﻧﻣ ﺎذج اﻧﺣ دار ﻗﺑ ل ان ﺗ ﺗم‬ ‫ﻋﻣﻠﯾ ﺔ اﻻﺧﺗﯾﺎراﻟﻧﮭ ﺎﺋﻲ‪ ٠‬ﻓ ﻲ ھ ذا اﻟﺑﻧ د ﺳ وف ﻧﺗﻧ ﺎول ﻋ دة ط رق ﻣﻔﯾ دة ﻟﺗﺷ ﺧﯾص‬ ‫وﻣﻌﺎﻟﺟﺔ اﻻﻧﺣراﻓﺎت )اﻟﻣﺧﺎﻟﻔﺎت( اﻟﺗﺎﻟﯾﺔ ﻋن ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط )‪.(١-٤‬‬ ‫‪٤١‬‬


‫‪ .١‬اﻟﻌﻼﻗﺔ ﺑﯾن ‪ x,y‬ﻟﯾﺳت ﺧطﯾﺔ‪٠‬‬ ‫‪ .٢‬ﺣدود اﻟﺧطﺎ ﻟﯾﺳت طﺑﯾﻌﯾﺔ‪٠‬‬ ‫‪ .٣‬اﻟﺗﺑﺎﯾن ﻟﺣد اﻟﺧطﺄ‬

‫‪‬‬

‫ﻟﯾس ﺛﺎﺑت ‪٠‬‬

‫‪ .٤‬ﺣدود اﻟﺧطﺄ ﻟﯾﺳت ﻣرﺗﺑطﮫ‪٠‬‬ ‫‪ .٥‬اﻟﺗوﻗﻊ ﻟﺣد‬

‫اﻟﺧطﺄ ‪‬‬

‫ﻻ ﯾﺳﺎوي ﺻﻔر‪.‬‬

‫وﺑﺎﻟرﻏم ﻣن إن دراﺳﺗﻧﺎ ﻓﻲ ھذا اﻟﺑﻧد ﺳوف ﺗﻘﺗﺻر ﻋﻠ ﻰ ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻲ‬ ‫اﻟﺑﺳﯾط اﻻ ان ﻧﻔس اﻻﺳﻠوب ﯾﻣﻛن ﺗﻌﻣﯾﻣﮫ ﻟﻠﻧﻣ ﺎذج اﻟﺗ ﻲ ﺗﺣﺗ وي ﻋﻠ ﻰ ﻋ دة ﻣﺗﻐﯾ رات‬ ‫ﻣﺳﺗﻘﻠﺔ‬ ‫ﺗﺷﯾر ﺗﺣﻠﯾل اﻟﺑ واﻗﻰ ﻟﻔﺋ ﺔ ﻣ ن اﻟط رق اﻟط رق اﻟﺗﺷﺧﯾﺻ ﯾﺔ ‪diagnostic methods‬‬ ‫ﻟﻔﺣ ص ﺻ ﻼﺣﯾﺔ ﻧﻣ وذج اﻻﻧﺣ دار وذﻟ ك ﺑﺎﺳ ﺗﺧدام اﻟﺑ واﻗﻲ ‪(yi  yˆi ) residuals‬‬ ‫ﺣﯾث‬ ‫‪. i=1,2,…,n‬ﻋﻧ دﻣﺎ ﯾﻛ ون ﻧﻣ وذج اﻻﻧﺣ دار ﻣﻧﺎﺳ ب ﻟﻠﺑﯾﺎﻧ ﺎت ﻓ ﺈن اﻟﺑ واﻗﻲ ﺳ وف‬ ‫ﺗﻌﻛس اﻟﺧواص اﻟﻣﻔروﺿﺔ ﻟﺣدود اﻟﺧطﺎ ﻓﻲ اﻟﻧﻣوذج‪٠‬‬ ‫ﻓﻲ ﺑﻌض اﻻﺣﯾﺎن ﯾﻛون ﻣن اﻟﻣﻔﯾد اﻟﺗﻌﺎﻣل ﻣﻊ اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ‪:‬‬ ‫‪, i  1,2,, n.‬‬

‫‪ei‬‬ ‫‪MSE‬‬

‫‪di ‬‬

‫ﺣﯾث ‪:‬‬ ‫‪2‬‬

‫‪.‬‬

‫‪ ei‬‬

‫‪n2‬‬

‫‪MSE ‬‬

‫ھﻧﺎك ﺻﯾﻐﺔ اﺧرى ﻟﻠﺑواﻗﻲ وھﻲ ﺑواﻗﻲ ﺳﺗﯾودﻧت واﻟﺗﻲ ﺗﻌرف ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪.‬‬

‫‪ei‬‬ ‫‪‬‬ ‫‪1 (x i  x) 2 ‬‬ ‫‪MSE 1  ( ‬‬ ‫‪)‬‬ ‫‪n‬‬ ‫‪SXX‬‬ ‫‪‬‬ ‫‪‬‬

‫‪ri ‬‬

‫‪i  1,2,  , n .‬‬

‫‪٤٢‬‬


‫وﺗﻌﺗﺑر ﺑواﻗﻲ ﺳﺗﯾودﻧت ﻣﻔﯾدة ﻓﻲ ﺗﺷﺧﯾص اﻻﻧﺣراﻓﺎت ﻋن ﻧﻣوذج اﻻﻧﺣدار‪ ٠‬ﻏﺎﻟﺑﺎ ‪،‬‬ ‫ﻓﻲ اﻟﺑﯾﺎﻧﺎت ذات اﻟﺣﺟم اﻟﺻﻐﯾر ﻓﺎن ﺑواﻗﻲ ﺳﺗﯾودﻧت ﺗﻛون اﻛﺛر ﻛﻔﺎءة ﻣن اﻟﺑواﻗﻲ‬ ‫اﻟﻣﻌﯾﺎرﯾﺔ‪٠‬ﻋﻧدﻣﺎ ﺗﻛون ‪ n‬ﻛﺑﯾرة ﺳوف ﯾﻛون ھﻧﺎك اﺧﺗﻼف ﺻﻐﯾر ﺑﯾن اﻟطرﯾﻘﺗﯾن‪٠‬‬ ‫ﻣﺛﺎل )‪(١٥-٤‬‬

‫ﻓﻲ ﻋﻣﻠﯾﺔ ﺻﻧﺎﻋﯾﺔ اﺟرﯾت ﺗﺟرﺑﺔ ﻟدراﺳﺔ اﻟﻌﻼﻗﺔ ﺑﯾن ﻣﺗﻐﯾ رﯾن ‪ x,Y‬واﻟﺑﯾﺎﻧ ﺎت‬ ‫ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪x2‬‬

‫‪xy‬‬

‫‪15000.‬‬ ‫‪17500‬‬ ‫‪22500‬‬ ‫‪31500‬‬ ‫‪28500‬‬ ‫‪64000‬‬ ‫‪56000‬‬ ‫‪100000‬‬ ‫‪107500‬‬ ‫‪132000‬‬ ‫‪117000‬‬ ‫‪210000‬‬ ‫‪244000‬‬ ‫‪268000‬‬

‫‪x‬‬

‫‪y‬‬

‫‪10000.‬‬ ‫‪15625‬‬ ‫‪15625‬‬ ‫‪22500‬‬ ‫‪22500‬‬ ‫‪40000‬‬ ‫‪40000‬‬ ‫‪62500‬‬ ‫‪62500‬‬ ‫‪90000‬‬ ‫‪90000‬‬ ‫‪122500‬‬ ‫‪160000‬‬ ‫‪160000‬‬

‫‪100.‬‬ ‫‪125‬‬ ‫‪125‬‬ ‫‪150‬‬ ‫‪150‬‬ ‫‪200‬‬ ‫‪200‬‬ ‫‪250‬‬ ‫‪250‬‬ ‫‪300‬‬ ‫‪300‬‬ ‫‪350‬‬ ‫‪400‬‬ ‫‪400‬‬

‫‪150.‬‬ ‫‪140‬‬ ‫‪180‬‬ ‫‪210‬‬ ‫‪190‬‬ ‫‪320‬‬ ‫‪280‬‬ ‫‪400‬‬ ‫‪430‬‬ ‫‪440‬‬ ‫‪390‬‬ ‫‪600‬‬ ‫‪610‬‬ ‫‪670‬‬

‫و اﻟﻣطﻠوب ‪:‬‬ ‫ﺣﺳﺎب اﻟﺑواﻗﻲ و اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻲ ﺳﺗﯾودﻧت ‪.‬‬ ‫اﻟﺣــل‪:‬‬ ‫‪3300‬‬ ‫‪ 235.714 ,‬‬ ‫‪14‬‬

‫‪‬‬

‫‪x‬‬

‫‪n‬‬

‫‪,x ‬‬

‫‪n  14‬‬

‫‪5010‬‬ ‫‪ 357.857 ,‬‬ ‫‪14‬‬

‫‪٤٣‬‬

‫‪‬‬

‫‪y‬‬

‫‪n‬‬

‫‪y‬‬


‫)‪(3300)(5010‬‬ ‫‪ x y‬‬ ‫‪1413500 ‬‬ ‫‪SXY‬‬ ‫‪n‬‬ ‫‪14‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪SXX‬‬ ‫‪( x ) 2‬‬ ‫‪(3300) 2‬‬ ‫‪2‬‬ ‫‪913750 ‬‬ ‫‪x ‬‬ ‫‪n‬‬ ‫‪14‬‬ ‫‪ xy ‬‬

‫‪232571‬‬ ‫‪ 1.71143 ,‬‬ ‫‪135893‬‬

‫‪‬‬

‫‪b 0  y  b1x  357.857  1.71143(235.714)  45.5519 .‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ‪:‬‬ ‫‪yˆ   45 .5519  1 .71143 x .‬‬

‫واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )‪.(١٢-٤‬‬ ‫‪Y‬‬ ‫‪700‬‬ ‫‪600‬‬ ‫‪500‬‬ ‫‪400‬‬ ‫‪300‬‬ ‫‪200‬‬ ‫‪100‬‬ ‫‪x‬‬ ‫‪600‬‬

‫‪400‬‬

‫‪500‬‬

‫‪200‬‬

‫‪300‬‬

‫ﺷﻜﻞ )‪(١٢-٤‬‬

‫‪100‬‬

‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﺑواﻗﻲ ‪ ei‬واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪ d i‬وﺑواﻗﻲ ﺳﺗﯾودﻧت ‪. ri‬‬ ‫‪ri‬‬

‫‪di‬‬

‫‪ei‬‬

‫‪٤٤‬‬

‫‪yˆ i‬‬

‫‪yi‬‬

‫‪xi‬‬


100. 125 125 150 150 200 200 250 250 300 300 350 400 400

150. 140 180 210 190 320 280 400 430 440 390 600 610 670

125.591 168.377 168.377 211.163 211.163 296.735 296.735 382.306 382.306 467.878 467.878 553.449 639.021 639.021

24.4087 - 28.3771 11.6229 - 1.16294 - 21.1629 23.2654 - 16.7346 17.6938 47.6938 - 27.8778 - 77.8778 46.5506 - 29.021 30.979

0.664208 - 0.772198 0.316281 - 0.031646 - 0.575885 0.633099 - 0.45538 0.481484 1.29784 - 0.75861 - 2.11921 1.26673 - 0.789719 0.842999

0.745861 - 0.843355 0.345426 - 0.0338405 - 0.615821 0.660343 - 0.474977 0.500064 1.34793 - 0.800463 - 2.23613 1.38837 - 0.924322 0.986682

‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ p=1 1 x1={100,125.,125,150,150,200,200,250,250,300,300,350,400, 400} {100,125.,125,150,150,200,200,250,250,300,300,350,400,400 } y1={150,140.,180,210,190,320,280,400,430,440,390,600,610, 670} {150,140.,180,210,190,320,280,400,430,440,390,600,610,670 } l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] sxx=c[x1,x1] 135893. xb=h[x1]/l[x1] 235.714 yb=h[y1]/l[y1] 357.857 b1=c[x1,y1]/c[x1,x1] 1.71143 b0=yb-b1*xb ٤٥


-45.5519 t1=Transpose[{x1,y1}] {{100,150},{125.,140.},{125,180},{150,210},{150,190},{200 ,320},{200,280},{250,400},{250,430},{300,440},{300,390},{ 350,600},{400,610},{400,670}} a=PlotRange{{0,600},{0,700}} PlotRange{{0,600},{0,700}} PlotRange{{0,600},{0,700}} PlotRange{{0,600},{0,700}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1] 700 600 500 400 300 200 100 100

200

300

400

500

600

500

600

Graphics d=Plot[b0+b1*x,{x,0,600}] 1000 800 600 400 200

100

200

300

400

Graphics Show[g,d]

٤٦


700 600 500 400 300 200 100 100

200

300

Graphics n=l[x1] 14 ssto=c[y1,y1] 414236. ssr=c[x1,y1]^2/c[x1,x1] 398030. sse=ssto-ssr 16205.5 mse=sse/(n-2) 1350.45 yy=b0+(b1*x1)

400

500

600

{125.591,168.377,168.377,211.163,211.163,296.735,296.735, 382.306,382.306,467.878,467.878,553.449,639.021,639.021} e=y1-yy {24.4087,-28.3771,11.6229,-1.16294,-21.1629,23.2654,16.7346,17.6938,47.6938,-27.8778,-77.8778,46.5506,29.021,30.979}  di  e  mse {0.664208,-0.772198,0.316281,-0.031646,0.575885,0.633099,-0.45538,0.481484,1.29784,-0.75861,2.11921,1.26673,-0.789719,0.842999}

1 x1  xb ^2  ri  e   mse1     N n sxx {0.745861,-0.843355,0.345426,-0.0338405,0.615821,0.660343,-0.474977,0.500064,1.34793,-0.800463,2.23613,1.38837,-0.924322,0.986682} def=t1=Transpose[{x1,y1,yy,e,di,ri}] {{100,150,125.591,24.4087,0.664208,0.745861},{125.,140.,1 68.377,-28.3771,-0.772198,0.843355},{125,180,168.377,11.6229,0.316281,0.345426},{15 0,210,211.163,-1.16294,-0.031646,0.0338405},{150,190,211.163,-21.1629,-0.575885,0.615821},{200,320,296.735,23.2654,0.633099,0.660343},{20 ٤٧


‫‪0,280,296.735,-16.7346,-0.45538,‬‬‫‪0.474977},{250,400,382.306,17.6938,0.481484,0.500064},{25‬‬ ‫‪0,430,382.306,47.6938,1.29784,1.34793},{300,440,467.878,‬‬‫‪27.8778,-0.75861,-0.800463},{300,390,467.878,-77.8778,‬‬‫‪2.11921,‬‬‫‪2.23613},{350,600,553.449,46.5506,1.26673,1.38837},{400,6‬‬ ‫‪10,639.021,-29.021,-0.789719,‬‬‫}}‪0.924322},{400,670,639.021,30.979,0.842999,0.986682‬‬ ‫]‪TableForm[def‬‬

‫‪0.745861‬‬ ‫‪0.843355‬‬ ‫‪0.345426‬‬ ‫‪0.0338405‬‬ ‫‪0.615821‬‬ ‫‪0.660343‬‬ ‫‪0.474977‬‬ ‫‪0.500064‬‬ ‫‪1.34793‬‬ ‫‪0.800463‬‬ ‫‪2.23613‬‬ ‫‪1.38837‬‬ ‫‪0.924322‬‬ ‫‪0.986682‬‬

‫‪24.4087‬‬ ‫‪28.3771‬‬ ‫‪11.6229‬‬ ‫‪1.16294‬‬ ‫‪21.1629‬‬ ‫‪23.2654‬‬ ‫‪16.7346‬‬ ‫‪17.6938‬‬ ‫‪47.6938‬‬ ‫‪27.8778‬‬ ‫‪77.8778‬‬ ‫‪46.5506‬‬ ‫‪29.021‬‬ ‫‪30.979‬‬

‫‪0.664208‬‬ ‫‪0.772198‬‬ ‫‪0.316281‬‬ ‫‪0.031646‬‬ ‫‪0.575885‬‬ ‫‪0.633099‬‬ ‫‪0.45538‬‬ ‫‪0.481484‬‬ ‫‪1.29784‬‬ ‫‪0.75861‬‬ ‫‪2.11921‬‬ ‫‪1.26673‬‬ ‫‪0.789719‬‬ ‫‪0.842999‬‬

‫‪125.591‬‬ ‫‪168.377‬‬ ‫‪168.377‬‬ ‫‪211.163‬‬ ‫‪211.163‬‬ ‫‪296.735‬‬ ‫‪296.735‬‬ ‫‪382.306‬‬ ‫‪382.306‬‬ ‫‪467.878‬‬ ‫‪467.878‬‬ ‫‪553.449‬‬ ‫‪639.021‬‬ ‫‪639.021‬‬

‫‪150‬‬ ‫‪140.‬‬ ‫‪180‬‬ ‫‪210‬‬ ‫‪190‬‬ ‫‪320‬‬ ‫‪280‬‬ ‫‪400‬‬ ‫‪430‬‬ ‫‪440‬‬ ‫‪390‬‬ ‫‪600‬‬ ‫‪610‬‬ ‫‪670‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1.‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬

‫ﻛل اﻟﻣﺧرﺟﺎت اﻟﺗﻰ ﺗﻛﻠﻣﻧﺎ ﻋﻠﯾﮭﺎ ﺳﺎﺑﻘﺎ واﻟﺟدﯾد ھو اﻟﺑواﻗﻰ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪e=y1-yy‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪{24.4087,-28.3771,11.6229,-1.16294,-21.1629,23.2654,‬‬‫‪16.7346,17.6938,47.6938,-27.8778,-77.8778,46.5506,‬‬‫}‪29.021,30.979‬‬

‫اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪‬‬

‫‪mse‬‬

‫‪di  e ‬‬

‫واﻟﻣﺧرج ھو‬

‫‪٤٨‬‬

‫‪100‬‬ ‫‪125.‬‬ ‫‪125‬‬ ‫‪150‬‬ ‫‪150‬‬ ‫‪200‬‬ ‫‪200‬‬ ‫‪250‬‬ ‫‪250‬‬ ‫‪300‬‬ ‫‪300‬‬ ‫‪350‬‬ ‫‪400‬‬ ‫‪400‬‬


‫‪{0.664208,-0.772198,0.316281,-0.031646,‬‬‫‪0.575885,0.633099,-0.45538,0.481484,1.29784,-0.75861,‬‬‫}‪2.11921,1.26673,-0.789719,0.842999‬‬

‫ﺑواﻗﻰ ﺳﺗودﯾﻧت ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫‪1 x1  xb ^2 ‬‬ ‫‪ri  e  ‬‬ ‫‪mse1  ‬‬ ‫‪  N‬‬ ‫‪n‬‬ ‫‪sxx‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪{0.745861,-0.843355,0.345426,-0.0338405,‬‬‫‪0.615821,0.660343,-0.474977,0.500064,1.34793,-0.800463,‬‬‫}‪2.23613,1.38837,-0.924322,0.986682‬‬

‫اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪TableForm[def‬‬

‫ﺳوف ﻧﺗﻧﺎول ﻓﻲ اﻷﺟزاء اﻟﺗﺎﻟﯾﮫ ﺑﻌض اﻟطرق اﻟﺑﯾﺎﻧﯾﮫ واﻟﺗﺣﻠﯾﻠﯾﮫ ﻻﻛﺗﺷﺎف وﺗﺻ ﺣﯾﺢ‬ ‫اﻻﻧﺣراﻓﺎت ﻋن ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ )‪ (١-٤‬وذﻟك ﺑﺈﺳﺗﺧدام اﻟﺑواﻗﻲ‪.‬‬ ‫)‪ (١-١٢-٤‬رﺳوم اﻟﺑواﻗﻰ‬ ‫ﺳوف ﻧﺗﻧﺎول ﻓﻲ ھذا اﻟﺟزء ﺑﻌض اﻻﻧواع ﻣن رﺳوم اﻟﺑ واﻗﻲ )أو رﺳ وم اﻟﺑ واﻗﻰ‬ ‫اﻟﻣﻌﯾﺎرﯾ ﺔ أو رﺳ وم ﺳ ﺗﯾودﻧت( واﻟﺗ ﻲ ﺗﺳ ﺗﺧدم ﻓ ﻲ اﻟﻛﺷ ف ﻋ ن اﻻﻧﺣراﻓ ﺎت ﻋ ن‬ ‫ﻧﻣ وذج اﻻﻧﺣ دار )‪ .(١-٤‬ﻛﺛﯾ ر ﻣ ن ﺑ راﻣﺞ اﻟﺣﺎﺳ ب اﻵﻟ ﻲ اﻟﺟ ﺎھزه واﻟﺗ ﻰ ﺗﺧ ص‬ ‫اﻻﻧﺣدار ﺗﻧﺗﺞ ﺗﻠك اﻟرﺳوم ﺣﺳب اﻟطﻠب وﻓﻲ ھذه اﻟﺣﺎﻟ ﺔ ﻧﺣﺗ ﺎج إﻟ ﻰ ﺟﮭ د ﻗﻠﯾ ل ﻓ ﻲ‬ ‫ﺗﺷﺧﯾص اﻻﻧﺣراف ﻋن اﻟﻧﻣوذج‪.‬‬ ‫ا‪ -‬رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﺗﻘدﯾرﯾﮫ‪:‬‬ ‫ان رﺳ م اﻟﺑ واﻗﻲ ‪) e i‬أو اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﮫ أو ﺑ واﻗﻰ ﺳ ﯾﺗودﻧت( ﻣﻘﺎﺑ ل اﻟﻘ ﯾم‬ ‫اﻟﻣﻘدره ‪ yˆ i‬ﯾﻔﺳر ﻟﻧﺎ ﺑﺻورة ﻋﺎﻣﺔ ﻣﺎ إذا ﻛﺎﻧت ﻓروض اﻟﺗﺣﻠﯾل ﻣﺗ وﻓرة أو ﻻ‪ .‬إذا‬ ‫ﻛﺎن اﻟﻧﻣوذج اﻟﻣﻘدر ﻣﻼﺋﻣﺎ ﻓﺈن ﺷﻛل إﻧﺗﺷﺎر اﻟﺑواﻗﻲ ﯾﺄﺧذ اﻟﺷﻛل اﻟﻣوﺿﺢ ﻓ ﻲ ﺷ ﻛل‬ ‫)‪ (١٣-٤‬واﻟﺧﺎص ﺑﺎﻟﻣﺛﺎل )‪ (١٥-٤‬ﺣﯾث اﻟﻧﻘﺎط ﺗﻧﺗﺷر ﻋﺷ واﺋﯾﺎ ً ﺣ ول اﻟﺻ ﻔر داﺧ ل‬ ‫ﺣزام اﻓﻘﻰ وﻻ ﺗوﺟ د ﻧﺗ وءات أو اﺗﺟ ﺎه ﻣﻌ ﯾن ﻛ ﺎن ﺗﺻ ﺎﻋدﯾﺎ أو ﺗﻧﺎزﻟﯾ ﺎ‪ .‬ﻧﻔ س اﻟﺷ ﺊ‬ ‫ﻋﻧد اﺳﺗﺧدام اﻟﺑ واﻗﻰ اﻟﻣﻌﯾﺎرﯾ ﺔ أو ﺑ واﻗﻰ ﺳ ﺗﯾودﻧت ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪-٤‬‬ ‫‪) (١٥-٤) ، (١٤‬واﻟﺧﺎص ﺑﺎﻟﻣﺛﺎل )‪ ((١٥-٤‬ﻋﻠﻲ اﻟﺗواﻟﻰ‪.‬‬ ‫‪٤٩‬‬


‫ﺷﻛل )‪(١٣-٤‬‬

‫ﺷﻛل )‪(١٤-٤‬‬

‫ﺷﻛل )‪(١٥-٤‬‬ ‫‪٥٠‬‬


‫إذا ﻛﺎﻧت اﻟﻧﻘﺎط ﻓﻲ رﺳم اﻟﺑواﻗﻰ ﺗﺗوزع ﻋﻠﻲ ﺷﻛل ﻣﻧﺣﻧﻰ ﻛﻣﺎ ﯾﺗﺿﺢ ﻣن ﺷ ﻛل‬ ‫)‪ (١٦-٤‬ﻓﮭذا ﯾدل ﻋﻠﻲ ﻋدم اﻟﺧطﯾﮫ‪ .‬وھذا ﯾﻌﻧﻰ اﻟﺣﺎﺟﮫ اﻟﻰ إﺿﺎﻓﺔ ﻣﺗﻐﯾرات ﻣﺳﺗﻘﻠﮫ‬ ‫أﺧرى ﻓ ﻲ اﻟﻧﻣ وذج‪ .‬ﻋﻠ ﻲ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ﺣ د اﻟﺗرﺑﯾ ﻊ ﻗ د ﯾﻛ ون ﺿ رورﯾﺎ ً‪ .‬اﻟﺗﺣ وﯾﻼت‬ ‫ﻋﻠﻲ اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل و )أو( اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻗد ﺗﻛون ﻣطﻠوﺑﮫ‪.‬‬ ‫‪e‬‬ ‫‪60‬‬ ‫‪40‬‬ ‫‪20‬‬ ‫‪300‬‬

‫‪250‬‬

‫‪150‬‬

‫‪200‬‬

‫‪100‬‬

‫‪50‬‬ ‫‪-20‬‬ ‫‪-40‬‬ ‫‪-60‬‬

‫ﺷﻛل ) ‪( ١٦ – ٤‬‬ ‫اﻟﺣﺎﻟﮫ اﻟﺗﻰ ﯾﻛون ﻓﯾﮭﺎ ﻓرض اﻟﺗﺑﺎﯾن ﻏﯾر ﻣﺗﺣﻘق ﻣوﺿﺣﮫ ﻓ ﻲ ﺷ ﻛل )‪(١٧-٤‬‬ ‫ﺣﯾث ﯾزداد اﻻﻧﺗﺷﺎر اﻟرأﺳﻰ ﻟﻠﺑواﻗﻰ ﻣﻊ زﯾﺎدة ‪ yˆ i‬وﺗﺳﻣﻰ ھذه اﻟﺣﺎﻟﺔ اﻟﺷﻛل اﻟﻘﻣﻌﻲ‬ ‫اﻟﻣﻔﺗوح ﻣن اﻷﻣﺎم‪ .‬وھذا ﯾﻌﻧﻰ أن ﺗوزﯾﻌﺎت ‪ Yi‬ﻟﮭﺎ ﺗﺑﺎﯾن ﯾزداد ﻣﻊ زﯾ ﺎدة ‪.  Y x i‬‬ ‫أﻣﺎ ﻓﻲ ﺷﻛل )‪ (١٨-٤‬ﻓﻧﺟد اﻻﻧﺗﺷﺎر اﻟرأﺳﻲ ﻟﻠﺑواﻗﻰ ﯾﻘل ﻣ ﻊ زﯾ ﺎدة ‪ yˆ i‬وﺗﺳ ﻣﻰ ھ ذه‬ ‫اﻟﺣﺎﻟﮫ اﻟﺷﻛل اﻟﻘﻣﻌﻲ اﻟﻣﻔﺗوح ﻣن اﻟﺧﻠف‪ .‬وھذا ﯾﻌﻧﻰ أن ﺗوزﯾﻌﺎت ‪ Yi‬ﻟﮭﺎ ﺗﺑﺎﯾن ﯾﻘ ل‬ ‫ﻣﻊ زﯾﺎدة ‪ .  Y x i‬واﺧﯾرا ﺷ ﻛل )‪ (١٩-٤‬واﻟ ذى ﯾوﺿ ﺢ ﻛ ﻼ اﻟﺷ ﻛﻠﯾن اﻟﺳ ﺎﺑﻘﯾن اى‬ ‫ﯾم‪ y‬ﻧﺳ ب ﺗﻘ ﻊ ﺑ ﯾن ‪ 1 , 0‬ﺣﯾ ث‬ ‫ﺷﻛل اﻟﻘوس اﻟﻣزدوج وھ ذا ﯾﺣ دث ﻋﻧ دﻣﺎ ﺗﻛ ون ﻗ ‪i‬‬ ‫ﺗﺑﺎﯾن ﻧﺳﺑﺔ ذى اﻟﺣدﯾن اﻟﻘرﯾﺑﮫ ﻣ ن ‪ 0.5‬ﯾﻛ ون اﻛﺑ ر ﻣ ن اﺧ رى ﻗرﯾﺑ ﮫ ﻣ ن اﻟﺻ ﻔر او‬ ‫اﻟواﺣ د اﻟﺻ ﺣﯾﺢ‪.‬ﻋﻣوﻣ ﺎ َ ﺑﻔﺿ ل اﺳ ﺗﺧدام اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ أو ﺑ واﻗﻰ ﺳ ﯾﺗودﻧت ﻓ ﻲ‬ ‫رﺳم اﻟﺑواﻗﻰ‪.‬‬ ‫‪e‬‬

‫‪٥١‬‬


‫‪20‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬ ‫‪100‬‬

‫‪95‬‬

‫‪90‬‬

‫‪80‬‬

‫‪85‬‬

‫‪75‬‬ ‫‪-5‬‬ ‫‪-10‬‬ ‫‪-15‬‬

‫ﺷﻛل )‪(١٧-٤‬‬ ‫‪e‬‬

‫ﺷﻛل )‪(١٨-٤‬‬

‫‪٥٢‬‬


‫ﺷﻛل )‪( ١٩-٤‬‬ ‫اﯾﺿﺎ رﺳم اﻟﺑ واﻗﻰ ‪ e i‬ﻣﻘﺎﺑ ل ‪ yˆ i‬ﻗ د ﯾﻛﺷ ف ﻟﻧ ﺎ ﻋ ن اﻟﻣﺷ ﺎھدات اﻟﺷ ﺎذه )اﻟﺧ وارج(‬ ‫واﻟﺗﻰ ﺗﻣﺛل ﻣﺟﻣوﻋﺔ ﻗﻠﯾﻠﮫ ﻣن اﻟﻣﺷﺎھدات ﻓﻲ اﻟﻌﯾﻧﮫ‪ .‬أن وﺟود ﺑﯾﺎﻧﺎت ﺷﺎذه ﻓﻲ اﻟﻌﯾﻧﺔ‬ ‫ﻗد ﯾؤدى اﻟﻰ اﻟﺗوﺻل اﻟﻰ ﻧﺗﺎﺋﺞ ﺧﺎطﺋﺔ‪ .‬إذا ﺑدأ ﻟﻧﺎ ﻣن ﺷﻛل اﻻﻧﺗﺷﺎر أن ھﻧﺎك ﻧﻘطﺔ‬ ‫أو ﻋ دة ﻧﻘ ﺎط ﺗﺑﻌ د ﺑﺻ ورة واﺿ ﺣﺔ ﻋ ن ﺑﻘﯾ ﺔ اﻟﻘ ﯾم ﻓ ﺈن ھ ذه اﻟﻧﻘط ﺔ أو اﻟﻧﻘ ﺎط ﺗﻣﺛ ل‬ ‫ﺑﯾﺎﻧﺎت ﺷﺎذة ﯾﺳﺗدﻋﻰ دراﺳﺗﮭﺎ‪.‬‬ ‫أﯾﺿ ﺎ رﺳ وم اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ أو ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت ﺗﻛ ون ﻣﻔﯾ ده ﻓ ﻲ اﻛﺗﺷ ﺎف‬ ‫اﻻﻧﺣراف ﻋن اﻻﻋﺗدال ‪ .‬ﻋﻧدﻣﺎ ﯾﻛون ﺗوزﯾﻊ اﻷﺧطﺎء طﺑﯾﻌﻲ ﻓﺈن ﺗﻘرﯾﺑ ﺎ ‪ 68%‬ﻣ ن‬ ‫اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ﺳوف ﺗﻘﻊ ﺑﯾن ‪ -1, +1‬وﺗﻘرﯾﺑ ﺎ ‪ 95%‬ﻣ ﻧﮭم ﯾﻘ ﻊ ﺑ ﯾن ‪ -2,+2‬وﻣ ﺎ‬ ‫ﯾزﯾد أو ﯾﻘل ﻋن ذﻟك ﯾﻌﺗﺑر أﺧطﺎء ﺷﺎذه )اﻟﺧوارج ‪.(outliers‬‬ ‫ب‪ -‬رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل ﻣﺗﻐﯾر ﻣﺳﺗﻘل‪:‬‬ ‫ﻋﻧ د رﺳ م اﻟﺑ واﻗﻰ ‪ ei‬ﻣﻘﺎﺑ ل ‪ x i‬وﻋﻧ دﻣﺎ ﯾﻛ ون اﻟﻧﻣ وذج ﻣﻧﺎﺳ ﺑﺎ ﻓ ﺈن اﻟﻧﻘ ﺎط‬ ‫ﻋﻠﻲ اﻟرﺳم ﺗﺗﺑﻌﺛر ﻋﺷواﺋﯾﺎ داﺧل ﺣ زام اﻓﻘ ﻲ ﺣ ول اﻟﺻ ﻔر دون ان ﺗظﮭ ر اﺗﺟﺎھ ﺎت‬ ‫ﻣﻧﺗظﻣﮫ ﻷن ﺗﻛون ﻣوﺟﺑﮫ او ﺳﺎﻟﺑﮫ‪ .‬ان رﺳم اﻟﺑواﻗﻰ ‪ ei‬ﻣﻘﺎﺑل ﻗ ﯾم ‪ x i‬ﯾﻛ ﺎﻓﺊ رﺳ م‬ ‫اﻟﺑواﻗﻰ ‪ e i‬ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﺗﻘدﯾرﯾﺔ ‪ yˆ i‬وذﻟك ﻻن اﻟﻘﯾم اﻟﺗﻘدﯾرﯾ ﮫ ‪ yˆ i‬ﺗﻣﺛ ل دوال ﺧطﯾ ﮫ‬ ‫ﻓ ﻲ اﻟﻘ ﯾم ‪ x i‬ﻟﻠﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل واﻟ ذى ﯾﺗ ﺄﺛر ﻓﻘ ط ھ و ﺗ درﯾﺞ ﻣﺣ ور ‪ x‬وﻟ ﯾس اﻟﻧﺳ ق‬ ‫اﻷﺳﺎﺳﻰ ﻟﻠﻧﻘﺎط اﻟﻣرﺳوﻣﺔ‪.‬‬ ‫ج‪ -‬رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل زﻣن‪:‬‬ ‫ﺑﻌض اﻟﺗطﺑﯾﻘﺎت ﻓ ﻲ اﻻﻧﺣ دار ﺗﺷ ﺗﻣل ﻋﻠ ﻲ ﻣﺗﻐﯾ ر ﺗ ﺎﺑﻊ وﻣﺗﻐﯾ رات ﻣﺳ ﺗﻘﻠﮫ ﻟﮭ ﺎ‬ ‫طﺑﯾﻌﺔ ان ﺗﻛون ﻣﺗﺗﺎﺑﻌﮫ ﻣﻊ اﻟزﻣن‪ .‬اﻟﺑﯾﺎﻧﺎت ﻓﻲ ھذه اﻟﺣﺎﻟ ﮫ ﺗﺳ ﻣﻰ اﻟﺳﻼﺳ ل اﻟزﻣﻧﯾ ﮫ‪.‬‬ ‫ﻧﻣﺎذج اﻻﻧﺣدار اﻟﺗﻰ ﺗﺳﺗﺧدم اﻟﺳﻼﺳل اﻟزﻣﻧﯾﮫ ﺗﻧﺗﺷر ﻓﻲ ﻣﺟﺎل اﻻﻗﺗﺻ ﺎد‪ .‬إن ﻓ رض‬ ‫ﻋ دم اﻻرﺗﺑ ﺎط أو اﻻﺳ ﺗﻘﻼل ﻟﻼﺧط ﺎء ﻟﺑﯾﺎﻧ ﺎت اﻟﺳﻼﺳ ل اﻟزﻣﻧﯾ ﮫ ﯾﻛ ون ﻏﺎﻟﺑ ﺎ ﻏﯾ ر‬ ‫ﻣﺗﺣﻘق ‪.‬ﻋﺎدة اﻻﺧطﺎء ﻓﻲ اﻟﺳﻼﺳل اﻟزﻣﻧﯾﮫ ﺗﻛون ﻣرﺗﺑطﺔ ‪،‬أي أن ‪ E i  j   0‬و‬ ‫‪ . i  j‬ﯾﻘﺎل ﻟﺣدود اﻟﺧطﺄ ﻓﻲ ھ ذه اﻟﺣﺎﻟ ﺔ اﻧﮭ ﺎ ﻣرﺗﺑط ﮫ ذاﺗﯾ ﺎ‪ .‬ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﻓ ﺈن‬ ‫رﺳم اﻟﺑواﻗﻰ ‪ e i‬ﻣﻘﺎﺑل اﻟزﻣن ﯾﻛﺷف ﻋن وﺟود اﻻرﺗﺑﺎط اﻟذاﺗﻲ ﻟﻠﺑواﻗﻰ‪ .‬ﯾﺗﺿ ﺢ ﻣ ن‬ ‫‪٥٣‬‬


‫ﺷﻛل )‪ (٢٠-٤‬وﺟود ارﺗﺑﺎط ذاﺗﻲ ﻣوﺟب ﺣﯾ ث ﺗﻛ ون ھﻧ ﺎك ﻋ دة ﻧﻘ ﺎط ﻣوﺟﺑ ﮫ ﺗﻠﯾﮭ ﺎ‬ ‫ﻋدة ﻧﻘﺎط ﺳﺎﻟﺑﮫ‪.‬‬ ‫‪20‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬

‫‪20‬‬

‫‪10‬‬

‫‪15‬‬

‫‪5‬‬ ‫‪-5‬‬ ‫‪-10‬‬

‫ﺷﻛل )‪(٢٠-٤‬‬ ‫أﻣﺎ ﺷﻛل )‪ (٢١-٤‬ﻓﯾوﺿ ﺢ وﺟ ود ارﺗﺑ ﺎط ذاﺗ ﻲ ﺳ ﺎﻟب ﺣﯾ ث ﻧﻘ ﺎط اﻟﺑ واﻗﻰ‬ ‫ﺗﺗﻌﺎﻗب ﺑﺎﻷﺷﺎرة ﻓﺎﻻوﻟﻰ ﻣوﺟﺑﮫ ﻣ ﺛﻼ واﻟﺛﺎﻧﯾ ﮫ ﺳ ﺎﻟﺑﮫ واﻟﺛﺎﻟﺛ ﮫ ﻣوﺟﺑ ﮫ واﻟراﺑﻌ ﮫ ﺳ ﺎﻟﺑﮫ‬ ‫وھﻛذا‪.‬‬ ‫‪20‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬

‫‪20‬‬

‫‪10‬‬

‫‪15‬‬

‫‪5‬‬ ‫‪-5‬‬

‫اﻟﺰﻣﻦ‬

‫‪-10‬‬

‫ﺷﻛل )‪(٢١-٤‬‬ ‫ﻣﺛﺎل )‪(١٦-٤‬‬ ‫ﯾُﺗوﻗﻊ أن ﺗﻘ ل ﻛﺗﻠ ﮫ ﻋﺿ ﻼت اﻟﺷ ﺧص ﻣ ﻊ اﻟﻌﻣ ر ‪ ،‬وﻟﺗﻘﺻ ﻲ ھ ذه اﻟﻌﻼﻗ ﺔ ﻋﻧ د‬ ‫اﻟﻧﺳﺎء ‪ .‬اﺧﺗﺎر ﺑﺎﺣ ث ﺗﻐذﯾ ﺔ أرﺑﻌ ﮫ ﻧﺳ ﺎء ﻋﺷ واﺋﯾﺎ ﻣ ن ﻛ ل ﺷ رﯾﺣﺔ ﻋﻣرﯾ ﮫ ﻣ ن ‪10‬‬ ‫ﺳﻧوات ﺗﺑدا ﺑﺎﻟﻌﻣر ‪ 40‬وﺗﻧﺗﮭﻲ ﺑﺎﻟﻌﻣر ‪ .79‬ﯾﻌطﻲ ﺟدول اﻟﺗﺎﻟﻰ اﻟﻧﺗﯾﺟ ﺔ ‪ x ،‬اﻟﻌﻣ ر‬ ‫و ‪ y‬ﻗﯾﺎس ﻛﺗﻠﺔ اﻟﻌﺿﻠﺔ ‪ .‬ﺑﺎﻓﺗراض ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط )‪. (١ – ٤‬‬ ‫)أ(‬

‫أوﺟد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ‪.‬‬

‫‪٥٤‬‬


‫) ب ( اﺣﺳب اﻟﺑواﻗﻲ واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻲ ﺳﺗﯾودﻧت وﻣﺛﻠﮭ ﺎ ﺑﯾﺎﻧﯾ ﺎ ً‪ .‬ھ ل ﺗﺑ دو‬ ‫داﻟﮫ اﻻﻧﺣدار اﻟﺧطﯾﺔ ﺗوﻓﯾﻘﺎ ﺟﯾد‪.‬‬ ‫‪78‬‬

‫‪49‬‬

‫‪53‬‬

‫‪45‬‬

‫‪58‬‬

‫‪45‬‬

‫‪65‬‬

‫‪76‬‬

‫‪56‬‬

‫‪68‬‬

‫‪73‬‬

‫‪56‬‬

‫‪67‬‬

‫‪43‬‬

‫‪64‬‬

‫‪71‬‬

‫‪x‬‬

‫‪77‬‬

‫‪105‬‬

‫‪100‬‬

‫‪97‬‬

‫‪76‬‬

‫‪116‬‬

‫‪84‬‬

‫‪65‬‬

‫‪80‬‬

‫‪78‬‬

‫‪73‬‬

‫‪87‬‬

‫‪68‬‬

‫‪100‬‬

‫‪91‬‬

‫‪82‬‬

‫‪y‬‬

‫اﻟﺣــل‬ ‫)أ( ﯾﺗﺿﺢ ﻣن ﺷﻛل اﻻﻧﺗﺷﺎر )‪ (٢٢-٤‬أن اﻟﺧط اﻟﻣﺳﺗﻘﯾم ھ و أﻓﺿ ل طرﯾﻘ ﺔ ﻟﺗﻣﺛﯾ ل‬ ‫ھذه اﻟﺑﯾﺎﻧﺎت ‪:‬‬

‫أي أﻧﻧﺎ ﻧﻔﺗرض اﻟﻧﻣوذج اﻟﺧطﻰ اﻟﺑﺳﯾط ‪.‬‬ ‫‪y‬‬ ‫‪120‬‬ ‫‪100‬‬ ‫‪80‬‬ ‫‪60‬‬ ‫‪40‬‬

‫‪x‬‬

‫‪20‬‬ ‫‪x‬‬ ‫‪100‬‬

‫‪80‬‬

‫‪40‬‬

‫‪60‬‬

‫‪20‬‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر )‪(٢٢-٤‬‬ ‫ﺑﻣﺎ أن‬

‫‪ β 0 , β1‬ﻣﺟﮭوﻟﺗﺎن ﻓﺈﻧﻧﺎ ﻧﻘدرھﻣﺎ ﻣن ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ﺣﯾث ‪:‬‬ ‫‪ x i2  60409 ,‬‬

‫‪ y i  1379.‬‬

‫‪y  86.1875 ,‬‬

‫‪ x i  967‬‬

‫‪,‬‬

‫‪n  16‬‬

‫‪x  60.4375‬‬

‫‪x i y i‬‬ ‫‪SXY‬‬ ‫‪n‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪2‬‬ ‫‪SXX‬‬ ‫) ‪2 (x i‬‬ ‫‪x i ‬‬ ‫‪n‬‬ ‫‪x i yi ‬‬

‫‪٥٥‬‬

‫‪,‬‬

‫‪ x i y i  81331‬‬


‫)‪(967)(1379‬‬ ‫‪16‬‬ ‫‪‬‬ ‫‪(967) 2‬‬ ‫‪60409 ‬‬ ‫‪16‬‬ ‫‪ 2012.3125‬‬ ‫‪‬‬ ‫‪ 1.02359 ,‬‬ ‫‪1965.9375‬‬ ‫‪b 0  y  b1x  86.1875  ( 1.02359)(60.4375)  148.051 .‬‬ ‫‪81331 ‬‬

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪yˆ  148 .051  1.02359 x.‬‬

‫واﻟﻣوﺿﺣﺔ ﺑﯾﺎﻧﯾﺎ ً ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )‪. (٢٣ – ٤‬‬ ‫‪y‬‬ ‫‪120‬‬ ‫‪100‬‬ ‫‪80‬‬ ‫‪60‬‬ ‫‪40‬‬ ‫‪20‬‬ ‫‪x‬‬ ‫‪100‬‬

‫‪80‬‬

‫‪40‬‬

‫‪60‬‬

‫‪20‬‬

‫ﺷﻛل ) ‪(٢٣ -٤‬‬ ‫)ب( اﻟﺑواﻗﻲ واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻲ ﺳﺗﯾودﻧت ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪( yi  yˆi ) 2‬‬ ‫‪yˆ i‬‬ ‫‪y i  yˆ i‬‬ ‫‪di‬‬ ‫‪ri‬‬

‫‪٥٦‬‬

‫‪yi‬‬


‫‪0.8223‬‬ ‫‪1.0480‬‬ ‫‪- 0.4972‬‬ ‫‪- 1.4223‬‬ ‫‪- 0.4611‬‬ ‫‪- 0.0408‬‬ ‫‪- 0.0553‬‬ ‫‪- 1.3265‬‬ ‫‪- 0.6535‬‬ ‫‪0.3076‬‬ ‫‪1.7270‬‬ ‫‪- 1.5688‬‬ ‫‪- 0.6149‬‬ ‫‪0.7658‬‬ ‫‪0.8767‬‬ ‫‪1.0931‬‬

‫‪43.8795‬‬ ‫‪71.5553‬‬ ‫‪16.2920‬‬ ‫‪131.5653‬‬ ‫‪13.9104‬‬ ‫‪0.1080‬‬ ‫‪0.1994‬‬ ‫‪115.1259‬‬ ‫‪27.6454‬‬ ‫‪6.1634‬‬ ‫‪196.3036‬‬ ‫‪160.8457‬‬ ‫‪24.8917‬‬ ‫‪38.4344‬‬ ‫‪50.4838‬‬ ‫‪77.2515‬‬

‫‪0.7939‬‬ ‫‪1.0138‬‬ ‫‪- 0.4837‬‬ ‫‪- 1.3747‬‬ ‫‪- 0.4470‬‬ ‫‪- 0.0393‬‬ ‫‪- 0.0535‬‬ ‫‪- 1.2859‬‬ ‫‪- 0.6301‬‬ ‫‪0.2975‬‬ ‫‪1.6792‬‬ ‫‪- 1.5199‬‬ ‫‪- 0.5979‬‬ ‫‪0.7430‬‬ ‫‪0.8515‬‬ ‫‪1.0533‬‬

‫‪75.3758‬‬ ‫‪82.5409‬‬ ‫‪104.0363‬‬ ‫‪79.4701‬‬ ‫‪90.7296‬‬ ‫‪73.3286‬‬ ‫‪78.4466‬‬ ‫‪90.7296‬‬ ‫‪70.2578‬‬ ‫‪81.5173‬‬ ‫‪101.9891‬‬ ‫‪88.6824‬‬ ‫‪101.9891‬‬ ‫‪93.8004‬‬ ‫‪97.8948‬‬ ‫‪68.2107‬‬

‫‪6.6241‬‬ ‫‪8.4590‬‬ ‫‪- 4.0363‬‬ ‫‪- 11.4701‬‬ ‫‪- 3.7296‬‬ ‫‪- 0.3286‬‬ ‫‪- 0.4466‬‬ ‫‪- 10.7296‬‬ ‫‪- 5.2578‬‬ ‫‪2.4826‬‬ ‫‪14.0108‬‬ ‫‪- 12.6824‬‬ ‫‪- 4.9891‬‬ ‫‪6.1995‬‬ ‫‪7.1051‬‬ ‫‪8.7892‬‬

‫رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪.(٢٤-٤‬‬ ‫‪e‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪120‬‬

‫‪110‬‬

‫‪100‬‬

‫‪80‬‬

‫‪90‬‬

‫‪70‬‬

‫‪60‬‬ ‫‪-5‬‬ ‫‪-10‬‬ ‫‪-15‬‬

‫ﺷﻛل )‪(٢٤-٤‬‬

‫رﺳم اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪ d i‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪. (٢٥-٤‬‬

‫‪٥٧‬‬

‫`‪82‬‬ ‫‪91‬‬ ‫‪100‬‬ ‫‪68‬‬ ‫‪87‬‬ ‫‪73‬‬ ‫‪78‬‬ ‫‪80‬‬ ‫‪65‬‬ ‫‪84‬‬ ‫‪116‬‬ ‫‪76‬‬ ‫‪97‬‬ ‫‪100‬‬ ‫‪105‬‬ ‫‪77‬‬


‫‪d‬‬ ‫‪3‬‬

‫‪d‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪120‬‬

‫‪110‬‬

‫‪100‬‬

‫‪80‬‬

‫‪90‬‬

‫‪70‬‬

‫‪60‬‬ ‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل )‪(٢٥-٤‬‬

‫رﺳم ﺑواﻗﻲ ﺳﺗﯾودﻧت ‪ ri‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪. (٢٦-٤‬‬

‫ﺷﻛل )‪(٢٦-٤‬‬ ‫ﯾﺗﺿﺢ ﻣن ﺷﻛل اﻻﻧﺗﺷﺎر )‪ (٢٢-٤‬وﻣن رﺳوم اﻟﺑواﻗﻲ أن اﻟﻣﻌﺎدﻟﺔ اﻟﻣﻘدره ﺗﺑدو‬ ‫ﺗوﻓﯾﻘﺎ ﺟﯾد‪.‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫}‪x1={71.,64,43,67,56,73,68,56,76,65,45,58,45,53,49,78‬‬ ‫}‪{71.,64,43,67,56,73,68,56,76,65,45,58,45,53,49,78‬‬ ‫}‪y1={82.,91,100,68,87,73,78,80,65,84,116,76,97,100,105,77‬‬ ‫}‪{82.,91,100,68,87,73,78,80,65,84,116,76,97,100,105,77‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫‪٥٨‬‬


h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] sxx=c[x1,x1] 1965.94 xb=h[x1]/l[x1] 60.4375 yb=h[y1]/l[y1] 86.1875 b1=c[x1,y1]/c[x1,x1] -1.02359 b0=yb-b1*xb 148.051 yy=b0+(b1*x1) {75.3758,82.541,104.036,79.4702,90.7297,73.3287,78.4466,9 0.7297,70.2579,81.5174,101.989,88.6825,101.989,93.8004,97 .8948,68.2107} e=y1-yy {6.62416,8.45904,-4.03634,-11.4702,-3.72968,-0.32866,0.446606,-10.7297,-5.25789,2.48263,14.0108,-12.6825,4.98916,6.19955,7.1052,8.78929} t1=Transpose[{x1,y1}] {{71.,82.},{64,91},{43,100},{67,68},{56,87},{73,73},{68,7 8},{56,80},{76,65},{65,84},{45,116},{58,76},{45,97},{53,1 00},{49,105},{78,77}} a=PlotRange{{0,100},{0,120}} PlotRange{{0,100},{0,120}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}] y 120 100 80 60 40 20 x 20

40

60

80

100

Graphics dd=Plot[b0+(b1*x),{x,0,100},AxesLabel{"x","y"}]

٥٩


y 140 120 100 80 x 20

40

60

80

100

60

80

100

Graphics Show[g,dd] y 120 100 80 60 40 20 x 20

40

Graphics n=l[x1] 16 ssto=c[y1,y1] 3034.44 ssr=c[x1,y1]^2/c[x1,x1] 2059.78 sse=ssto-ssr 974.656 mse=sse/(n-2) 69.6183  di  e  mse {0.793906,1.01382,-0.483755,-1.3747,-0.447002,0.0393899,-0.0535258,-1.28595,-0.630159,0.297543,1.6792,1.52,-0.597951,0.743017,0.851559,1.0534}

1 x1  xb ^2  ri  e   mse1     N n sxx {0.845946,1.05069,-0.546753,-1.43667,-0.464148,0.042544,-0.0561594,-1.33528,-0.698323,0.309051,1.85859,1.57238,-0.661831,0.779167,0.912464,1.19227} pp1=Transpose[{yy,e}] ٦٠


{{75.3758,6.62416},{82.541,8.45904},{104.036,4.03634},{79.4702,-11.4702},{90.7297,-3.72968},{73.3287,0.32866},{78.4466,-0.446606},{90.7297,10.7297},{70.2579,5.25789},{81.5174,2.48263},{101.989,14.0108},{88.6825,12.6825},{101.989,4.98916},{93.8004,6.19955},{97.8948,7.1052},{68.2107,8.78 929}} aa=PlotRange{{50,120},{-15,15}} PlotRange{{50,120},{-15,15}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp1, aa, a2, AxesLabel  "y ", "e" e

15 10 5  y

60

70

80

90

100

110

120

-5 -10 -15

Graphics pp2=Transpose[{yy,di}] {{75.3758,0.793906},{82.541,1.01382},{104.036,0.483755},{79.4702,-1.3747},{90.7297,0.447002},{73.3287,-0.0393899},{78.4466,0.0535258},{90.7297,-1.28595},{70.2579,0.630159},{81.5174,0.297543},{101.989,1.6792},{88.6825,1.52},{101.989,0.597951},{93.8004,0.743017},{97.8948,0.851559},{68.2107, 1.0534}} aa=PlotRange{{50,120},{-3,3}} PlotRange{{50,120},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp2, aa, a2, AxesLabel  "y ", "d"

٦١


d 3 2 1  y

60

70

80

90

100

110

120

-1 -2 -3

Graphics pp3=Transpose[{yy,ri}] {{75.3758,0.845946},{82.541,1.05069},{104.036,0.546753},{79.4702,-1.43667},{90.7297,0.464148},{73.3287,-0.042544},{78.4466,0.0561594},{90.7297,-1.33528},{70.2579,0.698323},{81.5174,0.309051},{101.989,1.85859},{88.6825,1.57238},{101.989,0.661831},{93.8004,0.779167},{97.8948,0.912464},{68.2107, 1.19227}} aa=PlotRange{{50,120},{-3,3}} PlotRange{{50,120},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "r" r 3 2 1  y

60

70

80

90

100

110

120

-1 -2 -3

Graphics def=Transpose[{x1,y1,yy,e,di,ri}] {{71.,82.,75.3758,6.62416,0.793906,0.845946},{64,91,82.54 1,8.45904,1.01382,1.05069},{43,100,104.036,-4.03634,0.483755,-0.546753},{67,68,79.4702,-11.4702,-1.3747,1.43667},{56,87,90.7297,-3.72968,-0.447002,0.464148},{73,73,73.3287,-0.32866,-0.0393899,0.042544},{68,78,78.4466,-0.446606,-0.0535258,٦٢


‫‪0.0561594},{56,80,90.7297,-10.7297,-1.28595,‬‬‫‪1.33528},{76,65,70.2579,-5.25789,-0.630159,‬‬‫‪0.698323},{65,84,81.5174,2.48263,0.297543,0.309051},{45,1‬‬ ‫‪16,101.989,14.0108,1.6792,1.85859},{58,76,88.6825,‬‬‫‪12.6825,-1.52,-1.57238},{45,97,101.989,-4.98916,‬‬‫‪0.597951,‬‬‫‪0.661831},{53,100,93.8004,6.19955,0.743017,0.779167},{49,‬‬ ‫‪105,97.8948,7.1052,0.851559,0.912464},{78,77,68.2107,8.78‬‬ ‫}}‪929,1.0534,1.19227‬‬ ‫]‪TableForm[def‬‬

‫‪0.845946‬‬ ‫‪1.05069‬‬ ‫‪0.546753‬‬ ‫‪1.43667‬‬ ‫‪0.464148‬‬ ‫‪0.042544‬‬ ‫‪0.0561594‬‬ ‫‪1.33528‬‬ ‫‪0.698323‬‬ ‫‪0.309051‬‬ ‫‪1.85859‬‬ ‫‪1.57238‬‬ ‫‪0.661831‬‬ ‫‪0.779167‬‬ ‫‪0.912464‬‬ ‫‪1.19227‬‬

‫‪6.62416‬‬ ‫‪8.45904‬‬ ‫‪4.03634‬‬ ‫‪11.4702‬‬ ‫‪3.72968‬‬ ‫‪0.32866‬‬ ‫‪0.446606‬‬ ‫‪10.7297‬‬ ‫‪5.25789‬‬ ‫‪2.48263‬‬ ‫‪14.0108‬‬ ‫‪12.6825‬‬ ‫‪4.98916‬‬ ‫‪6.19955‬‬ ‫‪7.1052‬‬ ‫‪8.78929‬‬

‫‪0.793906‬‬ ‫‪1.01382‬‬ ‫‪0.483755‬‬ ‫‪1.3747‬‬ ‫‪0.447002‬‬ ‫‪0.0393899‬‬ ‫‪0.0535258‬‬ ‫‪1.28595‬‬ ‫‪0.630159‬‬ ‫‪0.297543‬‬ ‫‪1.6792‬‬ ‫‪1.52‬‬ ‫‪0.597951‬‬ ‫‪0.743017‬‬ ‫‪0.851559‬‬ ‫‪1.0534‬‬

‫‪75.3758‬‬ ‫‪82.541‬‬ ‫‪104.036‬‬ ‫‪79.4702‬‬ ‫‪90.7297‬‬ ‫‪73.3287‬‬ ‫‪78.4466‬‬ ‫‪90.7297‬‬ ‫‪70.2579‬‬ ‫‪81.5174‬‬ ‫‪101.989‬‬ ‫‪88.6825‬‬ ‫‪101.989‬‬ ‫‪93.8004‬‬ ‫‪97.8948‬‬ ‫‪68.2107‬‬

‫‪82.‬‬ ‫‪91‬‬ ‫‪100‬‬ ‫‪68‬‬ ‫‪87‬‬ ‫‪73‬‬ ‫‪78‬‬ ‫‪80‬‬ ‫‪65‬‬ ‫‪84‬‬ ‫‪116‬‬ ‫‪76‬‬ ‫‪97‬‬ ‫‪100‬‬ ‫‪105‬‬ ‫‪77‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ اﻟﻣدﺧﻼت ‪:‬‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1.‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬

‫ﻛل اﻟﻣﺧرﺟﺎت اﻟﺗﻰ ﺗﻛﻠﻣﻧﺎ ﻋﻠﯾﮭﺎ ﺳﺎﺑﻘﺎ واﻟﺟدﯾد ھو رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑ ل اﻟﻘ ﯾم اﻟﻣﻘ درة‬ ‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪‬‬ ‫‪g  ListPlotpp1, aa, a2, AxesLabel  "y‬‬ ‫‪", "e"‬‬

‫واﻟﻣﺧرج ھو‬

‫‪٦٣‬‬

‫‪71.‬‬ ‫‪64‬‬ ‫‪43‬‬ ‫‪67‬‬ ‫‪56‬‬ ‫‪73‬‬ ‫‪68‬‬ ‫‪56‬‬ ‫‪76‬‬ ‫‪65‬‬ ‫‪45‬‬ ‫‪58‬‬ ‫‪45‬‬ ‫‪53‬‬ ‫‪49‬‬ ‫‪78‬‬


‫‪e‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪120‬‬

‫‪110‬‬

‫‪100‬‬

‫‪90‬‬

‫‪80‬‬

‫‪70‬‬

‫‪60‬‬ ‫‪-5‬‬ ‫‪-10‬‬ ‫‪-15‬‬

‫‪Graphics‬‬

‫رﺳم اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﻣﻘدرة ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪‬‬ ‫‪g  ListPlotpp2, aa, a2, AxesLabel  "y‬‬ ‫‪", "d"‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪d‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪120‬‬

‫‪110‬‬

‫‪100‬‬

‫‪90‬‬

‫‪80‬‬

‫‪70‬‬

‫‪60‬‬ ‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫‪‬‬ ‫‪Graphics‬‬

‫رﺳم ﺑواﻗﻰ ﺳﺗودﻧت ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﻣﻘدرة ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlotpp3, aa, a2, AxesLabel  "y‬‬ ‫‪", "r"‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪٦٤‬‬


r 3 2 1  y

60

70

80

90

100

110

120

-1 -2 -3

Graphics

(١٧-٤) ‫ﻣﺛﺎل‬ :‫( وذﻟك ﺑﺎﺳﺗﺧدام اﻟﺤﺰﻣﺔ اﻟﺠﺎھﺰة‬٢-٤) ‫( ﺳوف ﯾطﺑق ﻋﻠﻰ ﻣﺛﺎل‬١٦-٤) ‫اﻟﻣطﻠوب ﻓﻰ اﻟﻣﺛﺎل‬ : ‫وذﻟك ﺑﻛﺗﺎﺑﺔ اﻻﻣر اﻟﺗﺎﻟﻰ‬ Statistics`LinearRegression` .‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression`

oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp ct]}]; res=Regress[dpoints,{1,x},x,RegressionReport>FitResiduals] {FitResiduals{0.0789719,-0.00298867,-0.0380742,0.0109426,0.0641429,-0.0444229,-0.00198867,0.0165151,0.0413533,-0.0878177,-0.00734412,-0.00838349,0.0279493,0.0619585}} pr=Regress[dpoints,{1,x},x,RegressionReport>PredictedResponse] {PredictedResponse{0.546028,0.514989,0.526074,0.534943,0 .523857,0.519423,0.514989,0.479515,0.470647,0.492818,0.45 7344,0.488383,0.483949,0.444042}} lsq[x_]=Fit[dpoints,{1,x},x] 1.07813 -2.2171 x ٦٥


Map[lsq,oppbavg] {0.546028,0.514989,0.526074,0.534943,0.523857,0.519423,0. 514989,0.479515,0.470647,0.492818,0.457344,0.488383,0.483 949,0.444042} winpct-Map[lsq,oppbavg] {0.0789719,-0.00298867,-0.0380742,-0.0109426,0.0641429,0.0444229,-0.00198867,-0.0165151,0.0413533,-0.0878177,0.00734412,-0.00838349,-0.0279493,0.0619585} Regress[dpoints,{1,x},x,RegressionReport>{StandardizedResiduals,StudentizedResiduals}] {StandardizedResiduals{1.87411,-0.0644816,-0.839202,0.247677,1.40636,-0.965242,-0.0429063,-0.359268,0.91839,1.87916,-0.171141,-0.180051,0.603555,1.55562},StudentizedResiduals{2.13351,0.0617472,-0.828143,-0.237742,1.47337,-0.962259,0.0410828,-0.345837,0.911923,-2.14166,-0.164055,0.172619,-0.586836,1.66693}} predvals=pr[[1,2]] {0.546028,0.514989,0.526074,0.534943,0.523857,0.519423,0. 514989,0.479515,0.470647,0.492818,0.457344,0.488383,0.483 949,0.444042} errvals=res[[1,2]] {0.0789719,-0.00298867,-0.0380742,-0.0109426,0.0641429,0.0444229,-0.00198867,-0.0165151,0.0413533,-0.0878177,0.00734412,-0.00838349,-0.0279493,0.0619585} eps=(Max[oppbavg]-Min[oppbavg])/Length[oppbavg]; ListPlot[Transpose[{oppbavg,errvals}],Prolog>{PointSize[0.025]},AxesOrigin->{Min[oppbavg]eps,0},PlotRange->{{Min[oppbavg]eps,Max[oppbavg]+eps},{Min[errvals]eps,Max[errvals]+eps}}] 0.075 0.05 0.025 0.24

0.25

0.26

0.27

0.28

-0.025 -0.05 -0.075

Graphics eps=(Max[predvals]-Min[predvals])/Length[predvals]; ListPlot[Transpose[{predvals,errvals}],Prolog>{PointSize[0.03]},AxesOrigin->{Min[predvals]eps,0},PlotRange->{{Min[predvals]٦٦


eps,Max[predvals]+eps},{Min[errvals]eps,Max[errvals]+eps}}] 0.075 0.05 0.025 0.44

0.46

0.48

0.5

0.52

0.54

-0.025 -0.05 -0.075

Graphics errSTvals=Regress[dpoints,{1,x},x,RegressionReport>StandardizedResiduals][[1,2]] {1.87411,-0.0644816,-0.839202,-0.247677,1.40636,0.965242,-0.0429063,-0.359268,0.91839,-1.87916,0.171141,-0.180051,-0.603555,1.55562} eps=(Max[predvals]-Min[predvals])/Length[predvals]; ListPlot[Transpose[{predvals,errSTvals}],Prolog>{PointSize[0.02]},AxesOrigin->{Min[predvals]eps,0},PlotRange->{{Min[predvals]eps,Max[predvals]+eps},{Min[errSTvals]eps,Max[errSTvals]+eps}}] 1.5 1 0.5 0.44

0.46

0.48

0.5

0.52

0.54

-0.5 -1 -1.5

Graphics

: ‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬

‫اﻟﺑواﻗﻰ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ res=Regress[dpoints,{1,x},x,RegressionReport>FitResiduals]

‫واﻟﻣﺧرج ھو‬ {FitResiduals{0.0789719,-0.00298867,-0.0380742,0.0109426,0.0641429,-0.0444229,-0.00198867,٦٧


0.0165151,0.0413533,-0.0878177,-0.00734412,-0.00838349,0.0279493,0.0619585}}

‫اﻟﻘﯾم اﻟﻣﻘدرة ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ pr=Regress[dpoints,{1,x},x,RegressionReport>PredictedResponse] ‫واﻟﻣﺧرج ھو‬ {PredictedResponse{0.546028,0.514989,0.526074,0.534943,0 .523857,0.519423,0.514989,0.479515,0.470647,0.492818,0.45 7344,0488383,0.483949,0.444042}} ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻣﻌطﺎه ﻣن اﻻﻣر‬ lsq[x_]=Fit[dpoints,{1,x},x]

‫واﻟﻣﺧرج ھو‬ 1.07813 -2.2171 x

‫اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻰ ﺳﺗودﻧت ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ Regress[dpoints,{1,x},x,RegressionReport>{StandardizedResiduals,StudentizedResiduals}]

‫واﻟﻣﺧرج ھو‬ {StandardizedResiduals{1.87411,-0.0644816,-0.839202,0.247677,1.40636,-0.965242,-0.0429063,-0.359268,0.91839,1.87916,-0.171141,-0.180051,0.603555,1.55562},StudentizedResiduals{2.13351,0.0617472,-0.828143,-0.237742,1.47337,-0.962259,0.0410828,-0.345837,0.911923,-2.14166,-0.164055,0.172619,-0.586836,1.66693}}

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

xi

‫ ﻣﻘﺎﺑل‬ei ‫رﺳم اﻟﺑواﻗﻲ‬

eps=(Max[oppbavg]-Min[oppbavg])/Length[oppbavg]; ListPlot[Transpose[{oppbavg,errvals}],Prolog>{PointSize[0.025]},AxesOrigin->{Min[oppbavg]eps,0},PlotRange->{{Min[oppbavg]eps,Max[oppbavg]+eps},{Min[errvals]eps,Max[errvals]+eps}}]

‫رﺳم اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﻣﻘدرة ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ eps=(Max[predvals]-Min[predvals])/Length[predvals]; ListPlot[Transpose[{predvals,errvals}],Prolog>{PointSize[0.03]},AxesOrigin->{Min[predvals]eps,0},PlotRange->{{Min[predvals]eps,Max[predvals]+eps},{Min[errvals]eps,Max[errvals]+eps}}]

‫رﺳم ﺑواﻗﻰ ﺳﺗودﻧت ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﻣﻘدرة ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ٦٨


‫;]‪eps=(Max[predvals]-Min[predvals])/Length[predvals‬‬ ‫‪ListPlot[Transpose[{predvals,errSTvals}],Prolog‬‬‫]}‪>{PointSize[0.02]},AxesOrigin->{Min[predvals],0‬‬

‫)‪ (٢-١٢-٤‬رﺳوم ﺑواﻗﻰ اﺧرى ﻻﺧﺗﺑﺎر اﻻﻋﺗدال‬ ‫أن اﻻﻧﺣ راف ﻋ ن اﻻﻋﺗ دال ﻻ ﯾ ؤﺛر ﻛﺛﯾ را ﻋﻠ ﻰ اﻟﻧﻣ وذج ﻓ ﺈن ﻋ دم اﻻﻋﺗ دال ﯾ ؤﺛر‬ ‫ﻛﺛﯾرا ﻓ ﻲ إﺣﺻ ﺎءات ‪ t، F‬وﺑﺎﻟﺗ ﺎﻟﻲ ﻋﻠ ﻲ ﻓﺗ رات اﻟﺛﻘ ﺔ واﺧﺗﺑ ﺎرات اﻟﻔ روض و اﻟﺗ ﻲ‬ ‫ﺗﻌﺗﻣد ﻋﻠﻰ ﻓرض اﻻﻋﺗدال‪ .‬أﻛﺛر ﻣن ذﻟك ﻓﺈن اﻷﺧطﺎء اﻟﺗﻲ ﺗﺄﺗﻲ ﻣن ﺗوزﯾﻊ ﻟ ﮫ ذﯾ ل‬ ‫أوﺳ ﻊ او اﺿ ﯾق ﻣ ن اﻟطﺑﯾﻌ ﻲ ﯾﻛ ون ﺗوﻓﯾ ق اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ﻟﮭ ﺎ ﺣﺳ ﺎس ﻟﻠﻔﺋ ﺎت‬ ‫اﻟﺻﻐﯾرة ﻣن اﻟﺑﯾﺎﻧﺎت ‪ .‬أن ﺗوزﯾﻌﺎت اﻷﺧطﺎء اﻟﺗﻲ ﻟﮭﺎ ذﯾل أوﺳﻊ ﻣ ن اﻟطﺑﯾﻌ ﻲ ﻏﺎﻟﺑ ﺎ‬ ‫ﺗﻧﺗﺞ ﻣن ﻗﯾم ﺷﺎذة )اﻟﺧ وارج ‪ .(outliers‬ﻓ ﻲ ھ ذا اﻟﻘﺳ م ﺳ وف ﻧﻘ دم رﺳ وم ﺑ واﻗﻲ‬ ‫أﺧرى و ذﻟك ﻻﺧﺗﺑﺎر ﻣﺎ إذا ﻛﺎﻧت ﺣدود اﻟﺧط ﺄ ﺗﺗﺑ ﻊ ﺗوزﯾﻌ ﺎت طﺑﯾﻌﯾ ﺔ ﻋﻧ دﻣﺎ ﯾﻛ ون‬ ‫ھو ﻣطﻠوب ﻓﻲ ﻧﻣوذج اﻻﻧﺣدار) ‪.(١-٤‬‬ ‫أ‪ -‬اﻟﻣدرج اﻟﺗﻛراري‬ ‫ﯾﻣﻛن اﺳﺗﺧدام اﻟﻣ درج اﻟﺗﻛ راري ﻟﻠﺑ واﻗﻲ ﻟﻠﺗﺣﻘ ق ﻣ ن ﻓ رض اﻻﻋﺗ دال‪ .‬ﻋﻧ دﻣﺎ‬ ‫ﯾﻛون ﻋدد اﻟﺑواﻗﻲ ﺻﻐﯾر ﺟدا ﻓﺈﻧ ﮫ ﻻ ﯾﺳ ﻣﺢ ﺑ ﺎﻟﺗﻌرف اﻟﺑﺻ ري ﺑﺳ ﮭوﻟﺔ ﻋﻠ ﻰ ﺷ ﻛل‬ ‫اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ‪ .‬ﯾﺗﺿ ﺢ ﻣ ن ﺷ ﻛل )‪ (a)(٢٧-٤‬أن ﻓ رض اﻻﻋﺗ دال ﻣﺗﺣﻘ ق ﺑﯾﻧﻣ ﺎ‬ ‫ﯾوﺿﺢ ﺷﻛل )‪ (b) (٢٧-٤‬أن ﺗوزﯾﻊ اﻷﺧطﺎء ﻣﻠﺗوي ﻧﺎﺣﯾﺔ اﻟﯾﻣﯾن‪.‬‬

‫)‪(a‬‬

‫)‪(b‬‬ ‫‪0.3‬‬ ‫‪0.25‬‬ ‫‪0.2‬‬ ‫‪0.15‬‬ ‫‪0.1‬‬ ‫‪0.05‬‬ ‫‪10‬‬

‫‪8‬‬

‫‪6‬‬

‫‪4‬‬

‫‪2‬‬

‫‪0.5‬‬ ‫‪0.4‬‬ ‫‪0.3‬‬ ‫‪0.2‬‬ ‫‪0.1‬‬ ‫‪2‬‬

‫ﺷﻛل )‪(٢٧-٤‬‬ ‫ﻣﺛﺎل )‪(١٨-٤‬‬

‫‪٦٩‬‬

‫‪1‬‬

‫‪-1‬‬

‫‪-2‬‬


‫ﺳﻮف ﯾﺘﻢ اﻟﻮﺻﻮل اﻟﻰ اﻟﺮﺳﻢ اﻟﺴ ﺎﺑﻖ ﺑﺈﺳ ﺘﺨﺪام ﺑﺮﻧ ﺎﻣﺞ ﺟ ﺎھﺰ ﺣﯾ ث ﺗ م ﺗوﻟﯾ د ﺑﯾﺎﻧ ﺎت ﺗﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻰ‬

‫ﻋﻠﻰ اﻋﺘﺒﺎر اﻧﻬﺎ ﺗﻤﺜﻞ اﻟﺒﻮاﻗﻰ وذﻟﻚ ﺑﺎﺳﺘﺨﺪام اﻻﻣﺮ‬ data1=RandomArray[NormalDistribution[0,1],50]

‫ﻣﻊ ﺗﻤﺜﻴﻞ ﻫﺬﻩ اﻟﺒﻮاﻗﻰ ﺑﻴﺎﻧﻴﺎ ﺑﺈﺳﺘﺨﺪام اﻻﻣﺮ‬ p1=normalHistogram[data1,10,DisplayFunction->Identity];

‫اﻳﻀـﺎ ﯾ ﺗم ﺗوﻟﯾ د ﺑﯾﺎﻧ ﺎت ﺗﺗﺑ ﻊ ﺗوزﯾ ﻊ ﻣرﺑ ﻊ ﻛ ﺎى ﻋﻠـﻰ‬. ‫ﻣﻊ ﻋـﺪم ﺗﻨﻔﻴـﺬﻩ وذﻟـﻚ ﺑﻮﺿـﻊ ; ﻓـﻰ ﻧﻬﺎﻳـﺔ اﻻﻣـﺮ‬ ‫اﻋﺘﺒﺎر اﻧﻬﺎ ﺗﻤﺜﻞ اﻟﺒﻮاﻗﻰ وذﻟﻚ ﺑﺎﺳﺘﺨﺪام اﻻﻣﺮ‬ data2=RandomArray[ChiSquareDistribution[2],50]

‫ﻣﻊ ﺗﻤﺜﻴﻞ ﻫﺬﻩ اﻟﺒﻮاﻗﻰ ﺑﻴﺎﻧﻴﺎ ﺑﺈﺳﺘﺨﺪام اﻻﻣﺮ‬ p2=normalHistogram[data2,10,DisplayFunction->Identity]; ‫ ﻟﺗﻣﺛﯾل اﻟﺑواﻗﻰ ﻓﻰ اﻟﺣﺎﻟﺗﯾن اﻟﺳﺎﺑﻘﺗﯾن ﺑﺎﺳﺗﺧدام اﻟﻣدرج‬.‫ﻣﻊ ﻋﺪم ﺗﻨﻔﯿﺬه وذﻟﻚ ﺑﻮﺿﻊ اﻟﺮﻣﺰ ﻓﻰ ﻧﮭﺎﯾﺔ اﻻﻣر‬ ‫اﻟﺗﻛرارى ﯾﺳﺗﺧدم اﻻﻣر‬ Show[GraphicsArray[{p1,p2}]]

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ <<Graphics`Graphics` <<Statistics`ContinuousDistributions` Clear[normalHistogram] normalHistogram[data_,bars_:10,opts___]:=Module[{p1,p2min ,max,stepsize,counts,heights,midpts,tograph}, min=Min[data]; max=Max[data]; mean=Mean[data]; sd=StandardDeviation[data]; stepsize=(max-min)/(bars-1); counts=BinCounts[data,{minstepsize/2,max+stepsize/2,stepsize}]; heights=counts/(stepsize Length[data])//N; midpts=Table[i,{i,min,max,stepsize}]; tograph=Table[{N[midpts[[i]],3],heights[[i]],stepsiz e},{i,1,bars}]; p1=GeneralizedBarChart[tograph,PlotRange>All,DisplayFunction->Identity]; p2=Plot[PDF[NormalDistribution[mean,sd],x],{x,min,ma x},PlotStyle>{{GrayLevel[0.4],Thickness[0.01]}},DisplayFunction>Identity]; Show[p1,p2,opts,DisplayFunction>$DisplayFunction] ] ٧٠


‫]‪data1=RandomArray[NormalDistribution[0,1],50‬‬ ‫‪{0.584876,0.164822,0.449716,1.28953,0.520173,-1.69339,‬‬‫‪0.225564,0.462183,‬‬‫‪0.446375,0.226037,0.570508,0.735886,2.59758,0.231171,1.02‬‬ ‫‪25,-1.31356,2.60839,1.31471,0.893,2.17977,0.184372,‬‬‫‪0.661991,-0.066023,0.140468,-0.000891814,‬‬‫‪0.291963,0.728657,0.713564,0.724345,-0.224926,0.256552,‬‬‫‪0.771846,-0.525295,-0.0889038,-1.28344,-1.91511,‬‬‫‪0.599998,-0.0474356,0.197584,-0.598371,‬‬‫‪0.582649,0.238121,-0.566242,-0.484493,-1.61822,-2.08677,‬‬‫}‪0.191946,0.697967,1.81547,-1.39897‬‬ ‫;]‪p1=normalHistogram[data1,10,DisplayFunction->Identity‬‬ ‫]‪data2=RandomArray[ChiSquareDistribution[2],50‬‬ ‫‪{3.48566,3.55124,2.26459,0.116474,1.56762,1.99768,1.57667‬‬ ‫‪,1.75057,1.90107,0.678585,0.955201,0.20144,1.13616,0.1852‬‬ ‫‪95,0.44635,1.52742,0.423731,2.41548,0.524364,0.394676,6.4‬‬ ‫‪5974,10.1795,0.721821,0.155046,0.291119,0.356386,1.963,0.‬‬ ‫‪0363703,1.79359,1.51655,0.166446,1.14102,7.69427,0.558897‬‬ ‫‪,2.40877,0.827852,1.5761,0.33758,1.38669,3.26832,0.874976‬‬ ‫‪,1.21096,0.627969,1.96591,1.00144,1.23365,6.79307,1.60237‬‬ ‫}‪,0.598011,0.705157‬‬ ‫;]‪p2=normalHistogram[data2,10,DisplayFunction->Identity‬‬ ‫]]}‪Show[GraphicsArray[{p1,p2‬‬ ‫‪0.3‬‬ ‫‪0.25‬‬ ‫‪0.2‬‬ ‫‪0.15‬‬ ‫‪0.1‬‬ ‫‪0.05‬‬ ‫‪10‬‬

‫‪8‬‬

‫‪6‬‬

‫‪4‬‬

‫‪2‬‬

‫‪0.5‬‬ ‫‪0.4‬‬ ‫‪0.3‬‬ ‫‪0.2‬‬ ‫‪0.1‬‬ ‫‪2‬‬

‫‪1‬‬

‫‪-1‬‬

‫‪-2‬‬

‫‪GraphicsArray‬‬

‫ب‪ -‬رﺳم اﻻﺣﺗﻣﺎل اﻟطﺑﯾﻌﻰ‬ ‫ﻋﻣوﻣ ﺎ ﯾﺳ ﺗﺧدم اﻟ ورق اﻻﺣﺗﻣ ﺎﻟﻲ اﻟطﺑﯾﻌ ﻲ ﻓ ﻲ ﺗﻘﯾ ﯾم ﻓ رض ﺗﺑﻌﯾ ﺔ اﻟﺑﯾﺎﻧ ﺎت‬ ‫ﻟﻠﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ ﺣﯾ ث ﺗوﻗ ﻊ اﻟﻣﺷ ﺎھدات اﻟﻣطﻠ وب اﺧﺗﺑﺎرھ ﺎ ﻣ ﻊ اﻟﻘ ﯾم اﻟﻣﺗوﻗ ﻊ‬ ‫اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻋﻧ دﻣﺎ ﯾﻛ ون اﻟﺗوزﯾ ﻊ طﺑﯾﻌ ﻲ‪ .‬ﻓ ﺈذا وﻗﻌ ت أزواج اﻟﻘ ﯾم اﻟﻧﺎﺗﺟ ﺔ ﻋﻠ ﻰ‬ ‫ﺧ ط ﻣﺳ ﺗﻘﯾم ﺗﻘرﯾﺑ ﺎ ﻓ ﺈن ھ ذا ﯾ دل ﻋﻠ ﻰ أن اﻟﺑﯾﺎﻧ ﺎت ﺗﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ ‪ .‬أﻣ ﺎ إذا‬ ‫اﻧﺣرﻓت اﻟﻧﻘﺎط ﻋن ﺧط ﻣﺳﺗﻘﯾم ﺑﺻورة واﺿﺣﺔ ﻓﺈن ﻓرض اﻻﻋﺗدال ﯾﺻﺑﺢ ﻣﺷﻛوﻛﺎ‬ ‫ﻓ ﻲ ﺻ ﺣﺗﮫ ‪ .‬ﻛﻣ ﺎ أن اﻟطرﯾﻘ ﺔ اﻟﺗ ﻲ ﺗﺣ دث ﺑﮭ ﺎ ھ ذه اﻻﻧﺣراﻓ ﺎت ﻗ د ﺗﻣ دﻧﺎ ﺑ ﺑﻌض‬ ‫اﻟﻣﻌﻠوﻣﺎت ﻋن أﺳﺑﺎب ﻋدم اﻟﺗﺑﻌﯾﺔ ﻟﻠﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ‪ .‬وﺑﻣﺟ رد ﻣﻌرﻓ ﺔ ھ ذه اﻷﺳ ﺑﺎب‬ ‫ﻓﺈﻧﮫ ﻣن اﻟﻣﻣﻛن اﺗﺧﺎذ ﺑﻌض اﻹﺟراءات اﻟﺗﺻﺣﯾﺣﯾﺔ‪.‬‬ ‫ﻟ ﯾﻛن ‪ e1 , e 2 ,..., e n‬ﺗﻣﺛ ل اﻟﺑ واﻗﻲ اﻟﺗ ﻲ ﻋ ددھﺎ ‪ n‬و ﺑﻔ رض أن‬ ‫) ‪ e (1 )  e ( 2 ) ,...,  e ( n‬ﺗﻣﺛ ل اﻟﺑ واﻗﻲ ﺑﻌ د ﺗرﺗﯾﺑﮭ ﺎ ﺗﺻ ﺎﻋدﯾﺎ‪ .‬أي أن )‪e (1‬‬ ‫‪٧١‬‬


‫‪1‬‬ ‫) ‪(i ‬‬ ‫أﺻﻐر ﻗﯾﻣﺔ ﻓﻲ اﻟﺑواﻗﻲ و ‪ e‬أﻛﺑر ﻗﯾﻣﺔ ‪.‬ﺳوف ﯾﺳﺗﺧدم اﻟﻣﻘدار ‪2‬‬ ‫‪p (i ) ‬‬ ‫)‪(n‬‬ ‫‪n‬‬ ‫‪i‬‬ ‫ﻛﺗﻘرﯾب ﻟﻧﺳﺑﺔ اﻟﺑواﻗﻲ )ﻓﻲ اﻟﻌﯾﻧﺔ( اﻟﺗﻲ ﺗﻘﻊ ﻋﻧد أو ﻋﻠ ﻰ ﯾﺳ ﺎر )‪ . e (i‬ﺑﻔ رض أن‬ ‫‪n‬‬ ‫اﻟﻣﻘدار ) ‪ p (i‬ﻣﻌرف ﻣن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻰ ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬

‫‪z 2‬‬ ‫‪2‬‬

‫)‪ (i‬‬

‫‪1‬‬ ‫‪ (  (i) )  P ( Z   (i) )  ‬‬ ‫‪e‬‬ ‫‪dz  p (i).‬‬ ‫‪2‬‬ ‫‪‬‬ ‫‪‬‬ ‫وھﻧ ﺎ ﻓ ﺈن ) ‪ p (i‬ھ و اﺣﺗﻣ ﺎل اﻟﺣﺻ ول ﻋﻠ ﻰ اﻟﻘﯾﻣ ﺔ أﻗ ل ﻣ ن أو ﯾﺳ ﺎوي ) ‪  (i‬وذﻟ ك‬

‫ﺑﺎﺳ ﺗﺧدام اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ‪ .‬وﺑرﺳ م أزواج اﻟﻘ ﯾم ) ) ‪ ( e (i ) ,  (i‬وإذا ﻛﺎﻧ ت‬ ‫اﻟﻌﻼﻗ ﺔ ﺑ ﯾن أزواج اﻟﻘ ﯾم ﺧطﯾ ﺔ ﺗﻘرﯾﺑ ﺎ‪ .‬ﻓ ﺈن ھ ذا ﯾ دل ﻋﻠ ﻰ ﺗﺣﻘ ق ﻓ رض اﻻﻋﺗ دال‬ ‫ﻟﺣدود اﻷﺧطﺎء ‪ .‬وھﻧﺎك ورق اﺣﺗﻣﺎل طﺑﯾﻌﻲ ﻣﺻﻣم ﻟذﻟك اﻟﻐرض ‪ .‬وﯾﻣﻛ ن إﺟ راء‬ ‫اﻟﺣﺳﺎﺑﺎت اﻟﻼزﻣﺔ ﻟﻠﺣﺻول ﻋﻠﻰ ﺷﻛل رﺳم اﻻﺣﺗﻣﺎل اﻟطﺑﯾﻌﻲ ﺑﺎﺳ ﺗﺧدام اﻟﺣﺎﺳ ﺑﺎت‬ ‫اﻵﻟﯾﺔﻛﻣﺎ ﯾﺗﺿﺢ ﻣن اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ‪.‬‬ ‫ﻣﺛﺎل )‪(١٩-٤‬‬ ‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﻘﯾم اﻟﻣرﺗﺑﺔ )‪ e (i‬ﻟﻠﺑواﻗﻲ اﻟﺧﺎﺻﮫ ﺑﺎﻟﻣﺛﺎل )‪ (٥-٤‬وذﻟك‬ ‫ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻧﻔ ذ ﻋﻠ ﻲ اﻟﺣﺎﺳ ب اﻵﻟ ﻲ ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ‪ Mathematica‬ﻣ ﻊ‬ ‫اﻟﻘﯾم ) ‪ p (i‬وﻗﯾم اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ )‪  (i‬ﻟﮭ ذا اﻻﺣﺗﻣ ﺎل ﻓﻣ ﺛﻼ ﻣ ن اﻟﺟ دول‬ ‫اﻟﺗﺎﻟﻰ ﻧﺟد أن ‪:‬‬

‫‪2‬‬ ‫‪1.73166‬‬ ‫‪z‬‬ ‫‪1 e 2 dz  0.958333.‬‬ ‫‪P(Z  1.73166) ‬‬ ‫‪‬‬ ‫‪2‬‬ ‫‪‬‬

‫) ‪ (i‬‬

‫) ‪p (i‬‬

‫‪٧٢‬‬

‫) ‪e (i‬‬

‫‪ei‬‬


‫‪- 1.73166‬‬ ‫‪- 1.15035‬‬ ‫‪- 0.812218‬‬ ‫‪- 0.548522‬‬ ‫‪- 0.318639‬‬ ‫‪- 0.104633‬‬

‫‪0.104633‬‬ ‫‪0.318639‬‬ ‫‪0.548522‬‬ ‫‪0.812218‬‬ ‫‪1.15035‬‬ ‫‪1.73166‬‬

‫‪- 8.66963‬‬ ‫‪- 8.25577‬‬ ‫‪- 5.42806‬‬ ‫‪- 3.01421‬‬ ‫‪- 1.66963‬‬

‫‪0.0416667‬‬ ‫‪0.125‬‬ ‫‪0.208333‬‬ ‫‪0.291667‬‬ ‫‪0.375‬‬ ‫‪0.458333‬‬ ‫‪0.541667‬‬ ‫‪0.625‬‬ ‫‪0.708333‬‬ ‫‪0.791667‬‬ ‫‪0.875‬‬ ‫‪0.958333‬‬

‫‪0.571936‬‬ ‫‪1.74423‬‬ ‫‪1.91652‬‬ ‫‪2.74423‬‬ ‫‪5.15808‬‬ ‫‪7.39964‬‬ ‫‪7.50266‬‬

‫‪5.15808‬‬ ‫‪- 8.66963‬‬ ‫‪- 3.01421‬‬ ‫‪- 8.25577‬‬ ‫‪1.91652‬‬ ‫‪- 1.66963‬‬ ‫‪0.571936‬‬ ‫‪7.50266‬‬ ‫‪1.74423‬‬ ‫‪- 5.42806‬‬ ‫‪7.39964‬‬ ‫‪2.74423‬‬

‫ﯾوﺿﺢ ﺷﻛل )‪ (٢٨-٤‬ﺗوﻗﯾﻊ اﻟﺑواﻗﻰ اﻟﻣرﺗﺑﺔ )‪ e (i‬ﻣﻊ ﻗﯾم اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ‬ ‫)‪  (i‬ﻟﻧﺣﺻل ﻓﻲ اﻟﻧﮭﺎﯾﺔ ﻋﻠﻰ رﺳم اﻻﺣﺗﻣﺎل اﻟطﺑﯾﻌﻲ‪ .‬ﻧﻼﺣظ ﻣن ﺷﻛل )‪(٢٨-٤‬‬ ‫أن ازواج اﻟﻘﯾم ) ) ‪ ( e (i ) ,  ( i‬ﺗﻘﻊ ﺗﻘرﯾﺑﺎ ﻋﻠﻲ ﺧط ﻣﺳﺗﻘﯾم وﺑﺎﻟﺗﺎﻟﻲ ﻓﺈﻧﻧﺎ ﻧﻘﺑل‬ ‫ﻓرﺿﯾﮫ ﺗﺑﻌﯾﮫ ﺣدود اﻟﺧطﺄ ﻟﻠﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ‪.‬‬

‫ﺷﻛل )‪(٢٨-٤‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪٧٣‬‬


x1={4,6.,2,5,7,6,3,8,5,3,1,5} {4,6.,2,5,7,6,3,8,5,3,1,5} y1={197.,272,100,228,327,279,148,377,238,142,66,239} {197.,272,100,228,327,279,148,377,238,142,66,239} p=1 1 l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] n =l[x1] 12 sxx=c[x1,x1] 46.9167 xb=h[x1]/l[x1] 4.58333 yb=h[y1]/l[y1] 217.75 b1=c[x1,y1]/c[x1,x1] 44.4139 b0=yb-b1*xb 14.1865 yy=b0+(b1*x1) {191.842,280.67,103.014,236.256,325.083,280.67,147.428,36 9.497,236.256,147.428,58.6004,236.256} e=y1-yy {5.15808,-8.66963,-3.01421,-8.25577,1.91652,1.66963,0.571936,7.50266,1.74423,5.42806,7.39964,2.74423} ssgg=Sort[e] {-8.66963,-8.25577,-5.42806,-3.01421,1.66963,0.571936,1.74423,1.91652,2.74423,5.15808,7.39964, 7.50266} era=Table[(i-.5)/n,{i,1,n}] {0.0416667,0.125,0.208333,0.291667,0.375,0.458333,0.54166 7,0.625,0.708333,0.791667,0.875,0.958333} <<Statistics`ContinuousDistributions` qq[x_]:=Quantile[NormalDistribution[0,1],x] ffg=Map[qq,era] {-1.73166,-1.15035,-0.812218,-0.548522,-0.318639,0.104633,0.104633,0.318639,0.548522,0.812218,1.15035,1.73 166} wwwel=Transpose[{e,ssgg,era,ffg}] {{5.15808,-8.66963,0.0416667,-1.73166},{-8.66963,8.25577,0.125,-1.15035},{-3.01421,-5.42806,0.208333,0.812218},{-8.25577,-3.01421,0.291667,0.548522},{1.91652,-1.66963,0.375,-0.318639},{1.66963,0.571936,0.458333,٧٤


0.104633},{0.571936,1.74423,0.541667,0.104633},{7.50266,1 .91652,0.625,0.318639},{1.74423,2.74423,0.708333,0.548522 },{5.42806,5.15808,0.791667,0.812218},{7.39964,7.39964,0.875 ,1.15035},{2.74423,7.50266,0.958333,1.73166}} TableForm[wwwel] 5.15808 8.66963 0.0416667 1.73166 8.66963 8.25577 0.125 1.15035 3.01421 5.42806 0.208333 0.812218 8.25577 3.01421 0.291667 0.548522 1.91652 1.66963 0.375 0.318639 1.66963 0.571936 0.458333 0.104633

0.571936 7.50266 1.74423 5.42806 7.39964 2.74423

1.74423 1.91652 2.74423 5.15808 7.39964 7.50266

0.541667 0.625 0.708333 0.791667 0.875 0.958333

0.104633 0.318639 0.548522 0.812218 1.15035 1.73166

ssal=Transpose[{ssgg,ffg}] {{-8.66963,-1.73166},{-8.25577,-1.15035},{-5.42806,0.812218},{-3.01421,-0.548522},{-1.66963,0.318639},{0.571936,0.104633},{1.74423,0.104633},{1.91652,0.318639},{2.74423, 0.548522},{5.15808,0.812218},{7.39964,1.15035},{7.50266,1 .73166}} ggo=ListPlot[ssal,Prolog{PointSize[.02]},PlotRange{{9,8},{-2,9}}] 8

6

4

2

-7.5

-5

-2.5

2.5

5

7.5

-2

Graphics

: ‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ٧٥


‫اﻟﺑواﻗﻰ اﻟﻣرﺗﺑﺔ )‪ e (1) , e (2) , ... , e (n‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪ssgg=Sort[e‬‬ ‫واﻟﻤﺨﺮج ھﻮ‬ ‫‪{-8.66963,-8.25577,-5.42806,-3.01421,‬‬‫‪1.66963,0.571936,1.74423,1.91652,2.74423,5.15808,7.39964,‬‬ ‫}‪7.50266‬‬

‫اﻻﺣﺗﻣﺎﻻت اﻟﺗﺟرﯾﺑﯾﺔ اﻟﺗﺟﻣﯾﻌﯾﺔ ) ‪: p (i‬‬

‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪) / n , (2 - ) / n , ... , (n - ) / n .‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪(1 ‬‬

‫]}‪era=Table[(i-.5)/n,{i,1,n‬‬ ‫واﻟﻤﺨﺮج ھﻮ ‪:‬‬ ‫‪{0.0416667,0.125,0.208333,0.291667,0.375,0.458333,0.54166‬‬ ‫}‪7,0.625,0.708333,0.791667,0.875,0.958333‬‬

‫ﻗﯾم )‪  (1) ,  (2) , ... ,  (n‬ﯾﺗم ﺣﺳﺎﺑﮭﺎ ﺑﺎﺳﺗﺧدام اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻣن اﻻﻣ ر‬ ‫اﻟﺗﺎﻟﻰ ‪:‬‬ ‫]‪ffg=Map[qq,era‬‬

‫واﻟﻣﺧرج ھو ‪:‬‬ ‫‪{-1.73166,-1.15035,-0.812218,-0.548522,-0.318639,‬‬‫‪0.104633,0.104633,0.318639,0.548522,0.812218,1.15035,1.73‬‬ ‫}‪166‬‬

‫اﻟﺟدول اﻟذى ﯾﺣﺗوى ﻋﻠﻰ اﻟﻘﯾم اﻟﻣرﺗﺑﺔ )‪ e (i‬ﻟﻠﺑواﻗﻲ ﻣﻊ اﻟﻘﯾم ) ‪ p (i‬وﻗﯾم اﻟﺗوزﯾ ﻊ‬ ‫اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ )‪  (i‬ﻣﻌطﺎه ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ ‪:‬‬ ‫]‪TableForm[wwwe1‬‬

‫ﺗوﻗﯾﻊ اﻟﺑواﻗﻰ اﻟﻣرﺗﺑ ﺔ )‪ e (i‬ﻣ ﻊ ﻗ ﯾم اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ )‪  (i‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ‬ ‫رﺳم اﻻﺣﺗﻣﺎل اﻟطﺑﯾﻌﻲ اﻟﻣوﺿﺢ ﻓﻰ ﺷﻛل )‪ (٢٨-٤‬ﯾﻌطﻰ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ ‪-:‬‬ ‫{{‪ggo=ListPlot[ssal,Prolog{PointSize[.02]},PlotRange‬‬‫]}}‪9,8},{-2,9‬‬

‫ﻋﻧدﻣﺎ ﯾﻛون ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ طﺑﯾﻌﻲ ﻛﻣﺎ ﻓﻲ ﺷﻛل )‪ a (٢٩-٤‬ﻓﺈﻧﻧﺎ ﻧﺣﺻل‬ ‫ﻋﻠﻰ رﺳم اﺣﺗﻣﺎل طﺑﯾﻌﻲ ﻣﺛﺎﻟﻲ ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ b(٣٠-٤‬ﺣﯾث ﺗﻠﺗف‬ ‫‪٧٦‬‬


‫اﻟﻧﻘﺎط ﺣول ﺧط ﻣﺳﺗﻘﯾم‪ .‬ﻋﻧدﻣﺎ ﯾﻛون اﻟﺗوزﯾﻊ ﻣﻠﺗوي ﻧﺎﺣﯾﺔ اﻟﯾﻣﯾن ﻛﻣﺎ ﻓﻲ ﺷﻛل )‪-٤‬‬ ‫‪ c(٢٩‬ﻓﺈن رﺳم اﻻﺣﺗﻣﺎل اﻟطﺑﯾﻌﻲ ﺳوف ﯾﻛون ﻣﻘﻌرا ﻣن اﺳﻔل ‪ downward‬ﻛﻣﺎ‬ ‫ﻓﻲ ﺷﻛل )‪ . c(٣٠-٤‬أﻣﺎ إذا ﻛﺎن اﻟﺗوزﯾﻊ ﻣﻠﺗوي ﻧﺎﺣﯾﺔ اﻟﯾﺳﺎر ﻓﺎن رﺳم اﻻﺣﺗﻣﺎل‬ ‫اﻟطﺑﯾﻌﻲ ﯾﻛون ﻣﻘﻌرا ﻣن اﻋﻠﻲ ‪ . upward‬وإذا ﻛﺎن اﻟﺗوزﯾﻊ ﻟﮫ اﺣﺗﻣﺎل اﻋﻠﻲ ﻓﻲ‬ ‫اﻟذﯾﻠﯾن ﻣن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﻣﺛل اﻟﺗوزﯾﻊ اﻟﻣﻧﺗظم ﻛﻣﺎ ﻓﻲ ﺷﻛل )‪ b(٢٩-٤‬او اﻟﺗوزﯾﻊ‬ ‫اﻟﻣﻔﻠطﺢ ﻓﺈن اﻟرﺳم ﻋﻠﻲ اﻟورق اﻻﺣﺗﻣﺎﻟﻲ اﻟطﺑﯾﻌﻲ ﯾﻛون ﻣﻘﻌرا ﻣن أﺳﻔل ﻧﺎﺣﯾﺔ‬ ‫اﻟرﻛن اﻷﯾﺳر اﻟﺳﻔﻠﻲ وﻣﻘﻌرا ﻣن اﻋﻠﻲ ﻧﺎﺣﯾﺔ اﻟرﻛن اﻷﯾﻣن اﻟﻌﻠوي ﻛﻣﺎ ﻓﻲ‬ ‫ﺷﻛل )‪ . a(٣٠-٤‬اﻟﺣﺎﻟﺔ اﻟﻌﻛﺳﯾﺔ ﻣﻌطﺎه ﻛﻣﺎ ﻓﻲ ﺷﻛل )‪ d (٢٩-٤‬واﻟﺗﻲ ﯾﻣﻛن‬ ‫ﻣﻼﺣظﺗﮭﺎ ﻓﻲ اﻟﺗوزﯾﻌﺎت اﻟﺗﻲ ﻟﮭﺎ اﺣﺗﻣﺎل أﻗل ﻓﻲ اﻟذﯾﻠﯾن ﻣن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ او‬ ‫اﻟﻣدﺑﺑﮫ واﻟﻣوﺿﺣﮫ ﻓﻲ ﺷﻛل )‪d(٣٠-٤‬‬

‫)‪(a‬‬

‫)‪(b‬‬

‫)‪(c‬‬

‫)‪(d‬‬ ‫ﺷﻛل )‪(٢٩-٤‬‬ ‫‪4‬‬

‫)‪( b‬‬

‫) ‪(a‬‬

‫‪٧٧‬‬


( c)

( d) (٣٠-٤) ‫ﺷﻛل‬ (٢٠-٤) ‫ﻣﺛﺎل‬

: ‫( ﻧﺳﺗﺧدم اﻟﺑرﻧﺎﻣﺞ اﻟﺗﺎﻟﻰ‬٣٠-٤) ‫(وﺷﻛل‬٢٩-٤) ‫ﻟﻠﺣﺻول ﻋﻠﻰ ﺷﻛل‬ <<Statistics`ContinuousDistributions` plot1=Plot[PDF[NormalDistribution[0,1],x],{x,2,2},DisplayFunction->Identity]; plot2=Plot[PDF[UniformDistribution[0,1],x],{x,0,1},Displa yFunction->Identity]; plot3=Plot[PDF[ChiSquareDistribution[4],x],{x,0,15},Displ ayFunction->Identity]; plot4=Plot[PDF[StudentTDistribution[1],x],{x,10,10},DisplayFunction->Identity]; Show[GraphicsArray[{{plot1,plot2},{plot3,plot4}}]]

-2

-1

0.4

2

0.3 0.2

1.5 1

0.1

0.5 1

2

0.2 0.4 0.6 0.8 1 0.3 0.25 0.2 0.15 0.1 0.05

0.175 0.15 0.125 0.1 0.075 0.05 0.025 2 4 6 8 10 12 14

-10

-5

5

10

GraphicsArray

normal=RandomArray[NormalDistribution[0,1],50]

٧٨


{0.119447,0.566809,0.280831,0.22715,0.658255,1.56798,0.180 001,0.187362,0.596641,0.430159,-0.0966329,0.284134,0.358295,-1.26955,-0.27671,-0.0248395,0.910254,-0.264412,-0.305139,1.64856,0.703,1.65633,0.615424,1.11452,1.18427,-0.826099,0.203374,1.14628,0.435058,-2.02507,0.921211,0.616495,-1.06946,-0.965814,0.822306,0.629285,0.162396,-0.328231,0.716756,-0.658059,0.273968,1.53388,-1.11519,-0.839082,1.80152,1.17551,0.0521744,0.368834,0.286288,0.709404} n1=normalProbability[normal,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.99369 uniform=RandomArray[UniformDistribution[0,1],50]; Short[uniform] {0.425167,48,0.924985} n2=normalProbability[uniform,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.97522 chi=RandomArray[ChiSquareDistribution[4],50]; Short[chi] {3.46277,48,7.38896} n3=normalProbability[chi,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.944491 student=RandomArray[StudentTDistribution[1],50]; Short[student] {0.742873,48,0.0998677} n4=normalProbability[student,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.691211 Show[GraphicsArray[{{n1,n2},{n3,n4}}]] Normal

Probability 2

Plot

1 -2

Probability

1

0.2 0.4

-1

-1

-2

-2

Probability

Plot

Normal

0.6 0.8

Probability

-30 -1 -2

Plot 2 1

2 1 2

Plot

1

-1

Normal 3

Normal 2

4

6

8

10 12

-20

-10

-1 -2 -3

GraphicsArray

: ‫ﻟﮭﺬا اﻟﺒﺮﻧﺎﻣﺞ‬ ‫( ﯾﺗﺑﻊ اﻻﺗﻰ‬٢٩-٤)‫ﻟﻠﺤﺼﻮل ﻋﻠﻰ ﺷﻜﻞ‬ ٧٩


‫اﻻﻣﺮ‬ plot1=Plot[PDF[NormalDistribution[0,1],x],{x,2,2},DisplayFunction->Identity];

‫ﯾﺆدى إﻟﻰ اﻟﺤﺼﻮل ﻋﻠﻰ رﺳم اﻟﺗوزﯾﻊ طﺑﯾﻌﻰ واﻻﻣر‬ plot2=Plot[PDF[UniformDistribution[0,1],x],{x,0,1},Displa yFunction->Identity]; ‫واﻻﻣر‬.‫ﯾﺆدى إﻟﻰ اﻟﺤﺼﻮل ﻋﻠﻰ رﺳﻢ ﺗوزﯾﻊ ﻣﻧﺗظم‬ plot3=Plot[PDF[ChiSquareDistribution[4],x],{x,0,15},Displ ayFunction->Identity]; ‫ واﻻﻣر‬. ‫ﯾﺆدى إﻟﻰ اﻟﺤﺼﻮل ﻋﻠﻰ رﺳﻢ ﺗوزﯾﻊ ﻣرﺑﻊ ﻛﺎى ﺑدرﺟﺔ ﺣرﯾﺔ ارﺑﻌﺔ‬ plot4=Plot[PDF[StudentTDistribution[1],x],{x,10,10},DisplayFunction->Identity]; . ‫ﺗوزﯾﻊ ت ﺑدرﺟﺔ ﺣرﯾﺔ واﺣدة‬

‫ﯾﺆدى إﻟﻰ اﻟﺤﺼﻮل رﺳﻢ‬ : ‫اﻻواﻣر اﻟﺳﺎﺑﻘﺔ ﻻ ﺗﻧﻔذ اﻻ ﺑﻌد اﻻﻣر اﻟﺗﺎﻟﻰ‬ Show[GraphicsArray[{{plot1,plot2},{plot3,plot4}}]] . (٢٩-٤) ‫ﺣﯾث ﺗؤدى اﻟﻰ ﺷﻛل‬

‫( ﻳﻘﻮم اﻻﻣﺮ‬٣٠-٤) ‫ﻟﻠﺤﺼﻮل ﻋﻠﻰ ﺷﻜﻞ‬ normal=RandomArray[NormalDistribution[0,1],50]

‫واﻻﻣﺮ‬. ‫ﺑﺘﻮﻟﻴﺪ ﺑﻴﺎﻧﺎت ﺗﺘﺒﻊ اﻟﺘﻮزﻳﻊ اﻟﻄﺒﻴﻌﻰ‬ uniform=RandomArray[UniformDistribution[0,1],50];

‫ﺑﺘﻮﻟﻴﺪ ﺑﻴﺎﻧﺎت ﺗﺘﺒﻊ اﻟﺘﻮزﻳﻊ اﳌﻨﺘﻈﻢ واﻻﻣﺮ‬ chi=RandomArray[ChiSquareDistribution[4],50];

‫ﺑﺘﻮﻟﻴﺪ ﺑﻴﺎﻧﺎت ﺗﺘﺒﻊ ﺗﻮزﻳﻊ ﻣﺮﺑﻊ ﻛﺎى واﻻﻣﺮ‬ student=RandomArray[StudentTDistribution[1],50];

‫( ﺑــﺪون ﺗﻨﻔﻴــﺬ‬٢٩-٤) ‫ اﻻواﻣــﺮ اﻟﺘﺎﻟﻴــﺔ ﺗــﺆدى اﱃ اﳊﺼــﻮل ﻋﻠــﻰ ﺷ ﻛل‬. ‫ﺑﺘﻮﻟﻴــﺪ ﺑﻴﺎﻧــﺎت ﺗﺘﺒــﻊ ﺗﻮزﻳــﻊ ﻣﺮﺑــﻊ ت‬ :(‫)ﻛﻤﺎ ﺗﺆدى اﱃ اﳊﺼﻮل ﻋﻠﻰ ﻣﻌﺎﻣﻞ ﺳﺒﲑﻣﺎن واﻟﺬى ﺳﻮف ﻧﺘﻨﺎوﻟﻪ ﻓﻴﻤﺎ ﺑﻌﺪ‬ n1=normalProbability[normal,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.99369 n2=normalProbability[uniform,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.97522 n3=normalProbability[chi,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.944491 n4=normalProbability[student,DisplayFunction->Identity]; ٨٠


‫‪Pearson'sCorrelationCoefficient0.691211‬‬

‫ﻟﻠﺤﺼﻮل ﻋﻠﻰ ﺷﻜﻞ‬

‫)‪ (٣٠-٤‬ﻧﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ ‪:‬‬ ‫]]}}‪Show[GraphicsArray[{{n1,n2},{n3,n4‬‬

‫)‪ (٣-١٢-٤‬اﺧﺗﺑﺎر ﻧﻘص اﻻﻋﺗداﻟﻰ‬ ‫ﻓ ﻲ ھ ذا اﻻﺧﺗﺑ ﺎر ﯾ ﺗم ﺗرﺗﯾ ب اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ )‪ d (i‬ﻣ ن اﻻﺻ ﻐر اﻟ ﻰ اﻻﻛﺑ ر‬ ‫)ﺗرﺗﯾﺑ ﺎ ﺗﺻ ﺎﻋدﯾﺎ( ﺣﯾ ث ) ‪ d (1)  d ( 2 )  ...  d ( n‬ﺛ م ﯾ ﺗم ﺣﺳ ﺎب اﻟﻘ ﯾم‬ ‫) ‪ z (1)  z ( 2 )  ...  z ( n‬واﻟﻣﺳ ﺗﺧرﺟﮫ ﻣ ن ﺟ دول اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ ﻓ ﻲ‬ ‫ﻣﻠﺣق )‪ (١‬واﻟﺗﻰ اﻟﻣﺳﺎﺣﮫ ﻗﺑﻠﮭﺎ ﺗﺳﺎوى ‪ p ( i )  ( i  0 . 75 ) /( n  0 . 25 ) ‬ﺣﯾث‬ ‫‪ i  1,2,..., n‬وﯾﻣﻛن اﺳﺗﺧدام اﻟﺣﺎﺳ ب اﻵﻟ ﻲ ﺑﺄﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ‪Mathematica‬‬ ‫ﻓﻲ ﺣﺳﺎب ﻗﯾم ) ‪ . z (i‬ﻻزواج اﻟﻘﯾم ‪:‬‬ ‫) ) ‪(d (2) , z (2) ),..., (d (n ) , z (n‬‬

‫‪d (1) , z (1)  ,‬‬

‫ﯾﺗم ﺣﺳﺎب ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺑﺳﯾط ‪) r‬ﻣﻌﺎﻣل ﺑﯾرﺳون( ‪ .‬ﺑﻔرض أن ﻓرض اﻟﻌدم‪:‬‬ ‫‪: H0‬‬

‫ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ ﻓﻲ ﺗوزﯾﻊ اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط )‪ (١-٤‬طﺑﯾﻌﻲ‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل‪:‬‬ ‫‪: H1‬‬

‫ﺗوزﯾ ﻊ ﺣ دود اﻟﺧط ﺄ ﻓ ﻲ ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻰ اﻟﺑﺳ ﯾط )‪ (١-٤‬ﻏﯾ ر‬ ‫طﺑﯾﻌﻲ‬

‫ﻋﻧ دﻣﺎ ﯾﻛ ون ‪ H 0‬ﺻ ﺣﯾﺢ ﻓ ﺈن ‪ r‬ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ ‪ R r‬ﻟ ﮫ ﺗوزﯾ ﻊ اﺣﺗﻣ ﺎﻟﻰ‪.‬‬ ‫اﻟﻘﯾم اﻟﺣرﺟﮫ ‪ C ‬ﻣن ‪ R r‬ﻣﻌط ﺎه ﻓ ﻲ اﻟﺟ دول ﻓ ﻲ ﻣﻠﺣ ق )‪ (١٠‬ﻓ ﻰ ﻛﺗ ﺎب ﻣ دﺧل‬ ‫ﺣ دﯾث ﻟﻼﺣﺻ ﺎء واﻻﺣﺗﻣ ﺎﻻت ﻟﻠ دﻛﺗورة ﺛ روت ﻣﺣﻣ د ﻋﺑ د اﻟﻣ ﻧﻌم وذﻟ ك ﻋﻧ د‬ ‫ﻣﺳ ﺗوﯾﺎت ﻣﻌﻧوﯾ ﺔ ﻣﺧﺗﻠﻔ ﺔ‪ .‬ﻣﻧطﻘ ﺔ اﻟ رﻓض ‪ R r  C ‬إذا وﻗﻌ ت ‪ r‬ﻓ ﻲ ﻣﻧطﻘ ﺔ‬ ‫اﻟرﻓض ﻧرﻓض ‪. H 0‬‬ ‫ﻣﺛﺎل )‪(٢١-٤‬‬ ‫ﯾﻌطﻰ ﺟدول اﻟﺗﺎﻟﻰ اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ اﻟﻣرﺗﺑﮫ )‪ d (i‬اﻟﺧﺎﺻ ﮫ ﺑﺎﻟﻣﺛ ﺎل )‪ (٥-٤‬ﻣ ﻊ‬ ‫ﻗﯾم ) ‪ z ( i ) , p (i‬ﺣﯾث اﺳﺗﺧدم ﺑرﻧﺎﻣﺞ ‪ Mathematica‬ﻓﻲ ﺣﺳﺎب ﻗﯾم )‪. z(i‬‬ ‫) ‪Z (i‬‬

‫) ‪p (i‬‬ ‫‪٨١‬‬

‫) ‪d (i‬‬


‫‪-1.63504‬‬ ‫‪-1.11394‬‬ ‫‪-0.791639‬‬ ‫‪-0.536176‬‬ ‫‪-0.311919‬‬ ‫‪-0.102491‬‬ ‫‪0.102491‬‬ ‫‪0.311919‬‬ ‫‪0.536176‬‬ ‫‪0.791639‬‬ ‫‪1.11394‬‬ ‫‪1.63504‬‬

‫‪-1.4937‬‬ ‫‪-1.42239‬‬ ‫‪-0.935205‬‬ ‫‪-0.51932‬‬ ‫‪-0.287661‬‬ ‫‪0.0985392‬‬ ‫‪0.300514‬‬ ‫‪0.330198‬‬ ‫‪0.472805‬‬ ‫‪0.888689‬‬ ‫‪1.27489‬‬ ‫‪1.29264‬‬

‫‪0.0510204‬‬ ‫‪0.132653‬‬ ‫‪0.214286‬‬ ‫‪0.295918‬‬ ‫‪0.377551‬‬ ‫‪0.459184‬‬ ‫‪0.540816‬‬ ‫‪0.622449‬‬ ‫‪0.704082‬‬ ‫‪0.785714‬‬ ‫‪0.867347‬‬ ‫‪0.94898‬‬

‫واﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم‪:‬‬ ‫‪: H0‬‬

‫ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ طﺑﯾﻌﯾﮫ‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‪:‬‬ ‫ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ ﻏﯾر طﺑﯾﻌﯾﮫ‬

‫‪: H1‬‬

‫ﻣن اﻟﺑﯾﺎﻧﺎت ﻓﻰ اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﻰ ﺻﯾﻐﺔ ‪ r‬اﻟﺗﺎﻟﯾﮫ ‪:‬‬

‫)‪ d (i)  z (i‬‬ ‫‪n‬‬

‫‪‬‬ ‫‪ z ( i ) 2 ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬

‫‪n‬‬

‫‪ d (i ) z (i) ‬‬

‫‪2    z 2‬‬

‫)‪(i‬‬

‫‪ ‬‬

‫‪‬‬

‫‪r‬‬

‫‪‬‬ ‫) ‪ d (i‬‬ ‫‪  d (2i ) ‬‬ ‫‪n‬‬ ‫‪‬‬

‫‪9 . 74961‬‬ ‫‪ 0 . 981243 .‬‬ ‫) ‪(10 )( 9 . 87237‬‬

‫‪r‬‬

‫ﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﮫ ‪   .05‬ﻓ ﺈن ‪ C 0.05  0.918‬واﻟﻣﺳ ﺗﺧرﺟﮫ ﻣ ن‬ ‫اﻟﺟدول ﻓﻲ ﻣﻠﺣق )‪) (١٠‬اﻟﻣوﺟود ﻓﻰ ﻛﺗﺎب ﻣدﺧل ﺣدﯾث ﻟﻼﺣﺻﺎء‬ ‫واﻻﺣﺗﻣ ﺎﻻت ﻟﻠ دﻛﺗورة ﺛ روت ﻣﺣﻣ د ﻋﺑ د اﻟﻣ ﻧﻌم( ﻋﻧ د ‪ n  10‬وذﻟ ك‬ ‫ﻟﻌدم وﺟود ﻗﯾﻣﺔ ﻟـ ‪ C .05‬ﻋﻧد ‪ . n  12‬ﻣﻧطﻘﺔ اﻟ رﻓض ‪. R r  0.918‬‬ ‫وﺑﻣ ﺎ أن ‪ r‬ﺗﻘ ﻊ ﻓ ﻲ ﻣﻧطﻘ ﺔ اﻟﻘﺑ ول ﻧﻘﺑ ل ‪ . H 0‬أى أن ﺣ دود اﻟﺧط ﺄ ﺗﺗﺑ ﻊ‬ ‫اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ‪.‬‬ ‫‪٨٢‬‬


‫ وﻓﯾﻣﺎ‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬

x1={4,6.,2,5,7,6,3,8,5,3,1,5} {4,6.,2,5,7,6,3,8,5,3,1,5} y1={197.,272,100,228,327,279,148,377,238,142,66,239} {197.,272,100,228,327,279,148,377,238,142,66,239} p=1 1 l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] n =l[x1] 12 sxx=c[x1,x1] 46.9167 xb=h[x1]/l[x1] 4.58333 yb=h[y1]/l[y1] 217.75 b1=c[x1,y1]/c[x1,x1] 44.4139 b0=yb-b1*xb 14.1865 yy=b0+(b1*x1) {191.842,280.67,103.014,236.256,325.083,280.67,147.428,36 9.497,236.256,147.428,58.6004,236.256} e=y1-yy {5.15808,-8.66963,-3.01421,-8.25577,1.91652,1.66963,0.571936,7.50266,1.74423,5.42806,7.39964,2.74423} n=l[x1] 12 ssto=c[y1,y1] 92884.3 ssr=c[x1,y1]^2/c[x1,x1] 92547.4 sse=ssto-ssr 336.881 mse=sse/(n-2) 33.6881  di  e  mse {0.888689,-1.4937,-0.51932,-1.42239,0.330198,0.287661,0.0985392,1.29264,0.300514,0.935205,1.27489,0.472805} dii=Sort[di] ٨٣


‫‪{-1.4937,-1.42239,-0.935205,-0.51932,‬‬‫‪0.287661,0.0985392,0.300514,0.330198,0.472805,0.888689,1.‬‬ ‫}‪27489,1.29264‬‬ ‫]}‪nndd=Table[(i-.75)/(n+.25),{i,1,n‬‬ ‫‪{0.0204082,0.102041,0.183673,0.265306,0.346939,0.428571,0‬‬ ‫}‪.510204,0.591837,0.673469,0.755102,0.836735,0.918367‬‬ ‫`‪<<Statistics`ContinuousDistributions‬‬ ‫]‪qq[x_]:=Quantile[NormalDistribution[0,1],x‬‬ ‫]‪ffg=Map[qq,nndd‬‬ ‫‪{-2.04539,-1.27001,-0.901454,-0.627072,-0.393598,‬‬‫‪0.180012,0.0255806,0.232272,0.449514,0.690633,0.981126,1.‬‬ ‫}‪39417‬‬ ‫]‪ffgi=Sort[ffg‬‬ ‫‪{-2.04539,-1.27001,-0.901454,-0.627072,-0.393598,‬‬‫‪0.180012,0.0255806,0.232272,0.449514,0.690633,0.981126,1.‬‬ ‫}‪39417‬‬ ‫]‪sss1=c[dii,dii‬‬ ‫‪10.‬‬ ‫]‪sss2=c[dii,ffgi‬‬ ‫‪10.0895‬‬ ‫]‪sss3=c[ffgi,ffgi‬‬ ‫‪10.6044‬‬

‫‪sss2‬‬ ‫‪‬‬ ‫‪sss1  sss3‬‬ ‫‪0.979775‬‬

‫ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن ‪:‬‬ ‫ﻣﻌﺎﻣل ارﺗﺑﺎط ﺑﯾرﺳون ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪bxy‬‬ ‫‪‬‬ ‫‪nxy  nk2‬‬ ‫وﻟﻠﻌﻠﻢ ﯾﻤﻜﻦ اﻟﺤﺼﻮل ﻋﻠﻰ ﻣﻌﺎﻣﻞ ﺳﺒﯿﺮﻣﺎن ﻣﻦ اﻟﺒﺮﻧﺎﻣﺞ اﻟﺨﺎص ﺑﻤﺜﺎل )‪. (٢٠-٤‬‬

‫)‪ (١٣-٤‬اﺧﺗﺑﺎر ﺧطﯾﺔ اﻻﻧﺣدار‬ ‫‪Test for Linearity of Regression‬‬ ‫اﻵن ﺳوف ﻧﻘدم اﺧﺗﺑﺎر إﺣﺻﺎﺋﻲ ﻟﻧﻘص اﻟﺗوﻓﯾق ﻟﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ‪.‬‬ ‫ﺗﻔﺗرض اﻟطرﯾﻘﺔ ﺗﺣﻘق ﻛل ﻣن اﻻﻋﺗدال واﻻﺳﺗﻘﻼل وﺛﺑﺎت اﻟﺗﺑﺎﯾن وﻓﻘ ط ھﻧ ﺎك ﺷ ك‬ ‫ﻓﻲ وﺟود ﻋﻼﻗﺔ ﺧط ﻣﺳﺗﻘﯾم ﺑﯾن ‪. x , Y‬‬

‫‪٨٤‬‬


‫ﯾﺣﺗ ﺎج اﺧﺗﺑ ﺎر ﻧﻘ ص اﻟﺗوﻓﯾ ق إﻟ ﻰ وﺟ ود ﻣﺷ ﺎھدات ﻣﺗﻛ ررة ﻋﻠ ﻰ اﻻﺳ ﺗﺟﺎﺑﺔ ‪y‬‬

‫وذﻟك ﻋﻠﻰ اﻷﻗل ﻟﻣﺳﺗوى واﺣد ﻣن ‪ . x‬ﺑﻔرض إﻧﻧﺎ أﺧذﻧﺎ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن ‪ n‬ﻣ ن‬ ‫اﻟﻣﺷﺎھدات وذﻟك ﺑﺎﺳ ﺗﺧدام ‪ m‬ﻣ ن اﻟﻘ ﯾم اﻟﻣﺧﺗﻠﻔ ﺔ ﻣ ن ‪ ، x‬ﻟ ﯾﻛن ‪x1 , x 2 ,..., x m‬‬ ‫ﺑﺣﯾ ث أن اﻟﻌﯾﻧ ﺔ ﺗﺣﺗ وي ‪ n1‬ﻗﯾﻣ ﺔ ﻣﺷ ﺎھدة ﻣ ن اﻟﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ ‪ Y1‬اﻟﻣﻘﺎﺑ ل ل‬ ‫‪ x1‬و ‪ n 2‬ﻗﯾﻣ ﺔ ﻣﺷ ﺎھدة ﻣ ن اﻟﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ ‪ Y2‬اﻟﻣﻘﺎﺑ ل ﻟ ـ ‪ x 2‬و‪ nm‬ﻗﯾﻣ ﺔ‬ ‫ﻣﺷ ﺎھدة ﻣ ن اﻟﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ ‪ Ym‬اﻟﻣﻘﺎﺑ ل ﻟ ـ ‪ . x m‬ﻣ ن اﻟﺿ روري أن‬ ‫‪k‬‬ ‫‪ ni‬‬ ‫‪i 1‬‬

‫‪ x i‬ﺣﯾ‬

‫‪ . n ‬ﺳوف ﻧﻌرف ‪ y ij‬ﻟﯾﻣﺛل اﻟﻘﯾﻣﺔ رﻗم ‪ j‬ﻣن اﻟﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ ‪ Yi‬ﻋﻧد‬ ‫ث ‪ i  1,2,..., k‬و ‪ j  1,2,..., n i‬و‬

‫‪ni‬‬ ‫‪ y ij‬‬ ‫‪j1‬‬

‫‪ yi ‬و ‪. yi  yi / n‬‬

‫وﻋﻠﻰ ذﻟك ﻋﻧدﻣﺎ ‪ n 4  3‬ﻓﺈن اﻟﻘﯾﺎﺳﺎت ﻋﻠﻰ ‪ Y4‬ﺗﻘﺎﺑل ‪ x  x 4‬وﺳ وف ﻧﻌ رف‬ ‫ھذه اﻟﻣﺷﺎھدات ﺑ ﺎﻟرﻣوز ‪ y 41 , y 42 , y 43‬وﻋﻠ ﻰ ذﻟ ك ‪. y 4  y 41  y 42  y 43‬‬ ‫ﯾﻌﺗﻣد اﻻﺧﺗﺑﺎر ﻋﻠﻰ ﺗﺟزﺋﺔ ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ إﻟﻰ ﺟزﺋﯾن ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪SSE  SSPE  SSLF ,‬‬

‫ﺣﯾث ‪ SSPE‬ھ و ﻣﺟﻣ وع اﻟﻣرﺑﻌ ﺎت اﻟ ذي ﯾرﺟ ﻊ إﻟ ﻰ اﻟﺧط ﺄ اﻟﺧ ﺎﻟص ) اﻟﺻ ﺎﻓﻲ (‬ ‫‪ pure error‬أي اﻻﺧﺗﻼف ﺑﯾن ﻗﯾم ‪ y‬داﺧل ﻗﯾﻣﮫ ﻣﻌطﺎة ﻣن ‪ . x‬أﻣﺎ ‪ SSLF‬ﻓﮭ و‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت ﻧﻘص اﻟﺗوﻓﯾ ق إي أن ‪ SSPE‬ﯾﻌﻛ س اﻻﺧ ﺗﻼف اﻟﻌﺷ واﺋﻲ أو ﺧط ﺎ‬ ‫اﻟﺗﺟرﺑﺔ‪.‬‬ ‫ﺣﯾث ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ھو‪:‬‬

‫‪‬‬

‫‪‬‬

‫‪2‬‬ ‫‪ ni‬‬ ‫‪ y ij ‬‬ ‫‪2‬‬ ‫‪  ( y ij ‬‬ ‫‪‬‬ ‫‪nj ‬‬ ‫‪ j1‬‬ ‫‪‬‬ ‫‪‬‬

‫‪m‬‬ ‫‪ ‬‬ ‫‪i 1‬‬

‫‪y ij  y i ‬‬

‫‪2‬‬

‫‪m ni‬‬ ‫‪  ‬‬ ‫‪i 1 j1‬‬

‫‪SSPE‬‬

‫واﻟذى ﻧﺣﺻل ﻋﻠﯾﮫ ﺑﺣﺳﺎب ﻣﺟﻣ وع اﻟﻣرﺑﻌ ﺎت اﻟﻣﺻ ﺣﺢ ﻟﻠﻣﺷ ﺎھدات اﻟﻣﺗﻛ رره ﻋﻧ د‬ ‫ﻛل ﻣﺳﺗوى ﻣن ‪ x‬ﺛم اﻟﺟﻣﻊ ﻋﻠﻲ ﻛل اﻟﻣﺳﺗوﯾﺎت ‪ m‬ﻣن ‪ .x‬اﻟﻌدد اﻟﻛﻠﻰ ﻣن درﺟ ﺎت‬ ‫اﻟﺣرﯾﺔ اﻟﻣرﺗﺑطﺔ ﺑﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ھو‪:‬‬ ‫‪(n i  1)  n  m.‬‬

‫‪m‬‬ ‫‪‬‬ ‫‪i 1‬‬

‫اﻣ ﺎ ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت ﻧﻘ ص اﻟﺗوﻓﯾ ق ﻓﻌ ﺎدة ﯾ ﺗم اﻟﺣﺻ ول ﻋﻠﯾ ﮫ ﺑط رح ‪ SSPE‬ﻣ ن‬ ‫‪ . SSE‬ﯾوﺟد ‪ m  2‬ﻣن درﺟﺎت اﻟﺣرﯾﺔ ﯾرﺗﺑط ﺑـ ‪ . SSLF‬اﻹﺣﺻﺎء اﻟذي ﯾﻌﺗﻣ د‬ ‫ﻋﻠﯾﮫ اﻻﺧﺗﺑﺎر ھو‪:‬‬

‫‪٨٥‬‬


‫‪SSLF / m  2 MSLF‬‬ ‫‪‬‬ ‫‪.‬‬ ‫‪SSPE / n  m  MSPE‬‬

‫‪F‬‬

‫اﻟﺣﺳ ﺎﺑﺎت اﻟﻣطﻠوﺑ ﺔ ﻻﺧﺗﺑ ﺎر اﻟﻔ رض ﻓ ﻲ ﻣﺷ ﻛﻠﺔ اﻻﻧﺣ دار ﺑﻘﯾﺎﺳ ﺎت ﻣﺗﻛ ررة ﻋﻠ ﻰ‬ ‫اﻻﺳﺗﺟﺎﺑﺔ ﯾﻣﻛن ﺗﻠﺧﯾﺻﮭﺎ ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬ ‫‪Ms‬‬

‫‪F‬‬

‫‪SSR‬‬ ‫‪MSE‬‬

‫‪MSLF‬‬ ‫‪MSPE‬‬

‫‪SSR‬‬ ‫)‪MSE  SSE /( n  2‬‬

‫‪SSE  SSPE‬‬ ‫‪m2‬‬ ‫‪SSPE‬‬ ‫‪MSPE ‬‬ ‫‪nm‬‬

‫‪SS‬‬

‫‪df‬‬

‫‪S.O.V‬‬

‫‪SSR‬‬

‫‪1‬‬ ‫‪n2‬‬

‫اﻻﻧﺣدار‬

‫‪SSE‬‬

‫‪MSLF ‬‬

‫‪SSE  SSPE‬‬ ‫‪SSPE‬‬

‫‪m2‬‬

‫اﻟﺧطﺄ‬ ‫ﻧﻘص اﻟﺗوﻓﯾق‬

‫‪ n  m‬اﻟﺧطﺄاﻟﺧﺎﻟص‬ ‫‪n 1‬‬

‫اﻟﻛﻠﻲ‬

‫ﻋﻧدﻣﺎ ﯾﻛون ﻓرض اﻟﻌدم ﺻﺣﯾﺢ ‪  Y |x i   0  1 x i‬ﻓﺈن اﻹﺣﺻﺎء ‪ F‬ﯾﺗﺑﻊ ﺗوزﯾ ﻊ‬ ‫‪ F‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ‪ n-m‬و ‪ . m-2‬إذا ﻛﺎﻧ ت ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﺔ اﻗ ل ﻣ ن ﻗﯾﻣ ﺔ ‪F‬‬ ‫اﻟﺟدوﻟﯾﺔ ﻓﮭ ذا ﯾ دل ﻋﻠ ﻰ أن ھﻧ ﺎك ﺛﻘ ﺔ ﻛﺑﯾ رة ﻓ ﻲ ﻋ دم ﻧﻘ ص اﻟﺗوﻓﯾ ق وﻋﻧدﺋ ذ ﻧﺧﺗﺑ ر‬ ‫اﻟﻔرﺿﯾﺔ ‪ H 0 : 1  0‬ﺑﺎﺳﺗﺧدام اﻹﺣﺻﺎء ‪:‬‬

‫‪.‬‬

‫‪MSR‬‬ ‫‪MSE‬‬

‫‪F‬‬

‫وإذا ﻛﺎﻧت ‪ F‬اﻟﻣﺣﺳوﺑﺔ اﻛﺑر ﻣن اﻟﺟدوﻟﯾﺔ ﻓﺈﻧﻧﺎ ﻧرﻓض ﻓرض اﻟﻌدم ‪. H 0 : 1  0‬‬ ‫ﻟﺷ ﻛل اﻻﻧﺗﺷ ﺎر اﻟﻣﻌط ﻰ ﻓ ﻲ ﺷ ﻛل )‪ (٣١-٤‬وﻋﻧ د ﻗﺑ ول ﻓ رض اﻟﻌ دم أن‬ ‫‪  Y|x i   0  1 x i‬ورﻓ ض ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﻓ ﺈن ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار‬ ‫اﻟﻣﻘدرة ﺳوف ﺗﻛون ‪:‬‬ ‫‪yˆ  b 0  b1x .‬‬

‫‪٨٦‬‬


‫ﺷﻛل)‪(٣١-٤‬‬ ‫ﻟﺷﻛل اﻻﻧﺗﺷﺎر اﻟﻣﻌطﻰ ﻓﻲ ﺷﻛل )‪ (٣٢-٤‬وﻋﻧ د ﻗﺑ ول ﻓ رض اﻟﻌ دم أن اﻟﻧﻣ وذج ھ و‬ ‫‪  Y |x i   0  1 x i‬وﻗﺑ ول ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﻓ ﺈن ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار‬ ‫اﻟﻣﻘدرة ﺳوف ﺗﻛون ‪:‬‬ ‫‪yˆ  y .‬‬

‫ﺷﻛل)‪(٣٢-٤‬‬ ‫ﻟﺷﻛل اﻻﻧﺗﺷﺎر اﻟﻣﻌطﻰ ﻓﻲ ﺷﻛل )‪ (٣٣-٤‬وﻋﻧد رﻓض ﻓرض اﻟﻌدم أن اﻟﻧﻣ وذج ھ و‬ ‫‪  Y|x i   0  1 x i‬ورﻓض ﻓرض اﻟﻌدم ‪ H 0 : 1  0‬ﻓﺈﻧﻧﺎ ﻧﺣﺎول ﻣﻊ اﻟﻧﻣوذج‬ ‫‪ . Yi   0  1x i   2 x i 2  i‬أﻣﺎ إذا ﻛﺎن ﺷﻛل اﻻﻧﺗﺷﺎر ﻏﯾر ذﻟك ﻓﻼ ﺑ د‬ ‫ﻣ ن ﻋﻣ ل ﺗﺣ وﯾﻼت ﻋﻠ ﻰ ﻗ ﯾم ‪ x‬أو ﻗ ﯾم ‪ y‬أو ﻛﻼھﻣ ﺎ )وﻋﻠ ﻰ اﻷﻛﺛ ر ﯾﺳ ﺗﺧدم‬ ‫اﻟﺗﺣوﯾل ﻟﻘﯾم ‪ . ( y‬ھذا وھﻧﺎك ﻋدة طرق ﻟﺗﺣوﯾل اﻟﺑﯾﺎﻧﺎت ﺳوف ﻧﺗﻧﺎوﻟﮭﺎ ﺑﻌد ذﻟك‪.‬‬ ‫‪٨٧‬‬


‫ﺷﻛل )‪(٣٣-٤‬‬ ‫ﻟﺷﻛل اﻻﻧﺗﺷﺎر واﻟﻣﻌطﻰ ﻓﻲ ﺷﻛل )‪ (٣٤-٤‬وﻋﻧد رﻓض ﻓرض اﻟﻌدم أن اﻟﻧﻣوذج ھو‬ ‫‪  Y |x i   0  1 x i‬ﻗﺑ ول ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﻧﺣ ﺎول ﻣ ﻊ اﻟﻧﻣ وذج‬ ‫‪ Yi   0  1x i   2 x i 2   i‬أﻣﺎ إذا ﻛﺎن اﻻﻧﺗﺷﺎر ﻏﯾر ذﻟك ﻓﺈﻧﻧﺎ ﻧﻠﺟﺄ إﻟﻰ‬ ‫اﻟﺗﺣوﯾﻼت ‪.‬‬

‫ﺷﻛل )‪(٣٤-٤‬‬

‫ﻣﺛﺎل)‪(٢٢-٤‬‬ ‫ﻻزواج اﻟﻘﯾﺎﺳ ﺎت ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ اﺧﺗﺑ ر ﻓ رض اﻟﻌ دم ‪ : H0‬اﻟﻧﻣ وذج ﺧط ﻲ ﺿ د اﻟﻔ رض‬ ‫اﻟﺑدﯾل ‪ : H0‬اﻟﻧﻣوذج ﻏﯾر ﺧطﻲ ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪  0.05‬‬ ‫‪y‬‬

‫‪x‬‬

‫اﻟﻣﺷﺎھدات‬ ‫‪5.3‬‬ ‫‪3.5‬‬ ‫‪5.3‬‬ ‫‪2.8‬‬ ‫‪5.3‬‬ ‫‪2.1‬‬ ‫‪5.7‬‬ ‫‪3.4‬‬ ‫‪6.0‬‬ ‫‪3.2‬‬ ‫‪6.0‬‬ ‫‪3.0‬‬

‫اﻟﻣﺷﺎھدات‬ ‫‪17‬‬ ‫‪18‬‬ ‫‪19‬‬ ‫‪20‬‬ ‫‪21‬‬ ‫‪22‬‬

‫‪y‬‬ ‫‪1.7‬‬ ‫‪2.8‬‬ ‫‪2.8‬‬ ‫‪2.2‬‬ ‫‪5.4‬‬ ‫‪3.2‬‬

‫‪x‬‬ ‫‪3.7‬‬ ‫‪4.0‬‬ ‫‪٨٨ 4.0‬‬ ‫‪4.0‬‬ ‫‪4.7‬‬ ‫‪4.7‬‬

‫اﻟﻣﺷﺎھدات‬ ‫‪9‬‬ ‫‪10‬‬ ‫‪11‬‬ ‫‪12‬‬ ‫‪13‬‬ ‫‪14‬‬

‫‪y‬‬

‫‪x‬‬

‫‪2.3‬‬ ‫‪1.8‬‬ ‫‪2.8‬‬ ‫‪1.5‬‬ ‫‪2.2‬‬ ‫‪3.8‬‬

‫‪1.3‬‬ ‫‪1.3‬‬ ‫‪2.0‬‬ ‫‪2.0‬‬ ‫‪2.7‬‬ ‫‪3.3‬‬

‫‪1‬‬ ‫‪2‬‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪5‬‬ ‫‪6‬‬


‫اﻟﺣــل ‪:‬‬ ‫‪ : H 0‬اﻟﻧﻣوذج اﻟﺧطﻰ ‪:‬‬ ‫‪ : H1‬اﻟﻧﻣوذج ﻏﯾر ﺧطﻰ ‪:‬‬ ‫‪.   0.05‬‬ ‫ﺳوف ﻧوﺟد ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﺧﺎﻟص ﺛم ﻣﺟﻣوع ﻣرﺑﻌﺎت ﻗﺻور اﻟﺗوﻓﯾق ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ﻋﻧد ‪ x  1.3‬ھو ‪:‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪(2.3)  (1.8)  (2.3)  (1.8)2 / 2  0.125.‬‬

‫‪‬‬

‫‪‬‬

‫ﺑدرﺟﺔ ﺣرﯾﺔ واﺣدة ‪.  n1  2.1  1‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ﻋﻧد ‪ x  2.0‬ھو ‪:‬‬ ‫‪(2.8)2  (1.5) 2  (2.8)  (1.5)2 / 2  0.845.‬‬

‫‪‬‬

‫‪‬‬

‫ﺑدرﺟ ﺔ ﺣرﯾ ﺔ واﺣ دة ‪ .  n 2  2  1  1‬ﺑ ﻧﻔس اﻟطرﯾﻘ ﺔ ﯾ ﺗم ﺣﺳ ﺎب ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺧط ﺄ‬ ‫اﻟﺧﺎﻟص ﻟﻠﻘﯾم اﻟﺑﺎﻗﯾﺔ ﻣن ‪ x‬ﻛﻣﺎ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪.‬‬ ‫درﺟﺎت ﺣرﯾﺔ‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪11‬‬

‫‪(yiu  yi ) 2‬‬ ‫‪0.125‬‬ ‫‪0.845‬‬ ‫‪2.000‬‬ ‫‪2.000‬‬ ‫‪0.240‬‬ ‫‪6.260‬‬ ‫‪0.980‬‬ ‫‪0.020‬‬ ‫‪12.470‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪SS‬‬ ‫‪MS‬‬ ‫‪F‬‬ ‫‪6.326‬‬ ‫‪6.326‬‬ ‫‪6.326‬‬ ‫‪f‬‬ ‫‪0.963‬‬ ‫‪21.192‬‬ ‫‪= 6.569‬‬ ‫‪0.963=s2‬‬ ‫ﻋﻧد ﻣﺳﺗوى‬ ‫ﻣﻌﻧوﯾﺔ ‪=0.05‬‬ ‫‪٨٩‬‬

‫ﻣﺳﺗوى ‪x‬‬ ‫‪1.3‬‬ ‫‪2.0‬‬ ‫‪3.3‬‬ ‫‪3.7‬‬ ‫‪4.0‬‬ ‫‪4.7‬‬ ‫‪5.3‬‬ ‫‪6.0‬‬ ‫اﻟﻣﺟﻣوع‬

‫‪df‬‬ ‫‪1‬‬

‫‪S.O.V‬‬ ‫اﻻﻧﺣدار‬

‫‪22‬‬

‫اﻟﺧطﺄ‬


‫‪0.793‬‬ ‫‪1.134‬‬

‫‪f ‬‬

‫‪0.793=MSL‬‬ ‫‪1.134= s e2‬‬

‫‪8.722‬‬ ‫‪12.470‬‬

‫‪11‬‬ ‫‪11‬‬

‫ﻗﺻور اﻟﺗوﻓﯾق‬ ‫اﻟﺧطﺄ اﻟﺧﺎﻟص‬

‫‪=0.699‬‬ ‫‪f   0.699‬ﻏﯾ ر ﻣﻌﻧوﯾ ﺔ ﻷﻧﮭ ﺎ أﻗ ل ﻣ ن اﻟواﺣ د ﻓﮭ ذا ﯾﻌﻧ ﻰ ان‬ ‫ﻣ ن اﻟﺟ دول اﻟﺳ ﺎﺑق وﺑﻣ ﺎ ان‬ ‫اﻟﻧﻣ وزج ﺧط ﻰ وﺑﻣ ﺎ ان ‪ f  6.569‬اﻛﺑ ر ﻣ ن اﻟﺟدوﻟﯾ ﺔ )‪ (4.5‬ﻓﺈﻧﻧ ﺎ ﻧ رﻓض ﻓ رض اﻟﻌ دم‬

‫‪H 0 : 1  0‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪x={1.3,1.3,2,2,2.7,3.3,3.3,3.7,3.7,4,4,4,4.7,4.7,4.7,5,5.‬‬ ‫;}‪3,5.3,5.3,5.7,6,6,6.3,6.7‬‬ ‫‪y={2.3,1.8,2.8,1.5,2.2,3.8,1.8,3.7,1.7,2.8,2.8,2.2,5.4,3.‬‬ ‫;}‪2,1.9,1.8,3.5,2.8,2.1,3.4,3.2,3.0,3.0,5.9‬‬ ‫‪yy={{2.3,1.8},{2.8,1.5},{2.2},{3.8,1.8},{3.7,1.7},{2.8,2.‬‬ ‫‪8,2.2},{5.4,3.2,1.9},{1.8},{3.5,2.8,2.1},{3.4},{3.2,3.0},‬‬ ‫;}}‪{3.0},{5.9‬‬ ‫]‪a[x_]:=Length[x‬‬ ‫]‪z[x_]:=Apply[Plus,x‬‬

‫‪zx2‬‬ ‫‪ax‬‬

‫‪cx_ : zx^2 ‬‬

‫]‪h=Map[c,yy‬‬ ‫}‪{0.125,0.845,0.,2.,2.,0.24,6.26,0.,0.98,0.,0.02,0.,0.‬‬ ‫]‪ssp=z[h‬‬ ‫‪12.47‬‬ ‫]‪q=Map[a,yy‬‬ ‫}‪{2,2,1,2,2,3,3,1,3,1,2,1,1‬‬ ‫‪qq=q-1‬‬ ‫}‪{1,1,0,1,1,2,2,0,2,0,1,0,0‬‬ ‫]‪ne=z[qq‬‬ ‫‪11‬‬

‫‪ssp‬‬ ‫‪ne‬‬

‫‪s2e ‬‬

‫‪1.13364‬‬ ‫]}]‪tx=Table[{1,x[[i]]},{i,1,a[x‬‬ ‫‪{{1,1.3},{1,1.3},{1,2},{1,2},{1,2.7},{1,3.3},{1,3.3},{1,3‬‬ ‫‪.7},{1,3.7},{1,4},{1,4},{1,4},{1,4.7},{1,4.7},{1,4.7},{1,‬‬ ‫‪5},{1,5.3},{1,5.3},{1,5.3},{1,5.7},{1,6},{1,6},{1,6.3},{1‬‬ ‫}}‪,6.7‬‬ ‫]‪a[tx‬‬ ‫‪24‬‬ ‫]‪u=Transpose[tx‬‬

‫‪٩٠‬‬


{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{1.3,1 .3,2,2,2.7,3.3,3.3,3.7,3.7,4,4,4,4.7,4.7,4.7,5,5.3,5.3,5. 3,5.7,6,6,6.3,6.7}} t1=u.y {68.6,307.41} t2=Inverse[u.tx] {{0.361353,-0.075965},{-0.075965,0.0180511}} b=t1.t2 {1.4364,0.337886} b0=b[[1]] 1.4364 b1=b[[2]] 0.337886 yb=b0+b1*x {1.87565,1.87565,2.11217,2.11217,2.34869,2.55142,2.55142, 2.68657,2.68657,2.78794,2.78794,2.78794,3.02446,3.02446,3 .02446,3.12583,3.22719,3.22719,3.22719,3.36235,3.46371,3. 46371,3.56508,3.70023} e=y-yb {0.424352,-0.0756476,0.687832,-0.612168,0.148688,1.24858,-0.75142,1.01343,0.986575,0.0120596,0.0120596,-0.58794,2.37554,0.175539,1.12446,-1.32583,0.272808,-0.427192,-1.12719,0.0376531,0.263713,-0.463713,-0.565079,2.19977} sse=e.e 21.1937 ssto=c[y] 27.5183 ssl=sse-ssp 8.72367 ssr=ssto-sse 6.32467 dsr=1 1 n=a[x] 24 dse=n-2 22 dst=n-1 23 nl=dse-ne 11

msr 

ssr dsr

6.32467

mse 

sse dse

0.963348 ٩١


f

msr mse

6.56529

msl 

ssl nl

0.793061

ff 

msl s2e

0.699572 ww=Transpose[{x,y}] {{1.3,2.3},{1.3,1.8},{2,2.8},{2,1.5},{2.7,2.2},{3.3,3.8}, {3.3,1.8},{3.7,3.7},{3.7,1.7},{4,2.8},{4,2.8},{4,2.2},{4. 7,5.4},{4.7,3.2},{4.7,1.9},{5,1.8},{5.3,3.5},{5.3,2.8},{5 .3,2.1},{5.7,3.4},{6,3.2},{6,3.},{6.3,3.},{6.7,5.9}} ww1=PlotRange{{0,8},{0,7}} PlotRange{{0,8},{0,7}} ww2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} ww3=ListPlot[ww,ww1,ww2] 7 6 5 4 3 2 1 1

2

3

4

5

6

7

8

Graphics ww5=Plot[b0+b1*x,{x,0,8}] 4 3.5 3 2.5

2

4

6

1.5

Graphics Show[ww3,ww5] ٩٢

8


7 6 5 4 3 2 1 1

2

3

4

5

6

7

8

Graphics th=TableHeadings{{soruce,regression,residual,lake,pure },{anova}} TableHeadings{{soruce,regression,residual,lake,pure},{an ova}} tr1={"df","ss","ms","f"} {df,ss,ms,f} tr2={dsr,ssr,msr,f} {1,6.32467,6.32467,6.56529} tr3={dse,sse,mse,"---"} {22,21.1937,0.963348,---} tr4={nl,ssl,msl,ff} {11,8.72367,0.793061,0.699572} tr5={ne,ssp,s2e,"---"} {11,12.47,1.13364,---} TableForm[{tr1,tr2,tr3,tr4,tr5},th]

soruce regression residual lake pure

anova df 1 22 11 11

ss 6.32467 21.1937 8.72367 12.47

ms 6.32467 0.963348 0.793061 1.13364

f 6.56529 

0.699572 

<<Statistics`ContinuousDistributions` =0.05; ff1=Quantile[FRatioDistribution[nl,ne],1-] 2.81793 If[ff>ff1,Print["RjectHo"],Print["AccpetHo"]] AccpetHo ff2=Quantile[FRatioDistribution[dsr,dse],1-] 4.30095 If[f>ff2,Print["RjectHo"],Print["AccpetHo"]] RjectHo

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫اﻟﻣدﺧﻼت‬: ‫اوﻻ‬ ٩٣


‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪TableForm[{tr1,tr2,tr3,tr4,tr5},th‬‬

‫و ‪ f   0.699‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪msl‬‬ ‫‪ff ‬‬ ‫‪s2e‬‬ ‫‪ f‬اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬ ‫]‪ff1=Quantile[FRatioDistribution[nl,ne],1-‬‬

‫ﺣﯾث اﻟﻣﺧرج‬ ‫‪2.81793‬‬

‫اﻟﻘرار اﻟﻣﺗﺧذ ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]]"‪If[ff>ff1,Print["RjectHo"],Print["AccpetHo‬‬

‫واﻟﻣﺧرج ﻓﻰ ھذه اﻟﺣﺎﻟﺔ ھو‬ ‫‪.AccpetHo‬‬ ‫وھذا ﯾﻌﻧﻰ ان اﻟﻧﻣوزج ﺧطﻰ‪.‬‬ ‫اﯾﺿﺎ ‪ f  6.569‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪msr‬‬ ‫‪f‬‬ ‫‪mse‬‬ ‫‪ f‬اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬ ‫]‪ff2=Quantile[FRatioDistribution[dsr,dse],1-‬‬

‫ﺣﯾث اﻟﻣﺧرج‬ ‫‪4.30095‬‬

‫اﻟﻘرار اﻟﻣﺗﺧذ ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]]"‪If[f>ff2,Print["RjectHo"],Print["AccpetHo‬‬

‫واﻟﻣﺧرج ﻓﻰ ھذه اﻟﺣﺎﻟﺔ ھو‬ ‫‪RjectHo‬‬

‫اى رﻓض ﻓرض اﻟﻌدم ‪H 0 : 1  0‬‬ ‫وھذا ﯾﻌﻧﻰ اﻧﺎ ﻟﻧﻣوزج ﺧطﻰ‪.‬‬

‫ﻣﺛﺎل )‪(٢٣-٤‬‬ ‫درﺳ ت ﻓﻌﺎﻟﯾ ﺔ )ﺟﯾ ر( ﺗﺟرﯾﺑ ﻲ ﺟدﯾ د ﻓ ﻲ ﺗﺧﻔ ﯾض اﺳ ﺗﮭﻼك اﻟﺟ ﺎزوﻟﯾن ﻓ ﻲ‬ ‫‪12‬ﻣﺣﺎوﻟﺔ اﺳﺗﺧدﻣت ﻓﯾﮭﺎ ﻋرﺑﺔ ﻧﻘل ﺧﻔﯾﻔﺔ ﻣﺟﮭ زة ﺑﮭ ذا اﻟﺟﯾ ر ﺣﯾ ث ‪ x‬ﻓ ﻲ اﻟﺟ دول‬ ‫‪٩٤‬‬


‫اﻟﺗﺎﻟﻰ‪ .‬ﻟﻠﺳرﻋﺔ اﻟﺛﺎﺑﺗﺔ )ﺑﺎﻟﻣﯾل ﻓﻲ اﻟﺳﺎﻋﺔ( ﻟﻌرﺑﺔ اﻻﺧﺗﺑﺎر و‪ y‬اﻷﻣﯾﺎل اﻟﻣﻘطوﻋﺔ ﻟﻛل‬ ‫ﺟﺎﻟون ‪.‬‬ ‫‪y‬‬

‫‪x‬‬ ‫‪35‬‬ ‫‪35‬‬ ‫‪40‬‬ ‫‪40‬‬ ‫‪45‬‬ ‫‪45‬‬ ‫‪50‬‬ ‫‪50‬‬ ‫‪55‬‬ ‫‪55‬‬ ‫‪60‬‬ ‫‪60‬‬

‫‪22‬‬ ‫‪20‬‬ ‫‪28‬‬ ‫‪31‬‬ ‫‪37‬‬ ‫‪38‬‬ ‫‪41‬‬ ‫‪39‬‬ ‫‪34‬‬ ‫‪37‬‬ ‫‪27‬‬ ‫‪30‬‬

‫ﻓﮭل ﻣﻌﺎدﻟﺔ اﻟﺧط اﻟﻣﺳﺗﻘﯾم ﺗﻼﺋم اﻟﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق ؟‬ ‫اﻟﺣــل‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻟﻠﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق ﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪(٣٥-٤‬‬

‫ﺷﻛل)‪(٣٥-٤‬‬ ‫ﻧوﺟد أوﻻ ﻣﻌﺎدﻟﺔ اﻟﺧط اﻟﻣﺳﺗﻘﯾم اﻟﻣﻘدرة ﻋﻠﻰ اﻓﺗراض أﻧﮭﺎ ﺗﻼﺋم اﻟﺑﯾﺎﻧﺎت ﺣﯾث ‪:‬‬ ‫‪570‬‬ ‫‪ 47.5‬‬ ‫‪12‬‬

‫‪‬‬

‫‪x‬‬

‫‪x‬‬

‫‪,‬‬

‫‪384‬‬ ‫‪ 32‬‬ ‫‪12‬‬

‫‪n‬‬ ‫‪ x y‬‬ ‫‪ xy ‬‬ ‫‪SXY‬‬ ‫‪n‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪2‬‬ ‫‪SXX‬‬ ‫‪2  x ‬‬ ‫‪x ‬‬ ‫‪n‬‬ ‫‪٩٥‬‬

‫‪‬‬

‫‪y‬‬

‫‪n‬‬

‫‪y‬‬


‫‪570 384 ‬‬

‫‪18530 ‬‬

‫‪12‬‬ ‫‪‬‬ ‫‪570 2‬‬ ‫‪27950 ‬‬ ‫‪12‬‬

‫‪290‬‬ ‫‪ 0.331429 ,‬‬ ‫‪875‬‬

‫‪‬‬

‫‪‬‬

‫‪b 0  y  b1x  32  0.33142947.5‬‬ ‫‪ 16.2571 .‬‬

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪yˆ  16.2571  0.331429 x .‬‬

‫واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )‪(٣٦-٤‬‬

‫ﺷﻛل )‪(٣٦-٤‬‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪F‬‬

‫‪MS‬‬

‫‪SS‬‬

‫‪df‬‬

‫‪S.O.V‬‬

‫‪2.32224‬‬

‫‪96.1143‬‬

‫‪96.1143‬‬

‫‪1‬‬

‫اﻻﻧﺣدار‬

‫‪٩٦‬‬


‫‪--‬‬

‫‪41.3886‬‬

‫‪413.886‬‬

‫‪10‬‬

‫اﻟﺧطﺄ‬

‫‪--‬‬

‫‪--‬‬

‫‪510‬‬

‫‪11‬‬

‫اﻟﻛﻠﻲ‬

‫ﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﺔ ‪ 2.32224 ‬أﻗ ل ﻣ ن اﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ ‪F.05 1,10  4.96‬‬ ‫ﻓﺈﻧﻧﺎ ﻧﻘﺑل ﻓرض اﻟﻌدم ‪ . H 0 : 1  0‬واﻵن ﻧﺧﺗﺑر اﻟﺑواﻗﻲ ﺑﺎﺳﺗﺧدام رﺳ م اﻟﺑ واﻗﻲ‬

‫ﻣن ﻣﻌﺎدﻟﺔ اﻟﺧط اﻟﻣﺳﺗﻘﯾم اﻟﻣﻘدرة ‪:‬‬

‫‪yˆ  16.2571  0.331429 x .‬‬

‫ﻧوﺟد ‪ e i , d i , ri‬ﻟﻛل ﻗﯾم ‪ x i‬ﻛﻣﺎ ھو ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪ri‬‬

‫‪di‬‬

‫‪e  y i  yˆ i‬‬

‫‪٩٧‬‬

‫‪yˆi‬‬

‫‪yi‬‬

‫‪xi‬‬


‫‪1.05972‬‬ ‫‪1.42157‬‬ ‫‪0.254947‬‬

‫‪0.910428‬‬ ‫‪1.22131‬‬ ‫‪0.235379‬‬

‫‪5.85714‬‬ ‫‪7.85714‬‬ ‫‪1.51429‬‬

‫‪0.250137‬‬ ‫‪0.949981‬‬ ‫‪1.11297‬‬ ‫‪1.33184‬‬ ‫‪1.00586‬‬ ‫‪0.0817756‬‬ ‫‪0.423309‬‬ ‫‪1.65419‬‬ ‫‪1.11141‬‬

‫‪0.230938‬‬ ‫‪0.905987‬‬ ‫‪1.06143‬‬ ‫‪1.27016‬‬ ‫‪0.95928‬‬ ‫‪0.0754989‬‬ ‫‪0.390818‬‬ ‫‪1.42116‬‬ ‫‪0.954839‬‬

‫‪1.48571‬‬ ‫‪5.82857‬‬ ‫‪6.82857‬‬ ‫‪8.17143‬‬ ‫‪6.17143‬‬ ‫‪0.485714‬‬ ‫‪2.51429‬‬ ‫‪9.14286‬‬ ‫‪6.14286‬‬

‫‪27.8571‬‬ ‫‪27.8571‬‬ ‫‪29.5143‬‬ ‫‪29.5143‬‬ ‫‪31.1714‬‬ ‫‪31.1714‬‬ ‫‪32.8286‬‬ ‫‪32.8286‬‬ ‫‪34.4857‬‬ ‫‪34.4857‬‬ ‫‪36.1429‬‬ ‫‪36.1429‬‬

‫‪22‬‬ ‫‪20‬‬ ‫‪28‬‬ ‫‪31‬‬ ‫‪37.‬‬ ‫‪38‬‬ ‫‪41‬‬ ‫‪39‬‬ ‫‪34‬‬ ‫‪37‬‬ ‫‪27‬‬ ‫‪30‬‬

‫ﻟﻠﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق واﻟﺧﺎﺻﺔ ﺑﺎﻟﻣﺛﺎل )‪ (٢٢-٤‬ﯾوﺿﺢ ﺷﻛل )‪ (٣٧-٤‬رﺳم‬ ‫‪ ei‬ﻣﻘﺎﺑل ‪yˆ i‬‬

‫ﺷﻛل )‪(٣٧-٤‬‬ ‫ﻟﻠﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق واﻟﺧﺎﺻﺔ ﺑﺎﻟﻣﺛ ﺎل )‪ (٢٣-٤‬ﯾوﺿ ﺢ ﺷ ﻛل ) ‪ (٣٨-٤‬رﺳ م‬ ‫‪ d i‬ﻣﻘﺎﺑل ‪yˆ i‬‬ ‫‪d‬‬ ‫‪4‬‬ ‫‪2‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪45‬‬

‫‪40‬‬

‫‪30‬‬

‫‪35‬‬

‫‪25‬‬ ‫‪-2‬‬ ‫‪-4‬‬

‫‪٩٨‬‬


‫ﺷﻛل )‪(٣٨-٤‬‬ ‫وﻋﻧد اﺳﺗﺧدام ﺑواﻗﻲ ﺳﺗﯾودﻧت ﻧﺣﺻل ﻋﻠﻰ ﻧﻔس اﻟرﺳم وﻟﻛن ﻣﻊ اﺧﺗﻼف ﻓﻲ ﻣﻘﯾﺎس‬ ‫اﻟرﺳم ﻛﻣﺎ ﯾﺗﺿﺢ ﻣن ﺷﻛل ) ‪(٣٩-٤‬‬ ‫‪r‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪45‬‬

‫‪40‬‬

‫‪30‬‬

‫‪35‬‬

‫‪25‬‬ ‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل ) ‪(٣٩-٥‬‬ ‫وﻣن ﻣﻼﺣظﺔ اﻟرﺳم اﻟﺑﯾﺎﻧﻲ ﻧرى ﺑﺄﻧ ﮫ ﯾﺷ ﺑﮫ ‪ ‬ﻣﻣ ﺎ ﯾ دل ﻋﻠ ﻰ أن ھﻧ ﺎك ﻣﻌﺎدﻟ ﺔ ﻣ ن‬ ‫درﺟ ﺔ ﺛﺎﻧﯾ ﺔ ﺳ وف ﺗﻛ ون اﻛﺛ ر ﻣﻼﺋﻣ ﺔ ﻟﻠﺑﯾﺎﻧ ﺎت ‪ .‬أي أن اﻟﻧﻣ وذج اﻟﺧط ﻲ )‪ (١-٤‬ﻻ‬ ‫ﯾﻼﺋم اﻟﺑﯾﺎﻧﺎت واﻟذي ﯾوﺿﺣﮫ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )‪.(٣٥-٥‬‬ ‫ﺳوف ﯾﺗم اﯾﺟﺎد ‪ e i , d i , ri‬ﻟﻛل ﻗﯾم ‪ x i‬ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪Mathematica‬‬ ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫}‪x1={35,35,40.,40,45,45,50,50,55,55,60,60‬‬ ‫}‪{35,35,40.,40,45,45,50,50,55,55,60,60‬‬ ‫}‪y1={22,20,28,31,37.,38,41,39,34,37,27,30‬‬ ‫}‪{22,20,28,31,37.,38,41,39,34,37,27,30‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪sxx=c[x1,x1‬‬ ‫‪875.‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪47.5‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪32.‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪0.331429‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪٩٩‬‬


16.2571 yy=b0+(b1*x1) {27.8571,27.8571,29.5143,29.5143,31.1714,31.1714,32.8286, 32.8286,34.4857,34.4857,36.1429,36.1429} e=y1-yy {-5.85714,-7.85714,1.51429,1.48571,5.82857,6.82857,8.17143,6.17143,0.485714,2.51429,-9.14286,-6.14286} t1=Transpose[{x1,y1}] {{35,22},{35,20},{40.,28},{40,31},{45,37.},{45,38},{50,41 },{50,39},{55,34},{55,37},{60,27},{60,30}} a=PlotRange{{30,65},{10,45}} PlotRange{{30,65},{10,45}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}] y 45 40 35 30 25 20 15 x 35

40

45

50

55

60

65

Graphics dd=Plot[b0+(b1*x),{x,30,65},AxesLabel{"x","y"}] y 38 36 34 32 30 28 x 35

Graphics Show[g,dd]

40

45

50

55

60

١٠٠

65


y 45 40 35 30 25 20 15 x 35

40

45

50

55

60

65

Graphics n=l[x1] 12 ssto=c[y1,y1] 510. ssr=c[x1,y1]^2/c[x1,x1] 96.1143 sse=ssto-ssr 413.886 mse=sse/(n-2) 41.3886  di  e  mse {-0.910428,-1.22131,0.235379,0.230938,0.905987,1.06143,1.27016,0.95928,0.0754989,0.390818,-1.42116,-0.954839}

1 x1  xb ^2  ri  e   mse1      N n sxx {-1.05972,-1.42157,0.254947,0.250137,0.949981,1.11297,1.33184,1.00586,0.0817756,0.423309,-1.65419,-1.11141} pp1=Transpose[{yy,e}] {{27.8571,-5.85714},{27.8571,-7.85714},{29.5143,1.51429},{29.5143,1.48571},{31.1714,5.82857},{31.1714,6.8 2857},{32.8286,8.17143},{32.8286,6.17143},{34.4857,0.485714},{34.4857,2.51429},{36.1429,-9.14286},{36.1429,6.14286}} aa=PlotRange{{20,40},{-15,15}} PlotRange{{20,40},{-15,15}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp1, aa, a2, AxesLabel  "y ", "e"

١٠١


e 15 10 5  y

22.5

25

27.5

30

32.5

35

37.5

40

-5 -10 -15

Graphics pp2=Transpose[{yy,di}] {{27.8571,-0.910428},{27.8571,-1.22131},{29.5143,0.235379},{29.5143,0.230938},{31.1714,0.905987},{31.1714, 1.06143},{32.8286,1.27016},{32.8286,0.95928},{34.4857,0.0754989},{34.4857,0.390818},{36.1429,1.42116},{36.1429,-0.954839}} aa=PlotRange{{20,45},{-5,5}} PlotRange{{20,45},{-5,5}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp2, aa, a2, AxesLabel  "y ", "d" d

4 2  y

25

30

35

40

45

-2 -4

Graphics pp3=Transpose[{yy,ri}] {{27.8571,-1.05972},{27.8571,-1.42157},{29.5143,0.254947},{29.5143,0.250137},{31.1714,0.949981},{31.1714, 1.11297},{32.8286,1.33184},{32.8286,1.00586},{34.4857,0.0817756},{34.4857,0.423309},{36.1429,1.65419},{36.1429,-1.11141}} aa=PlotRange{{20,45},{-3,3}} PlotRange{{20,45},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "r" ١٠٢


‫‪r‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪45‬‬

‫‪40‬‬

‫‪35‬‬

‫‪30‬‬

‫‪25‬‬ ‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫‪Graphics‬‬ ‫]}‪def=Transpose[{x1,y1,yy,e,di,ri‬‬ ‫‪{{35,22,27.8571,-5.85714,-0.910428,‬‬‫‪1.05972},{35,20,27.8571,-7.85714,-1.22131,‬‬‫‪1.42157},{40.,28,29.5143,-1.51429,-0.235379,‬‬‫‪0.254947},{40,31,29.5143,1.48571,0.230938,0.250137},{45,3‬‬ ‫‪7.,31.1714,5.82857,0.905987,0.949981},{45,38,31.1714,6.82‬‬ ‫‪857,1.06143,1.11297},{50,41,32.8286,8.17143,1.27016,1.331‬‬ ‫‪84},{50,39,32.8286,6.17143,0.95928,1.00586},{55,34,34.485‬‬ ‫‪7,-0.485714,-0.0754989,‬‬‫‪0.0817756},{55,37,34.4857,2.51429,0.390818,0.423309},{60,‬‬ ‫‪27,36.1429,-9.14286,-1.42116,-1.65419},{60,30,36.1429,‬‬‫}}‪6.14286,-0.954839,-1.11141‬‬ ‫]‪TableForm[def‬‬ ‫‪1.05972‬‬ ‫‪1.42157‬‬ ‫‪0.254947‬‬

‫‪5.85714‬‬ ‫‪7.85714‬‬ ‫‪1.51429‬‬

‫‪0.910428‬‬ ‫‪1.22131‬‬ ‫‪0.235379‬‬

‫‪1.48571‬‬ ‫‪5.82857‬‬ ‫‪6.82857‬‬ ‫‪8.17143‬‬ ‫‪6.17143‬‬ ‫‪0.485714‬‬ ‫‪2.51429‬‬ ‫‪9.14286‬‬ ‫‪6.14286‬‬

‫‪27.8571‬‬ ‫‪27.8571‬‬ ‫‪29.5143‬‬ ‫‪29.5143‬‬ ‫‪31.1714‬‬ ‫‪31.1714‬‬ ‫‪32.8286‬‬ ‫‪32.8286‬‬ ‫‪34.4857‬‬ ‫‪34.4857‬‬ ‫‪36.1429‬‬ ‫‪36.1429‬‬

‫‪22‬‬ ‫‪20‬‬ ‫‪28‬‬ ‫‪31‬‬ ‫‪37.‬‬ ‫‪38‬‬ ‫‪41‬‬ ‫‪39‬‬ ‫‪34‬‬ ‫‪37‬‬ ‫‪27‬‬ ‫‪30‬‬

‫‪0.230938‬‬ ‫‪0.250137‬‬ ‫‪0.905987‬‬ ‫‪0.949981‬‬ ‫‪1.06143‬‬ ‫‪1.11297‬‬ ‫‪1.27016‬‬ ‫‪1.33184‬‬ ‫‪0.95928‬‬ ‫‪1.00586‬‬ ‫‪0.0754989‬‬ ‫‪0.0817756‬‬ ‫‪0.390818‬‬ ‫‪0.423309‬‬ ‫‪1.42116‬‬ ‫‪1.65419‬‬ ‫‪0.954839‬‬ ‫‪1.11141‬‬ ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1 .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬

‫ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار اﻟﻣﻘ درة ‪) yˆ  16.2571  0.331429 x .‬ﺣﯾ ث‬ ‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪١٠٣‬‬

‫‪b 0  16.2571‬‬

‫‪35‬‬ ‫‪35‬‬ ‫‪40.‬‬ ‫‪40‬‬ ‫‪45‬‬ ‫‪45‬‬ ‫‪50‬‬ ‫‪50‬‬ ‫‪55‬‬ ‫‪55‬‬ ‫‪60‬‬ ‫‪60‬‬


‫‪b0=yb-b1*xb‬‬

‫و ‪b1  0.331429‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫‪(b1=sxy/sxx‬‬ ‫واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻣن اﻻﻣر‬ ‫]‪Show[g,dd‬‬ ‫اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫]‪TableForm[def‬‬

‫رﺳم ‪ ei‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlot pp1, aa, a2, AxesLabel  "y‬‬ ‫‪", "e"‬‬

‫رﺳم ‪ d i‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlot pp2, aa, a2, AxesLabel  "y‬‬ ‫‪", "d"‬‬

‫رﺳم‬

‫‪ri‬‬

‫ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlot pp3, aa, a2, AxesLabel  "y‬‬ ‫‪", "r"‬‬

‫وﯾﻣﻛن ﻋﻣل اﺧﺗﺑﺎر ﻟﻧﻘص اﻟﺗوﻓﯾق ﻟﻠﺗﺄﻛﯾد ﻣن اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ ‪:‬‬ ‫ﻣﺛﺎل)‪(٢٤-٤‬‬ ‫اﻵن ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق ﻻﺧﺗﺑﺎر ﻧﻘص اﻟﺗوﻓﯾق أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪:‬‬

‫‪H 0 :  Y|x   0  1x i‬‬ ‫‪i‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‪:‬‬

‫‪H1 :  Y|x   0  1x i‬‬ ‫‪i‬‬ ‫ﻧﺗﺑﻊ اﻟﺧطوات اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺎ اﻟﺧﺎﻟص ﻋﻧد ‪ x= 35‬ھو ‪:‬‬

‫}‪222  20 2  {22  202 / 2‬‬ ‫‪2‬‬ ‫‪١٠٤‬‬


‫ﺑدرﺟﺎت ﺣرﯾﺔ ‪n 1  2  1  1‬‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺎ اﻟﺧﺎﻟص ﻋﻧد ‪ x=40‬ھو ‪:‬‬

‫}‪282  312  {28  312 / 2‬‬ ‫‪ 4. 5‬‬ ‫ﺑدرﺟﺎت ﺣرﯾﺔ ‪n 2  2  1  1‬‬

‫ﺑﻧﻔس اﻟطرﯾﻘﺔ ﯾﻣﻛن ﺣﺳﺎب ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺎ اﻟﺧﺎﻟص ﻟﻠﻘ ﯾم اﻟﺑﺎﻗﯾ ﺔ ﻣ ن ‪x‬‬ ‫ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪ni‬‬ ‫‪x‬‬ ‫درﺟﺎت‬ ‫‪2‬‬ ‫اﻟﺣرﯾﺔ‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬

‫‪yij  y i ‬‬

‫‪‬‬ ‫‪j1‬‬

‫‪2‬‬ ‫‪4.5‬‬ ‫‪0.5‬‬ ‫‪2‬‬ ‫‪4.5‬‬ ‫‪4.5‬‬

‫‪35‬‬ ‫‪40‬‬ ‫‪45‬‬ ‫‪50‬‬ ‫‪55‬‬ ‫‪60‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪F‬‬ ‫‪2.32224‬‬ ‫‪-‬‬‫‪32.9905‬‬ ‫‪--‬‬

‫‪MS‬‬ ‫‪96.1143‬‬ ‫‪41.3886‬‬ ‫‪98.0714‬‬ ‫‪3‬‬

‫‪SS‬‬ ‫‪96.1143‬‬ ‫‪413.886‬‬ ‫‪395.886‬‬ ‫‪18‬‬

‫‪df‬‬ ‫‪1‬‬ ‫‪10‬‬ ‫‪4‬‬ ‫‪6‬‬

‫‪S.O.V‬‬ ‫اﻻﻧﺣدار‬ ‫اﻟﺧطﺄ‬ ‫ﻗﺻور اﻟﺗوﻓﯾق‬ ‫اﻟﺧطﺄ اﻟﺧﺎﻟص‬

‫ﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﺔ ﻟﻘﺻ ور اﻟﺗوﻓﯾ ق ‪ 32.9905 ‬ﺗزﯾ د ﻋ ن اﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ‬ ‫‪ F.05 4,6  4.53‬ﻓﺈﻧﻧ ﺎ ﻧ رﻓض ﻓ رض اﻟﻌ دم وﺑﻧ ﺎء ﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن ﻣﻌﺎدﻟ ﺔ اﻟﺧ ط‬ ‫اﻟﻣﺳ ﺗﻘﯾم ﻏﯾ ر ﻣﻼﺋﻣ ﺔ ﻟﻠﺑﯾﺎﻧ ﺎت ﻓ ﯾﻣﻛن اﺳ ﺗﺧدام ﻣﻌﺎدﻟ ﺔ ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾ ﺔ ﻻن‬ ‫‪ f  2.32224‬اﻗل ﻣن ‪. F.05 1,10  4.9646‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫}‪x={35.,35,40.,40,45,45,50,50,55,55,60,60‬‬ ‫}‪{35.,35,40.,40,45,45,50,50,55,55,60,60‬‬ ‫}‪y={22.,20.,28,31,37.,38,41,39,34,37,27,30‬‬ ‫}‪{22.,20.,28,31,37.,38,41,39,34,37,27,30‬‬ ‫}‪{22.`,20.`,28,31,37.`,38.,41,39,34,37,27,30‬‬ ‫}‪{22.,20.,28,31,37.,38.,41,39,34,37,27,30‬‬ ‫}}‪yy={{22,20},{28,31},{37,38},{41,39},{34,37},{27,30‬‬ ‫}}‪{{22,20},{28,31},{37,38},{41,39},{34,37},{27,30‬‬ ‫‪١٠٥‬‬


a[x_]:=Length[x] z[x_]:=Apply[Plus,x]

cx_ : zx^2 

zx2 ax

h=Map[c,yy]

2,

9 1 9 9 , , 2, ,  2 2 2 2

ssp=z[h] 18 q=Map[a,yy] {2,2,2,2,2,2} qq=q-1 {1,1,1,1,1,1} ne=z[qq] 6

s2e 

ssp ne

3 tx=Table[{1,x[[i]]},{i,1,a[x]}] {{1,35.},{1,35},{1,40.},{1,40},{1,45},{1,45},{1,50},{1,50 },{1,55},{1,55},{1,60},{1,60}} a[tx] 12 u=Transpose[tx] {{1,1,1,1,1,1,1,1,1,1,1,1},{35.,35,40.,40,45,45,50,50,55, 55,60,60}} t1=u.y {384.,18530.} t2=Inverse[u.tx] {{2.6619,-0.0542857},{-0.0542857,0.00114286}} b=t1.t2 {16.2571,0.331429} b0=b[[1]] 16.2571 b1=b[[2]] 0.331429 yb=b0+b1*x {27.8571,27.8571,29.5143,29.5143,31.1714,31.1714,32.8286, 32.8286,34.4857,34.4857,36.1429,36.1429} e=y-yb {-5.85714,-7.85714,1.51429,1.48571,5.82857,6.82857,8.17143,6.17143,0.485714,2.51429,-9.14286,-6.14286} sse=e.e 413.886 ١٠٦


ssto=c[y] 510. ssl=sse-ssp 395.886 ssr=ssto-sse 96.1143 dsr=1 1 n=a[x] 12 dse=n-2 10 dst=n-1 11 nl=dse-ne 4

msr 

ssr dsr

96.1143

mse 

sse dse

41.3886

f

msr mse

2.32224

msl 

ssl nl

98.9714

ff 

msl s2e

32.9905 th=TableHeadings{{soruse,redession,residual,ftt,pure},{a nova}} TableHeadings{{soruse,redession,residual,ftt,pure},{anov a}} tr1={"df","ss","ms","f"} {df,ss,ms,f} tr2={dsr,ssr,msr,f} {1,96.1143,96.1143,2.32224} tr3={dse,sse,mse,"---"} {10,413.886,41.3886,---} tr4={nl,ssl,msl,ff} {4,395.886,98.9714,32.9905} tr5={ne,ssp,s2e,"---"} {6,18,3,---} TableForm[{tr1,tr2,tr3,tr4,tr5},th]

١٠٧


soruse redession residual ftt pure

anova df 1 10 4 6

ss 96.1143 413.886 395.886 18

ms 96.1143 41.3886 98.9714 3

f 2.32224 

32.9905 

<<Statistics`ContinuousDistributions` =0.05; ff1=Quantile[FRatioDistribution[nl,ne],1-] 4.53368 If[ff>ff1,Print["RjectHo"],Print["AccpetHo"]] RjectHo ff2=Quantile[FRatioDistribution[dsr,dse],1-] 4.9646 If[f>ff2,Print["RjectHo"],Print["AccpetHo"]] AccpetHo

‫ اﻟﻣدﺧﻼت‬:‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬x‫ اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‬y . ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ TableForm[{tr1,tr2,tr3,tr4,tr5},th]

‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬f   32.9005 ‫و‬ msl ff  s2e ‫ اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬f ff1=Quantile[FRatioDistribution[nl,ne],1-]

‫ﺣﯾث اﻟﻣﺧرج‬ 4.53368

‫اﻟﻘرار اﻟﻣﺗﺧذ ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ If[ff>ff1,Print["RjectHo"],Print["AccpetHo"]]

‫واﻟﻣﺧرج ﻓﻰ ھذه اﻟﺣﺎﻟﺔ ھو‬ RjectHo

.‫وھذا ﯾﻌﻧﻰ ان اﻟﻧﻣوزج ﻏﯾر ﺧطﻰ‬ ‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬f  2.3224 ‫اﯾﺿﺎ‬ msr f mse ‫ اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬f ff2=Quantile[FRatioDistribution[dsr,dse],1-]

‫ﺣﯾث اﻟﻣﺧرج‬ ١٠٨


‫‪4.9646‬‬

‫اﻟﻘرار اﻟﻣﺗﺧذ ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]]"‪If[f>ff2,Print["RjectHo"],Print["AccpetHo‬‬

‫واﻟﻣﺧرج ﻓﻰ ھذه اﻟﺣﺎﻟﺔ ھو‬ ‫‪AccpetHo‬‬

‫اى ﻗﺑول ﻓرض اﻟﻌدم ‪H 0 : 1  0‬‬

‫)‪ (١٤-٤‬ﺗﺣوﯾﻼت اﻟﻰ اﻟﺧط اﻟﻣﺳﺗﻘﯾم‬ ‫‪Transformations to a Straight Line‬‬ ‫إن ﺿ رورة اﻗﺗ راح ﻧﻣ وذج ﺑ دﯾل ﻟﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻲ‬ ‫‪ Yi   0  1x i   i‬ﯾرﺟﻊ إﻣﺎ إﻟﻰ اﻋﺗﺑﺎرات ﻧظرﯾﺔ أو ﻣن اﻟﺧﺑ رة اﻟﺳ ﺎﺑﻘﺔ أو‬ ‫ﻣن اﺧﺗﺑﺎر رﺳوم اﻟﺑواﻗﻲ أو ﻣن اﺧﺗﺑﺎر ﻧﻘص ﺟودة اﻟﺗوﻓﯾق‪ .‬ﻓﻲ ﻛل ﺣﺎﻟﺔ ﯾﻛون ﻣن‬ ‫اﻟﺿروري وﺿﻊ ﻧﻣوذج ﻣﻌﺎﻟﻣﮫ ﯾﻣﻛ ن ﺗﻘ دﯾرھﺎ ﺑﺳ ﮭوﻟﺔ‪ .‬ﻣﺟﻣوﻋ ﺔ ﺧﺎﺻ ﺔ ﻣ ن ﺗﻠ ك‬ ‫اﻟﻧﻣﺎذج ﯾﻣﻛن ﺗﻌرﯾﻔﮭﺎ ﻋن طرﯾق ﻣﺎ ﯾﻌرف ﺑﺎﻟدوال اﻟﻘﺎﺑﻠﺔ ﻟﻠﺗﺣوﯾل إﻟﻰ ﺧطﯾﺔ‬ ‫‪ intrinsically linear‬أو ‪. transformably linear‬‬

‫ﺗﻌرﯾف ‪ :‬ﺗﺳﻣﻰ اﻟداﻟﺔ اﻟﺗ ﻲ ﺗ رﺑط ‪ x‬ﻣ ﻊ ‪ y‬ﺑﺎﻟداﻟ ﺔ اﻟﻘﺎﺑﻠ ﺔ ﻟﻠﺗﺣوﯾ ل إﻟ ﻰ ﺧطﯾ ﺔ إذا‬ ‫أﻣﻛن إﺟراء ﺗﺣوﯾﻠﺔ ﻋﻠﻰ ‪ x‬و) أو ( ﺗﺣوﯾﻠ ﺔ ﻋﻠ ﻰ ‪y‬ﺑﺣﯾ ث ﯾﻣﻛ ن اﻟﺗﻌﺑﯾ ر‬ ‫ﻋن اﻟداﻟﺔ ﻛﺎﻷﺗﻲ ‪ y    0  1x ‬ﺣﯾث ‪ x ‬اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل اﻟﻣﺣ ول و‬ ‫‪ y‬اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ اﻟﻣﺣول‪.‬‬ ‫اﻟداﻟﺔ اﻟﻘﺎﺑﻠ ﺔ ﻟﻠﺗﺣوﯾ ل إﻟ ﻰ ﺧطﯾ ﺔ ﺗ ؤدي ﻣﺑﺎﺷ رة إﻟ ﻰ ﻧﻣ ﺎذج إﻧﺣ دار ﺧطﯾ ﮫ وﻣﻌﺎﻟﻣﮭ ﺎ‬ ‫ﯾﻣﻛن ﺗﻘدﯾرھﺎ ﺑﺳﮭوﻟﮫ ﺑﺎﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻌﺎدﯾﺔ ‪.‬‬ ‫اﻟﻣﯾزة اﻷﺳﺎﺳﯾﺔ ﻟﻧﻣوذج اﻻﻧﺣدار اﻟﻘﺎﺑل ﻟﻠﺗﺣوﯾ ل إﻟ ﻰ ﺧط ﻲ ھ و أن اﻟﻣﻌﻠﻣﺗ ﯾن‬ ‫‪  0 , 1‬ﻓﻲ اﻟﻧﻣوذج اﻟﻣﺣول ﯾﻣﻛن ﺗﻘدﯾرھﻣﺎ ﺑﺎﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى‬ ‫اﻟﻌﺎدﯾﺔ وذﻟك ﺑﺎﻟﺗﻌوﯾض ﻋن ‪ x  , y ‬ﻓﻲ ﺻﯾﻐﺔ ﻛل ﻣن ‪ b 0 , b1‬ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬

‫‪١٠٩‬‬


‫‪ x i  y i‬‬

‫‪‬‬

‫‪ x i y i‬‬

‫‪n‬‬ ‫‪( x i ) 2‬‬ ‫‪2‬‬ ‫‪ ( x i ) ‬‬ ‫‪n‬‬ ‫‪ y i‬‬ ‫‪ x i‬‬ ‫‪b0 ‬‬ ‫‪ b1‬‬ ‫‪.‬‬ ‫‪n‬‬ ‫‪n‬‬ ‫‪b1 ‬‬

‫‪,‬‬

‫اﻟﻣﻌﺎﻟم ﻓﻲ ﻧﻣوذج اﻻﻧﺣدار اﻟﻐﯾ ر ﺧط ﻲ اﻷﺻ ﻠﻲ ﯾﻣﻛ ن ﺗﻘ دﯾرھﺎ ﻷﻧﮭ ﺎ ﺗﻛ ون داﻟ ﮫ‬ ‫ﻓﻲ ‪ b 0 , b1‬وذﻟك ﻋﻧد اﻟﺿرورة ‪.‬‬ ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺑﻌض اﻟﻧﻣﺎزج ﻟﺗوﺿﯾﺢ ذﻟك ‪.‬‬

‫)‪ (١-١٤-٤‬اﻟﻧﻣوذج اﻷﺳﻰ‬

‫‪The Exponential Model‬‬

‫ﻣﻌﺎدﻟﺔ اﻟﻧﻣوذج اﻷﺳﻰ ﺗﻛون ﻋﻠﻰ اﻟﺻورة اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪ Y|x    x‬‬

‫ﺣﯾث ‪ , ‬ﺛﺎﺑﺗﺎن واﻟﻣطﻠوب ﺗﻘدﯾرھﻣﺎ ﻣ ن اﻟﺑﯾﺎﻧ ﺎت ﺑﺎﻟﺗﻘ دﯾرﯾن ‪ c , d‬ﻋﻠ ﻰ اﻟﺗ واﻟﻲ ‪ .‬ﯾﻣﻛ ن ﺗﻘ دﯾر‬ ‫‪  Y|x‬ﺑﺎﻟﻘﯾﻣﺔ ‪ yˆx‬ﻣن ﻣﻧﺣﻧﻰ اﻻﻧﺣدار اﻟﻣﻘدر اﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪yˆ x  c d x .‬‬

‫ﺑﺄﺧذ ﻟوﻏﺎرﯾﺗﻣﺎت اﻟطرﻓﯾن ) ﻟﻸﺳﺎس ‪ ( e‬ﻓﻲ اﻟﻣﻌﺎدﻟﺔ اﻟﺳﺎﺑﻘﺔ ﻓﺈن ﻣﻧﺣﻧﻰ اﻻﻧﺣدار اﻟﻣﻘ در ﯾﻣﻛ ن‬ ‫ﻛﺗﺎﺑﺗﮫ ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪ln yˆ x  ln c  (ln d ) x ,‬‬

‫وﻛل زوج ﻣن اﻟﻣﺷﺎھدات ﻓﻲ اﻟﻌﯾﻧﺔ ﯾﺣﻘق اﻟﻌﻼﻗﺔ ‪:‬‬ ‫‪ln y i  ln c  (ln d ) x i  e i  b 0  b1 x i  e i ,‬‬

‫ﺣﯾث أن ‪ . b1  (ln d ), b 0  ln c :‬وﻋﻠﻰ ذﻟك ﯾﻣﻛن إﯾﺟﺎد ‪ b 0 , b1‬ﺑﺎﻟﺻﯾﻎ اﻟﻣﺳﺗﺧدﻣﺔ ﻟﻧﻣوذج‬ ‫اﻻﻧﺣدار اﻟﺧطﻰ ‪ ،‬اﻟﺗﻲ ﺳﺑق أن ﺗﻧﺎوﻟﻧﺎھﺎ ‪ ،‬ﺑﺎﺳﺗﺧدام اﻟﻧﻘﺎط )‪ (xi , ln yi‬ﺛم إﯾﺟﺎد ‪ c , d‬ﺑﺄﺧذ‬ ‫اﻟﻘﯾم اﻟﻣﻘﺎﺑﻠﺔ ﻟﻠوﻏﺎرﯾﺗﻣﺎت ﻟـ ‪ b 0 , b1‬ﻋﻠﻰ اﻟﺗواﻟﻲ‪ ،‬أي أن ‪:‬‬ ‫‪d  exp( b1 ), c  exp( b 0 ) .‬‬ ‫طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ﻟﺗوﻓﯾق ﻣﻧﺣﻧﻰ أﺳﻰ ﻟﻔﺋﺔ ﻣن اﻟﻣﺷﺎھدات ﻣوﺿﺣﮫ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ ‪.‬‬

‫ﻣﺛﺎل)‪(٢٥-٤‬‬ ‫ﻻزواج اﻟﻘﯾﺎﺳﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ أوﺟد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺗﺣت ﻓرض اﻟﻧﻣ وذج اﻷﺳ ﻰ‬ ‫‪.‬‬ ‫‪7‬‬ ‫‪882‬‬

‫‪6‬‬ ‫‪670‬‬

‫‪5‬‬ ‫‪548‬‬

‫‪4‬‬ ‫‪457‬‬

‫‪١١٠‬‬

‫‪3‬‬ ‫‪393‬‬

‫‪2‬‬ ‫‪341‬‬

‫‪1‬‬ ‫‪304‬‬

‫‪x‬‬ ‫‪y‬‬


‫اﻟﺣــل ‪:‬‬ ‫ﺑوﺿﻊ ‪yi  ln y i‬‬ ‫ﻓﺈن ‪yi  43.243148 :‬‬

‫و‬

‫‪x 2i  140‬‬

‫‪,‬‬

‫‪x i  28‬‬

‫‪yi‬‬ ‫‪ 6.1775926‬‬ ‫‪n‬‬

‫‪,‬‬

‫‪x  4,‬‬

‫‪n7‬‬

‫‪,‬‬

‫‪x i yi  177.85134‬‬

‫)‪(28)(43.243148‬‬ ‫‪7‬‬ ‫‪(28) 2‬‬ ‫‪140 ‬‬ ‫‪7‬‬

‫‪177.85134 ‬‬ ‫‪b1 ‬‬

‫‪= 0.174241 .‬‬ ‫)‪b0= 6.1775926 – ( 0.174241) (4‬‬ ‫‪= 5.4806286 .‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ  5.4806286  0.174241x.‬‬

‫وﻋﻠﻰ ذﻟك ‪:‬‬ ‫‪ln d  b1  0.174241 , ln c  b 0  5.4806286,‬‬ ‫‪d  exp( b1 )  1.1903424 , c  exp( b 0 )  239 .99752 .‬‬

‫وﺑﺎﻟﺗﺎﻟﻲ ﻓﺈن ﻣﻧﺣﻧﻰ اﻻﻧﺣدار اﻟﻣﻘدر ﺑﺎﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ھو ‪:‬‬ ‫‪yˆ  c d x‬‬ ‫‪ ( 239 .99752 )(1 .1903424 ) x‬‬

‫واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻲ ﻟﮭﺎ ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪. (٤٠-٤‬‬

‫‪١١١‬‬


(٤٠-٤) ‫ﺷﻜﻞ‬

‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬

x1={1,2,3,4,5,6,7} {1,2,3,4,5,6,7} yy3={304.0,341.0,393.0,457.0,548.0,670.0,882.0} {304.,341.,393.,457.,548.,670.,882.} y1=Log[yy3] {5.71703,5.83188,5.97381,6.12468,6.30628,6.50728,6.78219} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] k[x_]:=h[x]/l[x] xb=k[x1] 4 yb=k[y1] 6.17759 b1=c[x1,y1]/c[x1,x1] 0.174241 d=Exp[b1] 1.19034 b0=yb-b1*xb 5.48063 c=Exp[b0] 239.997 t1=Transpose[{x1,yy3}] {{1,304.},{2,341.},{3,393.},{4,457.},{5,548.},{6,670.},{7 ,882.}} ١١٢


a=PlotRange{{0,10},{100,1100}} PlotRange{{0,10},{100,1100}} a1=Prolog{PointSize[.03]} Prolog{PointSize[0.03]} g= ListPlot[t1,a,a1] 1000 800 600 400

2

4

6

8

10

4

6

8

10

4

6

8

10

Graphics d=Plot[c*d^x,{x,0,10}]

1200 1000 800 600

2

Graphics Show[g,d] 1000 800 600 400

2

Graphics

١١٣


‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1 .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ  5.4806286  0.174241x.‬‬

‫ﺣﯾث ‪ b 0  5.4806286‬ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪b0=yb-b1*xb‬‬

‫و ‪ b1  0.174241‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬

‫ﻣﻧﺣﻧﻰ اﻻﻧﺣدار اﻟﻣﻘدر ﺑﺎﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ھو ‪:‬‬ ‫‪yˆ  c d x‬‬ ‫‪ ( 239 .99752 )(1 .1903424 ) x‬‬

‫ﺣﯾث‬ ‫‪ln d  b1  0.174241 , ln c  b 0  5.4806286,‬‬ ‫‪d  exp( b1 )  1.1903424 , c  exp( b 0 )  239 .99752 .‬‬

‫ﺣﯾث‬ ‫‪ c  exp(b 0 )  239.99752‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪c=Exp[b0‬‬

‫و ‪ d  exp(b1 )  1.1903424‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪d=Exp[b1‬‬

‫واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻰ ﻟﻠﻣﻌﺎدﻟﺔ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪Show[g,d‬‬

‫)‪(٢-١٤-٤‬ﻧﻣوذج اﻟﻘوى‬

‫‪Power Model‬‬

‫ﻣﻌﺎدﻟﺔ ﻧﻣوذج اﻟﻘوى ﺗﻛون ﻋﻠﻰ اﻟﺻورة اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪‬‬ ‫‪ Y|x  a 0 x a 0‬‬ ‫ﺣﯾث ‪ a 0 , a0‬ﺛﺎﺑﺗﺎن واﻟﻣطﻠوب ﺗﻘدﯾرھﻣﺎ ﻣ ن اﻟﺑﯾﺎﻧ ﺎت ﺑﺎﻟﺗﻘ دﯾرﯾن ‪ co , do‬ﻋﻠ ﻰ اﻟﺗ واﻟﻲ‪ .‬ﯾﻣﻛ ن‬ ‫ﺗﻘدﯾر ‪  Y|x‬ﺑﺎﻟﻘﯾﻣﺔ ‪ yˆx‬ﻣن ﻣﻧﺣﻧﻰ اﻻﻧﺣدار اﻟﻣﻘدر اﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪١١٤‬‬


‫‪yˆ x  co x d o .‬‬ ‫ﺑﺄﺧذ ﻟوﻏﺎرﯾﺗﻣﺎت اﻟطرﻓﯾن ) ﻟﻸﺳﺎس ‪ ( e‬ﻓﺈن ﻣﻧﺣﻧﻰ اﻻﻧﺣدار ﯾﻣﻛن ﻛﺗﺎﺑﺗﮫ ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫)‪ln yˆ x  ln co  d o (ln x‬‬ ‫ﻛل زوج ﻣن اﻟﻣﺷﺎھدات ﻓﻲ اﻟﻌﯾﻧﺔ ﯾﺣﻘق اﻟﻌﻼﻗﺔ ‪:‬‬ ‫‪ln yi  ln co  d o (ln x i )  ei‬‬

‫‪ bo  b1 (ln x i )  ei‬‬

‫ﺣﯾ ث ‪ . b1  d o ,b o  ln co‬وﻋﻠ ﻰ ذﻟ ك ﯾﻣﻛ ن إﯾﺟ ﺎد ‪ b0 , b1‬ﺑﺎﻟﺻ ﯾﻎ اﻟﻣﺳ ﺗﺧدﻣﺔ ﻟﻧﻣ وذج‬ ‫اﻻﻧﺣدار اﻟﺧطﻰ‪ ،‬اﻟﺗﻲ ﺳ ﺑق أن ﺗﻧﺎوﻟﺗﺎھ ﺎ ‪ ،‬ﺑﺎﺳ ﺗﺧدام اﻟﻧﻘ ﺎط ) ‪ (ln x i ,ln yi‬ﺛ م إﯾﺟ ﺎد ‪co ,‬‬ ‫‪do‬ﺣﯾث ‪. b1  d o ,ln co  b o‬‬

‫ﻣﺛﺎل)‪(٢٦-٤‬‬ ‫ﻻزواج اﻟﻘﯾﺎﺳﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ أوﺟد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺗﺣت ﻓرض ﻧﻣوذج اﻟﻘوى ‪.‬‬ ‫‪400‬‬ ‫‪33.0‬‬

‫‪400‬‬ ‫‪26.0‬‬

‫‪400‬‬ ‫‪24.5‬‬

‫‪400‬‬ ‫‪21.5‬‬

‫‪500‬‬ ‫‪16.5‬‬

‫‪500‬‬ ‫‪9.8‬‬

‫‪500‬‬ ‫‪7.8‬‬

‫‪500‬‬ ‫‪6.4‬‬

‫‪600‬‬ ‫‪3.6‬‬

‫‪600‬‬ ‫‪3.0‬‬

‫‪600‬‬ ‫‪2.65‬‬

‫اﻟﺣــل ‪:‬‬ ‫‪n  12 ,  ln x i  74.412 ,  ln yi  26.22601 ,‬‬ ‫‪ ln x i2  461.75874 , (ln x i )(ln y i )  160.84601 ,‬‬

‫‪ ln yi2  67.74609.‬‬ ‫)‪(74.412)(26.22601‬‬ ‫‪160.84601 ‬‬ ‫‪12‬‬ ‫‪b1 ‬‬ ‫‪(74.412) 2‬‬ ‫‪461.75874 ‬‬ ‫‪12‬‬ ‫‪= - 5.3996,‬‬ ‫)‪26.22061  ( 5.3996)(74.412‬‬ ‫‪b0 ‬‬ ‫‪12‬‬ ‫‪= 35.6684.‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ x  35.6684  5.3996x.‬‬ ‫وﻋﻠﻰ ذﻟك ‪:‬‬ ‫‪ln co  b0  35.6684‬‬ ‫أي أن ‪:‬‬ ‫‪15‬‬

‫‪c0  exp(b0 )  3.094491530.10‬‬ ‫‪d 0  b1  5.3996‬‬ ‫واﻟﻣﻌﺎدﻟﺔ اﻷﺳﺎﺳﯾﺔ اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪١١٥‬‬

‫‪600‬‬ ‫‪2.35‬‬

‫‪x‬‬ ‫‪y‬‬


15

yˆ x  c0 x d 0  (3.094491530 10)  x 5.3996 . . (٤١-٤) ‫واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻲ ﻟﮭﺎ ﻣوﺿﺢ ﻓﻲ ﺷﻛل‬

(٤١-٤) ‫ﺷﻛل‬ ‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ xx3={600.0,600.0,600.,600.,500.,500.,500.,500.,400.,400., 400.,400.} {600.,600.,600.,600.,500.,500.,500.,500.,400.,400.,400.,4 00.} x1=Log[xx3] {6.39693,6.39693,6.39693,6.39693,6.21461,6.21461,6.21461, 6.21461,5.99146,5.99146,5.99146,5.99146} yy3={2.35,2.65,3.,3.6,6.4,7.8,9.8,16.5,21.5,24.5,26.,33.} {2.35,2.65,3.,3.6,6.4,7.8,9.8,16.5,21.5,24.5,26.,33.} y1=Log[yy3] {0.854415,0.97456,1.09861,1.28093,1.8563,2.05412,2.28238, 2.80336,3.06805,3.19867,3.2581,3.49651} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] k[x_]:=h[x]/l[x] xb=k[x1] 6.201 yb=k[y1] 2.1855 b1=c[x1,y1]/c[x1,x1] -5.39974 b0=yb-b1*xb 35.6693 c=Exp[b0] 3.09732  1015 ١١٦


t1=Transpose[{xx3,yy3}] {{600.,2.35},{600.,2.65},{600.,3.},{600.,3.6},{500.,6.4}, {500.,7.8},{500.,9.8},{500.,16.5},{400.,21.5},{400.,24.5} ,{400.,26.},{400.,33.}} a=PlotRange{{300,700},{0,40}} PlotRange{{300,700},{0,40}} a1=Prolog{PointSize[.03]} Prolog{PointSize[0.03]} g= ListPlot[t1,a,a1] 40 35 30 25 20 15 10 5 350

400

450

500

550

600

650

700

Graphics d=Plot[c*x^b1,{x,300,700}] 120 100 80 60 40 20 400

500

600

Graphics Show[g,d]

١١٧

700


‫‪40‬‬ ‫‪35‬‬ ‫‪30‬‬ ‫‪25‬‬ ‫‪20‬‬ ‫‪15‬‬ ‫‪10‬‬ ‫‪5‬‬ ‫‪700‬‬

‫‪650‬‬

‫‪600‬‬

‫‪550‬‬

‫‪500‬‬

‫‪450‬‬

‫‪400‬‬

‫‪350‬‬

‫‪Graphics‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﺑﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ yy3 .‬اﻟﻤﺴﻤﻰ ﺑﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪xx3‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ x  35.6684  5.3996x.‬‬ ‫ﺣﯾث ‪ b 0  35.6684‬ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪b0=yb-b1*xb‬‬

‫وﺑﻣﺎ ان ‪:‬‬ ‫‪ln co  b0  35.6684‬‬

‫أي أن ‪:‬‬ ‫‪15‬‬

‫‪c0  exp(b0 )  3.094491530.10‬‬ ‫وﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪c=Exp[b0‬‬

‫واﯾﺿﺎ‬ ‫‪d 0  b1  5.3996‬‬ ‫وﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬

‫واﻟﻣﻌﺎدﻟﺔ اﻷﺳﺎﺳﯾﺔ اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪١١٨‬‬


‫‪15‬‬

‫‪yˆ x  c0 x d 0  (3.094491530 10)  x 5.3996 .‬‬ ‫واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻰ ﻟﻠﻣﻌﺎدﻟﺔ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪Show[g,d‬‬

‫)‪ (٣-١٤-٤‬ﻧﻣوذج ﯾﻌطﻲ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻋﻠﻰ اﻟﺷﻛل ‪yˆ  b 0  b1 x‬‬

‫ﻣﺛﺎل)‪٢٧-٤‬‬ ‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻋدد اﻟﺳﺎﻋﺎت اﻟﺗﻲ ﯾﻘﺿﯾﮭﺎ ‪ 30‬طﺎﻟب ﻓﻲ اﻟدراﺳﺔ ﺧﺎرج‬ ‫اﻟﻣدرج ﻓﻲ اﻷﺳﺑوع ) ‪ ( x‬واﻟدرﺟﺎت اﻟﺗﻲ ﺣﺻﻠوا ﻋﻠﯾﮭﺎ ﻓﻲ ﻣﺎدة اﻹﺣﺻﺎء ) ‪( y‬‬ ‫ﺣﯾث اﻟدرﺟﺔ اﻟﻧﮭﺎﺋﯾﺔ ‪ . 200‬ھل ﯾﻣﻛن ﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﺎت ﺑﻣﻌﺎدﻟﺔ ﺧط ﻣﺳﺗﻘﯾم ؟‬

‫‪xy‬‬

‫‪x2‬‬

‫‪١١٩‬‬

‫‪y‬‬

‫‪x‬‬


‫‪20‬‬ ‫‪25‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪120‬‬ ‫‪142.5‬‬ ‫‪200‬‬ ‫‪180‬‬ ‫‪285‬‬ ‫‪257.5‬‬ ‫‪252.5‬‬ ‫‪348‬‬ ‫‪360‬‬ ‫‪430.5‬‬ ‫‪552‬‬ ‫‪532‬‬ ‫‪657‬‬ ‫‪760‬‬ ‫‪735‬‬ ‫‪863.5‬‬ ‫‪902‬‬ ‫‪1002‬‬ ‫‪972‬‬ ‫‪1066‬‬ ‫‪1211‬‬ ‫‪1253‬‬ ‫‪1488‬‬ ‫‪1544‬‬ ‫‪1710‬‬ ‫‪1620‬‬

‫‪0.25‬‬ ‫‪0.25‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪2.25‬‬ ‫‪2.25‬‬ ‫‪4‬‬ ‫‪4‬‬ ‫‪6.25‬‬ ‫‪6.25‬‬ ‫‪6.25‬‬ ‫‪9‬‬ ‫‪9‬‬ ‫‪12.25‬‬ ‫‪16‬‬ ‫‪16‬‬ ‫‪20.25‬‬ ‫‪25‬‬ ‫‪25‬‬ ‫‪30.25‬‬ ‫‪30.25‬‬ ‫‪36‬‬ ‫‪36‬‬ ‫‪42.25‬‬ ‫‪49‬‬ ‫‪49‬‬ ‫‪64‬‬ ‫‪64‬‬ ‫‪81‬‬ ‫‪81‬‬ ‫‪729‬‬

‫‪19643.5‬‬

‫اﻟﺣــل ‪:‬‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺢ ﻓﻲ ﺷﻛل)‪(٤٢-٤‬‬

‫ﺷﻛل)‪(٤٢-٤‬‬ ‫‪١٢٠‬‬

‫‪40‬‬ ‫‪50‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪80‬‬ ‫‪95‬‬ ‫‪100‬‬ ‫‪90‬‬ ‫‪114‬‬ ‫‪103‬‬ ‫‪101‬‬ ‫‪116‬‬ ‫‪120‬‬ ‫‪123‬‬ ‫‪138‬‬ ‫‪133‬‬ ‫‪146‬‬ ‫‪152‬‬ ‫‪147‬‬ ‫‪157‬‬ ‫‪164‬‬ ‫‪167‬‬ ‫‪162‬‬ ‫‪164‬‬ ‫‪173‬‬ ‫‪179‬‬ ‫‪186‬‬ ‫‪193‬‬ ‫‪190‬‬ ‫‪180‬‬ ‫‪3918‬‬

‫‪0.5‬‬ ‫‪0 .5‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1.5‬‬ ‫‪1.5‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪3‬‬ ‫‪3‬‬ ‫‪3.5‬‬ ‫‪4‬‬ ‫‪4‬‬ ‫‪4.5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5.5‬‬ ‫‪5.5‬‬ ‫‪6‬‬ ‫‪6‬‬ ‫‪6.5‬‬ ‫‪7‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪9‬‬ ‫‪127‬‬


‫ﺑﻔرض أن ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط )‪ (١-٤‬ﯾﻣﺛل اﻟﺑﯾﺎﻧﺎت ﻓﯾﺎ ﻟﺟدول اﻟﺳﺎﺑق ﻓﺈن ‪:‬‬ ‫‪3918‬‬ ‫‪ 130.6‬‬ ‫‪30‬‬

‫‪‬‬

‫‪y‬‬

‫‪n‬‬

‫‪, y‬‬

‫)‪(127)(3918‬‬ ‫‪30‬‬ ‫‪(127) 2‬‬ ‫‪729 ‬‬ ‫‪30‬‬

‫‪127‬‬ ‫‪ 4.23333‬‬ ‫‪30‬‬

‫‪19643.5 ‬‬

‫‪ x y‬‬

‫‪‬‬

‫‪x‬‬

‫‪ xy ‬‬

‫‪n ‬‬ ‫‪2‬‬ ‫)‪2 ( x‬‬ ‫‪x ‬‬ ‫‪n‬‬ ‫‪3057.3‬‬ ‫‪‬‬ ‫‪ 15.9761,‬‬ ‫‪191.367‬‬

‫‪n‬‬

‫‪, x‬‬

‫‪SXY‬‬ ‫‪‬‬ ‫‪SXX‬‬

‫‪n  30‬‬

‫‪b1 ‬‬

‫‪b 0  y  b1x  130.6  (15.9761)(4.23333)  62.9677 .‬‬

‫ﻣﻌﺎدﻟﺔ ﺧط اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪y  62.9677  15.9761x .‬‬

‫وﻟﻣﻌرﻓﺔ ﻣدى ﺗوﻓر ﺷروط ﻓروض اﻟﺗﺣﻠﯾل ﻧﺗﺑﻊ ﻣﺎ ﯾﻠﻲ ‪:‬‬ ‫‪ -١‬ﻧﺤﺴﺐ ﻗﻴﻢ اﻟﺒﻮاﻗﻲ ‪ ei‬و اﻟﺒﻮاﻗﻲ اﻟﻤﻌﻴﺎرﻳﺔ ‪ d i‬وﺑﻮاﻗﻲ ﺳﺘﻴﻮدﻧﺖ ‪ ri‬واﻟﻨﺘﺎﺋﺞ ﻣﻌﻄﺎة ﻓﻲ‬ ‫اﻟﺠﺪول اﻟﺘﺎﻟﻰ ‪:‬‬

‫‪ri‬‬

‫‪di‬‬

‫‪ei‬‬

‫‪١٢١‬‬

‫‪yˆ i‬‬

‫‪yi‬‬

‫‪xi‬‬


‫‪- 2.9048‬‬ ‫‪- 1.9664‬‬ ‫‪- 0.3663‬‬

‫‪- 2.7463‬‬ ‫‪- 1.8591‬‬ ‫‪- 0.3498‬‬

‫‪- 30.9557‬‬ ‫‪- 20.9557‬‬ ‫‪- 3.9438‬‬

‫‪0.0981‬‬ ‫‪- 0.6385‬‬ ‫‪0.7431‬‬ ‫‪0.4647‬‬ ‫‪- 0.4500‬‬ ‫‪1.0091‬‬ ‫‪0.0083‬‬ ‫‪- 0.1735‬‬ ‫‪0.4624‬‬ ‫‪0.8248‬‬ ‫‪0.3719‬‬ ‫‪1.0042‬‬ ‫‪0.5530‬‬ ‫‪1.0053‬‬ ‫‪0.8271‬‬ ‫‪0.3752‬‬ ‫‪0.5585‬‬ ‫‪1.1930‬‬ ‫‪0.7440‬‬ ‫‪0.2889‬‬ ‫‪- 0.2573‬‬ ‫‪- 0.1659‬‬ ‫‪0.3870‬‬ ‫‪- 0.4485‬‬ ‫‪0.2087‬‬ ‫‪- 1.6140‬‬ ‫‪- 2.5775‬‬

‫‪0.0937‬‬ ‫‪- 0.6149‬‬ ‫‪0.7157‬‬ ‫‪0.4506‬‬ ‫‪- 0.4364‬‬ ‫‪0.9840‬‬ ‫‪0.0081‬‬ ‫‪- 0.1692‬‬ ‫‪0.4528‬‬ ‫‪0.8076‬‬ ‫‪0.3651‬‬ ‫‪0.9872‬‬ ‫‪0.5436‬‬ ‫‪0.9882‬‬ ‫‪0.8119‬‬ ‫‪0.3683‬‬ ‫‪0.5468‬‬ ‫‪1.1678‬‬ ‫‪0.7253‬‬ ‫‪0.2817‬‬ ‫‪- 0.2495‬‬ ‫‪- 0.1597‬‬ ‫‪0.3725‬‬ ‫‪- 0.4237‬‬ ‫‪0.1972‬‬ ‫‪- 1.4862‬‬ ‫‪- 2.3734‬‬

‫‪1.0561‬‬ ‫‪- 6.9318‬‬ ‫‪8.0681‬‬ ‫‪5.0800‬‬ ‫‪- 4.9199‬‬ ‫‪11.0919‬‬ ‫‪0.0919‬‬ ‫‪- 1.9080‬‬ ‫‪5.1039‬‬ ‫‪9.1039‬‬ ‫‪4.1158‬‬ ‫‪11.1277‬‬ ‫‪6.1277‬‬ ‫‪11.1396‬‬ ‫‪9.1516‬‬ ‫‪4.1516‬‬ ‫‪6.1635‬‬ ‫‪13.1635‬‬ ‫‪8.1754‬‬ ‫‪3.1754‬‬ ‫‪- 2.8125‬‬ ‫‪- 1.8006‬‬ ‫‪4.1993‬‬ ‫‪- 4.7767‬‬ ‫‪2.2232‬‬ ‫‪- 16.7529‬‬ ‫‪- 26.7529‬‬

‫‪70.9557‬‬ ‫‪70.9557‬‬ ‫‪78.9438‬‬ ‫‪78.9438‬‬ ‫‪86.9318‬‬ ‫‪86.9318‬‬ ‫‪94.9199‬‬ ‫‪94.91996‬‬ ‫‪102.9080‬‬ ‫‪102.9080‬‬ ‫‪102.9080‬‬ ‫‪110.8960‬‬ ‫‪110.8960‬‬ ‫‪118.8841‬‬ ‫‪126.8722‬‬ ‫‪126.8722‬‬ ‫‪134.8603‬‬ ‫‪142.8483‬‬ ‫‪142.8483‬‬ ‫‪150.8364‬‬ ‫‪150.8364‬‬ ‫‪158.8245‬‬ ‫‪158.8245‬‬ ‫‪166.8125‬‬ ‫‪174.8006‬‬ ‫‪174.8006‬‬ ‫‪190.7767‬‬ ‫‪190.7767‬‬ ‫‪206.7529‬‬ ‫‪206.7529‬‬

‫‪ -٢‬ﻧرﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ yˆ i‬واﻟﻧﺗﺎﺋﺞ ﻣﻌطﺎة ﻓﻲ ﺷﻛل)‪(٤٣-٤‬‬

‫ﺷﻛل)‪(٤٣-٤‬‬ ‫‪١٢٢‬‬

‫‪40‬‬ ‫‪50‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪80‬‬ ‫‪95‬‬ ‫‪100‬‬ ‫‪90‬‬ ‫‪114‬‬ ‫‪103‬‬ ‫‪101‬‬ ‫‪116‬‬ ‫‪120‬‬ ‫‪123‬‬ ‫‪138‬‬ ‫‪133‬‬ ‫‪146‬‬ ‫‪152‬‬ ‫‪147‬‬ ‫‪157‬‬ ‫‪164‬‬ ‫‪167‬‬ ‫‪162‬‬ ‫‪164‬‬ ‫‪173‬‬ ‫‪179‬‬ ‫‪186‬‬ ‫‪193‬‬ ‫‪190‬‬ ‫‪180‬‬

‫‪0.5‬‬ ‫‪0 .5‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1.5‬‬ ‫‪1.5‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪3‬‬ ‫‪3‬‬ ‫‪3.5‬‬ ‫‪4‬‬ ‫‪4‬‬ ‫‪4.5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5.5‬‬ ‫‪5.5‬‬ ‫‪6‬‬ ‫‪6‬‬ ‫‪6.5‬‬ ‫‪7‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪9‬‬


‫ﻣن ﻣﻼﺣظﺔ رﺳم اﻟﺑواﻗﻲ ﻓﻲ ﺷﻛل )‪ (٤٣-٤‬ﻧرى ﺑﺄﻧﮫ ﻋﻠﻰ ﺷﻛل ﻣﻧﺣﻧﻰ ‪ ‬ﻣﻣﺎ‬ ‫ﯾدل ﻋﻠﻰ أن اﻟﻧﻣوذج اﻟﺧطﻲ ﻻ ﯾﻼﺋم اﻟﺑﯾﺎﻧﺎت‪ .‬ﻧﻔس اﻟﺷﻲء ﻓﻲ ﺷﻛل)‪ (٤٤-٤‬ﻋﻧد‬ ‫رﺳم اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪ d i‬ﻣﻘﺎﺑل ‪ . yˆ i‬أﻣﺎ ﺷﻛل )‪ (٤٥-٤‬ﻓﻧﺣﺻل ﻋﻠﯾﮫ ﻋﻧد رﺳم‬ ‫ﺑواﻗﻲ ﺳﺗﯾودﻧت ﻣﻘﺎﺑل رﺳم ‪. yˆ i‬‬

‫ﺷﻛل )‪(٤٤-٤‬‬

‫ﺷﻛل )‪(٤٥-٤‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪x1={.5,.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,‬‬ ‫}‪5,5.5,5.5,6,6,6.5,7,7,8,8,9,9‬‬ ‫‪{0.5,0.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,5‬‬ ‫}‪,5.5,5.5,6,6,6.5,7,7,8,8,9,9‬‬ ‫‪y1={40,50,75,80,80,95.,100,90,114,103,101,116,120,123,138‬‬ ‫‪١٢٣‬‬


,133,146.,152,147,157,164,167,162,164,173,179,186,193,190 ,180} {40,50,75,80,80,95.,100,90,114,103,101,116,120,123,138,13 3,146.,152,147,157,164,167,162,164,173,179,186,193,190,18 0} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] sxx=c[x1,x1] 191.367 xb=h[x1]/l[x1] 4.23333 yb=h[y1]/l[y1] 130.6 b1=c[x1,y1]/c[x1,x1] 15.9761 b0=yb-b1*xb 62.9677 yy=b0+(b1*x1) {70.9558,70.9558,78.9438,78.9438,86.9319,86.9319,94.92,94 .92,102.908,102.908,102.908,110.896,110.896,118.884,126.8 72,126.872,134.86,142.848,142.848,150.836,150.836,158.825 ,158.825,166.813,174.801,174.801,190.777,190.777,206.753, 206.753} e=y1-yy {-30.9558,-20.9558,-3.94383,1.05617,6.93189,8.06811,5.08004,-4.91996,11.092,0.09197,1.90803,5.1039,9.1039,4.11583,11.1278,6.12777,11.1397,9.1 5163,4.15163,6.16356,13.1636,8.17549,3.17549,-2.81258,1.80064,4.19936,-4.77678,2.22322,-16.7529,-26.7529} t1=Transpose[{x1,y1}] {{0.5,40},{0.5,50},{1.,75},{1,80},{1.5,80},{1.5,95.},{2,1 00},{2,90},{2.5,114},{2.5,103},{2.5,101},{3,116},{3,120}, {3.5,123},{4,138},{4,133},{4.5,146.},{5,152},{5,147},{5.5 ,157},{5.5,164},{6,167},{6,162},{6.5,164},{7,173},{7,179} ,{8,186},{8,193},{9,190},{9,180}} a=PlotRange{{0,10},{30,200}} PlotRange{{0,10},{30,200}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}]

١٢٤


y 200 175 150 125 100 75 x 2

4

6

8

10

Graphics dd=Plot[b0+(b1*x),{x,30,65},AxesLabel{"x","y"}] y 1100 1000 900 800 700 x 35

40

45

50

55

60

65

Graphics Graphics n=l[x1] 30 ssto=c[y1,y1] 52401.2 ssr=c[x1,y1]^2/c[x1,x1] 48843.8 sse=ssto-ssr 3557.36 mse=sse/(n-2) 127.048  di  e  mse {-2.74636,-1.85917,-0.349891,0.0937025,0.614989,0.715792,0.450694,0.436493,0.984065,0.00815946,0.169278,0.452812,0.807686,0.365151,0.987241,0.543647,0.9 883,0.811921,0.368327,0.546823,1.16785,0.725319,0.281726, -0.249528,-0.159751,0.372561,-0.42379,0.197241,-1.4863,2.37348}

١٢٥


1 x1  xb ^2  ri  e   mse1      N n sxx {-2.90488,-1.96648,-0.366376,0.0981172,0.638529,0.743191,0.464707,-0.450064,1.00912,0.00836718,0.173587,0.462458,0.824893,0.371935,1.00427,0.553023,1.00 539,0.827116,0.37522,0.558599,1.193,0.744022,0.28899,0.257393,-0.165951,0.387022,-0.44858,0.208779,-1.61408,2.57754} pp1=Transpose[{yy,e}] {{70.9558,-30.9558},{70.9558,-20.9558},{78.9438,3.94383},{78.9438,1.05617},{86.9319,6.93189},{86.9319,8.06811},{94.92,5.08004},{94.92,4.91996},{102.908,11.092},{102.908,0.09197},{102.908,1.90803},{110.896,5.1039},{110.896,9.1039},{118.884,4.115 83},{126.872,11.1278},{126.872,6.12777},{134.86,11.1397}, {142.848,9.15163},{142.848,4.15163},{150.836,6.16356},{15 0.836,13.1636},{158.825,8.17549},{158.825,3.17549},{166.8 13,-2.81258},{174.801,1.80064},{174.801,4.19936},{190.777,4.77678},{190.777,2.22322},{206.753,-16.7529},{206.753,26.7529}} aa=PlotRange{{30,250},{-50,15}} PlotRange{{30,250},{-50,15}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp1, aa, a2, AxesLabel  "y ", "e " e 10  y

100

150

200

250

-10 -20 -30 -40 -50

Graphics pp2=Transpose[{yy,di}] {{70.9558,-2.74636},{70.9558,-1.85917},{78.9438,0.349891},{78.9438,0.0937025},{86.9319,0.614989},{86.9319,0.715792},{94.92,0.450694},{94.92,0.436493},{102.908,0.984065},{102.908,0.00815946},{102.90 8,0.169278},{110.896,0.452812},{110.896,0.807686},{118.884, 0.365151},{126.872,0.987241},{126.872,0.543647},{134.86,0 .9883},{142.848,0.811921},{142.848,0.368327},{150.836,0.5 46823},{150.836,1.16785},{158.825,0.725319},{158.825,0.28 ١٢٦


1726},{166.813,-0.249528},{174.801,0.159751},{174.801,0.372561},{190.777,0.42379},{190.777,0.197241},{206.753,-1.4863},{206.753,2.37348}} aa=PlotRange{{30,250},{-5,5}} PlotRange{{30,250},{-5,5}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp2, aa, a2, AxesLabel  "y ", "d" d 4 2  y

100

150

200

250

-2 -4

Graphics pp3=Transpose[{yy,ri}] {{70.9558,-2.90488},{70.9558,-1.96648},{78.9438,0.366376},{78.9438,0.0981172},{86.9319,0.638529},{86.9319,0.743191},{94.92,0.464707},{94.92,0.450064},{102.908,1.00912},{102.908,0.00836718},{102.908 ,0.173587},{110.896,0.462458},{110.896,0.824893},{118.884, 0.371935},{126.872,1.00427},{126.872,0.553023},{134.86,1. 00539},{142.848,0.827116},{142.848,0.37522},{150.836,0.55 8599},{150.836,1.193},{158.825,0.744022},{158.825,0.28899 },{166.813,-0.257393},{174.801,0.165951},{174.801,0.387022},{190.777,0.44858},{190.777,0.208779},{206.753,-1.61408},{206.753,2.57754}} aa=PlotRange{{30,250},{-3,3}} PlotRange{{30,250},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "r"

١٢٧


r 3 2 1  y

100

150

200

250

-1 -2 -3

Graphics def=Transpose[{x1,y1,yy,e,di,ri}] {{0.5,40,70.9558,-30.9558,-2.74636,2.90488},{0.5,50,70.9558,-20.9558,-1.85917,1.96648},{1.,75,78.9438,-3.94383,-0.349891,0.366376},{1,80,78.9438,1.05617,0.0937025,0.0981172},{1.5 ,80,86.9319,-6.93189,-0.614989,0.638529},{1.5,95.,86.9319,8.06811,0.715792,0.743191},{2, 100,94.92,5.08004,0.450694,0.464707},{2,90,94.92,4.91996,-0.436493,0.450064},{2.5,114,102.908,11.092,0.984065,1.00912},{2.5, 103,102.908,0.09197,0.00815946,0.00836718},{2.5,101,102.9 08,-1.90803,-0.169278,0.173587},{3,116,110.896,5.1039,0.452812,0.462458},{3,120 ,110.896,9.1039,0.807686,0.824893},{3.5,123,118.884,4.115 83,0.365151,0.371935},{4,138,126.872,11.1278,0.987241,1.0 0427},{4,133,126.872,6.12777,0.543647,0.553023},{4.5,146. ,134.86,11.1397,0.9883,1.00539},{5,152,142.848,9.15163,0. 811921,0.827116},{5,147,142.848,4.15163,0.368327,0.37522} ,{5.5,157,150.836,6.16356,0.546823,0.558599},{5.5,164,150 .836,13.1636,1.16785,1.193},{6,167,158.825,8.17549,0.7253 19,0.744022},{6,162,158.825,3.17549,0.281726,0.28899},{6. 5,164,166.813,-2.81258,-0.249528,0.257393},{7,173,174.801,-1.80064,-0.159751,0.165951},{7,179,174.801,4.19936,0.372561,0.387022},{8,18 6,190.777,-4.77678,-0.42379,0.44858},{8,193,190.777,2.22322,0.197241,0.208779},{9,190 ,206.753,-16.7529,-1.4863,-1.61408},{9,180,206.753,26.7529,-2.37348,-2.57754}} TableForm[def]

١٢٨


‫‪2.90488‬‬ ‫‪1.96648‬‬ ‫‪0.366376‬‬

‫‪2.74636‬‬ ‫‪1.85917‬‬ ‫‪0.349891‬‬

‫‪30.9558‬‬ ‫‪20.9558‬‬ ‫‪3.94383‬‬

‫‪0.0981172‬‬ ‫‪0.638529‬‬ ‫‪0.743191‬‬ ‫‪0.464707‬‬ ‫‪0.450064‬‬ ‫‪1.00912‬‬ ‫‪0.00836718‬‬ ‫‪0.173587‬‬ ‫‪0.462458‬‬ ‫‪0.824893‬‬ ‫‪0.371935‬‬ ‫‪1.00427‬‬ ‫‪0.553023‬‬ ‫‪1.00539‬‬ ‫‪0.827116‬‬ ‫‪0.37522‬‬ ‫‪0.558599‬‬ ‫‪1.193‬‬ ‫‪0.744022‬‬ ‫‪0.28899‬‬ ‫‪0.257393‬‬ ‫‪0.165951‬‬ ‫‪0.387022‬‬ ‫‪0.44858‬‬ ‫‪0.208779‬‬ ‫‪1.61408‬‬ ‫‪2.57754‬‬

‫‪0.0937025‬‬ ‫‪0.614989‬‬ ‫‪0.715792‬‬ ‫‪0.450694‬‬ ‫‪0.436493‬‬ ‫‪0.984065‬‬ ‫‪0.00815946‬‬ ‫‪0.169278‬‬ ‫‪0.452812‬‬ ‫‪0.807686‬‬ ‫‪0.365151‬‬ ‫‪0.987241‬‬ ‫‪0.543647‬‬ ‫‪0.9883‬‬ ‫‪0.811921‬‬ ‫‪0.368327‬‬ ‫‪0.546823‬‬ ‫‪1.16785‬‬ ‫‪0.725319‬‬ ‫‪0.281726‬‬ ‫‪0.249528‬‬ ‫‪0.159751‬‬ ‫‪0.372561‬‬ ‫‪0.42379‬‬ ‫‪0.197241‬‬ ‫‪1.4863‬‬ ‫‪2.37348‬‬

‫‪1.05617‬‬ ‫‪6.93189‬‬ ‫‪8.06811‬‬ ‫‪5.08004‬‬ ‫‪4.91996‬‬ ‫‪11.092‬‬ ‫‪0.09197‬‬ ‫‪1.90803‬‬ ‫‪5.1039‬‬ ‫‪9.1039‬‬ ‫‪4.11583‬‬ ‫‪11.1278‬‬ ‫‪6.12777‬‬ ‫‪11.1397‬‬ ‫‪9.15163‬‬ ‫‪4.15163‬‬ ‫‪6.16356‬‬ ‫‪13.1636‬‬ ‫‪8.17549‬‬ ‫‪3.17549‬‬ ‫‪2.81258‬‬ ‫‪1.80064‬‬ ‫‪4.19936‬‬ ‫‪4.77678‬‬ ‫‪2.22322‬‬ ‫‪16.7529‬‬ ‫‪26.7529‬‬

‫‪70.9558‬‬ ‫‪70.9558‬‬ ‫‪78.9438‬‬ ‫‪78.9438‬‬ ‫‪86.9319‬‬ ‫‪86.9319‬‬ ‫‪94.92‬‬ ‫‪94.92‬‬ ‫‪102.908‬‬ ‫‪102.908‬‬ ‫‪102.908‬‬ ‫‪110.896‬‬ ‫‪110.896‬‬ ‫‪118.884‬‬ ‫‪126.872‬‬ ‫‪126.872‬‬ ‫‪134.86‬‬ ‫‪142.848‬‬ ‫‪142.848‬‬ ‫‪150.836‬‬ ‫‪150.836‬‬ ‫‪158.825‬‬ ‫‪158.825‬‬ ‫‪166.813‬‬ ‫‪174.801‬‬ ‫‪174.801‬‬ ‫‪190.777‬‬ ‫‪190.777‬‬ ‫‪206.753‬‬ ‫‪206.753‬‬

‫‪40‬‬ ‫‪50‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪80‬‬ ‫‪95.‬‬ ‫‪100‬‬ ‫‪90‬‬ ‫‪114‬‬ ‫‪103‬‬ ‫‪101‬‬ ‫‪116‬‬ ‫‪120‬‬ ‫‪123‬‬ ‫‪138‬‬ ‫‪133‬‬ ‫‪146.‬‬ ‫‪152‬‬ ‫‪147‬‬ ‫‪157‬‬ ‫‪164‬‬ ‫‪167‬‬ ‫‪162‬‬ ‫‪164‬‬ ‫‪173‬‬ ‫‪179‬‬ ‫‪186‬‬ ‫‪193‬‬ ‫‪190‬‬ ‫‪180‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪ y1 .‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‪x1‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬ ‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر اﻟﻣوﺿﺢ ﻓﻲ ﺷﻛل)‪ (٤٢-٤‬ﻣﻌطﻰ ﻣن اﻻﻣر‬ ‫]}"‪g= ListPlot[t1,a,a1,AxesLabel{"x","y‬‬

‫ﻣﻌﺎدﻟﺔ ﺧط اﻻﻧﺣدار اﻟﻣﻘدرة‬ ‫‪y  62.9677  15.9761x‬‬

‫ﺣﯾث‬

‫‪b 0  62.9677‬‬

‫‪١٢٩‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫‪0.5‬‬ ‫‪0.5‬‬ ‫‪1.‬‬ ‫‪1‬‬ ‫‪1.5‬‬ ‫‪1.5‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪3‬‬ ‫‪3‬‬ ‫‪3.5‬‬ ‫‪4‬‬ ‫‪4‬‬ ‫‪4.5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5.5‬‬ ‫‪5.5‬‬ ‫‪6‬‬ ‫‪6‬‬ ‫‪6.5‬‬ ‫‪7‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪9‬‬


‫‪b0=yb-b1*xb‬‬

‫و ‪ x b1  15.9761‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫]‪TableForm[def‬‬

‫رﺳم ‪ ei‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlotpp1, aa, a2, AxesLabel  "y‬‬ ‫‪", "e "‬‬

‫رﺳم ‪ d i‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlotpp2, aa, a2, AxesLabel  "y‬‬ ‫‪", "d"‬‬

‫رﺳم‬

‫‪ri‬‬

‫ﻣﻘﺎﺑل ‪ yˆ i‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪‬‬ ‫‪g  ListPlotpp3, aa, a2, AxesLabel  "y‬‬ ‫‪", "r"‬‬

‫ﻣﺛﺎل)‪(٢٨-٤‬‬

‫ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق وﺑﻣﺎ أن ھﻧﺎك ﺗﻛرار ﻟﻘﯾم ‪ x‬ﻓﺈﻧﮫ ﯾﻣﻛن ﻋﻣل اﺧﺗﺑﺎر ﻟﻧﻘص اﻟﺗوﻓﯾق‬ ‫ﻛﻣﺎ ﯾﻠﻲ ‪ :‬ﯾﺗم ﺣﺳﺎب ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ﻣن اﻟﺟدول اﻟﺗﺎﻟﻰ ‪.‬‬

‫درﺟﺎت اﻟﺤﺮﯾﺔ‬

‫ﻣﺠﻤﻮع ﻣﺮﺑﻌﺎت‬ ‫اﻟﺨﻄﺄ اﻟﺨﺎﻟﺺ‬

‫‪x‬‬

‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬

‫‪50‬‬ ‫‪12.5‬‬ ‫‪112.5‬‬ ‫‪50‬‬

‫‪0.5‬‬ ‫‪1‬‬ ‫‪1.5‬‬ ‫‪2‬‬

‫‪١٣٠‬‬


‫‪98‬‬ ‫‪8‬‬ ‫‪0‬‬ ‫‪12.5‬‬ ‫‪0‬‬ ‫‪12.5‬‬ ‫‪24.5‬‬ ‫‪12.5‬‬ ‫‪0‬‬ ‫‪18‬‬ ‫‪24.5‬‬ ‫‪50‬‬ ‫‪485.5‬‬

‫‪2‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪14‬‬

‫‪2.5‬‬ ‫‪3‬‬ ‫‪3.5‬‬ ‫‪4‬‬ ‫‪4.5‬‬ ‫‪5‬‬ ‫‪5.5‬‬ ‫‪6‬‬ ‫‪6.5‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪9‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪F‬‬

‫‪MS‬‬

‫‪SS‬‬

‫‪df‬‬

‫‪S.O.V.‬‬

‫‪384.45‬‬

‫‪48843.8‬‬

‫‪48843.8‬‬

‫‪1‬‬

‫اﻻﻧﺣدار‬

‫‪--‬‬

‫‪127.048‬‬

‫‪3557.36‬‬

‫‪28‬‬

‫اﻟﺧطﺄ‬

‫‪6.327‬‬

‫‪219.418‬‬

‫‪3071.86‬‬

‫‪14‬‬

‫ﻗﺻور اﻟﺗوﻓﯾق‬

‫‪34.6786‬‬

‫‪485.5‬‬

‫‪14‬‬

‫اﻟﺧطﺄ اﻟﺧﺎﻟص‬

‫وﺑﻣﺎ أن ﻗﯾﻣﻪ ‪ F‬اﻟﻣﺣﺳوﺑﺔ ﻟﻧﻘص اﻟﻣطﺎﺑﻘﺔ )‪ (6.327‬أﻛﺑر ﻣن اﻟﻘﯾﻣﺔ ‪ F‬اﻟﺟدوﻟﯾﺔ‬ ‫‪ F.05 [14,14]  2.53‬ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪   0.05‬ﻟذا ﻓﺈن اﻟﻧﻣوذج اﻟﺧطﻲ ﻻ‬

‫ﯾﻼﺋم اﻟﺑﯾﺎﻧﺎت ﺑل أن ﻫﻧﺎك ﻣﻌﺎدﻟﺔ أﺧرى ﻗد ﺗﻼﺋم اﻟﺑﯾﺎﻧﺎت واﻟذى ﯾﺗﺿﺢ ﻣن ﺧﻼل‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر )‪. (٤٢-٤‬‬

‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪١٣١‬‬


x={.5,.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,5 ,5.5,5.5,6,6,6.5,7,7,8,8,9,9} {0.5,0.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,5 ,5.5,5.5,6,6,6.5,7,7,8,8,9,9} y={40.,50.,75,80,80,95.,100,90,114,103,101,116,120,123,13 8,133,146.,152,147,157,164,167,162,164,173,179,186,193,19 0,180} {40.,50.,75,80,80,95.,100,90,114,103,101,116,120,123,138, 133,146.,152,147,157,164,167,162,164,173,179,186,193,190, 180} yy={{40.,50},{75.,80},{80,95},{100,90},{114,103,101},{116 ,120},{123},{138,133},{146},{152,147},{157,164},{167,162} ,{164},{173,179},{186,193},{190,180}} {{40.,50},{75.,80},{80,95},{100,90},{114,103,101},{116,12 0},{123},{138,133},{146},{152,147},{157,164},{167,162},{1 64},{173,179},{186,193},{190,180}} a[x_]:=Length[x] z[x_]:=Apply[Plus,x]

zx2 cx_ : zx^2  ax h=Map[c,yy]

225 , 50, 98, 8, 0, 2 25 25 49 25 49 , 0, , , , 0, 18, , 50 2 2 2 2 2

50., 12.5,

ssp=z[h] 485.5 q=Map[a,yy] {2,2,2,2,3,2,1,2,1,2,2,2,1,2,2,2} qq=q-1 {1,1,1,1,2,1,0,1,0,1,1,1,0,1,1,1} ne=z[qq] 14

s2e 

ssp ne

34.6786 tx=Table[{1,x[[i]]},{i,1,a[x]}] {{1,0.5},{1,0.5},{1,1.},{1,1},{1,1.5},{1,1.5},{1,2},{1,2} ,{1,2.5},{1,2.5},{1,2.5},{1,3},{1,3},{1,3.5},{1,4},{1,4},

١٣٢


{1,4.5},{1,5},{1,5},{1,5.5},{1,5.5},{1,6},{1,6},{1,6.5},{ 1,7},{1,7},{1,8},{1,8},{1,9},{1,9}} a[tx] 30 u=Transpose[tx] {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1},{0.5,0.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4 .5,5,5,5.5,5.5,6,6,6.5,7,7,8,8,9,9}} t1=u.y {3918.,19643.5} t2=Inverse[u.tx] {{0.126981,-0.0221216},{-0.0221216,0.00522557}} b=t1.t2 {62.9677,15.9761} b0=b[[1]] 62.9677 b1=b[[2]] 15.9761 yb=b0+b1*x {70.9558,70.9558,78.9438,78.9438,86.9319,86.9319,94.92,94 .92,102.908,102.908,102.908,110.896,110.896,118.884,126.8 72,126.872,134.86,142.848,142.848,150.836,150.836,158.825 ,158.825,166.813,174.801,174.801,190.777,190.777,206.753, 206.753} e=y-yb {-30.9558,-20.9558,-3.94383,1.05617,6.93189,8.06811,5.08004,-4.91996,11.092,0.09197,1.90803,5.1039,9.1039,4.11583,11.1278,6.12777,11.1397,9.1 5163,4.15163,6.16356,13.1636,8.17549,3.17549,-2.81258,1.80064,4.19936,-4.77678,2.22322,-16.7529,-26.7529} sse=e.e 3557.36 ssto=c[y] 52401.2 ssl=sse-ssp 3071.86 ssr=ssto-sse 48843.8 dsr=1 1 n=a[x] 30 dse=n-2 28 dst=n-1 29 nl=dse-ne 14

١٣٣


msr 

ssr dsr

48843.8

mse 

sse dse

127.048

f

msr mse

384.45

msl 

ssl nl

219.418

ff 

msl s2e

6.3272

ww=Transpose[{x,y}] {{0.5,40.},{0.5,50.},{1.,75},{1,80},{1.5,80},{1.5,95.},{2 ,100},{2,90},{2.5,114},{2.5,103},{2.5,101},{3,116},{3,120 },{3.5,123},{4,138},{4,133},{4.5,146.},{5,152},{5,147},{5 .5,157},{5.5,164},{6,167},{6,162},{6.5,164},{7,173},{7,17 9},{8,186},{8,193},{9,190},{9,180}} ww1=PlotRange{{0,10},{30,200}} PlotRange{{0,10},{30,200}} ww2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} ww3=ListPlot[ww,ww1,ww2] 200 175 150 125 100 75 2

4

6

8

10

Graphics

th=TableHeadings{{soruse,redession,residual,ftt,total},{ anova}} ١٣٤


TableHeadings{{soruse,redession,residual,ftt,total},{ano va}} tr1={"df","ss","ms","f"} {df,ss,ms,f} tr2={dsr,ssr,msr,f} {1,48843.8,48843.8,384.45} tr3={dse,sse,mse,"---"} {28,3557.36,127.048,---} tr4={nl,ssl,msl,ff} {14,3071.86,219.418,6.3272} tr5={ne,ssp,s2e,"---"} {14,485.5,34.6786,---} TableForm[{tr1,tr2,tr3,tr4,tr5},th]

soruse redession residual ftt total

anova df 1 28 14 14

ss 48843.8 3557.36 3071.86 485.5

ms 48843.8 127.048 219.418 34.6786

f 384.45 

6.3272 

<<Statistics`ContinuousDistributions` =0.05; ff1=Quantile[FRatioDistribution[nl,ne],1-] 2.48373 If[ff>ff1,Print["RjectHo"],Print["AccpetHo"]] RjectHo ff2=Quantile[FRatioDistribution[dsr,dse],1-] 4.19597 If[f>ff2,Print["RjectHo"],Print["AccpetHo"]] RjectHo

(٢٩-٤)‫ﻣﺛﺎل‬ : x   x ‫ ﺣﯾث‬x ‫اﻻن ﯾﻣﻛن اﻟﻣﺣﺎوﻟﺔ ﻣﻊ ﺗﺣوﯾﻠﺔ ﻋﻠﻰ‬ : ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳﺗﺻﺑﺢ‬

y  b0  b1x 

١٣٥


‫وﻣن اﻟﺟدول اﻟﺗﺎﻟﻰ ﯾﺗم ﺣﺳﺎب ﻛل ﻣن ‪:‬‬

‫‪x , y, x  2 , x y‬‬

‫‪x y‬‬

‫‪x 2‬‬

‫‪x‬‬

‫‪x‬‬

‫‪١٣٦‬‬

‫‪y‬‬


‫‪28.2842‬‬ ‫‪35.3553‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪97.9795‬‬ ‫‪116.3507‬‬ ‫‪141.4213‬‬ ‫‪127.2792‬‬ ‫‪180.2498‬‬ ‫‪162.8572‬‬ ‫‪159.6950‬‬ ‫‪200.9178‬‬ ‫‪207.8460‬‬ ‫‪230.1119‬‬ ‫‪276‬‬ ‫‪266‬‬ ‫‪309.7127‬‬ ‫‪339.8823‬‬ ‫‪328.7019‬‬ ‫‪368.1976‬‬ ‫‪384.6140‬‬ ‫‪409.0647‬‬ ‫‪396.8173‬‬ ‫‪418.1196‬‬ ‫‪457.7149‬‬ ‫‪473.5894‬‬ ‫‪526.0874‬‬ ‫‪545.8864‬‬ ‫‪570‬‬ ‫‪540‬‬

‫‪0.7071‬‬ ‫‪0.7071‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1.2247‬‬ ‫‪1.2247‬‬ ‫‪1.4142‬‬ ‫‪1.4142‬‬ ‫‪1.5811‬‬ ‫‪1.5811‬‬ ‫‪1.5811‬‬ ‫‪1.7320‬‬ ‫‪1.7320‬‬ ‫‪1.8708‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2.1213‬‬ ‫‪2.2360‬‬ ‫‪2.2360‬‬ ‫‪2.3452‬‬ ‫‪2.3452‬‬ ‫‪2.4494‬‬ ‫‪2.4494‬‬ ‫‪2.5495‬‬ ‫‪2.6457‬‬ ‫‪2.6457‬‬ ‫‪2.8284‬‬ ‫‪2.8284‬‬ ‫‪3‬‬ ‫‪3‬‬

‫‪0.5000‬‬ ‫‪0.5000‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1.4999‬‬ ‫‪1.4999‬‬ ‫‪2.0000‬‬ ‫‪2.0000‬‬ ‫‪2.5000‬‬ ‫‪2.5000‬‬ ‫‪2.5000‬‬ ‫‪2.9999‬‬ ‫‪2.9999‬‬ ‫‪3.5‬‬ ‫‪4‬‬ ‫‪4‬‬ ‫‪4.4999‬‬ ‫‪5.0000‬‬ ‫‪5.0000‬‬ ‫‪5.5‬‬ ‫‪5.5‬‬ ‫‪5.9999‬‬ ‫‪5.9999‬‬ ‫‪6.4999‬‬ ‫‪7.0000‬‬ ‫‪7.0000‬‬ ‫‪8.0000‬‬ ‫‪8.0000‬‬ ‫‪9‬‬ ‫‪9‬‬

‫ﻻزواج اﻟﻘﯾم )‪ ( x , y‬ﻓﺈن ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪.(٤٦-٤‬‬

‫‪١٣٧‬‬

‫‪40‬‬ ‫‪50‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪80‬‬ ‫‪95‬‬ ‫‪100‬‬ ‫‪90‬‬ ‫‪114‬‬ ‫‪103‬‬ ‫‪101‬‬ ‫‪116‬‬ ‫‪120‬‬ ‫‪123‬‬ ‫‪138‬‬ ‫‪133‬‬ ‫‪146‬‬ ‫‪152‬‬ ‫‪147‬‬ ‫‪157‬‬ ‫‪164‬‬ ‫‪167‬‬ ‫‪162‬‬ ‫‪164‬‬ ‫‪173‬‬ ‫‪179‬‬ ‫‪186‬‬ ‫‪193‬‬ ‫‪190‬‬ ‫‪180‬‬

‫‪0.5‬‬ ‫‪0.5‬‬

‫‪1.5‬‬ ‫‪1.5‬‬

‫‪2.5‬‬ ‫‪2.5‬‬ ‫‪2.5‬‬

‫‪3.5‬‬

‫‪4.5‬‬

‫‪5.5‬‬ ‫‪5.5‬‬

‫‪6.5‬‬


‫ﺷﻛل )‪(٤٦-٤‬‬ ‫اﻵن ﯾﺗم ﺣﺳﺎب اﻟﻘﯾم اﻟﺗﺎﻟﯾﺔ واﻟﻼزﻣﺔ ﻹﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة‪:‬‬ ‫‪SXY  820 .011 ,‬‬ ‫‪SXX  13 .1153 ,‬‬

‫‪SXY 820.011‬‬ ‫‪‬‬ ‫‪ 62.5235 ,‬‬ ‫‪SXX 13.1153‬‬ ‫‪.‬‬

‫‪b1 ‬‬

‫‪b 0  y  b1x  130.6  (62.5235)( 1.94837)  8.78096‬‬

‫ﻣﻌﺎدﻟﺔ اﻟﺧط اﻟﻣﺳﺗﻘﯾم اﻟﻣﻘدرة ھﻲ ‪:‬‬ ‫‪yˆ  8.78096  62 .5235 x ‬‬

‫واﻟﻣﻣﺛﻠﮫ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل )‪ (٤٧-٤‬ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻟﻠﺑﯾﺎﻧﺎت اﻷﺻﻠﯾﮫ‪.‬‬ ‫واﻟﺗﻲ ﺗﺻﺑﺢ ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬

‫‪yˆ  8.78096  62.5235 x‬‬

‫‪١٣٨‬‬


‫ﺷﻛل )‪(٤٧-٤‬‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻟﻠﺑﯾﺎﻧﺎت اﻟﻣﺣوﻟﺔ ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬

‫‪F‬‬

‫‪MS‬‬

‫‪SS‬‬

‫‪df‬‬

‫‪S.O.V‬‬

‫‪1269‬‬

‫‪51270‬‬

‫‪51270‬‬

‫‪1‬‬

‫اﻻﻧﺣدار‬

‫‪--‬‬

‫‪40.4017‬‬

‫‪1131.25‬‬

‫‪28‬‬

‫اﻟﺧطﺄ‬

‫‪--‬‬

‫‪--‬‬

‫‪52401.2‬‬

‫‪29‬‬

‫اﻟﻛﻠﻲ‬

‫ﺑﻣﺎ أن ﻗﯾﻣﺔ ‪ F‬اﻟﻣﺣﺳوﺑﮫ ﺗزﯾد ﻋن ﻗﯾﻣﺔ ‪ F‬اﻟﺟدوﻟﯾﮫ ‪ F.05 (1,28)  4.2‬ﻓﺈﻧﻧﺎ ﻧرﻓض‬ ‫ﻓرض اﻟﻌدم ‪ . H 0 : 1  0‬اﻟﺑواﻗﻲ ‪ ei‬واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪ d i‬وﺑواﻗﻲ ﺳﺗﯾودﻧت‬ ‫‪ ri‬ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪١٣٩‬‬


yi

yˆi

ei

di

ri

xi 0.707107 0.707107

1.22474 1.22474 1.41421 1.41421 1.58114 1.58114 1.58114 1.73205 1.73205 1.87083

2.12132 2.23607 2.23607 2.34521 2.34521 2.44949 2.44949 2.54951 2.64575 2.64575 2.82843 2.82843

40. 50 75 80 80 95 100 90 114 103 101 116 120 123 138 133 146 152 147 157 164 167 162 164 173 179 186 193 190 180

52.9917 52.9917 71.3044 71.3044 85.3563 85.3563 97.2025 97.2025 107.639 107.639 107.639 117.075 117.075 125.752 133.828 133.828 141.413 148.588 148.588 155.411 155.411 161.932 161.932 168.185 174.202 174.202 185.624 185.624 196.351 196.351

12.9917 2.99173

2.04393 0.470676

2.21801 0.510763

3.69558 8.69558 5.35625 9.64375 2.79751 7.20249 6.36076 4.63924 6.63924 1.07478 2.92522 2.75165 4.17211 0.827888 4.58674 3.41233 1.58767 1.58852 8.58852 5.06846 0.0684572 4.18514 1.2025 4.7975 0.37598 7.37598 6.35135 16.3514

0.581409 1.36804 0.842677 1.51721 0.44012 1.13314 1.00071 0.729872 1.04452 0.16909 0.460213 0.432906 0.656381 0.130248 0.721613 0.536847 0.249782 0.249915 1.3512 0.797399 0.0107701 0.658431 0.189184 0.754771 0.0591513 1.16043 0.999231 2.57249

0.613511 1.44357 0.87535 1.57604 0.452768 1.1657 1.02328 0.746329 1.06808 0.172299 0.468947 0.440411 0.667672 0.132489 0.734817 0.547815 0.254886 0.255781 1.38291 0.819184 0.0110643 0.67944 0.196218 0.782836 0.0620889 1.21806 1.06377 2.73864

(٤٨-٤) ‫ ﻣﻌطﺎة ﻓﻲ ﺷﻛل‬yˆ i ‫ ﻣﻘﺎﺑل‬ei ‫رﺳم اﻟﺑواﻗﻲ‬

١٤٠


‫ﺷﻛل )‪(٤٨-٤‬‬ ‫أﯾﺿﺎ رﺳم اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪ d i‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣﻌطﻰ ﻓﻲ ﺷﻛل)‪. (٤٩-٤‬‬

‫ﺷﻛل)‪(٤٩-٤‬‬ ‫وأﺧﯾرا رﺳم ﺑواﻗﻲ ﺳﺗﯾودﻧت ‪ ri‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣﻌطﻰ ﻓﻲ ﺷﻛل)‪(٥٠-٤‬‬

‫ﺷﻛل)‪(٥٠-٤‬‬ ‫ﯾﺗﺿﺢ ﻣن ﺷﻛل)‪ (٤٨-٤٥‬ﺷﻛل )‪ (٤٩-٤‬وﺷﻛل )‪ (٥٠-٤‬أن اﻟﻧﻘﺎط ﺗﺗوزع ﺗوزﻋﺎ ً‬ ‫ﻋﺷواﺋﯾﺎ ً ﺣول اﻟﺻﻔر ﻣﻣﺎ ﯾدل ﻋﻠﻰ أن اﻟﻧﻣوذج اﻟﻣﺣول أﻛﺛر ﻣﻼءﻣﺔ ﻣن اﻟﻧﻣوذج‬ ‫‪١٤١‬‬


‫‪2‬‬ ‫اﻷول ‪ .‬وﻣﻣﺎ ﯾؤﻛد ذﻟك أﯾﺿﺎ أن ‪ R‬ﻟﻠﻧﻣوذج‬

‫‪ 51270‬‬ ‫‪‬‬ ‫اﻟﺛﺎﻧﻲ ‪ .979 ‬‬ ‫‪‬‬ ‫‪ 52401 .2‬‬ ‫‪‬‬

‫أﻛﺑر ﻣن‬

‫‪ 48843.8‬‬ ‫‪‬‬ ‫‪ R 2‬ﻟﻠﻧﻣوذج اﻷول ‪ 0.932 ‬‬ ‫‪ ‬وان ‪ MSE‬ﻟﻠﻧﻣوذج اﻟﺛﺎﻧﻲ أﺻﻐر‬ ‫‪ 52401.16‬‬ ‫‪‬‬ ‫ﻣن ﻗﯾﻣﺗﮫ ﻓﻲ اﻟﻧﻣوذج اﻷول وﻋﻠﯾﮫ ﻓﺈن اﻟﺗﺣوﯾﻠﺔ ‪ x   x‬ﻣﻧﺎﺳﺑﺔ ‪.‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪xx={.5,.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,‬‬ ‫}‪5,5.5,5.5,6,6,6.5,7,7,8,8,9,9‬‬ ‫‪{0.5,0.5,1.,1,1.5,1.5,2,2,2.5,2.5,2.5,3,3,3.5,4,4,4.5,5,5‬‬ ‫}‪,5.5,5.5,6,6,6.5,7,7,8,8,9,9‬‬ ‫‪y1={40,50,75,80,80,95.,100,90,114,103,101,116,120,123,138‬‬ ‫‪,133,146.,152,147,157,164,167,162,164,173,179,186,193,190‬‬ ‫}‪,180‬‬ ‫‪{40,50,75,80,80,95.,100,90,114,103,101,116,120,123,138,13‬‬ ‫‪3,146.,152,147,157,164,167,162,164,173,179,186,193,190,18‬‬ ‫}‪0‬‬ ‫‪‬‬ ‫‪x1  N xx   N‬‬ ‫‪{0.707107,0.707107,1.,1.,1.22474,1.22474,1.41421,1.41421,‬‬ ‫‪1.58114,1.58114,1.58114,1.73205,1.73205,1.87083,2.,2.,2.1‬‬ ‫‪2132,2.23607,2.23607,2.34521,2.34521,2.44949,2.44949,2.54‬‬ ‫}‪951,2.64575,2.64575,2.82843,2.82843,3.,3.‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪sxx=c[x1,x1‬‬ ‫‪13.1153‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪1.94837‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪130.6‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪62.5235‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪8.78096‬‬ ‫)‪yy=b0+(b1*x1‬‬ ‫‪{52.9917,52.9917,71.3044,71.3044,85.3563,85.3563,97.2025,‬‬ ‫‪١٤٢‬‬


97.2025,107.639,107.639,107.639,117.075,117.075,125.752,1 33.828,133.828,141.413,148.588,148.588,155.411,155.411,16 1.932,161.932,168.185,174.202,174.202,185.624,185.624,196 .351,196.351} e=y1-yy {-12.9917,-2.99173,3.69558,8.69558,5.35625,9.64375,2.79751,-7.20249,6.36076,-4.63924,6.63924,-1.07478,2.92522,-2.75165,4.17211,0.827888,4.58674,3.41233,1.58767,1.58852,8.58852,5.06846,0.0684572,-4.18514,1.2025,4.7975,0.37598,7.37598,-6.35135,-16.3514} t1=Transpose[{x1,y1}] {{0.707107,40},{0.707107,50},{1.,75},{1.,80},{1.22474,80} ,{1.22474,95.},{1.41421,100},{1.41421,90},{1.58114,114},{ 1.58114,103},{1.58114,101},{1.73205,116},{1.73205,120},{1 .87083,123},{2.,138},{2.,133},{2.12132,146.},{2.23607,152 },{2.23607,147},{2.34521,157},{2.34521,164},{2.44949,167} ,{2.44949,162},{2.54951,164},{2.64575,173},{2.64575,179}, {2.82843,186},{2.82843,193},{3.,190},{3.,180}} a=PlotRange{{0,4},{0,200}} PlotRange{{0,4},{0,200}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}] y 200 175 150 125 100 75 50 25 x 0.5

1

1.5

2

2.5

3

3.5

4

Graphics dd=Plot[b0+(b1*x),{x,0,8},AxesLabel{"x","y"}]

١٤٣


y 500 400 300 200 100 x 2

4

6

8

Graphics n=l[x1] 30 ssto=c[y1,y1] 52401.2 ssr=c[x1,y1]^2/c[x1,x1] 51270. sse=ssto-ssr 1131.25 mse=sse/(n-2) 40.4017  di  e  mse {-2.04393,-0.470676,0.581409,1.36804,0.842677,1.51721,0.44012,-1.13314,1.00071,-0.729872,1.04452,-0.16909,0.460213,-0.432906,0.656381,0.130248,0.721613,0.536847,0.249782,0.249915,1.3512,0.797399,0.0107701,-0.658431,0.189184,0.754771,0.0591513,1.16043,-0.999231,-2.57249}

1 x1  xb ^2  ri  e   mse1      N n sxx {-2.21801,-0.510763,0.613511,1.44357,0.87535,1.57604,0.452768,-1.1657,1.02328,-0.746329,1.06808,-0.172299,0.468947,-0.440411,0.667672,0.132489,0.734817,0.547815,0.254886,0.255781,1.38291,0.819184,0.0110643,-0.67944,0.196218,0.782836,0.0620889,1.21806,-1.06377,-2.73864} pp1=Transpose[{yy,e}] {{52.9917,-12.9917},{52.9917,2.99173},{71.3044,3.69558},{71.3044,8.69558},{85.3563,5.35625},{85.3563,9.64375},{97.2025,2.79751},{97.2025,7.20249},{107.639,6.36076},{107.639,-4.63924},{107.639,6.63924},{117.075,-1.07478},{117.075,2.92522},{125.752,2.75165},{133.828,4.17211},{133.828,0.827888},{141.413,4.58674},{148.588,3.41233},{148.588,1.58767},{155.411,1.58852},{155.411,8.58852},{161.932,5.0 6846},{161.932,0.0684572},{168.185,-4.18514},{174.202,١٤٤


1.2025},{174.202,4.7975},{185.624,0.37598},{185.624,7.375 98},{196.351,-6.35135},{196.351,-16.3514}} aa=PlotRange{{30,250},{-50,15}} PlotRange{{30,250},{-50,15}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp1, aa, a2, AxesLabel  "y ", "e " e 10  y

100

150

200

250

-10 -20 -30 -40 -50

Graphics pp2=Transpose[{yy,di}] {{52.9917,-2.04393},{52.9917,0.470676},{71.3044,0.581409},{71.3044,1.36804},{85.3563,0.842677},{85.3563,1.51721},{97.2025,0.44012},{97.2025,1.13314},{107.639,1.00071},{107.639,-0.729872},{107.639,1.04452},{117.075,-0.16909},{117.075,0.460213},{125.752,0.432906},{133.828,0.656381},{133.828,0.130248},{141.413,0.721613},{148.588,0.536847},{148.588, 0.249782},{155.411,0.249915},{155.411,1.3512},{161.932,0. 797399},{161.932,0.0107701},{168.185,0.658431},{174.202,0.189184},{174.202,0.754771},{185.624,0.0591513},{185.624 ,1.16043},{196.351,-0.999231},{196.351,-2.57249}} aa=PlotRange{{30,250},{-5,5}} PlotRange{{30,250},{-5,5}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp2, aa, a2, AxesLabel  "y ", "d"

١٤٥


d 4 2  y

100

150

200

250

-2 -4

Graphics pp3=Transpose[{yy,ri}] {{52.9917,-2.21801},{52.9917,0.510763},{71.3044,0.613511},{71.3044,1.44357},{85.3563,0.87535},{85.3563,1.57604},{97.2025,0.452768},{97.2025,1.1657},{107.639,1.02328},{107.639,-0.746329},{107.639,1.06808},{117.075,0.172299},{117.075,0.468947},{125.752,0.440411},{133.828,0.667672},{133.828,0.132489},{141.413,0.734817},{148.588,0.547815},{148.588, 0.254886},{155.411,0.255781},{155.411,1.38291},{161.932,0 .819184},{161.932,0.0110643},{168.185,0.67944},{174.202,0.196218},{174.202,0.782836},{185.624,0.0620889},{185.624 ,1.21806},{196.351,-1.06377},{196.351,-2.73864}} aa=PlotRange{{30,250},{-3,3}} PlotRange{{30,250},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "r" r 3 2 1  y

100

150

200

-1 -2 -3

Graphics def=Transpose[{x1,y1,yy,e,di,ri}]

١٤٦

250


{{0.707107,40,52.9917,-12.9917,-2.04393,2.21801},{0.707107,50,52.9917,-2.99173,-0.470676,0.510763},{1.,75,71.3044,3.69558,0.581409,0.613511},{1.,8 0,71.3044,8.69558,1.36804,1.44357},{1.22474,80,85.3563,5.35625,-0.842677,0.87535},{1.22474,95.,85.3563,9.64375,1.51721,1.57604},{1 .41421,100,97.2025,2.79751,0.44012,0.452768},{1.41421,90, 97.2025,-7.20249,-1.13314,1.1657},{1.58114,114,107.639,6.36076,1.00071,1.02328},{1. 58114,103,107.639,-4.63924,-0.729872,0.746329},{1.58114,101,107.639,-6.63924,-1.04452,1.06808},{1.73205,116,117.075,-1.07478,-0.16909,0.172299},{1.73205,120,117.075,2.92522,0.460213,0.468947} ,{1.87083,123,125.752,-2.75165,-0.432906,0.440411},{2.,138,133.828,4.17211,0.656381,0.667672},{2., 133,133.828,-0.827888,-0.130248,0.132489},{2.12132,146.,141.413,4.58674,0.721613,0.734817 },{2.23607,152,148.588,3.41233,0.536847,0.547815},{2.2360 7,147,148.588,-1.58767,-0.249782,0.254886},{2.34521,157,155.411,1.58852,0.249915,0.255781} ,{2.34521,164,155.411,8.58852,1.3512,1.38291},{2.44949,16 7,161.932,5.06846,0.797399,0.819184},{2.44949,162,161.932 ,0.0684572,0.0107701,0.0110643},{2.54951,164,168.185,4.18514,-0.658431,-0.67944},{2.64575,173,174.202,1.2025,-0.189184,0.196218},{2.64575,179,174.202,4.7975,0.754771,0.782836}, {2.82843,186,185.624,0.37598,0.0591513,0.0620889},{2.8284 3,193,185.624,7.37598,1.16043,1.21806},{3.,190,196.351,6.35135,-0.999231,-1.06377},{3.,180,196.351,-16.3514,2.57249,-2.73864}} TableForm[def]

١٤٧


‫‪2.21801‬‬ ‫‪0.510763‬‬

‫‪2.04393‬‬ ‫‪0.470676‬‬

‫‪12.9917‬‬ ‫‪2.99173‬‬

‫‪0.613511‬‬ ‫‪1.44357‬‬ ‫‪0.87535‬‬ ‫‪1.57604‬‬ ‫‪0.452768‬‬ ‫‪1.1657‬‬ ‫‪1.02328‬‬ ‫‪0.746329‬‬ ‫‪1.06808‬‬ ‫‪0.172299‬‬ ‫‪0.468947‬‬ ‫‪0.440411‬‬ ‫‪0.667672‬‬ ‫‪0.132489‬‬ ‫‪0.734817‬‬ ‫‪0.547815‬‬ ‫‪0.254886‬‬ ‫‪0.255781‬‬ ‫‪1.38291‬‬ ‫‪0.819184‬‬ ‫‪0.0110643‬‬ ‫‪0.67944‬‬ ‫‪0.196218‬‬ ‫‪0.782836‬‬ ‫‪0.0620889‬‬ ‫‪1.21806‬‬ ‫‪1.06377‬‬ ‫‪2.73864‬‬

‫‪0.581409‬‬ ‫‪1.36804‬‬ ‫‪0.842677‬‬ ‫‪1.51721‬‬ ‫‪0.44012‬‬ ‫‪1.13314‬‬ ‫‪1.00071‬‬ ‫‪0.729872‬‬ ‫‪1.04452‬‬ ‫‪0.16909‬‬ ‫‪0.460213‬‬ ‫‪0.432906‬‬ ‫‪0.656381‬‬ ‫‪0.130248‬‬ ‫‪0.721613‬‬ ‫‪0.536847‬‬ ‫‪0.249782‬‬ ‫‪0.249915‬‬ ‫‪1.3512‬‬ ‫‪0.797399‬‬ ‫‪0.0107701‬‬ ‫‪0.658431‬‬ ‫‪0.189184‬‬ ‫‪0.754771‬‬ ‫‪0.0591513‬‬ ‫‪1.16043‬‬ ‫‪0.999231‬‬ ‫‪2.57249‬‬

‫‪3.69558‬‬ ‫‪8.69558‬‬ ‫‪5.35625‬‬ ‫‪9.64375‬‬ ‫‪2.79751‬‬ ‫‪7.20249‬‬ ‫‪6.36076‬‬ ‫‪4.63924‬‬ ‫‪6.63924‬‬ ‫‪1.07478‬‬ ‫‪2.92522‬‬ ‫‪2.75165‬‬ ‫‪4.17211‬‬ ‫‪0.827888‬‬ ‫‪4.58674‬‬ ‫‪3.41233‬‬ ‫‪1.58767‬‬ ‫‪1.58852‬‬ ‫‪8.58852‬‬ ‫‪5.06846‬‬ ‫‪0.0684572‬‬ ‫‪4.18514‬‬ ‫‪1.2025‬‬ ‫‪4.7975‬‬ ‫‪0.37598‬‬ ‫‪7.37598‬‬ ‫‪6.35135‬‬ ‫‪16.3514‬‬

‫‪52.9917‬‬ ‫‪52.9917‬‬ ‫‪71.3044‬‬ ‫‪71.3044‬‬ ‫‪85.3563‬‬ ‫‪85.3563‬‬ ‫‪97.2025‬‬ ‫‪97.2025‬‬ ‫‪107.639‬‬ ‫‪107.639‬‬ ‫‪107.639‬‬ ‫‪117.075‬‬ ‫‪117.075‬‬ ‫‪125.752‬‬ ‫‪133.828‬‬ ‫‪133.828‬‬ ‫‪141.413‬‬ ‫‪148.588‬‬ ‫‪148.588‬‬ ‫‪155.411‬‬ ‫‪155.411‬‬ ‫‪161.932‬‬ ‫‪161.932‬‬ ‫‪168.185‬‬ ‫‪174.202‬‬ ‫‪174.202‬‬ ‫‪185.624‬‬ ‫‪185.624‬‬ ‫‪196.351‬‬ ‫‪196.351‬‬

‫‪40‬‬ ‫‪50‬‬ ‫‪75‬‬ ‫‪80‬‬ ‫‪80‬‬ ‫‪95.‬‬ ‫‪100‬‬ ‫‪90‬‬ ‫‪114‬‬ ‫‪103‬‬ ‫‪101‬‬ ‫‪116‬‬ ‫‪120‬‬ ‫‪123‬‬ ‫‪138‬‬ ‫‪133‬‬ ‫‪146.‬‬ ‫‪152‬‬ ‫‪147‬‬ ‫‪157‬‬ ‫‪164‬‬ ‫‪167‬‬ ‫‪162‬‬ ‫‪164‬‬ ‫‪173‬‬ ‫‪179‬‬ ‫‪186‬‬ ‫‪193‬‬ ‫‪190‬‬ ‫‪180‬‬

‫وﻗﺪ ﺗﻢ ﺣﻞ ھﺬا اﻟﻤﺜﺎل ﺑﻨﻔﺲ طﺮﯾﻘﺔ ﺣﻞ اﻟﻤﺜﺎل اﻟﺴﺎﺑﻖ ﻓﻘﻂ ﺗﻢ اﺧﺬ اﻟﺠﺬر اﻟﺘﺮﺑﯿﻌﻰ‬ ‫ﻟﻠﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ‪.‬‬

‫)‪ (١٤-٤‬اﻛﺗﺷﺎف و ﺗﺻﺣﯾﺢ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن‬ ‫‪١٤٨‬‬

‫‪0.707107‬‬ ‫‪0.707107‬‬ ‫‪1.‬‬ ‫‪1.‬‬ ‫‪1.22474‬‬ ‫‪1.22474‬‬ ‫‪1.41421‬‬ ‫‪1.41421‬‬ ‫‪1.58114‬‬ ‫‪1.58114‬‬ ‫‪1.58114‬‬ ‫‪1.73205‬‬ ‫‪1.73205‬‬ ‫‪1.87083‬‬ ‫‪2.‬‬ ‫‪2.‬‬ ‫‪2.12132‬‬ ‫‪2.23607‬‬ ‫‪2.23607‬‬ ‫‪2.34521‬‬ ‫‪2.34521‬‬ ‫‪2.44949‬‬ ‫‪2.44949‬‬ ‫‪2.54951‬‬ ‫‪2.64575‬‬ ‫‪2.64575‬‬ ‫‪2.82843‬‬ ‫‪2.82843‬‬ ‫‪3.‬‬ ‫‪3.‬‬


‫ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ﻟﺣ دود‬ ‫ﯾطﻠق ﻋﻠﻰ ﺗﺣﻘق اﻟﻔرض‬ ‫‪Var ( i )  Var ( Yi )   2‬‬ ‫اﻻﺧطﺎء ‪ ،‬أو اﺧﺗﺻﺎرا ﺛﺑﺎت اﻟﺗﺑﺎﯾن ‪ -‬ﺗﺟ ﺎﻧس اﻟﺗﺑ ﺎﯾن ‪ homoscedasticity ،‬ﺑﯾﻧﻣ ﺎ‬ ‫ﻣﺧﺎﻟﻔ ﺔ ھ ذا اﻟﻔ رض ﯾﺳ ﻣﻰ ﻋ دم ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ‪ . heteroscedasticity‬ﯾﻌﺗﺑ ر ﺛﺑ ﺎت‬ ‫اﻟﺗﺑﺎﯾن اﻟﻣطﻠب اﻷﺳﺎﺳﻲ ﻟﺗﺣﻠﯾل اﻷﻧﺣدار ‪.‬‬ ‫ﯾوﺟ د ط رق ﻋدﯾ دة ﻻﺧﺗﺑ ﺎر ﻋ دم ﺗﺟ ﺎﻧس اﻟﺗﺑ ﺎﯾن‪ .‬ﺳ وف ﻧﻘ دم ﻓ ﻲ اﻟﺟ زء اﻟﺗ ﺎﻟﻲ‬ ‫اﻟطرﯾﻘﺔ اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫)‪ (١-١٤-٤‬طرﯾﻘﺔ ﺟوﻟد‪ -‬ﻛوادت ﻻﻛﺗﺷﺎف ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن‬ ‫ﯾﻣﻛن أﺳﺗﺧدام ھذه اﻟطرﯾﻘﺔ ﻓﻲ ﺣﺎﻟﺔ وﺟود ﻣﺗﻐﯾر ﻣﺳﺗﻘل )أو أﻛﺛر (ﺣﯾث ‪:‬‬ ‫ﺗرﺗ ب اﻟﻣﺷ ﺎھدات وﻓﻘ ﺎ ً ﻷﺣ د اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ ﺗرﺗﯾ ب ﺗﺻ ﺎﻋدي أو ﺗﻧ ﺎزﻟﻲ ﺛ م‬ ‫ﯾﺣذف ‪ %20‬ﻣ ن اﻟﻣﺷ ﺎھدات ﻣ ن ﻣرﻛ ز اﻟﺳﻠﺳ ﻠﺔ وﻟ ﯾﻛن )‪ (c‬وذﻟ ك ﯾﺟﻌ ل اﻻﺧﺗﺑ ﺎر‬ ‫)‪( n  c‬‬ ‫أﻛﺛ ر ﺣﺳﺎﺳ ﯾﺔ‪ .‬ﯾﺳ ﺗﺧدم اﻟﺟ زء اﻷول ﻣ ن اﻟﻣﺷ ﺎھدات‬ ‫‪2‬‬ ‫اﻻﻧﺣدار اﻟﻣطﻠوﺑﺔ واﻟﺣﺻول ﻋﻠﻰ ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ ‪ SSE1‬ﻣن ﺟدول ﺗﺣﻠﯾل‬

‫ﻓ ﻲ اﯾﺟ ﺎد ﻣﻌﺎدﻟ ﺔ‬

‫اﻟﺗﺑ ﺎﯾن‪ .‬ﺗﻛ رر ﻣ ﺎ ﺳ ﺑق ﻓ ﻲ اﻟﺧط وة اﻟﺗﺎﻟﯾ ﺔ وﻟﻛ ن ﺑﺎﺳ ﺗﺧدام اﻟﻣﺷ ﺎھدات اﻷﺧﯾ رة‬ ‫)‪(n  c‬‬ ‫وﻋددھﺎ أﯾﺿ ﺎ ً‬ ‫‪2‬‬ ‫‪ . SSE 2‬ﯾﺳﺗﺧدم اﺧﺗﺑﺎر ﺟوﻟ د ﻓﯾﻠ د – ﻛواﻧ دت ﻟﻠﻛﺷ ف ﻋ ن ﻧ وﻋﯾن ﻣ ن ﻋ دم ﺛﺑ ﺎت‬

‫واﺟ راء اﻧﺣ دار واﻟﺣﺻ ول ﻋﻠ ﻰ ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺧط ﺄ‬

‫اﻟﺗﺑﺎﯾن وھﻣﺎ ‪:‬‬ ‫)أ(‬

‫ﻋﻧدﻣﺎ ﯾﻛون ﺗﺑﺎﯾن ﺣد اﻟﺧطﺄ داﻟﺔ ﺗﻧﺎﻗﺻﯾﺔ ﻓﻲ اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل ‪ x‬ﺣﯾث‬ ‫ﻓرض اﻟﻌدم ﺳوف ﯾﻛون ‪ : H 0‬ﺗﺑﺎﯾن ﺣد اﻟﺧطﺄ ﻣﺗﺟﺎﻧس ﺿد اﻟﻔرض‬ ‫اﻟﺑدﯾل ‪ : H1‬ﺗﺑﺎﯾن ﺣد اﻟﺧطﺄ داﻟﺔ ﺗﻧﺎﻗﺻﯾﺔ ﻓﻲ اﻟﻣﺗﻐﯾر ‪ . x‬وﻓﻲ ھذا‬ ‫اﻻﺧﺗﺑﺎر ﯾﺳﺗﺧدم اﻷﺣﺻﺎء ‪ F‬اﻟذي ﯾﺄﺧذ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫‪SSE1 (n  c) 2 MSE1‬‬ ‫‪‬‬ ‫‪.‬‬ ‫‪SSE 2 (n  c) 2 MSE 2‬‬

‫‪F‬‬

‫وﻣﻘﺎرﻧ ﺔ ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﺔ ﺑﻧظﯾرﺗﮭ ﺎ اﻟﺟدوﻟﯾ ﺔ ﺑ درﺟﺎت ﺣرﯾ ﺔ اﻟﺧط ﺄ‬ ‫ﻟﻠﻌﻣ ود واﻟﺻ ف وإذا ﻛﺎﻧ ت ﻗﯾﻣ ﺔ ‪ F‬أﻛﺑ ر ﻣ ن ﻧظﯾرﺗﮭ ﺎ اﻟﺟدوﻟﯾ ﺔ ﻧ رﻓض‬ ‫ﻓرض اﻟﻌدم‪.‬‬ ‫)ب( ﻋﻧدﻣﺎ ﯾﻛون ﺗﺑ ﺎﯾن ﺣ د اﻟﺧط ﺄ داﻟ ﮫ ﺗزاﯾدﯾ ﮫ ﻟﻠﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ‪ x‬ﻓ ﺈن ﻓ رض‬ ‫اﻟﻌ دم ﯾﻛ ون ‪ : H 0‬ﺗﺑ ﺎﯾن ﺣ د اﻟﺧط ﺄ ﻣﺗﺟ ﺎﻧس ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪H1 :‬‬ ‫ﺗﺑﺎﯾن ﺣد اﻟﺧطﺄ داﻟﮫ ﺗزاﯾدﯾﮫ ﻓﻲ ‪ x‬و ﻓﻲ ھذا اﻻﺧﺗﺑﺎر ﯾﺳﺗﺧدم اﻻﺣﺻﺎء ‪F‬‬ ‫ﻋﻠﻰ اﻟﺻورة اﻟﺗﺎﻟﯾﺔ ‪:‬‬

‫‪١٤٩‬‬


‫‪SSE 2 (n  c) 2‬‬ ‫‪.‬‬ ‫‪SSE1 (n  c) 2‬‬

‫‪F‬‬

‫وﺑﻣﻘﺎرﻧﺔ ﻗﯾﻣﺔ ‪ F‬اﻟﻣﺣﺳوﺑﺔ ﺑﻧظﯾرﺗﮭﺎ اﻟﺟدوﻟﯾﺔ ﺑدرﺟﺎت ﺣرﯾﺔ اﻟﺧطﺄ ﻟﻠﻌﻣود‬ ‫واﻟﺻف وإذا ﻛﺎﻧت ﻗﯾﻣﺔ ‪ F‬أﻛﺑر ﻣن ﻧظﯾراﺗﮭﺎ اﻟﺟدوﻟﯾﺔ ﻧرﻓض ﻓرض اﻟﻌدم‬ ‫‪.‬‬ ‫ﻣﺛﺎل)‪(٣٠-٤‬‬ ‫اﻟﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺗﻣﺛل درﺟﺎت اﺧﺗﺑﺎر اﻟﻘﺑول ودرﺟ ﺎت اﺧﺗﺑ ﺎر‬ ‫اﻟﺗﻔﺎﺿل واﻟﺗﻛﺎﻣل ﻟﻌﺷرة ﻣن طﻠﺑﺔ اﻟﺟﺎﻣﻌﺔ ‪ ،‬ﻣﻊ أﻣل أن ﯾﻛون ھؤﻻء اﻟﻌﺷ رة ﻋﯾﻧ ﺔ‬ ‫ﻋﺷواﺋﯾﺔ ﻣن ﻣﺟﺗﻣﻊ اﻟطﻠﺑﺔ ﻓﻲ اﻟﺟﺎﻣﻌﺔ واﻟﻣطﻠوب اﺧﺗﺑﺎر ﺗﺟﺎﻧس اﻟﺗﺑﺎﯾن‪.‬‬

‫اﻟطﺎﻟب‬ ‫‪1‬‬ ‫‪2‬‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪5‬‬ ‫‪6‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪10‬‬

‫اﻟدرﺟﺔ ﻓﻲ اﻣﺗﺣﺎن‬ ‫اﻟﻘﺑول ‪x‬‬ ‫‪39‬‬ ‫‪43‬‬ ‫‪21‬‬ ‫‪64‬‬ ‫‪57‬‬ ‫‪47‬‬ ‫‪28‬‬ ‫‪75‬‬ ‫‪34‬‬ ‫‪52‬‬

‫اﻟدرﺟﺔ ﻓﻲ اﻣﺗﺣﺎن‬ ‫اﻟﺗﻔﺎﺿل ‪y‬‬ ‫‪65‬‬ ‫‪74‬‬ ‫‪52‬‬ ‫‪82‬‬ ‫‪92‬‬ ‫‪74‬‬ ‫‪73‬‬ ‫‪98‬‬ ‫‪56‬‬ ‫‪75‬‬

‫اﻟﺣــل ‪:‬‬ ‫وﺣﯾث أن ﻋدد أزواج اﻟﻣﺷﺎھدات ‪ n=10‬ﻓﺈﻧﻧﺎ ﻧﺄﺧ ذ اﻻرﺑﻌ ﺔ أزواج اﻻوﻟ ﻰ ﻣ ن‬ ‫اﻟﻣﺷﺎھدات اﻟﻣرﺗﺑﮫ وﻓﻘﺎ ً اﻟﻣﺗﻐﯾر ‪ x‬وﻧﺳﺗﺧدﻣﮭﺎ ﻓﻲ أﯾﺟﺎد ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن‬ ‫وذﻟ ك ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ‪ SSE1‬وﺑ ﻧﻔس اﻟطرﯾﻘ ﺔ ﻧﺣﺻ ل ﻋﻠ ﻰ ‪ SSE 2‬ﻻزواج‬ ‫اﻟﻣﺷﺎھدات اﻻرﺑﻌﺔ اﻻﺧﯾرة اﻟﻣرﺗﺑ ﮫ وﻓﻘ ﺎ ً اﻟﻣﺗﻐﯾ ر ‪ x‬ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ اﻟﺟ دوﻟﯾن‬ ‫اﻟﺗﺎﻟﯾﯾن ﺛم ﻧﺣﺳب ﻗﯾﻣﺔ ‪.F‬‬ ‫‪F‬‬ ‫‪0.242351‬‬ ‫‪-‬‬

‫‪MS‬‬ ‫‪28.6409‬‬ ‫‪118.18‬‬

‫‪SS‬‬ ‫‪28.6409‬‬ ‫‪236.359‬‬ ‫‪١٥٠‬‬

‫‪df‬‬ ‫‪1‬‬ ‫‪2‬‬

‫‪Source‬‬ ‫‪Regression‬‬ ‫‪Residual‬‬


‫‪-‬‬

‫‪265‬‬

‫‪-‬‬

‫‪3‬‬

‫‪Total‬‬

‫وﻣن اﻟﺟدول اﻟﺳﺎﺑق ﻓﺈن ‪:‬‬ ‫‪SSE1  236.359‬‬

‫‪F‬‬ ‫‪2.486‬‬ ‫‬‫‪-‬‬

‫‪MS‬‬ ‫‪174.443‬‬ ‫‪70.1535‬‬ ‫‪-‬‬

‫‪SS‬‬ ‫‪174.443‬‬ ‫‪140.307‬‬ ‫‪314.75‬‬

‫‪df‬‬ ‫‪1‬‬ ‫‪2‬‬ ‫‪3‬‬

‫‪Source‬‬ ‫‪Regression‬‬ ‫‪Residual‬‬ ‫‪Total‬‬

‫وﻣن اﻟﺟدول اﻟﺳﺎﺑق ﻓﺈن ‪:‬‬ ‫‪SSE 2  140.307‬‬

‫ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﻣﻌﺎدﻟﺔ )‪ (٣-٤‬وﻋﻠﯾﺔ ﻓﻘﯾﻣﺔ ‪ F‬ﻟﻠﻣﺛﺎل )‪ (٣٠-٤‬ﺗﻛون‪:‬‬ ‫‪236.359 / 2‬‬ ‫‪ 1.6845 .‬‬ ‫‪140.307 / 2‬‬

‫‪F‬‬

‫وﺑﻣﺎ أن ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﮫ أﻗ ل ﻣ ن اﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ ‪ F0.05 (2,2)  19 ‬ﻓﺈﻧﻧ ﺎ ﻧﻘﺑ ل‬ ‫ﻓرض اﻟﻌدم وھو ﺛﺑﺎت اﻟﺗﺑﺎﯾن ‪.‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪=.05‬‬ ‫‪0.05‬‬ ‫}‪x1={21.,28,34,39‬‬ ‫}‪{21.,28,34,39‬‬ ‫}‪y1={52.,73,56,65‬‬ ‫}‪{52.,73,56,65‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪30.5‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪61.5‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪0.39779‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪49.3674‬‬ ‫]‪n=l[x1‬‬ ‫‪4‬‬ ‫]‪ssto=c[y1,y1‬‬ ‫‪١٥١‬‬


265. ssr=c[x1,y1]^2/c[x1,x1] 28.6409 sse=ssto-ssr 236.359 dto=n-1 3 msr=ssr/1 28.6409 dse=n-2 2 mse=sse/(n-2) 118.18 f1=msr/mse 0.242351 th=TableHeadings{{source,regression,residual,total},{ano va}} TableHeadings{{source,regression,residual,total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,msr,f1] {1,28.6409,28.6409,0.242351} rt3=List[dse,sse,mse,"---"] {2,236.359,118.18,---} rt4=List[dto,ssto,"---","---"] {3,265.,---,---} tf=TableForm[{rt1,rt2,rt3,rt4},th]

source regression residual total

anova df 1 2 3

SS 28.6409 236.359 265.

p=1 1 =.05 0.05 x11={52.,57,64,75} {52.,57,64,75} y11={75.,92,82,98} {75.,92,82,98} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] ١٥٢

MS 28.6409 118.18 

F 0.242351  


xb=h[x11]/l[x11] 62. yb=h[y11]/l[y11] 86.75 b1=c[x11,y11]/c[x11,x11] 0.765101 b0=yb-b1*xb 39.3138 n=l[x11] 4 ssto=c[y11,y11] 314.75 ssr=c[x11,y11]^2/c[x11,x11] 174.443 sse=ssto-ssr 140.307 dto=n-1 3 msr=ssr/1 174.443 dse=n-2 2 mse1=sse/(n-2) 70.1535 f1=msr/mse1 2.48659 th=TableHeadings{{source,regression,residual,total},{ano va}} TableHeadings{{source,regression,residual,total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,msr,f1] {1,174.443,174.443,2.48659} rt3=List[dse,sse,mse1,"---"] {2,140.307,70.1535,---} rt4=List[dto,ssto,"---","---"] {3,314.75,---,---} tf1=TableForm[{rt1,rt2,rt3,rt4},th]

source regression residual total

anova df 1 2 3

SS 174.443 140.307 314.75

Maxmse, mse1 ff  Minmse, mse1 1.68458 ١٥٣

MS 174.443 70.1535 

F 2.48659  


‫`‪<<Statistics`ContinuousDistributions‬‬ ‫]‪ffee=Quantile[FRatioDistribution[n-2,n-2],1-‬‬ ‫‪19.‬‬ ‫]]"‪If[ff>=ffee,Print["Reject Ho"],Print["Accept Ho‬‬ ‫‪Accept Ho‬‬

‫ﻟﮭذا اﻟﻣﺛﺎل ‪:‬‬ ‫اﻻرﺑﻌﺔ أزواج اﻻوﻟﻰ ﻣن اﻟﻣﺷﺎھدات اﻟﻣرﺗﺑﮫ وﻓﻘﺎ ً اﻟﻣﺗﻐﯾ ر ‪ x‬ﻣ ن اﻟﻘﺎﺋﻣﺗ ﺎن ‪ x1, y1‬و‬ ‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪tf=TableForm[{rt1,rt2,rt3,rt4},th‬‬

‫وذﻟ ك ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ‪ SSE1‬وﺑ ﻧﻔس اﻟطرﯾﻘ ﺔ ﻧﺣﺻ ل ﻋﻠ ﻰ ‪ SSE 2‬ﻻزواج‬ ‫اﻟﻣﺷﺎھدات اﻻرﺑﻌﺔ اﻻﺧﯾرة اﻟﻣرﺗﺑﮫ وﻓﻘﺎ ً اﻟﻣﺗﻐﯾر ‪ x‬ﻣن اﻟﻘﺎﺋﻣﺗ ﺎن ‪ x11, y11‬و ﺟ دول‬ ‫ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪tf1=TableForm[{rt1,rt2,rt3,rt4},th‬‬

‫‪ f‬اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر‬ ‫‪Maxmse, mse1‬‬ ‫‪Minmse, mse1‬‬

‫‪ff ‬‬

‫‪f‬اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬ ‫]‪ffee=Quantile[FRatioDistribution[n-2,n-2],1-‬‬ ‫اﻟﻘﺮار اﻟﺬى ﯾﺘﺨﺬ ﻣﻦ اﻻﻣﺮ‬ ‫]]"‪If[ff>=ffee,Print["Reject Ho"],Print["Accept Ho‬‬

‫وھﻮ ﻗﺒﻮل ﻓﺮض اﻟﻌﺪم ﻣﻦ اﻟﻤﺨﺮج‬ ‫‪Accept Ho‬‬

‫)‪ (٢-١٥-٤‬ﺗﺻﺣﯾﺢ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن‬ ‫ﻋﻧدﻣﺎ ﻻ ﯾﺗﺣﻘق ﺛﺑﺎت اﻟﺗﺑ ﺎﯾن ﻟﺣ دود اﻟﺧط ﺄ ‪ i‬ﻓ ﻰ ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻰ اﻟﺑﺳ ﯾط )‪ (١-٤‬ﻓﻼﺑ د ﻣ ن اﺗﺧ ﺎذ‬ ‫اﺟراء و ذﻟك ﻟﺟﻌل ﺗﺑﺎﯾﻧﺎت ‪) i‬أو ‪ ( Yi‬ﺗﻘرﯾﺑﺎ ﻣﺗﺳﺎوﯾﺔ‪ .‬ﯾﺗم ﺗﺻﺣﯾﺢ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن ﺑطرﯾﻘﺗﯾن ‪:‬‬

‫ا‪ -‬اﻟطرﯾﻘﺔ اﻻوﻟﻰ ‪:‬ﻋﻣل ﺗﺣوﯾل ﻟﻘﯾم ‪. y‬‬ ‫ب‪ -‬اﻟطرﯾﻘﺔ اﻟﺛﺎﻧﯾﺔ ‪ :‬اﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻣرﺟﺣﺔ ﺑدﻻ ً ﻣن اﺳﺗﺧدام‬ ‫طرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى اﻟﻌﺎدﯾ ﺔ وذﻟ ك ﺑﺈﺳ ﺗﺧدام وزن ﻣﻌ ﯾن ‪ w i‬ﻟﺟﻌ ل‬ ‫اﻟﺗﺑﺎﯾن ﻟﻼﺧطﺎء ﻣﺗﺟﺎﻧﺳﺔ‪ .‬ﺳوف ﻧﺗﻧﺎول اﻟطرﯾﻘﺗﯾن ﻓﻲ اﻟﺟزء اﻟﺗﺎﻟﻲ ‪:‬‬ ‫ا‪ -‬طرﯾﻘﺔ ﺗﺣوﯾل ﻗﯾم اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ‬ ‫ﺑﻔرض إﻧﻧﺎ ﻧرﻏب ﻓﻲ ﺗﺣوﯾل ﻗﯾم ‪ y‬ﻟﺗﺻﺣﯾﺢ ﻋدم اﻻﻋﺗدال أو ﻋدم ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن‬ ‫أو ﻋ دم ﺧطﯾ ﮫ داﻟ ﺔ اﻻﻧﺣ دار‪ .‬اﻟﻌﺎﺋﻠ ﺔ اﻟﻣﻔﯾ دة ﻣ ن اﻟﺗﺣ وﯾﻼت ھ ﻲ ﺗﺣوﯾﻠ ﺔ اﻟﻘ وى‬ ‫‪١٥٤‬‬


‫ ﻓﻌﻠ ﻰ‬، ‫ﻣﻌﻠﻣﮫ ﻣطﻠ وب إﯾﺟ ﺎد ﺗﻘ دﯾر ﻟﮭ ﺎ‬ ‫ ﺣﯾث‬y 

power transformation

1 ‫ﺳ ﺑﯾل اﻟﻣﺛ ﺎل‬ 2 ‫ اﻟﻣﻌﯾﺎر ﻓﻰ ﺗﺣدﯾد‬. y   ln( y ) ‫ ﺗﻌﻧﻲ اﺳﺗﺧدام اﻟﺗﺣوﯾﻠﺔ اﻟﻠوﻏﺎرﯾﺗﻣﯾﺔ ﺣﯾث‬  0 ‫ و اﻟﺗ ﻰ ﺗﺟﻌ ل ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت‬ ‫ ھ ﻰ اﯾﺟ ﺎد ﻗﯾﻣ ﺔ‬y ‫ اﻟﻣﻧﺎﺳﺑﺔ ﻟﺗﺣوﯾل ﻗ ﯾم‬ ‫ﻗﯾﻣﺔ‬

‫ و‬y   y ‫ ﺗﻌﻧ ﻲ اﺳ ﺗﺧدام ﺗﺣوﯾﻠ ﺔ اﻟﺟ ذر اﻟﺗرﺑﯾﻌ ﻲ ﺣﯾ ث‬ 

‫ ﻻﻧﺣدار ﺧطﻰ ﯾﺳﺗﻧد إﻟﻰ ذﻟك اﻟﺗﺣوﯾل اﺻﻐر ﻣﺎ ﯾﻣﻛن وﺳوف ﻧﺳﺗﺧدم‬SSE ‫اﻟﺑواﻗﻰ‬ ‫ ﻟﮭ ذا اﻟﻐ رض وﺑ دون اﻟ دﺧول ﻓ ﻰ‬Box and Cox ‫طرﯾﻘ ﺔ ﺑ وﻛس – ﻛ وﻛس‬ : ‫اﻟﺗﻔﺎﺻﯾل ﺳوف ﻧﺳﺗﺧدم ﺑرﻧﺎﻣﺞ ﺟﺎھز ﻟﮭذا اﻟﻐرض وذﻟك ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ‬ (٣١-٤)‫ﻣﺛﺎل‬ ‫ ﻓ ﻰ اﻟﺑرﻧ ﺎﻣﺞ اﻟﺗ ﺎﻟﻰ اﻟﺟ ﺎھز‬gradedata ‫ اﻟﻣﻌطﺎه ﻓﻰ اﻟﻘﺎﺋﻣ ﺔ اﻟﻣﺳ ﻣﺎه‬x, y ‫ﻻزواج ﻗﯾم‬ Box and ‫ ﺳ وف ﻧﺳ ﺗﺧدم طرﯾﻘ ﺔ ﺑ وﻛس – ﻛ وﻛس‬Mathematica ‫اﻟﻣﻛﺗ وب ﺑﻠﻐ ﺔ‬ ‫ل‬

‫ ﻣﻊ ﻓﺗرة ﺛﻘﺔ‬y ‫ اﻟﻣﻧﺎﺳﺑﺔ ﻟﺗﺣوﯾل ﻗﯾم‬ ‫ ﻟﺣﺳﺎب ﻗﯾﻣﺔ‬Cox . ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬

Off[General::spell1] <<Statistics`LinearRegression` <<Statistics`ContinuousDistributions` <<Statistics`DescriptiveStatistics` Clear[yp] yp[yij_,ytwiddle_,lambda_]:=(yij^lambda-1)/(lambda ytwiddle^(lambda-1)) /;lambda !=0; yp[yij_,ytwiddle_,lambda_]:=ytwiddle Log[yij] /; lambda ==0; Clear[sse] sse[data_,predictors_,indepvars_,ytwiddle_,lambda_,p _]:=Module[{resvals,withwvals}, withwvals=Table[MapAt[yp[#,ytwiddle,lambda]&,data[[j ]],p],{j,1,Length[data]}]; resvals=Regress[withwvals,predictors,indepvars,Regre ssionReport->FitResiduals][[1,2]]; Sum[resvals[[i]]^2,{i,1,Length[resvals]}]] Options[boxCoxRegression]={limits->{-2,2},gridsize>20,confidence->0.95}; Clear[boxCoxRegression] boxCoxRegression[data_,pred_,indepvars_,opts___]:=Module[ {lambdaminmax,grid,lambdavals,n,p,depvars,ytwiddle,table2 ,minval,lambdaposition,lambdahat,nu,ci,dist,chi2,var,tabl e3,table4,table5,min,max,lambda1,lambda2}, lambdaminmax=limits /. {opts} /. Options[boxCoxRegression]; grid=gridsize/. {opts} /. Options[boxCoxRegression]; ١٥٥


lambdavals=Table[lambdaminmax[[1]]+i(lambdaminmax[[2 ]]-lambdaminmax[[1]])/(grid-1),{i,0,grid-1}]; n=Length[data]; p=Length[data[[1]]]; depvars=Table[data[[i,p]],{i,1,Length[data]}]; ytwiddle=GeometricMean[depvars]//N; table2=Table[sse[data,pred,indepvars,ytwiddle,lambda vals[[i]],p],{i,1,Length[lambdavals]}]; minval=Min[table2]; lambdaposition=(Position[table2,minval]//Flatten)[[1 ]]; lambdahat=lambdavals[[lambdaposition]]; nu=n-p; ci=confidence /. {opts} /. Options[boxCoxRegression]; dist=ChiSquareDistribution[1]; chi2=Quantile[dist,ci]; var=-nu/2 Log[table2[[lambdaposition]]/nu]-1/2 chi2; table3=Map[-nu/2 Log[#/nu]&,table2]; table4=Map[#>var&,table3]; table5=Position[table4,True]//Flatten; min=Min[table5]; max=Max[table5]; lambda1=lambdavals[[min]]; lambda2=lambdavals[[max]]; Print["Box-Cox Transformation"]; {BoxCox->lambdahat//N,Confidence->100*ci"%" ,ConfidenceInterval->{lambda1//N,lambda2//N}} ] gradedata={{0.5,40},{0.5,50},{1,75},{1,80},{1.5,80},{1.5, 95},{2,100},{2,90},{2.5,114},{2.5,103},{2.5,101},{3,116}, {3,120},{3.5,123},{4,138},{4,133},{4.5,146},{5,152},{5,14 7},{5.5,157},{5.5,164},{6,167},{6,162},{6.5,164},{7,173}, {7,179},{8,186},{8,193},{9,190},{9,180}}; boxCoxRegression[gradedata,{1,x},x] Box-Cox Transformation {BoxCox2.,Confidence95. %,ConfidenceInterval{1.78947,2.}}

‫ﻣن اﻻﻣر‬

‫ل‬

‫ﻣﻊ ﻓﺗرة ﺛﻘﺔ‬

2

‫ ھﻰ‬y ‫ اﻟﻣﻧﺎﺳﺑﺔ ﻟﺗﺣوﯾل ﻗﯾم‬ ‫ﻗﯾﻣﺔ‬

boxCoxRegression[gradedata,{1,x},x]

‫و اﻟﻣﺧرج‬ {BoxCox2.,Confidence95. %,ConfidenceInterval{1.78947,2.}}

‫ طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻣرﺟﺣﺔ‬-‫ب‬ Weighted least squares: ١٥٦


‫ﺑﻔرض أن ‪ Var ( )   2   2 w‬ﺣﯾث ‪ w‬أوزان ﻣﻌروﻓ ﺔ وﻟﻠﺣﺻ ول‬ ‫‪i‬‬ ‫‪i‬‬ ‫‪i‬‬ ‫‪i‬‬ ‫ﻋﻠﻰ ﺗﻘدﯾرات ﻟﻠﻣﻌﺎﻟم ‪  0 ,1‬ﯾﻣﻛن اﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى اﻟﻣرﺟﺣ ﺔ‬ ‫)‪ Weight Least Squares (WLS‬ﺣﯾث ‪:‬‬ ‫‪ x i w i  yi w i‬‬

‫‪,‬‬

‫‪ wi‬‬ ‫‪2‬‬

‫‪‬‬

‫‪ x i yi w i‬‬

‫) ‪( x i w i‬‬ ‫‪2‬‬ ‫‪ xi wi‬‬ ‫‪ wi‬‬

‫‪ b1  wi i .‬‬ ‫‪ i‬‬ ‫‪xw‬‬

‫‪ yi w i‬‬ ‫‪ wi‬‬

‫‪b1 ‬‬

‫‪b0 ‬‬

‫ﻓﻲ ﻛﺛﯾر ﻣن اﻟﻣﺷﺎﻛل ﻓﺈن اﻷوزان ﯾﻣﻛن ﺗﻘدﯾرھﺎ ﺑﺳﮭوﻟﺔ‪ .‬ﻋﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل إذا‬ ‫ﻛﺎﻧت ‪ y i‬ﻣﺷﺎھدة ﻓﻲ اﻟﺣﻘﯾﻘﺔ ﺗﻣﺛل ﻣﺗوﺳط ﻣﺷﺎھدات ﻣﺄﺧوذة ﻣن ﻋﯾﻧﺔ ﺣﺟﻣﮭ ﺎ ‪n i‬‬ ‫ﻋﻧد ‪ x i‬وإذا ﻛﺎﻧت ﻛل اﻟﻣﺷﺎھدات اﻷﺻﻠﯾﺔ ﻟﮭﺎ ﺗﺑﺎﯾن ﺛﺎﺑت ‪  2‬ﻓ ﺈن ﺗﺑ ﺎﯾن ‪ Yi‬ھ و‬ ‫‪ VarYi   Varε i   σ 2 / n i‬وﻟ ذﻟك ﯾﻛ ون اﻟ وزن ھ و ‪ . n i‬ﻓ ﻲ ﺑﻌ ض اﻷﺣﯾ ﺎن‬ ‫ﺗﺑ ﺎﯾن ‪ Y i‬ﯾﻛ ون داﻟ ﺔ ﻓ ﻲ اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ‪ ، x‬ﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل‬ ‫‪1‬‬ ‫‪wi ‬‬ ‫‪ Var ( Y i )  Var (  i )   2 x i‬ﻓﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﻓﺈﻧﻧ ﺎ ﯾﻣﻛﻧﻧ ﺎ اﺳ ﺗﺧدام‬ ‫‪xi‬‬ ‫‪1‬‬ ‫ﻛ وزن‪ .‬أﯾﺿ ﺎ ً ﻗ د ﯾﻛ ون ‪ Var Yi    2 x i 2‬وﻋﻠ ﻰ ذﻟ ك ‪ w i  2‬واﻟﺗ ﻰ‬ ‫‪xi‬‬ ‫ﺗظﮭ ر ﻛﺛﯾ را ً ﻓ ﻲ اﻟدراﺳ ﺎت اﻷﺑﺣ ﺎث اﻟﺗ ﻲ ﺗﻌﺗﻣ د ﻋﻠ ﻰ ﺑﯾﺎﻧ ﺎت إﺣﺻ ﺎﺋﯾﺔ ﺗﺄﺧ ذ ﺷ ﻛل‬ ‫اﻟﺑﯾﺎﻧﺎت اﻟﻣﻘطﻌﯾ ﺔ ‪ cross-section data‬ﺣﯾ ث ﺗﺷ ﺗت ﻣﺷ ﺎھدات اﻟﺑﯾﺎﻧ ﺎت اﻟﻣﻘطﻌﯾ ﺔ‬ ‫اﻟﺧﺎﺻﺔ ﺑﺎﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻗد ﺗﺧﺗﻠف اﺧﺗﻼﻓﺎ ً ﻛﺑﯾرا ﻣن ﻣﺳﺗوى اﻟﻰ أﺧ ر ﻣ ن ﻣﺳ ﺗوﯾﺎت‬ ‫اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل ‪ .‬ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﻓﻲ دراﺳﺔ اﻟﻌﻼﻗﺔ ﺑﯾن دﺧل وأﻧﻔﺎق اﻷﺳر ﻋﻠﻰ‬ ‫ﻣﺧﺗﻠف اﻟﺳﻠﻊ واﻟﺧدﻣﺎت ﻧﺟد أن اﻷﺳر ذات اﻟدﺧول اﻟﻣرﺗﻔﻌ ﺔ ﺗﺗﻣﺗ ﻊ ﺑﻣروﻧ ﺔ ﻛﺑﯾ رة‬ ‫ﻓﻲ اﻷﻧﻔﺎق ‪ ،‬ﻓﻲ ﺣﯾن أن أﻧﻔﺎق اﻷﺳر ذات اﻟدﺧول اﻟﻣﻧﺧﻔﺿﺔ ﯾﻘﻊ ﻋﺎدة ﺿﻣن ﺣدود‬ ‫ﺿﯾﻘﺔ وﻋﻠﯾﮫ ﻓﺈن اﻟﺗﺑﺎﯾن ﻋﻧد اﻟدﺧول اﻟﻛﺑﯾر ‪ ،‬ﯾﻛون أﻛﺑر ﻣن اﻟﺗﺑﺎﯾن ﻋﻧد ﻗﯾم اﻟدﺧول‬ ‫اﻟﺻﻐﯾرة وھﻛذا ﻧﺟد أن ﻓرﺿ ﯾﺔ ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ﺗﺻ ﺑﺢ ﻋدﯾﻣ ﺔ اﻟﺟ دوى ﻓ ﻲ ﻣﺛ ل ھ ذة‬ ‫اﻟﺣﺎﻻت وﺑﺎﻟﺗﺎﻟﻲ ﯾواﺟﮫ اﻟﺑﺎﺣث ﻣﺷﻛﻠﺔ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن واﻟﺗﻰ ﺳوف ﻧﺻ ﺣﺣﮭﺎ ﻓ ﻲ‬ ‫اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ‬ ‫ﻣﺛﺎل)‪(٣٢-٤‬‬ ‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺑﯾﺎﻧﺎت ﻋن اﻟ دﺧل واﻹﻧﻔ ﺎق اﻟﺷ ﮭري ﻟﻌﯾﻧ ﺔ ﻣﻛوﻧ ﺔ ﻣ ن ‪20‬‬

‫ﻣﺷﺎھدة ﻣﻘﺳﻣﺔ إﻟﻰ أرﺑﻌﺔ ﻣﺟﺎﻣﯾﻊ وﻛل ﻣﺟﻣوﻋﺔ ﺑﮭﺎ ﺧﻣس ﻣﺷﺎھدات‪ .‬اﻟﻌﯾﻧﺔ ﻓﻲ ﻛل‬ ‫‪١٥٧‬‬


‫ﻣﺟﻣوﻋﺔ ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﺑﺗﻘدﯾر اﻹﻧﻔ ﺎق اﻟﺷ ﮭري ‪ $1000‬ﻟﺧﻣ س أﺳ ر ﻋﻧ د ﻧﻔ س‬ ‫اﻟ دﺧل‪ .‬أوﺟ د ﺗﻘ دﯾرات ﻣﻌ ﺎﻟم ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻲ ﺗﺣ ت ﻓ رض أن‬ ‫‪. Vari    2 x i 2‬‬ ‫اﻟﺪﺧﻞ‬ ‫‪$1000‬‬

‫اﻻﻧﻔﺎق اﻟﺸﮭﺮي ‪$ 1000‬‬ ‫‪2.1‬‬ ‫‪3.6‬‬ ‫‪5.0‬‬ ‫‪6.2‬‬

‫‪5.0‬‬ ‫‪10.0‬‬ ‫‪15.0‬‬ ‫‪20.0‬‬

‫‪2.0‬‬ ‫‪3.5‬‬ ‫‪4.5‬‬ ‫‪5.7‬‬

‫‪2.0‬‬ ‫‪3.5‬‬ ‫‪4.8‬‬ ‫‪6.0‬‬

‫اﻟﻤﺠﻤﻮﻋﺔ‬ ‫‪1.8‬‬ ‫‪3.0‬‬ ‫‪4.2‬‬ ‫‪4.8‬‬

‫‪2.0‬‬ ‫‪3.2‬‬ ‫‪4.2‬‬ ‫‪5.0‬‬

‫ﯾوﺿﺢ ﺷﻛل )‪ (٥١-٤‬أن اﻟﻌﻼﻗﺔ ﺑﯾن اﻹﻧﻔﺎق واﻟدﺧل اﻟﺷﮭري ﻋﻼﻗﺔ ﺧطﯾﺔ‪.‬‬ ‫‪10‬‬ ‫‪8‬‬ ‫‪6‬‬ ‫‪4‬‬ ‫‪2‬‬

‫‪20‬‬

‫‪17.5‬‬

‫‪15‬‬

‫‪12.5‬‬

‫‪10‬‬

‫‪7.5‬‬

‫‪5‬‬

‫‪2.5‬‬

‫ﺷﻛل )‪(٥١-٤‬‬

‫اﻟﺑﯾﺎﻧﺎت اﻟﻼزﻣﺔ ﻟﺣﺳﺎب ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬

‫‪١٥٨‬‬

‫‪1‬‬ ‫‪2‬‬ ‫‪3‬‬ ‫‪4‬‬


x 5 5 5 5 5 10 10 10 10 10 15 15 15 15 15 20 20 20 20 20

250

y 1.8 2 2 2 2.1 3 3.2 3.5 3.5 3.6 4.2 4.2 4.5 4.8 5 4.8 5 5.7 6 6.2

77.1

x2 25 25 25 25 25 100 100 100 100 100 225 225 225 225 225 400 400 400 400 400

3750

xy 9 10 10 10 10.5 30 32 35 35 36 63 63 67.5 72 75 96 100 114 120 124

1112

:‫ﺣﯾث‬ y

y

n

77.1 250 x  3.855 ، x    12.5 20 n 20 ١٥٩


SXY   x i y i 

 x i  yi

n 25077.1  1112  20  148 .25, 2

SXX   x 

 xi

2

n  2502  3750   625, 20 SXY 148.25 b1    0.2372, SXX 625 b 0  y  b1x  3.855  0.237212.5  0.89

:‫وﻋﻠﻰ ذﻟك ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ‬

yˆ  0.89  0.2372x

‫( ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر‬٥٢-٤) ‫واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ً ﻓﻲ ﺷﻛل‬ 10 8 6 4 2

2.5

5

7.5

10

١٦٠

12.5

15

17.5

20


‫ﺷﻛل )‪(٥٢-٤‬‬ ‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﺑواﻗﻲ ‪ ei‬واﻟﺑواﻗﻲ اﻟﻘﯾﺎﺳﯾﺔ ‪ d i‬واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ‪. ri‬‬ ‫‪ri‬‬ ‫‪-0.79786‬‬ ‫‪-0.219701‬‬ ‫‪-0.219701‬‬ ‫‪-0.219701‬‬ ‫‪0.0693792‬‬ ‫‪-0.724443‬‬ ‫‪-0.171433‬‬ ‫‪0.658082‬‬ ‫‪0.658082‬‬ ‫‪0.934587‬‬ ‫‪-0.685733‬‬ ‫‪-0.685733‬‬ ‫‪0.143783‬‬ ‫‪0.973298‬‬ ‫‪1.52631‬‬ ‫‪-2.41093‬‬ ‫‪-1.83277‬‬ ‫‪0.190793‬‬ ‫‪1.05803‬‬ ‫‪1.63619‬‬

‫‪di‬‬

‫‪ei‬‬

‫‪yˆi‬‬

‫‪-0.739905‬‬ ‫‪-0.203742‬‬ ‫‪-0.203742‬‬ ‫‪-0.203742‬‬ ‫‪0.0643396‬‬ ‫‪-0.702374‬‬ ‫‪-0.166211‬‬ ‫‪0.638034‬‬ ‫‪0.638034‬‬ ‫‪0.906116‬‬ ‫‪-0.664842‬‬ ‫‪-0.664842‬‬ ‫‪0.139402‬‬ ‫‪0.943647‬‬ ‫‪1.47981‬‬ ‫‪-2.2358‬‬ ‫‪-1.69964‬‬ ‫‪0.176934‬‬ ‫‪0.981179‬‬ ‫‪1.51734‬‬

‫‪-0.276‬‬ ‫‪-0.076‬‬ ‫‪-0.076‬‬ ‫‪-0.076‬‬ ‫‪0.024‬‬ ‫‪-0.262‬‬ ‫‪-0.062‬‬ ‫‪0.238‬‬ ‫‪0.238‬‬ ‫‪0.338‬‬ ‫‪-0.248‬‬ ‫‪-0.248‬‬ ‫‪0.052‬‬ ‫‪0.352‬‬ ‫‪0.552‬‬ ‫‪-0.834‬‬ ‫‪-0.634‬‬ ‫‪0.066‬‬ ‫‪0.366‬‬ ‫‪0.566‬‬

‫‪2.076‬‬ ‫‪2.076‬‬ ‫‪2.076‬‬ ‫‪2.076‬‬ ‫‪2.076‬‬ ‫‪3.262‬‬ ‫‪3.262‬‬ ‫‪3.262‬‬ ‫‪3.262‬‬ ‫‪3.262‬‬ ‫‪4.448‬‬ ‫‪4.448‬‬ ‫‪4.448‬‬ ‫‪4.448‬‬ ‫‪4.448‬‬ ‫‪5.634‬‬ ‫‪5.634‬‬ ‫‪5.634‬‬ ‫‪5.634‬‬ ‫‪5.634‬‬

‫‪y‬‬ ‫‪1.8‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2‬‬ ‫‪2.1‬‬ ‫‪3‬‬ ‫‪3.2‬‬ ‫‪3.5‬‬ ‫‪3.5‬‬ ‫‪3.6‬‬ ‫‪4.2‬‬ ‫‪4.2‬‬ ‫‪4.5‬‬ ‫‪4.8‬‬ ‫‪5‬‬ ‫‪4.8‬‬ ‫‪5‬‬ ‫‪5.7‬‬ ‫‪6‬‬ ‫‪6.2‬‬

‫‪x‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪5‬‬ ‫‪10‬‬ ‫‪10‬‬ ‫‪10‬‬ ‫‪10‬‬ ‫‪10‬‬ ‫‪15‬‬ ‫‪15‬‬ ‫‪15‬‬ ‫‪15‬‬ ‫‪15‬‬ ‫‪20‬‬ ‫‪20‬‬ ‫‪20‬‬ ‫‪20‬‬ ‫‪20‬‬

‫واﻟﻣوﺿﺣﺔ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل )‪ (٥٣-٤‬وﺷﻛل )‪ (٥٤-٤‬وﺷﻛل )‪ (٥٥-٤‬ﻋﻠﻰ اﻟﺗواﻟﻲ‪.‬‬ ‫‪1‬‬ ‫‪0.75‬‬ ‫‪0.5‬‬ ‫‪0.25‬‬ ‫‪10‬‬

‫‪8‬‬

‫‪6‬‬

‫‪4‬‬

‫‪2‬‬ ‫‪-0.25‬‬ ‫‪-0.5‬‬ ‫‪-0.75‬‬ ‫‪-1‬‬

‫‪١٦١‬‬


‫ﺷﻛل )‪(٥٣-٤‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬

‫‪10‬‬

‫‪6‬‬

‫‪8‬‬

‫‪2‬‬

‫‪4‬‬

‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل )‪(٥٤-٤‬‬ ‫‪2‬‬ ‫‪1.5‬‬ ‫‪1‬‬ ‫‪0.5‬‬ ‫‪10‬‬

‫‪8‬‬

‫‪4‬‬

‫‪6‬‬

‫‪2‬‬ ‫‪-0.5‬‬ ‫‪-1‬‬ ‫‪-1.5‬‬ ‫‪-2‬‬

‫ﺷﻛل )‪(٥٥-٤‬‬ ‫ﯾﺗﺿﺢ ﻣن رﺳم اﻟﺑواﻗﻲ ﻓﻲ ﺷﻛل )‪ (٥٣-٤‬وﺷﻛل )‪ (٥٤-٤‬وﺷﻛل )‪ (٥٥-٤‬أن‬ ‫ﺗﺑﺎﯾن اﻟﺑواﻗﻲ ﻏﯾر ﺛﺎﺑت وذﻟك ﻟظﮭور اﻟﺷﻛل اﻟﻘﻣﻌﻲ اﻟﻣﻔﺗوح ﻣن أﻋﻠﻲ‪.‬‬ ‫ﺳوف ﻧﺳﺗﺧدم ﺑرﻧﺎﻣﺞ ﺟﺎھز ﻟﮭذا اﻟﻐرض وذﻟك ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ ‪.:‬‬ ‫ﻣﺛﺎل)‪(٣٢-٤‬‬ ‫ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪١٦٢‬‬


y1={1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6,4.2,4.2,4.5,4.8,5,4.8 ,5,5.7,6,6.2} {1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6,4.2,4.2,4.5,4.8,5,4.8,5, 5.7,6,6.2} {1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6,4.2,4.2,4.5,4.8,5,4.8,5, 5.7,6,6.2} {1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6,4.2,4.2,4.5,4.8,5,4.8,5, 5.7,6,6.2} x1={5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,2 0,20} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,2 0} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,2 0} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,2 0} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] sxx=c[x1,x1] 625. xb=h[x1]/l[x1] 12.5 yb=h[y1]/l[y1] 3.855 b1=c[x1,y1]/c[x1,x1] 0.2372 b0=yb-b1*xb 0.89 yy=b0+(b1*x1) {2.076,2.076,2.076,2.076,2.076,3.262,3.262,3.262,3.262,3. 262,4.448,4.448,4.448,4.448,4.448,5.634,5.634,5.634,5.634 ,5.634} e=y1-yy {-0.276,-0.076,-0.076,-0.076,0.024,-0.262,0.062,0.238,0.238,0.338,-0.248,-0.248,0.052,0.352,0.552,0.834,-0.634,0.066,0.366,0.566} t1=Transpose[{x1,y1}] {{5.,1.8},{5,2},{5,2},{5,2},{5,2.1},{10,3},{10.,3.2},{10,

١٦٣


3.5},{10,3.5},{10.,3.6},{15,4.2},{15,4.2},{15,4.5},{15,4. 8},{15,5},{20,4.8},{20,5},{20,5.7},{20,6},{20,6.2}} a=PlotRange{{0,20},{0,10}} PlotRange{{0,20},{0,10}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}] y 10 8 6 4 2 x 2.5

5

7.5

10

12.5

15

17.5

20

Graphics dd=Plot[b0+(b1*x),{x,0,20},AxesLabel{"x","y"}] y 5 4 3 2 1 x 5

10

Graphics Show[g,dd]

15

20

y 10 8 6 4 2 x 2.5

5

7.5

10

12.5

15

Graphics ١٦٤

17.5

20


n=l[x1] 20 ssto=c[y1,y1] 37.6695 ssr=c[x1,y1]^2/c[x1,x1] 35.1649 sse=ssto-ssr 2.5046 mse=sse/(n-2) 0.139144

di  e 



mse

{-0.739905,-0.203742,-0.203742,-0.203742,0.0643396,0.702374,-0.166211,0.638034,0.638034,0.906116,-0.664842,0.664842,0.139402,0.943647,1.47981,-2.2358,1.69964,0.176934,0.981179,1.51734}

1 x1  xb ^2  ri  e   mse1      N n sxx {-0.79786,-0.219701,-0.219701,-0.219701,0.0693792,0.724443,-0.171433,0.658082,0.658082,0.934587,-0.685733,0.685733,0.143783,0.973298,1.52631,-2.41093,1.83277,0.190793,1.05803,1.63619} pp1=Transpose[{yy,e}] {{2.076,-0.276},{2.076,-0.076},{2.076,-0.076},{2.076,0.076},{2.076,0.024},{3.262,-0.262},{3.262,0.062},{3.262,0.238},{3.262,0.238},{3.262,0.338},{4.448,0.248},{4.448,0.248},{4.448,0.052},{4.448,0.352},{4.448,0.552},{5.634,0.834},{5.634,0.634},{5.634,0.066},{5.634,0.366},{5.634,0.566}} aa=PlotRange{{0,8},{-1,1}} PlotRange{{0,8},{-1,1}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp1, aa, a2, AxesLabel  "y ", "e" e 1

0.75 0.5 0.25  y

1

2

3

4

5

6

-0.25 -0.5 -0.75 -1

Graphics pp2=Transpose[{yy,di}]; ١٦٥

7

8


aa=PlotRange{{0,8},{-3,3}} PlotRange{{0,8},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlot pp2, aa, a2, AxesLabel  "y ", "d" d 3 2 1  y

1

2

3

4

5

6

7

8

-1 -2 -3

Graphics pp3=Transpose[{yy,ri}]; aa=PlotRange{{0,10},{-2,2}} PlotRange{{0,10},{-2,2}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "r" r 2

1.5 1 0.5  y

2

4

6

8

10

-0.5 -1 -1.5 -2

Graphics def=Transpose[{x1,y1,yy,e,di,ri}]; TableForm[def];

(٣٣-٤)‫ﻣﺛﺎل‬ ‫ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق وﻟﻠﺗﺣﻘق أﻛﺛر ﻣن وﺟود ﻋدم ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ﻧﻘ وم ﺑ ﺈﺟراء اﺧﺗﺑ ﺎر ﺟوﻟ د‬ ‫ اﻟﻘﺳ م‬.‫ وﻹﺟراء ھذا اﻻﺧﺗﺑﺎر ﻧﻘوم ﺑﺗﻘﺳﯾم اﻟﻣﺷ ﺎھدات إﻟ ﻰ ﻗﺳ ﻣﯾن‬.‫ﻓﯾﻠد – ﻛواﻧدت‬ ‫ واﻟﻘﺳم اﻟﺛﺎﻧﻲ ﯾﺷﻣل اﻟدﺧول اﻟﻌﺎﻟﯾﮫ‬$10.000 ‫ إﻟﻲ‬$5.000 ‫اﻷول ﯾﺷﻣل اﻟدﺧول ﻓﻲ‬ ١٦٦


‫‪ $15.000‬إﻟ ﻲ ‪ $20.000‬وﻻﯾﺳ ﺗﺑﻌد ھﻧ ﺎ ﻣﺷ ﺎھدات ﻣ ن اﻟوﺳ ط وﻣ ن ﺑﻌ د ذﻟ ك ﺗﻘ وم‬ ‫ﺑﺗﻘدﯾر ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار ﻟﻠﻘﯾم اﻟﺻﻐﯾرة ﻣن ‪ x i‬وأﺧ رى ﻟﻠﻘ ﯾم اﻟﻛﺑﯾ رة ﻣ ن ‪ x i‬ﺣﯾ ث‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻟﻠﻘﯾم اﻟﺻﻐﯾرة ﻣن اﻟدﺧل ھﻲ‪:‬‬ ‫‪yˆ  .6  0.276x‬‬ ‫‪SSE 1  .3‬‬

‫وﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻟﻠﻘﯾم اﻟﻛﺑﯾرة ﻣن اﻟدﺧل ھﻲ‪:‬‬ ‫‪yˆ  1.54  0.20x‬‬ ‫‪SSE 2  2.024‬‬

‫وﺑﻣﻘﺎرﻧﺔ ﻗﯾﻣﺔ ‪ F‬اﻟﻣﺣﺳوﺑﺔ )‪ (6.7‬ﺑﺎﻟﻘﯾﻣﺔ اﻟﺟدوﻟﯾﺔ ‪ F0.01 8,8  6.03‬ﻧﺟد أن ﻗﯾﻣﺔ‬ ‫‪ F‬اﻟﻣﺣﺳوﺑﺔ أﻛﺑرﻣن اﻟﻘﯾﻣﺔ اﻟﺟدوﻟﯾﺔ وھذا ﯾﻌﻧﻲ رﻓض ﻓرض اﻟﻌدم وﻗﺑول اﻟﻔرض‬ ‫اﻟﺑدﯾل ﺑﻌدم ﺗﺟﺎﻧس اﻟﺗﺑﺎﯾن‪.‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ ‫‪p=1‬‬ ‫‪1‬‬ ‫‪=.01‬‬ ‫‪0.01‬‬ ‫}‪y1={1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6‬‬ ‫}‪{1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6‬‬ ‫}‪x1={5.,5,5,5,5,10,10.,10,10,10.‬‬ ‫}‪{5.,5,5,5,5,10,10.,10,10,10.‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪k[x_]:=h[x]/l[x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪xb=h[x1]/l[x1‬‬ ‫‪7.5‬‬ ‫]‪yb=h[y1]/l[y1‬‬ ‫‪2.67‬‬ ‫]‪b1=c[x1,y1]/c[x1,x1‬‬ ‫‪0.276‬‬ ‫‪b0=yb-b1*xb‬‬ ‫‪0.6‬‬ ‫]‪n=l[x1‬‬ ‫‪10‬‬ ‫]‪ssto=c[y1,y1‬‬ ‫‪5.061‬‬ ‫]‪ssr=c[x1,y1]^2/c[x1,x1‬‬ ‫‪١٦٧‬‬


4.761 sse=ssto-ssr 0.3 dto=n-1 9 msr=ssr/1 4.761 dse=n-2 8 mse=sse/(n-2) 0.0375 f1=msr/mse 126.96 th=TableHeadings{{source,regression,residual,total},{ano va}} TableHeadings{{source,regression,residual,total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,msr,f1] {1,4.761,4.761,126.96} rt3=List[dse,sse,mse,"---"] {8,0.3,0.0375,---} rt4=List[dto,ssto,"---","---"] {9,5.061,---,---} tf=TableForm[{rt1,rt2,rt3,rt4},th]

source regression residual total

anova df 1 8 9

SS 4.761 0.3 5.061

MS 4.761 0.0375 

y11={4.2,4.2,4.5,4.8,5,4.8,5,5.7,6,6.2} {4.2,4.2,4.5,4.8,5,4.8,5,5.7,6,6.2} x11={15,15,15,15,15,20,20,20,20,20} {15,15,15,15,15,20,20,20,20,20} l[x_]:=Length[x] h[x_]:=Apply[Plus,x] k[x_]:=h[x]/l[x] c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x] xb=h[x11]/l[x11]

35 2 yb=h[y11]/l[y11] 5.04 b1=c[x11,y11]/c[x11,x11] ١٦٨

F 126.96  


0.2 b0=yb-b1*xb 1.54 n=l[x11] 10 ssto=c[y11,y11] 4.524 ssr=c[x11,y11]^2/c[x11,x11] 2.5 sse=ssto-ssr 2.024 dto=n-1 9 msr=ssr/1 2.5 dse=n-2 8 mse1=sse/(n-2) 0.253 f1=msr/mse1 9.88142 th=TableHeadings{{source,regression,residual,total},{ano va}} TableHeadings{{source,regression,residual,total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,msr,f1] {1,2.5,2.5,9.88142} rt3=List[dse,sse,mse1,"---"] {8,2.024,0.253,---} rt4=List[dto,ssto,"---","---"] {9,4.524,---,---} tf1=TableForm[{rt1,rt2,rt3,rt4},th]

anova source df regression 1 residual 8 total 9 Maxmse, mse1 ff  Minmse, mse1

SS 2.5 2.024 4.524

MS 2.5 0.253 

F 9.88142  

6.74667 <<Statistics`ContinuousDistributions` ffee=Quantile[FRatioDistribution[n-2,n-2],1-] 6.02887 If[ff>=ffee,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho ١٦٩


‫ﻣﺛﺎل)‪(٣٤-٤‬‬

‫ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق وﺑﺈﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻣرﺟﺣﺔ ﻓ ﺈن اﻟﺑﯾﺎﻧ ﺎت اﻟﻼزﻣ ﺔ‬ ‫ﻟﺣﺳﺎب ﺗﻘدﯾرات اﻟﻣﻌﺎﻟم ‪ 1 ,0‬ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬

‫‪yw‬‬

‫‪xyw‬‬

‫‪xw‬‬

‫‪١٧٠‬‬

‫‪1‬‬ ‫‪x2‬‬

‫‪w‬‬

‫‪y‬‬

‫‪x‬‬


5 5

1.8 2

5

2

5

2

5

2.1

10

3

10 10

3.2 3.5

10

3.5

10 15

3.6 4.2

15

4.2

15

4.5

15

4.8

15

5

20

4.8

20

5

20

5.7

20

6

20

6.2

0.04

0.2

0.36

0.072

1 25 1 25 1 25 1 25 1 100

1 5 1 5 1 5 1 5 1 10

2 5 2 5 2 5

2 25 2 25 2 25

0.42

0.084

3 10

3 100

0.01

0.1

1 100 1 100

1 10 1 10

0.32` 0.35

0.032` 0.035`

0.35

0.035`

0.01

0.1

1 225 1 225 1 225 1 225 1 225 1 400 1 400 1 400 1 400 1 400

1 15 1 15 1 15 1 15 1 15 1 20 1 20 1 20 1 20 1 20

0.36 0.28

0.036 0.0186667

0.28

0.018667

0.3

0.02

0.32

0.0213333

1 3

1 45

0.24

0.012

1 4

1 80

0.285

0.01425

3 10

3 200

0.31

0.0155

: ‫وﻋﻠﻰ ذﻟك‬  w i x i yi

b1   w ixi

2

 w i x i  w i yi  wi 2   wixi  

١٧١

 wi


‫‪ 0.249487 ,‬‬

‫‪ b1  w i x i‬‬ ‫‪ wi‬‬

‫‪ w i yi‬‬

‫‪b0 ‬‬

‫‪=0.752923‬‬

‫وﻋﻠﻰ ذﻟك ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون‪:‬‬

‫‪yˆ  0.752923  0.249487 x‬‬

‫ﯾﺗم ﺣﺳﺎب ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻰ ﻣن اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬

‫‪w ( y  yˆ) 2‬‬

‫‪( y  yˆ) 2‬‬

‫ˆ‪y  y‬‬

‫‪١٧٢‬‬

‫ˆ‪y‬‬

‫‪y‬‬

‫‪w‬‬


‫‪- 0.200359‬‬

‫‪2.00036‬‬ ‫‪2.00036‬‬

‫‪1.8‬‬ ‫‪2‬‬ ‫‪2‬‬

‫‪0.00160575‬‬ ‫‪5.1545 ´ 10- 9‬‬

‫‪0.0401437‬‬ ‫‪1.28863 ´ 10- 7‬‬

‫‪- 0.000358974‬‬

‫‪5.1545 ´ 10- 9‬‬

‫‪1.28863 ´ 10- 7‬‬

‫‪- 0.000358974‬‬

‫‪2.00036‬‬

‫‪5.1545 ´ 10- 9‬‬

‫‪1.28863 ´ 10- 7‬‬

‫‪- 0.000358974‬‬

‫‪2.00036‬‬

‫‪2‬‬

‫‪0.000397133‬‬

‫‪0.00992833‬‬

‫‪0.099641‬‬

‫‪2.00036‬‬

‫‪2.1‬‬

‫‪0.000614023‬‬

‫‪0.0614023‬‬

‫‪- 0.247795‬‬

‫‪3.24779‬‬

‫‪3‬‬

‫‪0.0000228435‬‬ ‫‪0.000636074‬‬

‫‪0.00228435‬‬ ‫‪0.0636074‬‬

‫‪- 0.0477949‬‬

‫‪0.252205‬‬

‫‪3.24779‬‬ ‫‪3.24779‬‬

‫‪3.2‬‬ ‫‪3.5‬‬

‫‪0.000636074‬‬

‫‪0.0636074‬‬

‫‪0.252205‬‬

‫‪3.24779‬‬

‫‪3.5‬‬

‫‪0.00124048‬‬ ‫‪0.000387383‬‬

‫‪0.124048‬‬ ‫‪0.0871612‬‬

‫‪0.352205‬‬ ‫‪- 0.295231‬‬

‫‪3.24779‬‬ ‫‪4.49523‬‬

‫‪3.6‬‬ ‫‪4.2‬‬

‫‪0.000387383‬‬

‫‪0.0871612‬‬

‫‪- 0.295231‬‬

‫‪4.49523‬‬

‫‪4.2‬‬

‫‪1.01091 ´ 10- 7‬‬

‫‪0.0000227456‬‬

‫‪0.00476923‬‬

‫‪4.49523‬‬

‫‪4.5‬‬

‫‪0.000412819‬‬

‫‪0.0928843‬‬

‫‪0.304769‬‬

‫‪4.49523‬‬

‫‪4.8‬‬

‫‪0.00113241‬‬

‫‪0.254792‬‬

‫‪0.504769‬‬

‫‪4.49523‬‬

‫‪5‬‬

‫‪0.00222155‬‬

‫‪0.88862‬‬

‫‪- 0.942667‬‬

‫‪5.74267‬‬

‫‪4.8‬‬

‫‪0.00137888‬‬

‫‪0.551554‬‬

‫‪- 0.742667‬‬

‫‪5.74267‬‬

‫‪5‬‬

‫‪4.55111 ´ 10- 6‬‬

‫‪0.00182044‬‬

‫‪- 0.0426667‬‬

‫‪5.74267‬‬

‫‪5.7‬‬

‫‪0.000165551‬‬

‫‪0.0662204‬‬

‫‪0.257333‬‬

‫‪5.74267‬‬

‫‪6‬‬

‫‪0.000522884‬‬

‫‪0.209154‬‬

‫‪0.457333‬‬

‫‪5.74267‬‬

‫‪6.2‬‬

‫ﺣﯾث ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﺳوف ﺗﻛون‪:‬‬ ‫‪SSE   w y i  yˆ i 2‬‬

‫ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠﻲ ﺳوف ﯾﻛون‪:‬‬ ‫‪2‬‬ ‫‪‬‬ ‫‪ w i yi ‬‬ ‫‪‬‬ ‫‪ wi‬‬

‫‪2‬‬

‫‪SSTO   yi w i‬‬

‫‪ 0.307804‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬

‫‪١٧٣‬‬

‫‪0.04‬‬ ‫‪1‬‬ ‫‪25‬‬ ‫‪1‬‬ ‫‪25‬‬ ‫‪1‬‬ ‫‪25‬‬ ‫‪1‬‬ ‫‪25‬‬ ‫‪1‬‬ ‫‪100‬‬

‫‪0.01‬‬ ‫‪1‬‬ ‫‪100‬‬ ‫‪1‬‬ ‫‪100‬‬

‫‪0.01‬‬ ‫‪1‬‬ ‫‪225‬‬ ‫‪1‬‬ ‫‪225‬‬ ‫‪1‬‬ ‫‪225‬‬ ‫‪1‬‬ ‫‪225‬‬ ‫‪1‬‬ ‫‪225‬‬ ‫‪1‬‬ ‫‪400‬‬ ‫‪1‬‬ ‫‪400‬‬ ‫‪1‬‬ ‫‪400‬‬ ‫‪1‬‬ ‫‪400‬‬ ‫‪1‬‬ ‫‪400‬‬


‫ﻣ ن اﻟﺟ دول اﻟﺳ ﺎﺑق وﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ ‪ F‬اﻟﻣﺣﺳ وﺑﺔ ﺗزﯾ د ﻋ ن اﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ‬ ‫‪ F0.05 1,18  4.413‬ﻓﺈﻧﻧﺎ ﻧﻘﺑل اﻟﻔرض اﻟﺑدﯾل أن ‪. H1 : 1  0‬‬ ‫ﯾﻌطﻲ ﺷﻛل )‪ (٥٦-٤‬رﺳم اﻟﺑواﻗﻲ ‪ w y  yˆ ‬ﻣﻘﺎﺑل ‪ ، w i y i‬ﻛﻣﺎ ﯾﻌطﻲ‬ ‫ﺷﻛل )‪ (٥٧-٤‬رﺳم اﻟﺑواﻗﻲ ‪ w y i  yˆ i ‬ﻣﻘﺎﺑل ‪ . w i x i‬ﯾﺗﺿﺢ ﻣن ﺷﻛل )‪-٤‬‬ ‫‪ (٥٦‬وﺷﻛل )‪ (٥٧-٤‬أن اﻟﺑواﻗﻲ ﺗﻧﺗﺷر ﺣول اﻟﺻﻔر وھذا ﯾﻌﻧﻲ ﺗﺟﺎﻧس اﻟﺗﺑﺎﯾن‪.‬‬ ‫ﺷﻛل )‪(٥٦-٤‬‬

‫‪0.1‬‬

‫‪0.05‬‬

‫‪0.5‬‬

‫‪0.45‬‬

‫‪0.4‬‬

‫‪0.3‬‬

‫‪0.35‬‬

‫‪0.25‬‬ ‫‪-0.05‬‬

‫‪-0.1‬‬

‫‪0.1‬‬

‫‪0.05‬‬

‫‪5‬‬

‫‪4‬‬

‫‪3‬‬

‫‪2‬‬

‫‪1‬‬ ‫‪-0.05‬‬

‫‪-0.1‬‬

‫‪١٧٤‬‬


(٥٧-٤) ‫ﺷﻛل‬ ‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ ww={5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,2 0,20} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,2 0} w=N[1/ww^2] {0.04,0.04,0.04,0.04,0.04,0.01,0.01,0.01,0.01,0.01,0.0044 4444,0.00444444,0.00444444,0.00444444,0.00444444,0.0025,0 .0025,0.0025,0.0025,0.0025} p=1;

y1={1.8,2,2,2,2.1,3,3.2,3.5,3.5,3.6,4.2,4.2,4.5,4.8,5,4.8 ,5,5.7,6,6.2}; x1={5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,2 0,20}; l[x_]:=Length[x] ff[x_]:=Apply[Plus,x] g[x_]:=((ff[x])^2)/l[x] h[x_]:=ff[x^2] rr[x_]:=h[x]-g[x] n=l[x1] 20

b1  ffx1  y1  w  ffx1  w  ffy1  w  ffw 

ffw  x1^2     ffx1^2  w   ffw   0.249487

b0 

ffy1  w  ffx1  w    b1  ffw ffw  

0.752923 yy=b0+b1*x1; err=ff[w*((y1-yy)^2)]; ١٧٥


0.0117659 0.0117659 ; ss=Transpose[{x1,y1,w,x1*w,x1*y1*w,y1*w}]; TableForm[ss]; yy=b0+b1*x1; sss=Transpose[{w,y1,yy,y1-yy,(y1-yy)^2,w*(y1-yy)^2}]; TableForm[sss]; ssr=ssto-err; 0.296038 mssrr=ssr/p; 0.296038 dfr=(n-p-1); 18 s2=err/dfr; 0.000653662 f=mssrr/s2; 452.891 th=TableHeadings->{{source,regression,residual, Total},{anova}} TableHeadings{{source,regression,residual,Total},{anova} }; rt1=List["df","SS","MS","F"]; {df,SS,MS,F} rt2=List[p,ssr,mssrr,f]; rt3=List[dfr,err,s2,"--"]; rt4=List[n-1,ssto,"--","--"]; tf=TableForm[{rt1,rt2,rt3,rt4},th]

source regression residual Total

anova df 1 18 19

SS 0.296038 0.0117659 0.307804

MS 0.296038 0.000653662

 <<Statistics` ContinuousDistributions` ffee=Quantile[FRatioDistribution[p,n-p-1],.95] 4.41387 If[f>=ffee,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho

F 452.891  

eefk=ListPlot[eede,Prolog{PointSize[.02]},PlotRange->{{.2,.5},{.1,.1}}]

١٧٦


‫‪0.1‬‬

‫‪0.05‬‬

‫‪0.5‬‬

‫‪0.45‬‬

‫‪0.4‬‬

‫‪0.3‬‬

‫‪0.35‬‬

‫‪0.25‬‬ ‫‪-0.05‬‬

‫‪-0.1‬‬

‫‪Graphics‬‬

‫{‪eefk=ListPlot[ee1,Prolog{PointSize[.02]},PlotRange->{{0,5},‬‬‫]}}‪.1,.1‬‬

‫‪0.1‬‬

‫‪0.05‬‬

‫‪5‬‬

‫‪3‬‬

‫‪4‬‬

‫‪2‬‬

‫‪1‬‬ ‫‪-0.05‬‬

‫‪-0.1‬‬

‫‪Graphics‬‬

‫)‪ (٣-١٥-٤‬طرﯾﻘﺔ ﻟﺣﺳﺎب اﻻوزان‬ ‫ﻓﻲ ﻛﺛﯾر ﻣن اﻟﻣﺷﺎﻛل ﻓﺈن اﻻوزان ﻻﺗﻛون ﻣﻌروﻓﮫ ﻓﻲ اﻟﺑداﯾﮫ وﻧﺣﺗﺎج إﻟﻰ ﺗﻘ دﯾرھﺎ‬ ‫ﺑﺎﻻﻋﺗﻣ ﺎد ﻋﻠ ﻰ ﻧﺗ ﺎﺋﺞ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى اﻟﻌﺎدﯾ ﮫ ﻓ ﻲ اﻟﺟ زء اﻟﺗ ﺎﻟﻲ ﺳ وف ﻧﺷ رح‬ ‫طرﯾﻘﺔ ﻹﯾﺟﺎد اﻻوزان ‪: w i‬‬ ‫ﻹﯾﺟﺎد اﻷوزان ‪ wi‬ﻧﺗﺑﻊ اﻟﺧطوات اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫‪ .١‬ﻧﺣﺳ ب ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار اﻟﻣﻘ درة ﺑﺎﺳ ﺗﺧدام طرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﻌﺎدﯾ ﺔ وﺗرﺳ م‬ ‫اﻟﺑواﻗﻲ ﻣﻘﺎﺑل ‪ yˆ i‬أو ‪ xˆ i‬إذا ﻛﺎن اﻧﺗﺷﺎر اﻟﻧﻘﺎط ﻓ ﻲ رﺳ م اﻟﺑ واﻗﻲ ﻋﻠ ﻲ ﺷ ﻛل‬ ‫ﻗﻣ ﻊ ﻣﻔﺗ وح ﻣ ن أﻋﻠ ﻰ أو ﻣ ن أﺳ ﻔل ﻋﻠ ﻲ ﺷ ﻛل ﻗوﺳ ﯾن ﻓﮭ ذا ﯾ دل ﻋﻠ ﻲ ﻋ دم‬ ‫ﺗﺟﺎﻧس اﻟﺗﺑﺎﯾن‪.‬‬

‫‪١٧٧‬‬


‫‪ .٢‬ﺑﺎﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻌﺎدﯾﺔ ﻧﺣﺳب ﻣﻌﺎدﻟﺔ اﻻﻧﺣ دار اﻟﻣﻘ درة‬ ‫ﺑﺎﺳﺗﺧدام اﻟﻘﯾم اﻟﻣطﻠﻘﺔ ‪ e i‬ﻣﻘﺎﺑل ﻗﯾم ‪ xˆ i‬أو ﻗﯾم ‪. yˆ i‬‬ ‫ﻧﺳﺗﺧدم ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة اﻟﻣﺣﺳوﺑﺔ ﻣن اﻟﺧطوة اﻟﺛﺎﻧﯾﺔ ﻓﻲ ﺗﻘدﯾر‬ ‫اﻷوزان ‪ wi‬اﻟﻼزﻣﺔ ﻟطرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻣرﺟﺣﺔ‪.‬‬ ‫ﻣﺛﺎل)‪(٣٥-٤‬‬ ‫ﺗﮭﺗم ﺑﺎﺣﺛﺔ ﺻﺣﯾﺔ ﺑدراﺳﺔ اﻟﻌﻼﻗﺔ ﺑﯾن ﺿﻐط اﻟدم اﻻﻧﺑﺳﺎطﻲ واﻟﻌﻣر ﻋﻧد اﻟﻧﺳﺎء‬ ‫اﻟﺑﺎﻟﻐﺎت اﻟﻠواﺗﻲ ﯾﺗﻣﺗﻌن ﺑﺻﺣﺔ ﺟﯾدة وﺗﺗراوح أﻋﻣﺎرھم ﺑﯾن ‪ 20‬و ‪ 60‬ﻋﺎﻣ ﺎ ً‪ ،‬وﻗ د‬ ‫ﺟﻣﻌ ت ﺑﯾﺎﻧ ﺎت إﺣﺻ ﺎﺋﯾﺔ ﻋ ن ‪ 54‬أﻣ رأة واﻟﺑﯾﺎﻧ ﺎت ﻣﻌط ﺎه ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ‪.‬‬ ‫ﯾوﺿ ﺢ ﺷ ﻛل اﻻﻧﺗﺷ ﺎر اﻟﻣﻌط ﻲ ﻓ ﻲ ﺷ ﻛل)‪ (٥٨-٤‬ان اﻟﻌﻼﻗ ﺔ ﺑ ﯾن ‪ x , Y‬ﻋﻼﻗ ﮫ‬ ‫ﺧطﯾﮫ‪.‬‬ ‫‪xy‬‬

‫‪x2‬‬

‫‪y‬‬

‫‪١٧٨‬‬

‫‪x‬‬


21. 22. 24 23 20 20 24 27 25 29 25 28 26 32 33 31 34 33 30 31 38 37 38 35 37 39 40 42 43 43 44 40 42 46 49 46 46 47 45 49 48 54 52 53 52 50 50 52 55 57 56 59 58 57

66. 63 75 70 65 70 72 73 71 79 68 67 79 76 69 66 73 76 73 80 91 78 87 79 68 75 70 72 80 75 71 90 85 89 101 83 80 96 92. 80 70 71 86 79 85 71 91 100 76 99 92 90 80 109

١٧٩

441. 484. 576 529 400 400 576 729 625 841 625 784 676 1024 1089 961 1156 1089 900 961 1444 1369 1444 1225 1369 1521 1600 1764 1849 1849 1936 1600 1764 2116 2401 2116 2116 2209 2025 2401 2304 2916 2704 2809 2704 2500 2500 2704 3025 3249 3136 3481 3364 3249

1386. 1386. 1800 1610 1300 1400 1728 1971 1775 2291 1700 1876 2054 2432 2277 2046 2482 2508 2190 2480 3458 2886 3306 2765 2516 2925 2800 3024 3440 3225 3124 3600 3570 4094 4949 3818 3680 4512 4140. 3920 3360 3834 4472 4187 4420 3550 4550 5200 4180 5643 5152 5310 4640 6213


‫‪120‬‬ ‫‪100‬‬ ‫‪80‬‬ ‫‪60‬‬ ‫‪40‬‬ ‫‪20‬‬

‫‪70‬‬

‫‪50‬‬

‫‪60‬‬

‫‪40‬‬

‫‪30‬‬

‫‪10‬‬

‫‪20‬‬

‫ﺷﻛل )‪(٥٨-٤‬‬ ‫اﻵن ﻧﺣﺳب ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻛﺎﻟﺗﺎﻟﻲ‪:‬‬

‫‪ x y‬‬

‫‪ xy ‬‬

‫‪n‬‬ ‫‪2‬‬ ‫‪2  x ‬‬ ‫‪x ‬‬ ‫‪n‬‬

‫‪2137 4272 ‬‬ ‫‪4094 .56‬‬ ‫‪7059.2‬‬

‫‪‬‬

‫‪b1 ‬‬

‫‪173155 ‬‬

‫‪54‬‬ ‫‪‬‬ ‫‪2137 2‬‬ ‫‪91629 ‬‬ ‫‪54‬‬

‫‪‬‬

‫‪ 0 .580031 ,‬‬

‫‪b 0  y  b1x‬‬

‫‪١٨٠‬‬


‫‪.‬‬

‫‪ 79.1111  (0.580031)39.5741  56.1569‬‬

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون‪:‬‬

‫‪yˆ  56.1569  0.580031x‬‬

‫اﻟﺑواﻗﻲ ‪ e i  y i  yˆ i‬ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪.‬‬

‫‪e‬‬

‫ˆ‪y‬‬

‫‪y‬‬

‫‪١٨١‬‬

‫‪x‬‬


21 22 24 23 20 20 24 27 25 29 25 28 26 32 33 31 34 33 30 31 38 37 38 35 37 39 40 42 43 43 44 40 42 46 49 46 46 47 45 49 48 54 52 53 52 50 50 52 55 57 56 59 58 57

66 63 75 70 65 70 72 73 71 79 68 67 79 76 69 66 73 76 73 80 91 78 87 79 68 75 70 72 80 75 71 90 85 89 101 83 80 96 92 80 70 71 86 79 85 71 91 100 76 99 92 90 80 109

68.3376 68.9176 70.0777 69.4976 67.7575 67.7575 70.0777 71.8178 70.6577 72.9778 70.6577 72.3978 71.2377 74.7179 75.2979 74.1379 75.878 75.2979 73.5579 74.1379 78.1981 77.6181 78.1981 76.458 77.6181 78.7781 79.3582 80.5182 81.0983 81.0983 81.6783 79.3582 80.5182 82.8383 84.5784 82.8383 82.8383 83.4184 82.2583 84.5784 83.9984 87.4786 86.3185 86.8986 86.3185 85.1585 85.1585 86.3185 88.0586 89.2187 88.6387 90.3787 89.7987 89.2187

١٨٢

- 2.33758 - 5.91761

4.92233 0.502362 - 2.75755 2.24245 1.92233 1.18224 0.342301 6.02218 - 2.6577 - 5.39779 7.76227 1.28209 - 6.29795 - 8.13788 - 2.87798 0.702054 - 0.557853 5.86212 12.8019 0.381931 8.8019 2.54199 - 9.61807 - 3.77813 - 9.35816 - 8.51822 - 1.09825 - 6.09825 - 10.6783 10.6418 4.48178 6.16165 16.4216 0.161654 - 2.83835 12.5816 9.74168 - 4.57844 - 13.9984 - 16.4786 - 0.318531 - 7.89856 - 1.31853 - 14.1585 5.84153 13.6815 - 12.0586 9.78132 3.36135 - 0.378746 - 9.79872 19.7813


‫ﯾوﺿﺢ رﺳم اﻟﺑ واﻗﻲ ‪ ei‬ﻣﻘﺎﺑ ل ‪ x i‬واﻟﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )‪ (٥٩-٤‬أن ﺗﺑ ﺎﯾن اﻟﺑ واﻗﻲ‬ ‫ﻏﯾر ﺛﺎﺑت ﺣﯾث ﺷﻛل اﻻﻧﺗﺷﺎر ﯾﺄﺧذ ﺷﻛل اﻟﻘﻣﻊ اﻟﻣﻔﺗوح ﻣن اﻷﻣﺎم‪.‬‬

‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬

‫‪95‬‬

‫‪90‬‬

‫‪85‬‬

‫‪80‬‬

‫‪75‬‬

‫‪70‬‬

‫‪65‬‬ ‫‪-10‬‬ ‫‪-20‬‬ ‫‪-30‬‬

‫ﺷﻜﻞ )‪(٥٩-٤‬‬

‫اﻵن ﻧﺳ ﺗﺧدم ﻗ ﯾم ‪ e i‬و ‪ x i‬ﻷﯾﺟ ﺎد ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار اﻟﻣﻘ درة وذﻟ ك ﻣ ن اﻟﺑﯾﺎﻧ ﺎت‬ ‫اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬

‫‪xe‬‬

‫‪x2‬‬

‫‪e‬‬

‫‪١٨٣‬‬

‫‪x‬‬


21 22 24 23 20 20 24 27 25 29 25 28 26 32 33 31 34 33 30 31 38 37 38 35 37 39 40 42 43 43 44 40 42 46 49 46 46 47 45 49 48 54 52 53 52 50 50 52 55 57 56 59 58 57

2.33758 5.91761 4.92233 0.502362 2.75755 2.24245 1.92233 1.18224 0.342301 6.022178 2.657699 5.397792 7.76227 1.28209 6.29795 8.13788 2.87798 0.702054 0.557853 5.86212 12.8019 0.381931 8.8019 2.54199 9.61807 3.77813 9.35816 8.518222 1.09825 6.09825 10.67828 10.64183 4.48178 6.16165 16.4216 0.16165 2.83835 12.5816 9.74168 4.57844 13.9984 16.4786 0.318531 7.898561 1.31853 14.1585 5.84153 13.6815 12.0586 9.78132 3.36135 0.378746 9.79872 19.7813

2137

441.` 484.` 576 529 400 400 576 729 625 841 625 784 676 1024 1089 961 1156 1089 900 961 1444 1369 1444 1225 1369 1521 1600 1764 1849 1849 1936 1600 1764 2116 2401 2116 2116 2209 2025 2401 2304 2916 2704 2809 2704 2500 2500 2704 3025 3249 3136 3481 3364 3249

339.822

91629

 x  2137 ,  e  339.822  x 2  91629 , x e  14847 ١٨٤

49.0891 130.187` 118.136 11.5543 55.1509 44.8491 46.136 31.9205 8.55752 174.643 66.4425 151.138 201.819 41.0267 207.832 252.274 97.8512 23.1678 16.7356 181.726 486.472 14.1315 334.472 88.9697 355.869 147.347 374.326 357.765 47.2249 262.225 469.845 425.674 188.235 283.436 804.657 7.43608 130.564 591.336 438.376 224.343 671.924 889.844 16.5636 418.624 68.5636 707.923 292.077 711.436 663.224 557.535 188.235 22.346 568.326 1127.53

14847.1


‫ﺣﯾث‪:‬‬ ‫‪e‬‬

‫‪ x‬‬

‫‪‬‬

‫‪xe‬‬

‫‪n‬‬ ‫‪2‬‬ ‫‪2  x ‬‬ ‫‪x ‬‬ ‫‪n‬‬

‫‪2137 339.822‬‬

‫‪b1 ‬‬

‫‪14847.1 ‬‬

‫‪54‬‬ ‫‪‬‬ ‫‪2137 2‬‬ ‫‪91629 ‬‬ ‫‪54‬‬ ‫‪1398.94‬‬ ‫‪‬‬ ‫‪ 0.198172,‬‬ ‫‪7059.2‬‬ ‫‪ | e i |‬‬ ‫‪ xi‬‬ ‫‪b0 ‬‬ ‫‪ b1‬‬ ‫‪n‬‬ ‫‪n‬‬ ‫‪ 6.29301  0.198172 39.5741‬‬ ‫‪ 1.54998 .‬‬ ‫‪‬‬

‫وﻋﻠﻰ ذﻟك ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون‪:‬‬ ‫‪s  1.54948  0.198172 x‬‬

‫ﺣﯾث ‪ s‬ﺗﻣﺛل اﻻﻧﺣراﻓﺎت اﻟﻣﻌﯾﺎرﯾﺔ‪.‬‬ ‫واﻷن ﻷﯾﺟ ﺎد اﻷﻧﺣ راف اﻟﻣﻌﯾ ﺎري ﻟﻛ ل ﻣﺷ ﺎھده ‪ yi‬ﻧﻌ وض ﺑﻘﯾﻣ ﺔ ‪ xi‬ﻓ ﻲ اﻟﻣﻌﺎدﻟ ﮫ‬ ‫اﻟﺳ ﺎﺑﻘﮫ ‪ .‬اﻟ وزن ‪ wi‬ﻟﻛ ل ﻣﺷ ﺎھده ‪ yi‬ھ و ﻣﻌﻛ وس ﻣرﺑ ﻊ اﻷﻧﺣ راف اﻟﻣﻌﯾ ﺎري‬ ‫واﻟﻣﺣﺳوب ﻣن اﻟﻣﻌﺎدﻟﮫ اﻟﻣﻘدره اﻟﺳﺎﺑﻘﮫ واﻟﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪.‬‬

‫‪1 s2  w‬‬

‫‪s‬‬

‫‪0.14657‬‬ ‫‪0.126617‬‬ ‫‪0.0972512‬‬ ‫‪0.110485‬‬ ‫‪0.171608‬‬

‫‪2.61214‬‬ ‫‪2.81031‬‬ ‫‪3.20666‬‬ ‫‪3.00849‬‬ ‫‪2.41397‬‬ ‫‪١٨٥‬‬


2.41397 3.20666 3.80117 3.40483 4.19752 3.40483 3.99935 3.603 4.79204 4.99021 4.59386 5.18838 4.99021 4.39569 4.59386 5.98107 5.38655 5.7829 5.98107 5.38655 5.7829 6.17924 6.37741 6.77376 6.97193 6.97193 7.1701 6.37741 6.77376 7.56645 8.16097 7.56645 7.56645 7.76462 7.36828 8.16097 7.96279 9.151839 8.75548 8.95365 8.75548 8.35914 8.35914 8.75548 9.35 9.74634 9.54817 10.1427 9.94452 9.74634

0.171608 0.0972512 0.0692093 0.0862599 0.0567564 0.0862599 0.0625204 0.077032 0.0435472 0.040157 0.0473853 0.0371481 0.0401571 0.0517542 0.0473853 0.0279539 0.0299026 0.0279539 0.034465 0.0299026 0.0261896 0.0245873 0.0217942 0.0205728 0.0205728 0.0194513 0.0245837 0.0217942 0.0174669 0.015047 0.0174669 0.0174669 0.0165867 0.0165867 0.0184191 0.0150147 0.0157714 0.0119395 0.0130449 0.0124738 0.0130449 0.0143112 0.0143112 0.0130449 0.0114387 0.0105273 0.0109688 0.00972062 0.0101119 0.0105273 ١٨٦


‫اﻵن ﻧوﺟد ﺗﻘدﯾرات ﻟﻠﻣﻌﺎﻟم ‪ 0 ,1‬ﻛﺎﻟﺗﺎﻟﻲ‪:‬‬

‫‪ x i w i  yi w i‬‬ ‫‪ wi‬‬

‫‪ x i w i 2‬‬ ‫‪ wi‬‬

‫‪ x i yi w i‬‬

‫‪‬‬

‫‪b1 ‬‬ ‫‪wi ‬‬

‫‪2‬‬

‫‪ xi‬‬

‫‪ 0 .596342 ,‬‬ ‫‪ xiwi‬‬

‫‪ b1‬‬

‫‪ yi w i‬‬

‫‪n‬‬ ‫‪n‬‬ ‫‪ 55.5658.‬‬

‫‪b0 ‬‬

‫‪ .‬ﻻﺧﺗﺑﺎر ﻓ رض اﻟﻌ دم ‪ H 0 : 1  0‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 : 1  0‬ﻧﺣﺳ ب‬ ‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ اﻟﻣرﺟﺣﺔ ﻣن ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن اﻟﺗﺎﻟﻰ ﺣﯾث‪:‬‬ ‫‪SSE   w i ( y i  yˆ i ) 2‬‬

‫‪= 76.5135,‬‬

‫ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠﯾﺔ ﺳوف ﺗﻛون‪:‬‬ ‫‪ y i w i 2‬‬ ‫‪2‬‬ ‫‪SYY   y w i ‬‬ ‫‪i‬‬ ‫‪ wi‬‬ ‫‪=159.854.‬‬

‫‪F‬‬ ‫‪56.64‬‬

‫‪MS‬‬

‫‪SS‬‬

‫‪83.3408 83.3408‬‬ ‫‪١٨٧‬‬

‫‪df‬‬

‫‪Source‬‬

‫‪1‬‬

‫‪Regression‬‬


Residual

52

76.5135 1.47141

-

Total

53

159.854

-

-

‫ اﻟﺟدوﻟﯾ ﮫ‬F ‫( ﺗزﯾ د ﻋ ن ﻗﯾﻣ ﺔ‬56.64) ‫ اﻟﻣﺣﺳ وﺑﺔ‬F ‫ﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ‬ .H0 ‫ ﻓﺈﻧﻧﺎ ﻧرﻓض ﻓرض اﻟﻌدم‬F0.05 [1,52]  4.08 :‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل وذﻟك ﺑﺎﺳﺗﺧدام اﻟﺤﺰﻣﺔ اﻟﺠﺎھﺰة‬ Statistics LinearRegression .‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬

<<Statistics`LinearRegression` bpdata={{21,66},{22,63},{24,75},{23,70},{20,65},{20,70},{ 24,72},{27,73},{25,71},{29,79},{25,68},{28,67},{26,79},{3 2,76},{33,69},{31,80},{34,73},{33,76},{30,73},{31,66},{38 ,87},{37,78},{38,91},{35,79},{37,68},{39,75},{40,70},{42, 72},{43,80},{43,75},{44,71},{40,90},{42,85},{46,89},{49,1 01},{46,83},{46,80},{47,96},{45,92},{49,80},{48,70},{54,7 1},{52,86},{53,79},{52,85},{50,71},{50,91},{52,100},{55,7 6},{57,99},{56,92},{59,90},{58,80},{57,109}}; ListPlot[bpdata,PlotRange->{{0,70},{0,120}}] 120 100 80 60 40 20

10

20

30

40

50

60

70

Graphics rgbp=Regress[bpdata,{1,x},x,RegressionReport->BestFit] {BestFit56.1569 +0.580031 x} rs=Regress[bpdata,{1,x},x,RegressionReport>FitResiduals][[1,2]] {-2.33758,-5.91761,4.92233,0.502362,2.75755,2.24245,1.92233,1.18224,0.342301,6.02218,2.6577,-5.39779,7.76227,1.28209,-6.29795,5.86212,2.87798,0.702054,-0.557853,8.13788,8.8019,0.381931,12.8019,2.54199,-9.61807,3.77813,-9.35816,-8.51822,-1.09825,-6.09825,10.6783,10.6418,4.48178,6.16165,16.4216,0.161654,١٨٨


2.83835,12.5816,9.74168,-4.57844,-13.9984,-16.4786,0.318531,-7.89856,-1.31853,-14.1585,5.84153,13.6815,12.0586,9.78132,3.36135,-0.378746,-9.79872,19.7813} ages=Transpose[bpdata][[1]]; respoints2=Table[{ages[[j]],rs[[j]]},{j,1,Length[ages]}] {{21,-2.33758},{22,5.91761},{24,4.92233},{23,0.502362},{20,2.75755},{20,2.24245},{24,1.92233},{27,1.18224},{25,0.342 301},{29,6.02218},{25,-2.6577},{28,5.39779},{26,7.76227},{32,1.28209},{33,6.29795},{31,5.86212},{34,-2.87798},{33,0.702054},{30,0.557853},{31,8.13788},{38,8.8019},{37,0.381931},{38,12.8019},{35,2.541 99},{37,-9.61807},{39,-3.77813},{40,-9.35816},{42,8.51822},{43,-1.09825},{43,-6.09825},{44,10.6783},{40,10.6418},{42,4.48178},{46,6.16165},{49,16.42 16},{46,0.161654},{46,2.83835},{47,12.5816},{45,9.74168},{49,-4.57844},{48,13.9984},{54,-16.4786},{52,-0.318531},{53,-7.89856},{52,1.31853},{50,-14.1585},{50,5.84153},{52,13.6815},{55,12.0586},{57,9.78132},{56,3.36135},{59,-0.378746},{58,9.79872},{57,19.7813}} ListPlot[respoints2,PlotRange->{{0,100},{-30,30}}] 30 20 10

20

40

60

80

100

-10 -20 -30

Graphics sqres=Table[rs[[j]]^2,{j,1,Length[rs]}] {5.46426,35.0181,24.2293,0.252368,7.60406,5.0286,3.69536, 1.39769,0.11717,36.2666,7.06337,29.1362,60.2528,1.64374,3 9.6641,34.3644,8.28275,0.49288,0.3112,66.2252,77.4734,0.1 45871,163.889,6.46173,92.5072,14.2743,87.5752,72.5601,1.2 0616,37.1887,114.026,113.249,20.0863,37.966,269.668,0.026 132,8.05621,158.297,94.9004,20.9621,195.955,271.544,0.101 462,62.3873,1.73852,200.462,34.1235,187.183,145.41,95.674 1,11.2986,0.143449,96.0148,391.3} absres=Table[Abs[rs[[j]]],{j,1,Length[rs]}]; absrespoints=Table[{ages[[j]],absres[[j]]},{j,1,Length[ag es]}]; ١٨٩


absregress=Regress[absrespoints,{1,x},x,RegressionReport>BestFit] {BestFit-1.54948+0.198172 x} pred=absregress=Regress[absrespoints,{1,x},x,RegressionRe port->PredictedResponse] {PredictedResponse{2.61214,2.81031,3.20666,3.00849,2.413 97,2.41397,3.20666,3.80117,3.40483,4.19752,3.40483,3.9993 5,3.603,4.79204,4.99021,4.59386,5.18838,4.99021,4.39569,4 .59386,5.98107,5.7829,5.98107,5.38655,5.7829,6.17924,6.37 741,6.77376,6.97193,6.97193,7.1701,6.37741,6.77376,7.5664 5,8.16097,7.56645,7.56645,7.76462,7.36828,8.16097,7.96279 ,9.15183,8.75548,8.95365,8.75548,8.35914,8.35914,8.75548, 9.35,9.74634,9.54817,10.1427,9.94452,9.74634}} f[x_]:=1/x^2 wghts1=Map[f,pred[[1,2]]] {0.146557,0.126617,0.0972512,0.110485,0.171608,0.171608,0 .0972512,0.0692093,0.0862599,0.0567564,0.0862599,0.062520 4,0.077032,0.0435472,0.0401571,0.0473853,0.0371481,0.0401 571,0.0517542,0.0473853,0.0279539,0.0299026,0.0279539,0.0 34465,0.0299026,0.0261896,0.0245873,0.0217942,0.0205728,0 .0205728,0.0194513,0.0245873,0.0217942,0.0174669,0.015014 7,0.0174669,0.0174669,0.0165867,0.0184191,0.0150147,0.015 7714,0.0119395,0.0130449,0.0124738,0.0130449,0.0143112,0. 0143112,0.0130449,0.0114387,0.0105273,0.0109688,0.0097206 2,0.0101119,0.0105273} rg1=Regress[bpdata,{1,x},x,Weights>wghts1,RegressionReport->{BestFit,ANOVATable}]

BestFit55.56580.596342x,ANOVATable

Model Error Total

DF 1 52 53

SumOfSq 83.3408 76.5135 159.854

MeanSq 83.3408 1.47141

FRatio 56.64

PValue 7.186811010

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫ اﻟﻣدﺧﻼت‬: ‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ‬bpdata.‫ﻻزواج ﻗﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻌطﻰ ﻣن اﻻﻣر‬ ListPlot[bpdata,PlotRange->{{0,70},{0,120}}]

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻣن اﻻﻣر‬ rgbp=Regress[bpdata,{1,x},x,RegressionReport->BestFit] ١٩٠


‫اﻟﺑواﻗﻰ ﻣن اﻻﻣر‬ ‫‪rs=Regress[bpdata,{1,x},x,RegressionReport‬‬‫]]‪>FitResiduals][[1,2‬‬

‫ﯾوﺿﺢ رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ x i‬ﻣن اﻻﻣر‬ ‫]}}‪[respoints2,PlotRange->{{0,100},{-30,30‬‬

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ‪:‬‬ ‫‪s  1.54948  0.198172 x‬‬ ‫ﻣن اﻻﻣر‬ ‫‪absregress=Regress[absrespoints,{1,x},x,RegressionReport‬‬‫]‪>BestFit‬‬

‫‪ s‬واﻟﺗﻰ ﺗﻣﺛل اﻻﻧﺣراﻓﺎت اﻟﻣﻌﯾﺎرﯾﺔ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪pred=absregress=Regress[absrespoints,{1,x},x,RegressionRe‬‬ ‫]‪port->PredictedResponse‬‬ ‫اﻟوزن ‪ wi‬ﻟﻛل ﻣﺷﺎھده ‪ yi‬ﻣﻌﻄﻰ ﻣﻦ اﻻﻣﺮ‬ ‫]]]‪wghts1=Map[f,pred[[1,2‬‬

‫ﺟﺪول ﺗﺤﻠﯿﻞ اﻟﺘﺒﺎﯾﻦ ﻣﻦ اﻻﻣﺮ‬ ‫‪rg1=Regress[bpdata,{1,x},x,Weights‬‬‫]}‪>wghts1,RegressionReport->{BestFit,ANOVATable‬‬

‫ﺣﯿﺚ ﯾﺤﺘﻮى اﻟﺠﺪول ﻋﻠﻰ ﻣﻌﺎدﻟﺔ اﻻﻧﺤﺪار اﻟﻘﺪرة‬

‫ﺑﺎﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى‬

‫اﻟﻣرﺟﺣﺔ‬

‫ﺣﯿﺚ ﺗﻢ اﺳﺘﺨﺪام اﻟﺨﯿﺎر‬ ‫‪ Weights->wghts1‬ﻓﻰ اﻻﻣﺮ اﻟﺴﺎﺑﻖ ‪.‬‬ ‫)‪ (١٦-٤‬ﻣﻌﺎﻣـل اﻻرﺗﺑـﺎط اﻟﺧطﻰ اﻟﺑﺳﯾـط‬ ‫‪The Simple Linear Correlation Coefficient‬‬ ‫ﻓ ﻲ ﻣﺷ ﻛﻠﺔ اﻻﻧﺣ دار ﻛ ﺎن اھﺗﻣﺎﻣﻧ ﺎ ﺑﺎﻟﺗﻧﺑ ﺄ ﺑﻣﺗﻐﯾ ر وذﻟ ك ﻣ ن اﻟﻣﻌﻠوﻣ ﺎت ﻋ ن اﻟﻣﺗﻐﯾ رات‬ ‫اﻟﻣﺳﺗﻘﻠﺔ ‪ ،‬ﺑﯾﻧﻣﺎ ﻓﻲ ﻣﺷﻛﻠﺔ اﻻرﺗﺑﺎط ﻓﺈن اھﺗﻣﺎﻣﻧﺎ ﺳوف ﯾﻛون ﻓﻲ ﻗﯾ ﺎس اﻟﻌﻼﻗ ﺔ ﺑ ﯾن ﻣﺗﻐﯾ رﯾن أو‬ ‫أﻛﺛ ر‪ .‬ﻣ رة أﺧ رى ﻓ ﺈن ﻗ ﯾم اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ ﻛﺎﻧ ت ﺛﺎﺑﺗ ﺔ ﻓ ﻲ ﻣﺷ ﻛﻠﺔ اﻻﻧﺣ دار ‪.‬اﻵن ﺳ وف‬ ‫ﯾﺧﺗﻠ ف اﻟوﺿ ﻊ‪ .‬ﺳ وف ﻧﻌ رف ﻣﻌﺎﻣ ل اﻻرﺗﺑ ﺎط اﻟﺧط ﻰ ﺑﺄﻧ ﮫ ﻣﻘﯾ ﺎس ﻟﻠﻌﻼﻗ ﺔ ﺑ ﯾن ﻣﺗﻐﯾ رﯾن‬ ‫ﻋﺷواﺋﯾﯾن ‪ .X,Y‬وﺳوف ﻧرﻣ ز ﻟ ﮫ ﺑ ﺎﻟرﻣز‪ . r‬ﺳ وف ﻧﻔﺗ رض أن اﻟﻣﺗﻐﯾ ران ‪ X,Y‬ﻟﮭﻣ ﺎ ﺗوزﯾ ﻊ‬ ‫اﺣﺗﻣﺎﻟﻲ ﺛﻧﺎﺋﻲ‪.‬‬ ‫ﻟﺣﺳﺎب ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺧط ﻰ ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن أزواج اﻟﻣﺷ ﺎھدات ) ‪. ( x , y‬‬ ‫إذا ﻛﺎﻧت ﻧﻘﺎط ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﺗﺗرﻛ ز ﻓ وق وﺣ ول ﺧ ط اﻧﺣ دار ﻟ ﮫ ﻣﯾ ل ﻣوﺟ ب ‪ ،‬ﻓﮭ ذا ﯾ دل ﻋﻠ ﻰ‬ ‫ارﺗﺑﺎط ﻣوﺟب ﻗوى ﺑﯾن اﻟﻣﺗﻐﯾرﯾن ) ارﺗﺑ ﺎط ط ردي ( ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل ) ‪(a) (٦٠-٤‬‬ ‫‪ .‬وﻣ ن ﻧﺎﺣﯾ ﺔ أﺧ رى ‪ ،‬إذا ﻛﺎﻧ ت ﻧﻘ ﺎط ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﺗﺗرﻛ ز ﻓ وق وﺣ ول ﺧ ط اﻧﺣ دار ﻟ ﮫ ﻣﯾ ل‬ ‫ﺳﺎﻟب ﻓﮭذا ﯾدل ﻋﻠﻰ ارﺗﺑﺎط ﻗوى ﺳ ﺎﻟب ﺑ ﯾن اﻟﻣﺗﻐﯾ رﯾن ) ارﺗﺑ ﺎط ﻋﻛﺳ ﻲ ( ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ‬ ‫‪١٩١‬‬


‫ﺷ ﻛل ) ‪ (b) (٦٠-٤‬ﻛﻠﻣ ﺎ زاد اﻧﺗﺷ ﺎر ﻧﻘ ﺎط ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﺣ ول وﻓ وق ﺧ ط اﻻﻧﺣ دار ﻓ ﺈن‬ ‫اﻻرﺗﺑﺎط ﯾﻘل ﻋددﯾﺎ ﺑﯾن اﻟﻣﺗﻐﯾرﯾن ‪ ،‬إذا ﻛﺎﻧت ﻧﻘﺎط ﺷﻛل اﻻﻧﺗﺷﺎر ﺗﻧﺗﺷر ﺑطرﯾﻘﺔ ﻋﺷ واﺋﯾﺔ ﻛﻣ ﺎ‬ ‫ﻓ ﻲ ﺷ ﻛل ) ‪ ( c ) (٦٠-٤‬ﻓﮭ ذا ﯾﻌﻧ ﻰ أن ‪ r  0‬وﻧﺳ ﺗﻧﺗﺞ ﻋ دم وﺟ ود ﻋﻼﻗ ﺔ ﺑ ﯾن ‪ .X,Y‬وﻟﻣ ﺎ‬ ‫ﻛﺎن ﻣﻌﺎﻣل اﻻرﺗﺑﺎط ﺑﯾن ﻣﺗﻐﯾرﯾن ﯾﻌﺗﺑ ر ﻣﻘﯾ ﺎس ﻟﻠﻌﻼﻗ ﺔ اﻟﺧطﯾ ﮫ ﺑﯾﻧﮭﻣ ﺎ وﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن ‪r  0‬‬ ‫ﺗﻌﻧﻰ ﻗﺻور ﻓﻲ اﻟﺧطﯾﺔ وﻟﯾﺳت ﻗﺻور ﻓﻲ اﻻرﺗﺑﺎط ‪ .‬ﻋﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ﻗ د ﺗﻛ ون ھﻧ ﺎك ﻋﻼﻗ ﺔ‬ ‫وﻟﻛﻧﮭ ﺎ ﻋﻼﻗ ﺔ ﻏﯾ ر ﺧطﯾ ﮫ ‪ .‬ﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل إذا وﺟ دت ﻋﻼﻗ ﺔ ﻗوﯾ ﺔ ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾ ﺔ ﺑ ﯾن‬ ‫اﻟﻣﺗﻐﯾرﯾن ‪ X,Y‬ﻛﻣﺎ ھوﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ ( d) ( ٦٠-٤‬ﻓﮭذا ﯾﻌﻧﻰ أن ‪. r  0‬‬

‫ﺷﻛل )‪(٦٠-٤‬‬ ‫ﯾﻌﺗﺑر ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺧطﻰ ) ﻣﻌﺎﻣل ﺑﯾرﺳون ﻟﻼرﺗﺑﺎط ( أو اﺧﺗﺻﺎرا ﻣﻌﺎﻣل اﻻرﺗﺑﺎط أﻛﺛر‬ ‫ﻣﻘﺎﯾﯾس اﻻرﺗﺑﺎط اﻟﺧطﻰ اﻧﺗﺷﺎرا‪.‬‬ ‫ﯾﺗم ﺣﺳﺎب ﻣﻌﺎﻣل اﻻرﺗﺑﺎط ﻣن اﻟﻣﻌﺎدﻟﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬

‫‪x i y i‬‬ ‫‪n‬‬ ‫‪ 2 (x i ) 2   2 ( y i ) 2 ‬‬ ‫‪x i ‬‬ ‫‪  y i ‬‬ ‫‪‬‬ ‫‪n‬‬ ‫‪n ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪x i y i ‬‬

‫‪SXY‬‬ ‫‪‬‬ ‫‪SXX.SYY‬‬

‫‪‬‬

‫ﺣﯾث ‪ r‬اﻟﻌﯾﻧﺔ ﻓﻲ اﻟﻣﺟﺗﻣﻊ‪.‬‬

‫ﻣﺛﺎل)‪(٣٦-٤‬‬

‫‪١٩٢‬‬

‫‪r‬‬


‫ﻟدراﺳ ﺔ اﻟﻌﻼﻗ ﺔ ﺑ ﯾن ﺗرﻛﯾ ز اﻷوزون ‪) (X) Ozone‬ﻣﻘ ﺎس ‪ (PPM‬وﺗرﻛﯾ ز اﻟﻛرﺑ ون )‪(Y‬‬ ‫)ﻣﻘﺎس ‪ (  g / m3‬ﺗم اﻟﺣﺻول ﻋﻠﻰ اﻟﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪0.100‬‬ ‫‪11.8‬‬ ‫‪0.110‬‬ ‫‪13.0‬‬

‫‪0.057‬‬ ‫‪2.5‬‬ ‫‪0.071‬‬ ‫‪2.8‬‬

‫‪0.186‬‬ ‫‪15.4‬‬ ‫‪0.140‬‬ ‫‪17.9‬‬

‫‪0.050‬‬ ‫‪6.3‬‬ ‫‪0.074‬‬ ‫‪16.6‬‬

‫‪0.162‬‬ ‫‪13.8‬‬ ‫‪0.111‬‬ ‫‪9.2‬‬

‫‪0.120‬‬ ‫‪9.5‬‬ ‫‪0.154‬‬ ‫‪20.6‬‬

‫‪0.088‬‬ ‫‪11.6‬‬ ‫‪0.055‬‬ ‫‪7.0‬‬

‫‪0.066‬‬ ‫‪4.6‬‬ ‫‪0.112‬‬ ‫‪8.0‬‬

‫‪x‬‬ ‫‪y‬‬ ‫‪x‬‬ ‫‪y‬‬

‫أوﺟد ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺑﺳﯾط ‪.‬‬

‫اﻟﺣــل ‪:‬‬ ‫‪n  16 , x i  1.656 , yi  170.6 ,‬‬ ‫‪x i2  0.196912 , x i yi  20.0397 ,‬‬

‫‪yi2  2253.56.‬‬ ‫‪x i yi‬‬ ‫‪n‬‬ ‫)‪(1.656)(170.6‬‬ ‫‪ 20.0397 ‬‬ ‫‪16‬‬ ‫‪= 2.3826,‬‬ ‫‪(x i ) 2‬‬ ‫‪2‬‬ ‫‪SXX  x i ‬‬ ‫‪n‬‬ ‫‪2‬‬ ‫)‪(1.656‬‬ ‫‪ 0.196912 ‬‬ ‫‪ 0.025516,‬‬ ‫‪16‬‬ ‫‪( y i ) 2‬‬ ‫‪(170.6)2‬‬ ‫‪SYY  yi2 ‬‬ ‫‪ 2253.56 ‬‬ ‫‪n‬‬ ‫‪16‬‬ ‫‪= 434.5375.‬‬ ‫‪SXY  x i yi ‬‬

‫وﻋﻠﻰ ذﻟك ‪:‬‬

‫‪SXY‬‬ ‫‪2.3826‬‬ ‫‪‬‬ ‫‪ 0.716.‬‬ ‫‪SXX.SYY‬‬ ‫)‪(0.025516)(434.5375‬‬

‫‪r‬‬

‫ﻓﻲ اﻟﻣﻧﺎﻗﺷﺔ اﻟﺳﺎﺑﻘﺔ ﻟم ﻧﺿﻊ ﻓروض ﻗوﯾﺔ ﻋﻠﻰ ﺗوزﯾﻊ اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﺑرت ﻣﻧﮫ اﻟﻌﯾﻧ ﺔ وذﻟ ك‬ ‫ﻟﻠﺣﺻول ﻋﻠﻰ ﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ ‬واﻟﺗﻲ ﺗرﻣز إﻟﻰ ﻣﻌﺎﻣ ل ارﺗﺑ ﺎط اﻟﻣﺟﺗﻣ ﻊ‪ .‬ﻟﻠﺣﺻ ول ﻋﻠ ﻰ‬ ‫‪ (1   )100%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣ ﺔ ‪ ‬أو اﺧﺗﺑ ﺎرات ﻓ روض ﺗﺧ ص ‪ ‬ﻓﺈﻧﻧ ﺎ ﻧﻔﺗ رض أن اﻟﻌﯾﻧ ﺔ‬ ‫ﻣﺄﺧوذة ﻣن ﻣﺟﺗﻣﻊ ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﺛﻧﺎﺋﻲ ‪the bivarate normal distribution‬‬ ‫أي أن ‪ X , Y‬ﻣﺗﻐﯾرﯾن ﻋﺷواﺋﯾﯾن ﺣﯾث داﻟﺔ اﻟﺗوزﯾﻊ اﻟﮭﺎﻣﺷ ﯾﺔ ﻟﻛ ل ﻣ ن ‪ Y , X‬ﺗﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ‬ ‫اﻟطﺑﯾﻌﻲ ‪.‬‬ ‫‪‬‬

‫اﺧﺗﺑﺎرات ﻓروض وﻓﺗرات ﺛﻘﺔ ﺗﺧص‬ ‫‪Tests Hypotheses and Confidence Intervals Concerning ‬‬ ‫‪١٩٣‬‬


‫ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪ H 0 :   0‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 :   0‬أو اﻟﻔ رض اﻟﺑ دﯾل‬ ‫‪ H1 :   0‬أو اﻟﻔرض اﻟﺑدﯾل ‪ H1 :   0‬وﺑﺎﻓﺗراض ﺻﺣﺔ ﻓرض اﻟﻌدم ﻓﺈن ‪:‬‬ ‫‪r n2‬‬

‫‪t‬‬

‫‪1  r2‬‬ ‫ھ ﻲ ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ ‪ T‬ﻟ ﮫ ﺗوزﯾ ﻊ ‪ t‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ‪ .   n  2‬وﻋﻠ ﻰ ذﻟ ك ﻟﻣﺳ ﺗوى‬ ‫ﻣﻌﻧوﯾﺔ ‪ ‬وﻟﻠﻔرض اﻟﺑدﯾل ‪ ) H1 :   0‬اﺧﺗﺑﺎر ذي ﺟﺎﻧﺑﯾن ( ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺳ وف ﺗﻛ ون‬ ‫‪ T   t  / 2 or T  t  / 2‬ﺣﯾث ‪ t  / 2‬ھﻲ ﻗﯾﻣﺔ ‪ t‬اﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊ ‪ t‬ﺑ درﺟﺎت ﺣرﯾ ﺔ‬ ‫‪ .   n  2‬ﻟﻠﺑ دﯾل ‪ H1 :   0‬ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض ‪ T  t ‬وﻟﻠﺑ دﯾل ‪ H1 :   0‬ﻓ ﺈن ﻣﻧطﻘ ﺔ‬ ‫اﻟرﻓض ‪. T   t ‬‬

‫ﻣﺛﺎل )‪(٣٧-٤‬‬ ‫ﺑﻔ رض أن اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ اﻟﻣﺛ ﺎل اﻟﺳ ﺎﺑق ﻣ ﺄﺧوذة ﻣ ن ﻣﺟﺗﻣ ﻊ ﯾﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ اﻟﺛﻧ ﺎﺋﻲ اﻟطﺑﯾﻌ ﻲ‪.‬‬ ‫اﻟﻣطﻠ وب اﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم‪ H 0 :   0 :‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 :   0‬وذﻟ ك ﻋﻧ د‬ ‫ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪.   0.01‬‬

‫اﻟﺣــل ‪:‬‬

‫‪ 3.84.‬‬

‫‪0.716 14‬‬ ‫‪1  (0.716)2‬‬

‫‪‬‬

‫‪r n2‬‬ ‫‪1  r2‬‬

‫‪t‬‬

‫‪t0.01= 2.624‬‬ ‫واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾ ﻊ ‪ t‬ﻓ ﻲ ﻣﻠﺣ ق )‪ (٢‬ﺑ درﺟﺎت ﺣرﯾ ﺔ ‪.   n  2  16  2  14‬‬ ‫ﻣﻧطﻘﺔ اﻟرﻓض ‪ . T > 2.624‬وﺑﻣﺎ أن ‪ t‬ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ‪ ،‬ﻧرﻓض ‪. H0‬‬ ‫وﺑﻣﺎ أن ‪ ‬ﯾﻘﯾس ﻗوة اﻻرﺗﺑﺎط اﻟﺧطﻰ ﺑﯾن ﻣﺗﻐﯾرﯾن ‪ X,Y‬ﻓﻲ اﻟﻣﺟﺗﻣﻊ ﻓﺈن ﻓرض اﻟﻌ دم‬ ‫‪ H 0 :   0‬ﯾ دل ﻋﻠ ﻰ ﻋ دم وﺟ ود ارﺗﺑ ﺎط ﺑ ﯾن اﻟﻣﺗﻐﯾ رﯾن ﻓ ﻲ اﻟﻣﺟﺗﻣ ﻊ ‪ .‬ﯾﻣﻛ ن إﺛﺑ ﺎت أن‬ ‫‪ t  r n  2 / 1  r 2  b1 / s 2 / SXX‬وھ ذا ﯾﻌﻧ ﻰ أن اﻻﺧﺗﺑ ﺎرﯾن ﻣﺗﻛ ﺎﻓﺋﯾن ‪ .‬وﻋﻠ ﻰ‬ ‫ذﻟك إذا ﻛﺎن اﻻھﺗﻣﺎم ﻓﻘط ﺑﻘﯾﺎس ﻗوة اﻟﻌﻼﻗﺔ ﺑﯾن ﻣﺗﻐﯾرﯾن ‪ X , Y‬وﻟﯾس اﻟﺣﺻ ول ﻋﻠ ﻰ ﻣﻌﺎدﻟ ﺔ‬ ‫اﻻﻧﺣدار اﻟﺧطﻰ ﻓ ﺈن اﺧﺗﺑ ﺎر ‪ H 0 :   0‬ﯾﻛ ون اﺳ ﮭل ﻣ ن اﺧﺗﺑ ﺎر ‪ t‬ﻷﻧ ﮫ ﯾﺗطﻠ ب ﻛﻣﯾ ﺔ ﻗﻠﯾﻠ ﺔ‬ ‫ﻣن اﻟﺣﺳﺎﺑﺎت‪.‬‬

‫اﻷﺳﻠوب اﻟﻣﺳ ﺗﺧدم ﻻﺧﺗﺑ ﺎر ‪ H 0 :   0‬ﻋﻧ دﻣﺎ ‪ 0  0‬ﻻ ﯾﻛ ﺎﻓﺊ أي طرﯾﻘ ﺔ ﻣﺳ ﺗﺧدﻣﺔ ﻓ ﻲ‬ ‫ﺗﺣﻠﯾ ل اﻻﻧﺣ دار‪ .‬ﺑﻔ رض أن أزواج اﻟﻣﺷ ﺎھدات ) ‪ (x1 , y1), (x2 , y2 ),…,(xn , yn‬ﺗﻣﺛ ل‬ ‫ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣﺄﺧوذة ﻣن ﻣﺟﺗﻣﻊ ﯾﺗﺑﻊ اﻟﺗوزﯾ ﻊ اﻟﺛﻧ ﺎﺋﻲ اﻟطﺑﯾﻌ ﻲ وإذا ﻛﺎﻧ ت ‪ n‬ﻛﺑﯾ رة وﺑ ﺎﻓﺗراض‬ ‫ﺻﺣﺔ ﻓرض اﻟﻌدم ﻓﺈن ‪:‬‬ ‫‪١٩٤‬‬


‫‪1 1 r ‬‬ ‫‪ln ‬‬ ‫‪‬‬ ‫‪2 1 r ‬‬

‫‪v‬‬

‫‪1  1  0 ‬‬ ‫‪ln ‬‬ ‫ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ ‪ V‬ﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺑﻣﺗوﺳط ‪‬‬ ‫‪2  1  0 ‬‬ ‫‪1‬‬ ‫وﺗﺑﺎﯾن‬ ‫‪n 3‬‬

‫‪V ‬‬

‫‪ ، 2V ‬ﺣﯾث اﻟﺗﺑﺎﯾن ﻻ ﯾﻌﺗﻣد ﻋﻠﻰ ‪ ، ‬وﻋﻠﻰ ذﻟك ﻓﺈن ‪:‬‬

‫‪1  1  0 ‬‬ ‫‪ln ‬‬ ‫‪‬‬ ‫‪2  1  0 ‬‬ ‫‪.‬‬ ‫‪1/ n  3‬‬

‫‪v‬‬ ‫‪z‬‬

‫ھ ﻲ ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ ‪ Z‬ﺗﻘرﯾﺑ ﺎ ً ﯾﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ‪ .‬اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﯾﻌط ﻰ‬ ‫اﻟﻔروض‬ ‫اﻟﺑدﯾﻠﺔ وﻣﻧطﻘﺔ اﻟرﻓض ﻟﻛل ﻓرض ﺑدﯾل ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪.‬‬ ‫اﻟﻔروض اﻟﺑدﯾﻠﺔ‬

‫ﻣﻧطﻘﺔ اﻟرﻓض‬ ‫‪Z  z  / 2 or Z  z / 2 .‬‬ ‫‪Z > z‬‬ ‫‪Z < - z‬‬

‫‪H1 :   0‬‬

‫‪H1 :    0‬‬ ‫‪H1 :    0‬‬

‫ﻣﺛﺎل)‪(٣٨-٤‬‬ ‫إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪n  20 , yi  690.30 , yi2  29040.29 ,‬‬ ‫‪x i yi  10818.56 , x i  285.90 x i2  4409.55,‬‬

‫أﺧﺗﺑر اﻟﻔرض ‪ 0.5  p  0.8‬ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ‪  = 0.05‬؟‬

‫اﻟﺣــل ‪:‬‬ ‫أي أﻧﻧﺎ ﻧرﻏب ﻓﻲ اﺧﺗﺑﺎر ‪:‬‬ ‫‪ =0.05.‬‬ ‫وﺣﯾث أن ‪ r  .733‬ﻓﺈن ‪:‬‬

‫‪,‬‬

‫‪H1 :   0.5‬‬

‫‪H 0 :   0.5 ,‬‬

‫‪1  1  .733 ‬‬ ‫‪v  ln ‬‬ ‫‪  .935,‬‬ ‫‪2  1  .733 ‬‬ ‫‪1  1  .5 ‬‬ ‫‪ V  ln ‬‬ ‫‪  .549.‬‬ ‫‪2  1  .5 ‬‬ ‫وﻋﻠﻰ ذﻟك ﻓﺈن ‪:‬‬ ‫‪١٩٥‬‬


‫‪1‬‬ ‫‪v  ln (1  0 ) /(1  0 ) ‬‬ ‫‪2‬‬ ‫‪z‬‬ ‫‪1/ n  3‬‬ ‫‪ (.935  .549) 17  1.59.‬‬ ‫‪ z0.05= 1.645‬واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ ﻓ ﻲ ﻣﻠﺣ ق )‪ . (١‬ﻣﻧطﻘ ﺔ‬ ‫اﻟرﻓض ‪ . Z > 1.645‬وﺑﻣﺎ أن ‪ z‬ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل ‪. H0‬‬ ‫ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ‪ (1-)100%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ ‬ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪e 2 c2  1‬‬ ‫‪e 2 c2  1‬‬

‫‪z / 2‬‬ ‫ﺣﯾث أن‬ ‫‪n 3‬‬ ‫ﻟﻠﺑﯾﺎﻧﺎت ﻓﻲ اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﻓﺈن ‪:‬‬ ‫‪n  20,‬‬

‫‪c1  v ‬‬ ‫‪,‬‬

‫‪‬‬

‫‪,‬‬

‫‪e 2c1  1‬‬ ‫‪e 2 c1  1‬‬

‫‪z / 2‬‬ ‫‪n 3‬‬

‫‪c2  v ‬‬ ‫‪,‬‬

‫‪v  0.935‬‬

‫‪r  0.733‬‬

‫‪c1  .935  1.96 / 17  .460,‬‬ ‫‪c2  .935  1.96 / 17  1.410‬‬ ‫ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ‪ 95%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪ ‬ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬

‫‪e 2(1.410)  1‬‬ ‫‪e 2(1.410)  1‬‬

‫‪‬‬

‫‪e2(.460)  1‬‬ ‫‪e2(.460)  1‬‬

‫واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ ‪:‬‬ ‫‪0.43 <  < 0.89‬‬

‫ﻣﺛﺎل )‪(٣٩-٤‬‬ ‫ﻟﻠﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.264,0‬‬ ‫‪.280,0.266,0.268,0.286,‬‬ ‫‪Y‬‬ ‫‪0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405,0‬‬ ‫‪.450,0.480,0.456,0.506.‬‬

‫اﻟﻤﻄﻠﻮب ‪:‬‬

‫)‪( ١‬‬

‫‪ 95%‬و‪ 90%‬ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ‪. ‬‬

‫‪١٩٦‬‬


‫ وذﻟ ك ﻋﻧ د ﻣﺳ ﺗوى‬H1 :   0 ‫ ﺿ د اﻟﻔ رض اﻟﺑ دﯾل‬H 0 :   0 :‫( اﺧﺗﺑﺎر ﻓ رض اﻟﻌ دم‬٢) .   0.05 ‫ﻣﻌﻧوﯾﺔ‬ ‫ وذﻟ ك ﻋﻧ د ﻣﺳ ﺗوى‬H1 :   0 ‫ ﺿ د اﻟﻔ رض اﻟﺑ دﯾل‬H 0 :   0 :‫( اﺧﺗﺑﺎر ﻓ رض اﻟﻌ دم‬٣) .   0.05 ‫ﻣﻌﻧوﯾﺔ‬

‫ وذﻟ ك ﻋﻧ د ﻣﺳ ﺗوى‬H1 :   .5 ‫ ﺿد اﻟﻔ رض اﻟﺑ دﯾل‬H 0 :   .5 :‫( اﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬٤) .   0.05 ‫ﻣﻌﻧوﯾﺔ‬ ‫ وﻓﯾﻣﺎ ﯾﻠﻰ‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﺟﺎھز ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ Off[General::spell1] <<Statistics`MultiDescriptiveStatistics` <<Statistics`NormalDistribution` z[r_]:=0.5 Log[(1+r)/(1-r)] Options[singleCorrelationCI]={confidence->0.95}; singleCorrelationCI[data1_,data2_,opts___]:=Module[{c,alp ha,r,n,zalpha,upperz,lowerz,upperr,lowerr}, c=confidence/. {opts} /. Options[singleCorrelationCI]; alpha=1-c; r=Correlation[data1,data2]; n=Length[data1]; zalpha=Quantile[NormalDistribution[0,1],1alpha/2]; upperz=z[r]+zalpha/Sqrt[n-3]; lowerz=z[r]-zalpha/Sqrt[n-3]; upperr=Tanh[upperz]; lowerr=Tanh[lowerz]; {lowerr,upperr}] Off[General::spell1] <<Statistics`MultiDescriptiveStatistics` <<Statistics`NormalDistribution` z[r_]:=0.5 Log[(1+r)/(1-r)] equalZero[r_,p0_,n_,tail_]:=Module[{p,teststat}, teststat=r*Sqrt[(n-2)/(1-r^2)]; If[tail==1,p=1-CDF[StudentTDistribution[n2],Abs[teststat]],p=2*(1-CDF[StudentTDistribution[n2],Abs[teststat]])]; Print["{Sample Correlation Coefficient -> ",r,","]; ١٩٧


Print["Test Statistic -> ",teststat,","]; Print["Distribution -> StudentTDistribution[",n-2,"],"]; Print[tail,"-sided p-value -> ",p,"}"]] notEqualZero[r_,p0_,n_,tail_]:=Module[{p,teststat}, teststat=(z[r]-z[p0])Sqrt[n-3]//N; If[tail==1,p=1CDF[NormalDistribution[0,1],Abs[teststat]],p=2*(1CDF[NormalDistribution[0,1],Abs[teststat]])]; Print["{Sample Correlation Coefficient -> ",r,","]; Print["Test Statistic -> ",teststat,","]; Print["Distribution -> NormalDistribution[0,1],"]; Print[tail,"-sided p-value -> ",p,"}"]] Options[singleCorrelationTest]={rhoZero->0,sided->2}; singleCorrelationTest[data1_,data2_,opts___]:=Module[{n,p 0,r,tail}, n=Length[data1]; r=Correlation[data1,data2]; p0=rhoZero/. {opts} /. Options[singleCorrelationTest]; tail=sided/. {opts} /. Options[singleCorrelationTest]; If[p0==0,equalZero[r,p0,n,tail],notEqualZero[r,p0,n, tail]]]; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; singleCorrelationCI[oppbavg,winpct] {-0.835107,-0.0228726} singleCorrelationCI[oppbavg,winpct,confidence->0.90] {-0.803981,-0.117343} singleCorrelationTest[oppbavg,winpct] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -2.26243 , Distribution -> StudentTDistribution[ 12 ], 2 -sided p-value -> 0.0430218 } singleCorrelationTest[oppbavg,winpct,sided->1] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -2.26243 , Distribution -> StudentTDistribution[ 12 ], 1 -sided p-value -> 0.0215109 } singleCorrelationTest[oppbavg,winpct,rhoZero->-0.5] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -0.213995 , Distribution -> NormalDistribution[0,1], 2 -sided p-value -> 0.830551 } ١٩٨


: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫ اﻟﻣدﺧﻼت‬: ‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ‬oppbavg‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ و‬

winpct.‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬

‫( ﻣﻦ اﻻﻣﺮﯾﯿﻦ اﻟﺘﺎﻟﯿﯿﻦ ﻣﻊ اﻟﻤﺨﺮج ﻟﻜﻞ اﻣﺮ‬١) ‫اﻟﻤﻄﻠﻮب‬ singleCorrelationCI[oppbavg,winpct] {-0.835107,-0.0228726} singleCorrelationCI[oppbavg,winpct,confidence->0.90] {-0.803981,-0.117343}

‫( ﻣﻦ اﻻﻣﺮ اﻟﺘﺎﻟﻰ ﻣﻊ اﻟﻤﺨﺮج‬٢) ‫واﻟﻤﻄﻠﻮب‬ singleCorrelationTest[oppbavg,winpct] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -2.26243 , Distribution -> StudentTDistribution[ 12 ], 2 -sided p-value -> 0.0430218 }

‫وﺑﻤﺎ ان‬ p-value ->

0.0430218 }

H1 :   0 ‫ﻓﮭﺬا ﯾﻌﻨﻰ ﻗﺒﻮل ﻓﺮض اﻟﺒﺪﯾﻞ‬

‫( ﻣﻦ اﻻﻣﺮ اﻟﺘﺎﻟﻰ ﻣﻊ اﻟﻤﺨﺮج‬٣) ‫واﻟﻤﻄﻠﻮب‬ singleCorrelationTest[oppbavg,winpct,sided->1] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -2.26243 , Distribution -> StudentTDistribution[ 12 ], 1 -sided p-value -> 0.0215109 }

‫وﺑﻤﺎ ان‬ p-value ->

0.0215109 }

‫ ﻻن ﻗﯿﻤﺔ اﻻﺣﺼﺎء‬H1 :   0 ‫ وﻟﯿﺲ‬H1 :   0 ‫ﻓﮭﺬا ﯾﻌﻨﻰ ﻗﺒﻮل ﻓﺮض اﻟﺒﺪﯾﻞ‬ .‫ﺳﺎﻟﺒﺔ‬ ‫( ﻣﻦ اﻻﻣﺮ اﻟﺘﺎﻟﻰ ﻣﻊ اﻟﻤﺨﺮج‬٤) ‫واﻟﻤﻄﻠﻮب‬ singleCorrelationTest[oppbavg,winpct,rhoZero->-0.5] {Sample Correlation Coefficient -> -0.546816 , Test Statistic -> -0.213995 , Distribution -> NormalDistribution[0,1], 2 -sided p-value -> 0.830551 }

‫وﺑﻤﺎ ان‬ p-value ->

0.830551 }

H1 :   .5 ‫ﻓﮭﺬا ﯾﻌﻨﻰ ﻗﺒﻮل ﻓﺮض‬ ١٩٩


‫ﻣﺛﺎل )‪(٤٠-٤‬‬ ‫ﺳوف ﯾﺗم اﯾﺟﺎد ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺧطﻰ اﻟﺑﺳﯾط ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,‬‬ ‫;}‪0.274,0.264,0.280,0.266,0.268,0.286‬‬ ‫‪winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0‬‬ ‫;}‪.512,0.405,0.450,0.480,0.456,0.506‬‬ ‫]‪l[x_]:=Length[x‬‬ ‫]‪h[x_]:=Apply[Plus,x‬‬ ‫]‪c[x_,y_]:=h[x*y]-((h[x]*h[y]))/l[x‬‬ ‫]‪ss1=c[oppbavg,winpct‬‬ ‫‪-0.00545343‬‬ ‫]‪ss2=c[oppbavg,oppbavg‬‬ ‫‪0.00245971‬‬ ‫]‪ss3=c[winpct,winpct‬‬ ‫‪0.0404364‬‬

‫‪ss1‬‬ ‫‪r  ‬‬ ‫‪ss2  ss3‬‬ ‫‪-0.546816‬‬

‫ﻟﮭذا اﻟﻣﺛﺎل ﻓﺈن ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺑﺳﯾط ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪ss1‬‬ ‫‪r  ‬‬ ‫‪ss2  ss3‬‬

‫اﻟﻔﺻل اﻟﺧﺎﻣس‬ ‫ﻧﻣﺎزج اﻻﻧﺣدار اﻟﺧطﻰ اﻟﻣﺗﻌدد و ﻧﻣﺎزج‬ ‫اﻻﻧﺣدار ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻧﯾﺔ‬ ‫واﻟﻧﻣﺎزج اﻟﻐﯾر ﺧطﯾﺔ‬ ‫‪٢٠٠‬‬


‫)‪ (١-٥‬اﻻﻧﺣدار اﻟﺧطﻰ اﻟﻣﺗﻌدد‬

‫‪Linear Multiple Regression‬‬

‫ﻓﻲ اﻟﻐﺎﻟب ﺗﻛون اﻟﻌﻼﻗﺎت اﻟﻔﻌﻠﯾﺔ ﺳواء اﻻﻗﺗﺻﺎدﯾﺔ أو اﻻﺟﺗﻣﺎﻋﯾ ﺔ أو اﻟﺳﯾﺎﺳ ﯾﺔ ﻣﻌﻘ دة ﯾﻣﺛ ل‬ ‫ﻓﯾﮭﺎ ﻣﺗﻐﯾر واﺣد ﺗﺎﺑﻊ وﻋدد ﻣن اﻟﻣﺗﻐﯾرات اﻷﺳﺎﺳﯾﺔ اﻟﻣﺳﺗﻘﻠﺔ وﻣن اﻷﻣﺛﻠﺔ اﻟﻌدﯾدة ﻋﻠﻰ ذﻟ ك ﻓ ﻲ‬ ‫ﻣﺟ ﺎل اﻻﻗﺗﺻ ﺎد ﻧﺟ د أن اﻟﻛﻣﯾ ﺔ اﻟﻣﺳ ﺗﮭﻠﻛﺔ ﻣ ن ﺳ ﻠﻌﺔ ﻣ ﺎ ﺗﺗ ﺄﺛر ﺑﺳ ﻌر اﻟﺳ ﻠﻌﺔ ذاﺗﮭ ﺎ ﻋ ﻼوة ﻋﻠ ﻰ‬ ‫أﺳ ﻌﺎر اﻟﺳ ﻠﻊ اﻟﺑدﯾﻠ ﺔ وأﯾﺿ ﺎ ﺑﺎﻹﺿ ﺎﻓﺔ إﻟ ﻰ ذوق اﻟﻣﺳ ﺗﮭﻠك‪ .‬ﻛ ذﻟك ﻛﻣﯾ ﺔ اﻹﻧﺗ ﺎج ﺗﺗ ﺄﺛر ﺑﺎﻟﻌﻣ ل‬ ‫ورأﺳﻲ اﻟﻣ ﺎل واﻟﻣ وارد اﻟوﺳ ﯾطﯾﺔ وﻏﯾرھ ﺎ ﻣ ن ﻋﻧﺎﺻ ر اﻟﻌﻣﻠﯾ ﺔ اﻹﻧﺗﺎﺟﯾ ﺔ‪ .‬وﻓ ﻲ ﻣﺟ ﺎل اﻟﺗ ﺄﻣﯾن‬ ‫ﯾﺗوﻗف اﻟﻘﺳط اﻟﺗﺄﻣﯾﻧﻲ ﻋﻠﻰ ﻋﻣر اﻟﻣؤﻣن ودﺧﻠﮫ وﻗﯾﻣﺔ اﻟوﺛﯾﻘﺔ وطول ﻓﺗرات اﻟﺗﺄﻣﯾن ‪.‬‬ ‫‪Least Square Method‬‬ ‫طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى‬ ‫اﻵن ﺳ وف ﻧﺗﻧ ﺎول ﻣﺷ ﻛﻠﺔ اﻟﺗﻘ دﯾر واﻟﺗﻧﺑ ﺄ ﺑﻘﯾﻣ ﺔ ﻣﺗﻐﯾ ر ﺗ ﺎﺑﻊ ﺑﺎﻻﻋﺗﻣ ﺎد ﻋﻠ ﻰ ﻓﺋ ﺔ ﻣ ن‬ ‫اﻟﻣﺷ ﺎھدات اﻟﻣ ﺄﺧوذة ﻣ ن ﻋ دة ﻣﺗﻐﯾ رات ﻣﺳ ﺗﻘﻠﺔ ‪ . X1, X2, …,Xp‬ﻛﻣ ﺎ ﻓ ﻲ ﺣﺎﻟ ﺔ اﻻﻧﺣ دار‬ ‫اﻟﺧطﻲ اﻟﺑﺳﯾط ‪ ،‬اﻟﻘﯾﻣﺔ ﻟﻛل ﻣﺗﻐﯾر ﻣﺳﺗﻘل واﻟﻣﺧﺗﺎرة ﺑواﺳطﺔ اﻟﺑﺎﺣ ث ﺳ وف ﺗظ ل ﺛﺎﺑﺗ ﺔ ‪ .‬إذا ﺗ م‬ ‫اﺧﺗﯾﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم ‪ n‬ﻣن اﻟﻣﺟﺗﻣﻊ ﻓﺈن ﺑﯾﺎﻧﺎت اﻟﻌﯾﻧﺔ ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪{x1i ,x 2i ,...,x pi ; yi );i  1,2,...,n‬‬ ‫ﻣ رة أﺧ رى اﻟﻘﯾﻣ ﺔ ‪ yi‬ﺗﻣﺛ ل ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ ‪ . Yi‬ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻲ اﻟﻣﺗﻌ دد‬ ‫اﻟﻧظري ﺳوف ﯾﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪ Y|x1 ,x 2 ,...,x p   0   1 x 1   2 x 2  ...   p x p ,‬‬ ‫ﺣﯾث أن ‪ 0 , 1,..., p‬ﺗﻣﺛل اﻟﻣﻌﺎﻟم اﻟﻣطﻠوب ﺗﻘدﯾرھﺎ‪ .‬ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﻣﺗﻌدد اﻟﻣﻘ در‬ ‫ﺳوف ﯾﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪yˆ  b 0  b 1 x 1  ...  b p x p ,‬‬ ‫ﺣﯾث أن ‪ b0, b1, ….bp‬اﻟﺗﻘدﯾرات اﻟﻣطﻠوب اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻟﻠﻣﻌ ﺎﻟم ‪ . 0 , 1,..., p‬ﻓ ﻰ ﺣﺎﻟ ﺔ‬ ‫وﺟود ﻣﺗﻐﯾرﯾن ﻣﺳﺗﻘﻠﯾن ‪. (p=2) X1 , X2‬‬ ‫وﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﻣﻘدر ﺳوف ﯾﻛون ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬

‫‪yˆ  b 0  b1 x 1  b 2 x 2 ,‬‬

‫‪٢٠١‬‬


‫ﻣﻌرﻓﺗﻧﺎ ﻟﻧظرﯾﺔ اﻟﻣﺻﻔوﻓﺎت ﺳوف ﯾﺳﺎﻋدﻧﺎ ﻓﻲ اﻟﺣﺻول ﻋﻠﻰ ﺗﻘدﯾرات اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ‪b0,‬‬ ‫‪ .b1, b2‬اﻟﻧﺗﺎﺋﺞ ﯾﻣﻛن ﺗﻌﻣﯾﻣﮭﺎ إﻟﻰ ﻋدة ﻣﺗﻐﯾرات ﻣﺳﺗﻘﻠﺔ ‪.‬‬ ‫وﯾﻣﻛن ﺣل اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام اﻟﻣﺻﻔوﻓﺎت ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ ‪:‬‬

‫ﻣﺛﺎل)‪(١-٥‬‬ ‫ﯾﺗﺄﺛر ﻣﺣﺻول اﻟﻔراوﻟﺔ ﺑﻛﻣﯾﺔ اﻷﻣطﺎر ‪ x1‬وﻛﻣﯾﺔ اﻟﺳﻣﺎد اﻟﻣﺳﺗﺧدم ‪ . x 2‬إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت ﻓﻲ‬ ‫اﻟﺟدول اﻟﺗﺎﻟﻰ ﻟﺗوﻓﯾق ﻣﻌﺎدﻟﺔ إﻧﺣدار ﺧطﻲ ﻣﺗﻌدد ﺑﺈﺳﺗﺧدام ﻛﻣﯾﺔ اﻷﻣطﺎر وﻛﻣﯾﺔ اﻟﺳﻣﺎد‬ ‫ﻛﻣﺗﻐﯾرات ﻣﺳﺗﻘﻠﺔ‪.‬‬ ‫‪x2‬‬

‫‪y‬‬

‫‪1000‬‬ ‫‪450‬‬ ‫‪1200‬‬ ‫‪700‬‬ ‫‪800‬‬ ‫‪1100‬‬ ‫‪1050‬‬ ‫‪1150‬‬ ‫‪1000‬‬ ‫‪950‬‬ ‫‪1300.‬‬

‫‪510‬‬ ‫‪450‬‬ ‫‪500‬‬ ‫‪425‬‬ ‫‪450‬‬ ‫‪475‬‬ ‫‪515‬‬ ‫‪500‬‬ ‫‪490‬‬ ‫‪510‬‬ ‫‪525‬‬

‫‪x1‬‬

‫‪16‬‬ ‫‪22‬‬ ‫‪23‬‬ ‫‪13‬‬ ‫‪17‬‬ ‫‪25‬‬ ‫‪18‬‬ ‫‪20‬‬ ‫‪21‬‬ ‫‪19‬‬ ‫‪22.‬‬

‫اﻟﺣــل ‪:‬‬ ‫ﻹﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﻘدرة‬ ‫‪yˆ  b 0  b1x1  b 2 x 2 , .‬‬

‫وﺑﺈﺳﺗﺧدام اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق ﻓﺈن اﻟﻣﺻﻔوﻓﺔ ‪ X‬واﻟﻣﺗﺟﮫ ‪ y‬ﯾﻛوﻧﺎن ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻲ‪:‬‬

‫‪٢٠٢‬‬


1 1  1  1 1  X  1 1  1 1  1 1 

16 510  22 450   23 500   13 425  17 450   25 475  18 515   20 500  21 490   19 510  22 525 

1000   450    1200    700  800    , y  1100  1050    1150  1000    950  1300    :‫ ﺳﺗﻛون ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻲ‬XX ‫اﻟﻣﺻﻔوﻓﺔ‬ 1 16 510   10700   1 1  1    1 22 450    , X' y  XX   16 22  22   213250          6  510 450525   5.26525  10  1 22 525   :‫ﺗﻘدﯾرات اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ﺳوف ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻛﺎﻟﺗﺎﻟﻲ‬ 1 b   XX  Xy . :‫أي‬ 1

 216 5350   10700  b0   11      b   216 4362 105410 213250     1   6   6  b2  5350 105410 2.6124  10  5.26525  10    1928.24 0.0271387 0.0460394   10700  23.0157     0.0271387 0.00922992 0.000316848  213250    9.61221        0.0460394 0.000316848 0.000107453  5026525  106   5.57653  :‫وﻋﻠﻰ ذﻟك ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﺗﻌدد اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل‬

yˆ  1928.24  9.61221x1  5.57653x 2 . :e ‫ واﻟﺑواﻗﻰ‬yˆ ‫ واﻟﻘﯾم اﻟﻣﻘدرة‬y‫ﯾﻌطﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﻣﺷﺎھدات‬ ٢٠٣


e  y  yˆ

y

1000 450 1200 700 800 1100 1050 1150 1000 950 1300.

1069.58 792.664 1081.1 566.741 744.603 960.914 1116.69 1052.27 1006.11 1098.42 1210.9

yˆ 69.5826 342.664

118.897 133.259 55.3967 139.086 66.6896 97.7338 6.1131 148.419 89.0963

‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ p=2 2 y={1000,450,1200,700,800,1100,1050,1150,1000,950,1300.} {1000,450,1200,700,800,1100,1050,1150,1000,950,1300.} x1={16,22,23,13,17,25,18,20,21,19,22.} {16,22,23,13,17,25,18,20,21,19,22.} x2={510,450,500,425,450,475,515,500,490,510,525} {510,450,500,425,450,475,515,500,490,510,525} ss=Transpose[{x1,x2,y}] {{16,510,1000},{22,450,450},{23,500,1200},{13,425,700},{1 7,450,800},{25,475,1100},{18,515,1050},{20,500,1150},{21, 490,1000},{19,510,950},{22.,525,1300.}} TableForm[ss]

16 22 23 13 17 25 18 20 21 19 22.

510 450 500 425 450 475 515 500 490 510 525

1000 450 1200 700 800 1100 1050 1150 1000 950 1300.

l[x_]:=Length[x] xx=Table[{1,x1[[i]],x2[[i]]},{i,1,l[x1]}] {{1,16,510},{1,22,450},{1,23,500},{1,13,425},{1,17,450},{ ٢٠٤


‫‪1,25,475},{1,18,515},{1,20,500},{1,21,490},{1,19,510},{1,‬‬ ‫}}‪22.,525‬‬ ‫]‪xpr=Transpose[xx‬‬ ‫‪{{1,1,1,1,1,1,1,1,1,1,1},{16,22,23,13,17,25,18,20,21,19,2‬‬ ‫}}‪2.},{510,450,500,425,450,475,515,500,490,510,525‬‬ ‫‪w=xpr.xx‬‬

‫‪11., 216., 5350., 216., 4362., 105410., 5350., 105410., 2.6124  106‬‬ ‫]‪v=Inverse[w‬‬ ‫{‪{{23.0157,-0.0271387,-0.0460394},‬‬‫‪0.0271387,0.00922992,-0.000316848},{-0.0460394,‬‬‫}}‪0.000316848,0.000107453‬‬ ‫‪xpy=xpr.y‬‬ ‫‪10700., 213250., 5.26525  106‬‬ ‫‪bb=v.xpy‬‬ ‫}‪{-1928.24,9.61221,5.57653‬‬ ‫‪yy =bb[[1]]+bb[[2]]*x1+bb[[3]]*x2‬‬ ‫‪{1069.58,792.664,1081.1,566.741,744.603,960.914,1116.69,1‬‬ ‫}‪052.27,1006.11,1098.42,1210.9‬‬ ‫‪e=y-yy‬‬ ‫‪{-69.5826,-342.664,118.897,133.259,55.3967,139.086,‬‬‫}‪66.6896,97.7338,-6.1131,-148.419,89.0963‬‬ ‫]}‪ss22=Transpose[{y,yy,e‬‬ ‫‪{{1000,1069.58,-69.5826},{450,792.664,‬‬‫‪342.664},{1200,1081.1,118.897},{700,566.741,133.259},{800‬‬ ‫‪,744.603,55.3967},{1100,960.914,139.086},{1050,1116.69,‬‬‫‪66.6896},{1150,1052.27,97.7338},{1000,1006.11,‬‬‫}}‪6.1131},{950,1098.42,-148.419},{1300.,1210.9,89.0963‬‬ ‫]‪TableForm[ss22‬‬ ‫‪1000‬‬ ‫‪1069.58‬‬ ‫‪69.5826‬‬ ‫‪450‬‬ ‫‪792.664‬‬ ‫‪342.664‬‬

‫‪118.897‬‬ ‫‪133.259‬‬ ‫‪55.3967‬‬ ‫‪139.086‬‬ ‫‪66.6896‬‬ ‫‪97.7338‬‬ ‫‪6.1131‬‬ ‫‪148.419‬‬ ‫‪89.0963‬‬

‫‪1081.1‬‬ ‫‪566.741‬‬ ‫‪744.603‬‬ ‫‪960.914‬‬ ‫‪1116.69‬‬ ‫‪1052.27‬‬ ‫‪1006.11‬‬ ‫‪1098.42‬‬ ‫‪1210.9‬‬

‫‪1200‬‬ ‫‪700‬‬ ‫‪800‬‬ ‫‪1100‬‬ ‫‪1050‬‬ ‫‪1150‬‬ ‫‪1000‬‬ ‫‪950‬‬ ‫‪1300.‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻋﺪد اﻟﻤﺘﻐﯿﺮات ﻣﻦ اﻻﻣﺮ‬ ‫‪p=2‬‬ ‫اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻧﻰ واﻟﻘﺎﺋﻤﺔ‪ x2‬ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه ‪x1‬واﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ‪y .‬‬ ‫‪٢٠٥‬‬


‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﺗﻌدد اﻟﻣﻘدرة‪:‬‬ ‫‪yˆ  1928.24  9.61221x1  5.57653x 2 .‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر ‪ bb‬واﻟﻣﺧرج ھو‬ ‫}‪{-1928.24,9.61221,5.57653‬‬

‫واﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‪:‬‬ ‫]‪TableForm[ss22‬‬

‫)‪ (٢-٥‬ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﺗﻌدد‪oefficient of Multiple Determination‬‬ ‫ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﺗﻌدد ‪ ،‬ﯾرﻣز ﻟﮫ ﺑﺎﻟرﻣز ‪ R2‬ھو ‪:‬‬ ‫‪SSR‬‬ ‫‪SSE‬‬ ‫‪R2 ‬‬ ‫‪1‬‬ ‫‪.‬‬ ‫‪SSTO‬‬ ‫‪SSTO‬‬ ‫ﻓﻲ ﺣﺎﻟﺔ وﺟود ﻣﺗﻐﯾر ﻣﺳﺗﻘل واﺣد ﻓﺈن ‪ R2‬ﯾﺻ ﺑﺢ ﻣﻌﺎﻣ ل اﻟﺗﺣدﯾ د اﻟﺑﺳ ﯾط ‪ . r2‬ﯾﺗ راوح ﻗﯾﻣ ﺔ ‪R2‬‬ ‫ﻣن اﻟﺻﻔر إﻟﻰ اﻟواﺣد اﻟﺻﺣﯾﺢ ‪ ،‬أي أن ‪:‬‬ ‫‪2‬‬ ‫‪0 < R < 1‬‬ ‫‪2‬‬ ‫ﻋﻧدﻣﺎ ‪ R2 = 0‬ﻓﮭذا ﯾﻌﻧﻰ أن ‪ b1 = b2 = 0‬وﻋﻧدﻣﺎ ‪ R = 1‬ﻓﮭذا ﯾﻌﻧﻰ أن ﺟﻣﯾﻊ اﻟﻘﯾم اﻟﻣﺷ ﺎھدة‬ ‫‪ yi‬ﺗﻘﻊ ﻋﻠﻰ اﻟﻣﺳﺗوى اﻟﻣﻘدر‪.‬‬ ‫وﯾﻣﻛن ﺣل اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام اﻟﻣﺻﻔوﻓﺎت ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ ‪:‬‬

‫ﻣﺛﺎل)‪(٢-٥‬‬ ‫ﻟﻠﻣﺛﺎل )‪(١-٥‬‬ ‫ﻓﺈن ﻣﻌﺎﻣل ﻗﯾﻣﺔ ﻣﻌﺎﻣل اﻟﺗﺣدﯾد ﺗﺣﺳب ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪( y j ) 2‬‬ ‫‪SYY  yy ‬‬ ‫‪n‬‬ ‫‪(10700) 2‬‬ ‫‪ 11000000 ‬‬ ‫‪11‬‬ ‫‪ 591818 ,‬‬

‫‪( y j )2‬‬ ‫‪n‬‬

‫‪SSR  bX' y ‬‬

‫‪ 10779427.8  10408181.8‬‬

‫‪ 371246 ,‬‬ ‫‪SSE  yy  bX ' y‬‬ ‫‪ SYY  SSR‬‬ ‫‪ 591818  371246‬‬ ‫‪ 220572 .‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪٢٠٦‬‬


‫‪F‬‬ ‫‪6.73243‬‬ ‫‬‫‪-‬‬

‫‪MS‬‬ ‫‪185623‬‬ ‫‪27571.5‬‬ ‫‪-‬‬

‫‪SS‬‬ ‫‪371246‬‬ ‫‪220572‬‬ ‫‪591818‬‬

‫‪df‬‬ ‫‪2‬‬ ‫‪8‬‬ ‫‪10‬‬

‫‪SSR 371246‬‬ ‫‪‬‬ ‫‪ .627.‬‬ ‫‪SYY 591818‬‬

‫‪S.O.V‬‬ ‫اﻹﻧﺣدار‬ ‫اﻟﺧطﺄ‬ ‫اﻟﻛﻠﻲ‬

‫‪R2 ‬‬

‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬ﻻﯾﺟﺎد ﻗﯾﻣﺔ ‪R 2‬‬ ‫واﯾﺿﺎ ﻻﺟراء اﺧﺗﺑﺎرات ﺗﺧص ‪ i  0,i  0,1,2‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوا اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪=.05‬‬ ‫‪0.05‬‬ ‫‪p=2‬‬ ‫‪2‬‬ ‫}‪y={1000.,450,1200,700,800,1100,1050,1150,1000,950,1300.‬‬ ‫}‪{1000.,450,1200,700,800,1100,1050,1150,1000,950,1300.‬‬ ‫}‪x1={16,22.,23,13,17,25,18,20,21,19,22.‬‬ ‫}‪{16,22.,23,13,17,25,18,20,21,19,22.‬‬ ‫}‪x2={510,450,500,425,450,475,515,500,490,510,525‬‬ ‫}‪{510,450,500,425,450,475,515,500,490,510,525‬‬ ‫]}‪ss=Transpose[{x1,x2,y‬‬ ‫‪{{16,510,1000.},{22.,450,450},{23,500,1200},{13,425,700},‬‬ ‫‪{17,450,800},{25,475,1100},{18,515,1050},{20,500,1150},{2‬‬ ‫}}‪1,490,1000},{19,510,950},{22.,525,1300.‬‬ ‫]‪TableForm[ss‬‬

‫‪1000.‬‬ ‫‪450‬‬ ‫‪1200‬‬ ‫‪700‬‬ ‫‪800‬‬ ‫‪1100‬‬ ‫‪1050‬‬ ‫‪1150‬‬ ‫‪1000‬‬ ‫‪950‬‬ ‫‪1300.‬‬

‫‪510‬‬ ‫‪450‬‬ ‫‪500‬‬ ‫‪425‬‬ ‫‪450‬‬ ‫‪475‬‬ ‫‪515‬‬ ‫‪500‬‬ ‫‪490‬‬ ‫‪510‬‬ ‫‪525‬‬

‫‪16‬‬ ‫‪22.‬‬ ‫‪23‬‬ ‫‪13‬‬ ‫‪17‬‬ ‫‪25‬‬ ‫‪18‬‬ ‫‪20‬‬ ‫‪21‬‬ ‫‪19‬‬ ‫‪22.‬‬

‫]‪l[x_]:=Length[x‬‬ ‫]}]‪xx=Table[{1,x1[[i]],x2[[i]]},{i,1,l[x1‬‬

‫‪٢٠٧‬‬


{{1,16,510},{1,22.,450},{1,23,500},{1,13,425},{1,17,450}, {1,25,475},{1,18,515},{1,20,500},{1,21,490},{1,19,510},{1 ,22.,525}} xpr=Transpose[xx] {{1,1,1,1,1,1,1,1,1,1,1},{16,22.,23,13,17,25,18,20,21,19, 22.},{510,450,500,425,450,475,515,500,490,510,525}} w=xpr.xx 11., 216., 5350., 216., 4362., 105410.,

5350., 105410., 2.6124  106 v=Inverse[w] {{23.0157,-0.0271387,-0.0460394},{0.0271387,0.00922992,-0.000316848},{-0.0460394,0.000316848,0.000107453}} xpy=xpr.y 10700., 213250., 5.26525  106 bb=v.xpy {-1928.24,9.61221,5.57653} yy =bb[[1]]+bb[[2]]*x1+bb[[3]]*x2 {1069.58,792.664,1081.1,566.741,744.603,960.914,1116.69,1 052.27,1006.11,1098.42,1210.9} e=y-yy {-69.5826,-342.664,118.897,133.259,55.3967,139.086,66.6896,97.7338,-6.1131,-148.419,89.0963} ss22=Transpose[{y,yy,e}] {{1000.,1069.58,-69.5826},{450,792.664,342.664},{1200,1081.1,118.897},{700,566.741,133.259},{800 ,744.603,55.3967},{1100,960.914,139.086},{1050,1116.69,66.6896},{1150,1052.27,97.7338},{1000,1006.11,6.1131},{950,1098.42,-148.419},{1300.,1210.9,89.0963}} TableForm[ss22] 1000. 1069.58 69.5826 450 792.664 342.664

1200 700 800 1100 1050 1150 1000 950 1300.

1081.1 566.741 744.603 960.914 1116.69 1052.27 1006.11 1098.42 1210.9

118.897 133.259 55.3967 139.086 66.6896 97.7338 6.1131 148.419 89.0963

err=e.e 220572. h[x_]:=Apply[Plus,x] c[x_]:=h[x^2]-(h[x]^2)/l[x] ٢٠٨


ssto=c[y] 591818. ssr=ssto-err 371246. mssr=ssr/p 185623. dfr=(l[x1]-p-1) 8 mmerr=err/dfr 27571.5 f=mssr/mmerr 6.73243 th=TableHeadings->{{source,regression,residual, Total},{anova}} TableHeadings{{source,regression,residual,Total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,mssr,f] rt3=List[dfr,err,mmerr,"--"] rt4=List[l[x1]-1,ssto,"--","--"] tf=TableForm[{rt1,rt2,rt3,rt4},th] {2,371246.,185623.,6.73243} {8,220572.,27571.5,--} {10,591818.,--,--}

source regression residual Total

anova df 2 8 10

SS 371246. 220572. 591818.

MS 185623. 27571.5

F 6.73243  

 R2=ssr/ssto 0.627298 errorm=mmerr*v {{634577.,-748.255,-1269.37},{-748.255,254.483,8.73597},{-1269.37,-8.73597,2.96263}} ggg[x_]:=Sqrt[x] nn=Map[ggg,errorm] {{796.604,0. +27.3542 ,0. +35.6283 },{0. +27.3542 ,15.9525,0. +2.95567 },{0. +35.6283 ,0. +2.95567 ,1.72123}} standbo=nn[[1,1]] 796.604 standb1=nn[[2,2]] 15.9525 standb3=nn[[3,3]] 1.72123 t11=bb[[1]]/standbo -2.42058 ٢٠٩


t22=bb[[2]]/standb1 0.602551 t33=bb[[3]]/standb3 3.23985 <<Statistics`ContinuousDistributions` TT=Quantile[StudentTDistribution[l[x1]-p-1],1-(/2)] 2.306 ww=bb[[1]]+TT*standbo -91.2698 uu=bb[[1]]-TT*standbo -3765.21 jj=bb[[2]]+TT*standb1 46.3988 qq=bb[[2]]-TT*standb1 -27.1744 aa=bb[[3]]+TT*standb3 9.54569 pp=bb[[3]]-TT*standb3 1.60736 ffee=Quantile[FRatioDistribution[p,l[x1]-p-1],1-] 4.45897 If[f>=ffee,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho If[Abs[t11]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho If[Abs[t22]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Accept Ho If[Abs[t33]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho

‫ اﯾﺿ ﺎ‬.v ‫ ﻧﺣﺻ ل ﻋﻠﯾﮭ ﺎ ﻣ ن اﻻﻣ ر‬ XX 

1

‫ واﻟﻣﺻ ﻔوﻓﺔ‬  .05 ‫ﻣﺳ ﺗوى اﻟﻣﻌﻧوﯾ ﺔ ﻣ ن اﻻﻣ ر‬ ‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬R 2 R2=ssr/ssto

‫واﻟﻣﺧرج ھو‬ 0.627298 ‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬s2  XX 

1

‫ﻣﺻﻔوﻓﺔ اﻟﺗﻐﺎﯾر واﻟﺗﺑﺎﯾن‬ errorm=mmerr*v

H 0 : 1  2  0 ‫ﻻﺧﺗﺑﺎر ﻣﻌﻧوﯾﺔ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫ﻧﺣﺻ ل ﻋﻠ ﻰ ﺟ دول ﺗﺣﻠﯾ ل‬. i  0,i  1,2 ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ان واﺣد ﻋﻠﻰ اﻻﻗ ل ﻣ ن‬ ‫اﻟﺗﺑﺎﯾن ﻣن اﻻﻣر‬ tf=TableForm[{rt1,rt2,rt3,rt4},th]

‫ اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر‬f f=mssr/mmerr

‫ اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬f ffee=Quantile[FRatioDistribution[p,l[x1]-p-1],1] ‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ٢١٠


‫]]"‪If[f>=ffee,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Reject Ho‬‬

‫اى رﻓض ﻓرض اﻟﻌدم‪ .‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 0  0‬‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 0  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t11]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Reject Ho‬‬

‫اى رﻓض ﻓرض اﻟﻌدم‪ .‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 1  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 1  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t22]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Accept Ho‬‬

‫اى ﻗﺑول ﻓرض اﻟﻌدم‪ .‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 2  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 2  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t33]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Reject Ho‬‬

‫اى رﻓض ﻓرض اﻟﻌدم‪.‬‬ ‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 0‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪ww=bb[[1]]+TT*standbo‬‬ ‫‪uu=bb[[1]]-TT*standbo‬‬

‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 1‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪jj=bb[[2]]+TT*standb1‬‬ ‫‪qq=bb[[2]]-TT*standb1‬‬

‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 2‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪٢١١‬‬


aa=bb[[3]]+TT*standb3 pp=bb[[3]]-TT*standb3

(٣-٥) ‫ﻣﺛﺎل‬ ‫إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ﻟﺗوﻓﯾق ﻣﻌﺎدﻟﺔ إﻧﺣدار ﺧطﻲ ﻣﺗﻌدد‬ X1={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.48,4.53,4.5 5,4.62,5.86}; X2={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264,0.270,0.24 0,0.259,0.252,0.258,0.293}; X3={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.26 4,0.280,0.266,0.268,0.286}; y={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405 ,0.450,0.480,0.456,0.506};

: ‫اﻟﺣل‬ ‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`LinearRegression`

. ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}] {{3.33,0.276,0.24,0.625},{3.51,0.249,0.254,0.512},{3.55,0 .249,0.249,0.488},{3.65,0.26,0.245,0.524},{3.8,0.271,0.25 ,0.588},{4.2,0.241,0.252,0.475},{4.22,0.269,0.254,0.513}, {4.27,0.264,0.27,0.463},{4.31,0.27,0.274,0.512},{4.48,0.2 4,0.264,0.405},{4.53,0.259,0.28,0.45},{4.55,0.252,0.266,0 .48},{4.62,0.258,0.268,0.456},{5.86,0.293,0.286,0.506}} ListPlot[Transpose[{teamera,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[teamera],Min[winpct]},PlotLabel->"Team ERA vs. Winning Percentage"]

٢١٢


Team ERA vs. Winning

Percentage

0.6 0.55 0.5 0.45 0.4

3.5

4

4.5

5

5.5

Graphics ListPlot[Transpose[{ownbavg,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[ownbavg],Min[winpct]},PlotLabel->"Own Batting Average vs. Winning Percentage"] Own Batting

Average

vs. Winning

Percentage

0.6 0.55 0.5 0.45 0.4

0.25

0.26

Batting

Average

0.27

0.28

0.29

Graphics ListPlot[Transpose[{oppbavg,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[oppbavg],Min[winpct]},PlotLabel->"Opponent Batting Average vs. Winning Percentage"] Opponent

vs. Winning

Percentage

0.6 0.55 0.5 0.45 0.4

0.25

0.26

0.27

0.28

Graphics ٢١٣


Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>BestFit] {BestFit0.302668 -0.0303858 x1+3.16123 x2-1.91482 x3} Fit[dpoints,{1,x1,x2,x3},{x1,x2,x3}] 0.302668 -0.0303858 x1+3.16123 x2-1.91482 x3 Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3}] 1 ParameterTable  x1 x2 x3

Estimate 0.302668  0.0303858 3.16123  1.91482

SE 0.196793 0.0190012 0.442659 0.864137

TStat 1.538  1.59915 7.14147  2.21587

PValue 0.155066 0.14087 , RSquared  0.885111, 0.0000313646 0.0510505

AdjustedRSquared  0.850644, EstimatedVariance  0.00046457, ANOVATable 

Model Error Total

DF 3 10 13

SumOfSq 0.0357907 0.0046457 0.0404364

MeanSq 0.0119302 0.00046457

FRatio 25.6801

PValue 0.000051525

Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3}]

1 x1 x2 ParameterTable  x3 x1x2 x2x3 x1x3

Estimate 4.3393 0.146461 8.45276 24.2133 1.64926 70.7988 0.959189

SE 6.70683 0.528633 23.6866 35.3193 2.42043 126.636 1.41262

TStat 0.646997 0.277055 0.356858 0.685554 0.68139 0.559074 0.679013

PValue 0.538264 0.789741 0.731713 , RSquared  0.894145, 0.515049 0.517525 0.593538 0.518942

AdjustedRSquared  0.803413, Model EstimatedVariance  0.000611483, ANOVATable  Error Total

DF 6 7 13

SumOfSq 0.036156 0.00428038 0.0404364

MeanSq 0.006026 0.000611483

FRatio 9.85473

PValue 0.00402332

cov=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3},RegressionReport->CovarianceMatrix] 44.9816 2.73914     2.73914 0.279453      155.174  10.5961    CovarianceMatrix     234.987  15.0672      14.7961  1.03209    836.777 58.082    4.13907  0.0360002

 155.174  234.987  14.7961  10.5961  15.0672  1.03209

561.055 804.323 49.0586  2961.71  7.89514

804.323 1247.45 81.6642  4420.59  23.2543

49.0586 81.6642 5.8585  283.878  1.88114

836.777 4.13907    58.082  0.0360002      2961.71  7.89514      4420.59  23.2543      283.878  1.88114     16036.7 58.7984    58.7984 1.9955 

corr=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3},RegressionReport->CorrelationMatrix]; corr[[1,2]] ٢١٤


1. 0.772577  0.976785  0.992006     0.772577 1.  0.84623  0.806985      0.976785  0.84623 1. 0.961426      0.992006  0.806985 0.961426 1.      0.911457  0.806625 0.855696 0.955271     0.867621  0.987375  0.988351   0.985224 0.436877  0.0482087  0.235956  0.466086 

 0.911457  0.806625

0.855696 0.955271 1.  0.926149  0.550177

0.985224 0.867621  0.987375  0.988351  0.926149 1. 0.328687

0.436877     0.0482087      0.235956      0.466086      0.550177     0.328687    1. 

corrmat=corr[[1,2,1]] {{1.,0.772577,-0.976785,-0.992006,0.911457,0.985224,0.436877},{0.772577,1.,-0.84623,0.806985,-0.806625,0.867621,-0.0482087},{-0.976785,0.84623,1.,0.961426,0.855696,-0.987375,-0.235956},{0.992006,-0.806985,0.961426,1.,0.955271,-0.988351,0.466086},{-0.911457,-0.806625,0.855696,0.955271,1.,0.926149,-0.550177},{0.985224,0.867621,-0.987375,0.988351,-0.926149,1.,0.328687},{0.436877,-0.0482087,0.235956,-0.466086,-0.550177,0.328687,1.}} corrmat[[1,3]] -0.976785

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫اﻟﻣدﺧﻼت‬: ‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬teamera ‫ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ownbavg ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻧﻰ و‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬oppbavg‫ اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻟﺚ واﻟﻘﺎﺋﻤﺔ‬winpct . ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﺑﯾن اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل اﻻول واﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﺗﻌطﻰ ﻣن اﻻﻣر‬ ListPlot[Transpose[{teamera,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[teamera],Min[winpct]},PlotLabel->"Team ERA vs. Winning Percentage"]

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﺑﯾن اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل اﻟﺛﺎﻧﻰ واﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﺗﻌطﻰ ﻣن اﻻﻣر‬ ListPlot[Transpose[{ownbavg,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[ownbavg],Min[winpct]},PlotLabel->"Own Batting Average vs. Winning Percentage"]

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﺑﯾن اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل اﻟﺛﺎﻟث واﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﺗﻌطﻰ ﻣن اﻻﻣر‬ ListPlot[Transpose[{oppbavg,winpct}],Prolog>{PointSize[0.02]},AxesOrigin>{Min[oppbavg],Min[winpct]},PlotLabel->"Opponent Batting Average vs. Winning Percentage"]

:‫ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﺗﻌدد اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل‬ . yˆ  .302668  .0303858x1  3.16123x 2  1.91482x 3 ‫وﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

٢١٥


‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>BestFit‬‬ ‫واﻟﻤﺨﺮج ھﻮ‬ ‫}‪{BestFit0.302668 -0.0303858 x1+3.16123 x2-1.91482 x3‬‬ ‫او ﻣﻦ اﻻﻣﺮ‬ ‫]}‪Fit[dpoints,{1,x1,x2,x3},{x1,x2,x3‬‬ ‫واﻟﻣﺧرج ھو‪:‬‬ ‫‪0.302668 -0.0303858 x1+3.16123 x2-1.91482 x3‬‬ ‫ﻣﻦ اﻻﻣﺮ‬ ‫]}‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3‬‬

‫ﻧﺣﺻل ﻋﻠﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ‪:‬‬ ‫‪PValue‬‬ ‫‪0.155066‬‬ ‫‪0.14087‬‬ ‫‪, RSquared  0.885111,‬‬ ‫‪0.0000313646‬‬ ‫‪0.0510505‬‬

‫‪TStat‬‬ ‫‪1.538‬‬ ‫‪1.59915‬‬ ‫‪7.14147‬‬ ‫‪2.21587‬‬

‫‪SE‬‬ ‫‪0.196793‬‬ ‫‪0.0190012‬‬ ‫‪0.442659‬‬ ‫‪0.864137‬‬

‫‪Estimate‬‬ ‫‪0.302668‬‬ ‫‪0.0303858‬‬ ‫‪3.16123‬‬ ‫‪1.91482‬‬

‫‪1‬‬ ‫‪ParameterTable  x1‬‬

‫‪x2‬‬ ‫‪x3‬‬

‫‪AdjustedRSquared  0.850644,‬‬ ‫‪PValue‬‬ ‫‪0.000051525‬‬

‫‪‬‬

‫‪FRatio‬‬ ‫‪25.6801‬‬

‫‪MeanSq‬‬ ‫‪0.0119302‬‬ ‫‪0.00046457‬‬

‫‪SumOfSq‬‬ ‫‪0.0357907‬‬ ‫‪0.0046457‬‬ ‫‪0.0404364‬‬

‫‪DF‬‬ ‫‪3‬‬ ‫‪10‬‬ ‫‪13‬‬

‫‪Model‬‬ ‫‪EstimatedVariance  0.00046457, ANOVATable ‬‬ ‫‪Error‬‬ ‫‪Total‬‬

‫ﻻﺧﺗﺑﺎر ﻣﻌﻧوﯾﺔ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم ‪H 0 : 1  2  3  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ان واﺣد ﻋﻠﻰ اﻻﻗل ﻣن ‪ i  0,i  1,2,3‬ﻧﺣﺻل ﻋﻠﻰ ﺟ دول ﺗﺣﻠﯾ ل‬ ‫اﻟﺗﺑﺎﯾن اﻟﺳ ﺎﺑق ﺣﯾ ث ﻗﯾﻣ ﺔ ‪ f‬اﻟﻣﺣﺳ وﺑﺔ ھ ﻰ ‪ 25.6801‬وﺑﻣ ﺎ ا ن ﻗﯾﻣ ﺔ ‪ p‬اﻗ ل ﻣ ن ‪   .01‬ﻓﺈﻧﻧ ﺎ‬ ‫ﻧرﻓض ﻓرض اﻟﻌدم ‪.‬ﻗﯾﻣﺔ ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﻌ دل )‪ (.850644‬واﻟﺗ ﻰ ﺗﻌﻧ ﻰ ان ‪85%‬ﻣ ﻦ اﻟﺘﻐﯿ ﺮ‬ ‫ﻓ ﻰ اﻟﻤﺘﻐﯿ ﺮ اﻟﺘ ﺎﺑﻊ ﯾﻌ ود اﻟ ﻰ اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ‪.‬اﯾﺿ ﺎ ﻣ ن ﺟ دول اﻟﻣﻌﻠﻣ ﺔ ﻧﺟ د ان ﻗﯾﻣ ﺔ‬ ‫‪ p= 0000313646‬ﻟﻠﻣﺗﻐﯾر ‪ x2‬واﻟﺗﻰ ﺗﻌﻧﻰ ﻣﻌﻧوﯾﺔ ھذا اﻟﻣﺗﻐﯾر ‪.‬‬ ‫ﺗﺣت ﻓرض ﻣﺗﻐﯾرات ﺟدﯾدة ﻣﺛل ‪ x1x 2 , x1x 3 , x 2 x 3‬وﺑﺎﺳﺗﺧدام اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1‬‬ ‫]}‪x3},{x1,x2,x3‬‬ ‫ﻧﺣﺻل ﻋﻠﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪:‬‬

‫‪٢١٦‬‬


1 x1 x2 ParameterTable x3 x1x2 x2x3 x1x3

Estimate 4.3393 0.146461 8.45276 24.2133 1.64926 70.7988 0.959189

SE 6.70683 0.528633 23.6866 35.3193 2.42043 126.636 1.41262

TStat 0.646997 0.277055 0.356858 0.685554 0.68139 0.559074 0.679013

PValue 0.538264 0.789741 0.731713 , RSquared 0.894145, 0.515049 0.517525 0.593538 0.518942

AdjustedRSquared 0.803413, Model EstimatedVariance 0.000611483,ANOVATable Error Total

DF 6 7 13

SumOfSq 0.036156 0.00428038 0.0404364

MeanSq 0.006026 0.000611483

FRatio 9.85473

PValue 0.00402332

i  0,i  1, 2,...7 ‫ﻻﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ان واﺣ د ﻋﻠ ﻰ اﻻﻗ ل ﻣ ن‬ ‫ وﺑﻣ ﺎ ان ﻗﯾﻣ ﺔ‬.9.85473 ‫ اﻟﺟدوﻟﯾﺔ ھ ﻰ‬f ‫ﻧﺣﺻل ﻋﻠﻰ ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن اﻟﺳﺎﺑق ﺣﯾث ﻗﯾﻣﺔ‬ ‫( واﻟﺗ ﻰ‬.803413) ‫ﻗﯾﻣ ﺔ ﻣﻌﺎﻣ ل اﻟﺗﺣدﯾ د اﻟﻣﻌ دل‬. ‫ ﻓﺈﻧﻧ ﺎ ﻧ رﻓض ﻓ رض اﻟﻌ دم‬  .01 ‫اﻗل ﻣن‬p ‫اﯾﺿ ﺎ ﻣ ن ﺟ دول‬.‫ﻣ ﻦ اﻟﺘﻐﯿ ﺮ ﻓ ﻰ اﻟﻤﺘﻐﯿ ﺮ اﻟﺘ ﺎﺑﻊ ﯾﻌ ود اﻟ ﻰ اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ‬80.3% ‫ﺗﻌﻧ ﻰ ان‬ . ‫ ﻏﯾر ﻣﻌﻧوﯾﺔ ﻟﺟﻣﯾﻊ اﻟﻣﺗﻐﯾرات‬p ‫اﻟﻣﻌﺎﻟم ﻧﺟد ان ﻗﯾﻣﺔ‬ ‫ﻣﺻﻔوﻓﺔ اﻟﺗﻐﺎﯾر واﻟﺗﺑﺎﯾن ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ cov=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3},RegressionReport->CovarianceMatrix]

44.9816 2.73914     2.73914 0.279453      155.174  10.5961    CovarianceMatrix    234.987  15.0672      14.7961  1.03209     836.777 58.082    4.13907  0.0360002

 155.174  234.987  14.7961  10.5961  15.0672  1.03209

561.055 804.323 49.0586  2961.71  7.89514

804.323 1247.45 81.6642  4420.59  23.2543

49.0586 81.6642 5.8585  283.878  1.88114

: ‫واﻟﻣﺧرج ھو‬ 836.777 4.13907    58.082  0.0360002      2961.71  7.89514      4420.59  23.2543       283.878  1.88114     16036.7 58.7984    58.7984 1.9955 

‫ﻣﺻﻔوﻓﺔ اﻻرﺗﺑﺎط ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ corr=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3},RegressionReport->CorrelationMatrix]; corr[[1,2]] ‫واﻟﻣﺧرج ھو‬ 1. 0.772577  0.976785  0.992006  0.911457 0.985224 0.436877        0.772577 1.  0.84623  0.806985  0.806625 0.867621  0.0482087           0.976785  0.84623 1. 0.961426 0.855696  0.987375  0.235956          0.992006  0.806985 0.961426 1. 0.955271  0.988351  0.466086          0.911457  0.806625 0.855696 0.955271 1.  0.926149  0.550177         0.985224 0.867621  0.987375  0.988351  0.926149 1. 0.328687     1.  0.436877  0.0482087  0.235956  0.466086  0.550177 0.328687 

‫ﻣﺻﻔوﻓﺔ اﻻرﺗﺑﺎط ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻋﻠﻰ ﺷﻛل ﻗﺎﺋﻣﺔ ﻣن اﻻﻣر‬ corrmat=corr[[1,2,1]] ‫واﻟﻣﺧرج ھو‬ {{1.,0.772577,-0.976785,-0.992006,0.911457,0.985224,0.436877},{0.772577,1.,-0.84623,0.806985,-0.806625,0.867621,-0.0482087},{-0.976785,0.84623,1.,0.961426,0.855696,-0.987375,-0.235956},{٢١٧


‫‪0.992006,-0.806985,0.961426,1.,0.955271,-0.988351,‬‬‫‪0.466086},{-0.911457,-0.806625,0.855696,0.955271,1.,‬‬‫‪0.926149,-0.550177},{0.985224,0.867621,-0.987375,‬‬‫‪0.988351,-0.926149,1.,0.328687},{0.436877,-0.0482087,‬‬‫}}‪0.235956,-0.466086,-0.550177,0.328687,1.‬‬ ‫ﻟﻠﺣﺻول ﻋل ﻣﻌﺎﻣل اﻻرﺗﺑﺎط ﺑﯾن اﻟﻣﺗﻐﯾر اﻻول واﻟﻣﺗﻐﯾر اﻟﺛﺎﻟث )ﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ( ﻧﺳﺗﺧدم اﻻﻣر‬ ‫]]‪corrmat[[1,3‬‬

‫)‪ (٣-٥‬اﻻﻧﺣدار ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻧﯾﺔ‬

‫‪Quadratic Regression‬‬

‫ﻓﻲ ﺑﻌض اﻷﺣﯾﺎن ﺗﻛون اﻟﻌﻼﻗﺔ ﺑﯾن ﻣﺗﻐﯾرﯾن ﻋﻠﻰ ﺷﻛل ﻣﻧﺣﻧﻰ ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾ ﺔ ﻓﻌﻠ ﻰ ﺳ ﺑﯾل‬ ‫اﻟﻣﺛﺎل ﺑﻔرض أﻧﻧﺎ ﻧرﻏب ﻓﻲ ﺗﻘدﯾر ﻣﻌﺎﻟم اﻟﻧﻣوذج ‪:‬‬ ‫‪ Y|x   0  1x   2 x 2‬‬ ‫ﻓﻲ اﻟﺣﻘﯾﻘﺔ ﻧرﻏب ﻓﻲ ﺗﻘدﯾر ﻣﻌﺎﻟم اﻟﻧﻣوذج اﻧﺣدار ﺧطﻰ ﻣﺗﻌدد ﻋﻠﻰ اﻟﺷﻛل ‪:‬‬ ‫‪Y|x  b0  b1x1  b2 x 2‬‬ ‫وذﻟك ﺑوﺿﻊ ‪ x2 = x2 , x1 = x‬ﻓﻲ اﻟﻣﻌﺎدﻟﺔ اﻟﺳﺎﺑﻘﺔ ‪.‬‬

‫ﻣﺛﺎل)‪(٤-٥‬‬ ‫ﻷزواج اﻟﻘﯾﺎﺳﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗ ﺎﻟﻰ أوﺟ د اﻻﻧﺣ دار اﻟﻣﻘ درة ﻟﻧﻣ وذج اﻧﺣ دار ﻣ ن اﻟدرﺟ ﺔ‬ ‫اﻟﺛﺎﻧﯾﺔ‪.‬‬ ‫‪2‬‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪5‬‬ ‫‪6‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪10‬‬ ‫‪10.20 15.35 20.50 25.95 32.20 38.50 46.00 53.80 62.00‬‬

‫اﻟﺣــل ‪:‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ ‪:‬‬

‫‪yˆ x  1.48083  3.792313x  0.223674x 2.‬‬ ‫واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻲ ﻟﮭﺎ ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪.(١-٥‬‬ ‫ﺷﻛل )‪(١-٥‬‬ ‫‪٢١٨‬‬

‫‪1‬‬ ‫‪5.0‬‬

‫‪x‬‬ ‫‪y‬‬


‫ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬. Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ . ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ p=2

2 x1={1.,2,3,4,5,6,7,8,9,10} {1.,2,3,4,5,6,7,8,9,10} y={5.,10.2,15.35,20.5,25.95,32.2,38.5,46,53.8,62} {5.,10.2,15.35,20.5,25.95,32.2,38.5,46,53.8,62} x2=x1^2 {1.,4,9,16,25,36,49,64,81,100} ss=Transpose[{x1,x2,y}] {{1.,1.,5.},{2,4,10.2},{3,9,15.35},{4,16,20.5},{5,25,25.9 5},{6,36,32.2},{7,49,38.5},{8,64,46},{9,81,53.8},{10,100, 62}} l[x_]:=Length[x] xx=Table[{1,x1[[i]],x2[[i]]},{i,1,l[x1]}] {{1,1.,1.},{1,2,4},{1,3,9},{1,4,16},{1,5,25},{1,6,36},{1, 7,49},{1,8,64},{1,9,81},{1,10,100}} xpr=Transpose[xx] {{1,1,1,1,1,1,1,1,1,1},{1.,2,3,4,5,6,7,8,9,10},{1.,4,9,16 ,25,36,49,64,81,100}} w=xpr.xx {{10.,55.,385.},{55.,385.,3025.},{385.,3025.,25333.}} v=Inverse[w] {{1.38333,-0.525,0.0416667},{-0.525,0.241288,0.0208333},{0.0416667,-0.0208333,0.00189394}} xpy=xpr.y {309.5,2218.1,17708.2} bb=v.xpy {1.48083,3.79231,0.223674} yy =bb[[1]]+bb[[2]]*x1+bb[[3]]*x2 ٢١٩


{5.49682,9.96015,14.8708,20.2289,26.0342,32.287,38.987,46 .1345,53.7292,61.7714} t1=Transpose[{x1,y}] {{1.,5.},{2,10.2},{3,15.35},{4,20.5},{5,25.95},{6,32.2},{ 7,38.5},{8,46},{9,53.8},{10,62}} a=PlotRange{{0,15},{0,70}} PlotRange{{0,15},{0,70}} a1=Prolog{PointSize[.02]} Prolog{PointSize[0.02]} g= ListPlot[t1,a,a1,AxesLabel{"x","y"}] y 70 60 50 40 30 20 10 x 2

Graphics

4

6

8

10

12

14

dd=Plot[bb[[1]]+bb[[2]]*x+bb[[3]]*x^2,{x,0,15},AxesLabel {"x","y"}] y 100 80 60 40 20 x 2

Graphics Show[g,dd]

4

6

8

10

12

٢٢٠

14


‫‪y‬‬ ‫‪70‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬ ‫‪x‬‬ ‫‪14‬‬

‫‪10‬‬

‫‪12‬‬

‫‪8‬‬

‫‪6‬‬

‫‪2‬‬

‫‪4‬‬

‫‪Graphics‬‬

‫ﻣﺛﺎل )‪(٥-٥‬‬ ‫ﻟﻠﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ أوﺟد ﻣﻌﺎدﻟﺔاﻻﻧﺣدار اﻟﻣﻘدرة ﻟﻧﻣوذج اﻧﺣدار ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻧﯾﺔ‪.‬‬ ‫‪X‬‬ ‫‪0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.264,0‬‬ ‫‪.280,0.266,0.268,0.286,‬‬ ‫‪Y‬‬ ‫‪0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405,0‬‬ ‫‪.450,0.480,0.456,0.506.‬‬

‫اﻟﺣل ‪:‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وذﻟك ﺑﺎﺳﺗﺧدام‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ ‫`‪Statistics`LinearRegression‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫`‪<<Statistics`LinearRegression‬‬ ‫‪oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,‬‬ ‫;}‪0.274,0.264,0.280,0.266,0.268,0.286‬‬ ‫‪winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0‬‬ ‫;}‪.512,0.405,0.450,0.480,0.456,0.506‬‬ ‫‪dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winp‬‬ ‫;]}]‪ct‬‬ ‫]‪Regress[dpoints,{1,x,x^2},x‬‬

‫‪٢٢١‬‬


1 ParameterTable  x x2

Estimate 12.9504  92.8343 172.464

SE 4.17042 31.8034 60.5108

TStat 3.10529  2.91901 2.85014

PValue 0.0100092 , RSquared  0.59678, 0.0139622 0.0157927

AdjustedRSquared  0.523467, Model EstimatedVariance  0.00148225, ANOVATable  Error Total

DF 2 11 13

SumOfSq 0.0241316 0.0163048 0.0404364

MeanSq 0.0120658 0.00148225

FRatio 8.14018

PValue 0.00676837

Regress[dpoints,{1,x,x^2,x^3},x] 1 ParameterTable  x x2 x3

Estimate 48.0489  494.226 1700.06  1934.66

SE 82.9408 947.803 3605.45 4565.52

TStat 0.579316  0.521444 0.471525  0.423755

PValue 0.575193 0.613409, RSquared  0.603892, 0.647385 0.680715

AdjustedRSquared  0.48506, Model EstimatedVariance  0.00160171, ANOVATable  Error Total

DF 3 10 13

SumOfSq 0.0244192 0.0160171 0.0404364

MeanSq 0.00813974 0.00160171

FRatio 5.08189

PValue 0.0215877

‫ﻣﻦ اﻻﻣﺮ‬ Regress[dpoints,{1,x,x^2},x] ‫اﻟﻤﺨﺮج ﻟﮭﺬا‬.‫ﻧﺤﺼﻞ ﻋﻠﻰ اﻟﺠﺪول اﻟﺘﺎﻟﻰ واﻟﺬى ﻧﺘﻌﺎﻣﻞ ﻣﻌﮫ ﻛﻤﺎ ﻓﻰ اﻟﺠﺪاول اﻟﻤﺨﺮﺟﺔ ﻓﻰ ﺣﺎﻟﺔ اﻻﻧﺤﺪار اﻟﻤﺘﻌﺪد‬ : ‫اﻻﻣﺮ ھﻮ‬

ParameterTable 

1 x x2

Estimate 12.9504  92.8343 172.464

SE 4.17042 31.8034 60.5108

TStat 3.10529  2.91901 2.85014

PValue 0.0100092 , RSquared  0.59678, 0.0139622 0.0157927

AdjustedRSquared  0.523467, EstimatedVariance  0.00148225, ANOVATable 

Model Error Total

DF 2 11 13

SumOfSq 0.0241316 0.0163048 0.0404364

MeanSq 0.0120658 0.00148225

FRatio 8.14018

PValue 0.00676837

: ‫ﻟﻠﺣﺻول ﻋﻠﻰ ﻣﻌﺎدﻟﺔ ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻟﺛﺔ ﻧﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ‬

Regress[dpoints,{1,x,x^2,x^3},x]

:‫ﺣﯿﺚ ﻧﺤﺼﻞ ﻋﻠﻰ اﻟﺠﺪول اﻟﺘﺎﻟﻰ‬

٢٢٢


‫‪PValue‬‬ ‫‪0.575193‬‬ ‫‪0.613409, RSquared  0.603892,‬‬ ‫‪0.647385‬‬ ‫‪0.680715‬‬

‫‪SE‬‬ ‫‪82.9408‬‬ ‫‪947.803‬‬ ‫‪3605.45‬‬ ‫‪4565.52‬‬

‫‪TStat‬‬ ‫‪0.579316‬‬ ‫‪ 0.521444‬‬ ‫‪0.471525‬‬ ‫‪ 0.423755‬‬

‫‪Estimate‬‬ ‫‪48.0489‬‬ ‫‪ 494.226‬‬ ‫‪1700.06‬‬ ‫‪ 1934.66‬‬

‫‪1‬‬ ‫‪ParameterTable  x‬‬ ‫‪x2‬‬ ‫‪x3‬‬

‫‪AdjustedRSquared  0.48506,‬‬ ‫‪PValue‬‬ ‫‪0.0215877‬‬

‫‪‬‬

‫‪FRatio‬‬ ‫‪5.08189‬‬

‫‪SumOfSq‬‬ ‫‪0.0244192‬‬ ‫‪0.0160171‬‬ ‫‪0.0404364‬‬

‫‪MeanSq‬‬ ‫‪0.00813974‬‬ ‫‪0.00160171‬‬

‫‪DF‬‬ ‫‪3‬‬ ‫‪10‬‬ ‫‪13‬‬

‫‪Model‬‬ ‫‪Error‬‬ ‫‪Total‬‬

‫‪EstimatedVariance  0.00160171, ANOVATable ‬‬

‫واﻟﺬى ﻧﺘﻌﺎﻣﻞ ﻣﻌﮫ ﻛﻤﺎ ﻓﻰ اﻟﺠﺪاول اﻟﻤﺨﺮﺟﺔ ﻓﻰ ﺣﺎﻟﺔ اﻻﻧﺤﺪار اﻟﻤﺘﻌﺪد‪.‬‬

‫ﻣﺛﺎل)‪(٦-٥‬‬ ‫ﻷزواج اﻟﻣﺷﺎھدات اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺣﯾث ‪ x‬ﺗﻣﺛل ﻋ دد اﻷﯾ ﺎم ﺑﻌ د اﻹزھ ﺎر و ‪(Kg/ha) y‬‬ ‫اﻟﻣﺣﺻول اﻟﻧﺎﺗﺞ ﻣن ﻧﺑﺎت ﻣ ﺎ ﻓ ﻲ اﻟﮭﻧ د‪ ،‬أوﺟ د ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار اﻟﻣﻘ دره ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾ ﺔ واﺧﺗﺑ ر‬ ‫ﻓرض اﻟﻌدم‪:‬‬ ‫‪H 0 : 1  2  0 .‬‬ ‫‪30‬‬

‫‪28‬‬

‫‪26‬‬

‫‪24‬‬

‫‪22‬‬

‫‪20‬‬

‫‪18‬‬

‫‪16‬‬

‫‪x‬‬

‫‪3883‬‬

‫‪3500‬‬

‫‪3190‬‬

‫‪3057‬‬

‫‪3423‬‬

‫‪3304‬‬

‫‪2518‬‬

‫‪2508‬‬

‫‪y‬‬

‫‪46‬‬

‫‪44‬‬

‫‪42‬‬

‫‪40‬‬

‫‪38‬‬

‫‪36‬‬

‫‪34‬‬

‫‪32‬‬

‫‪x‬‬

‫‪2776‬‬

‫‪3103‬‬

‫‪3241‬‬

‫‪3517‬‬

‫‪3333‬‬

‫‪3708‬‬

‫‪3646‬‬

‫‪3823‬‬

‫‪y‬‬

‫اﻟﺣــل ‪:‬‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪.(٢-٥‬‬

‫ﺷﻛل )‪(٢-٥‬‬ ‫واﻟذي ﯾوﺿﺢ ﻋﻼﻗﺔ ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻧﯾﺔ‪ .‬ﻧﻣوذج اﻹﻧﺣدار اﻟﻣﻘدر ھو‪:‬‬ ‫‪٢٢٣‬‬


‫‪yˆ  1070.4  293.48x  4  5358x 2 .‬‬ ‫واﻟﻣوﺿﺢ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل )‪ (٣-٥‬ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر‪.‬‬ ‫ﺷﻛل )‪(٣-٥‬‬

‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬ ‫‪SS‬‬ ‫‪MS‬‬ ‫‪F‬‬ ‫‪2084779.4‬‬ ‫‪1042389.691‬‬ ‫‪25.077‬‬

‫‪S.O.V‬‬ ‫‪df‬‬ ‫‪2‬‬ ‫‪1, 2 0‬‬ ‫‪13‬‬ ‫‪540388.37‬‬ ‫‪41568.336‬‬ ‫اﻟﺧطﺄ‬ ‫‪15‬‬ ‫‪2625167.8‬‬ ‫اﻟﻛﻠﻲ‬ ‫ﺑﻣﺎ أن ﻗﯾﻣﺔ‪ F‬اﻟﻣﺣﺳوﺑﺔ ﻣن ا ﻟﺟدول اﻟﺳﺎﺑق ﺗﺳﺎوي )‪ (25.077‬ﺗزﯾد ﻋن ﻗﯾﻣﺔ ‪ F‬اﻟﺟد وﻟﯾﺔ‬ ‫ﻋﻧد درﺟﺗﻲ ﺣرﯾﺔ )‪ (2, 13‬و ‪  F0.05 (2,13)  3.81),   0.05‬ﻓﺈﻧﻧﺎ ﻧرﻓض ﻓرض‬ ‫اﻟﻌدم‪.‬‬ ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ‪ Mathematica‬وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات‬ ‫اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪p=2‬‬ ‫‪2‬‬ ‫‪y={2508.,2518,3304,3423,3057,3190,3500,3883,3823,3646,370‬‬ ‫‪8,‬‬ ‫}‪3333,3517,3241,3103,2776‬‬ ‫‪{2508.,2518,3304,3423,3057,3190,3500,3883,3823,3646,3708,‬‬ ‫}‪3333,3517,3241,3103,2776‬‬ ‫}‪x1={16,18,20.,22,24,26,28,30,32,34,36,38,40,42,44,46‬‬ ‫}‪{16,18,20.,22,24,26,28,30,32,34,36,38,40,42,44,46‬‬ ‫‪x2=x1^2‬‬ ‫‪{256,324,400.,484,576,676,784,900,1024,1156,1296,1444,160‬‬ ‫}‪0,1764,1936,2116‬‬

‫‪٢٢٤‬‬


ss=Transpose[{x1,x2,y}] {{16,256,2508.},{18,324,2518},{20.,400.,3304},{22,484,342 3},{24,576,3057},{26,676,3190},{28,784,3500},{30,900,3883 },{32,1024,3823},{34,1156,3646},{36,1296,3708},{38,1444,3 333},{40,1600,3517},{42,1764,3241},{44,1936,3103},{46,211 6,2776}} TableForm[ss]

16 18 20. 22 24 26 28 30 32 34 36 38 40 42 44 46

256 324 400. 484 576 676 784 900 1024 1156 1296 1444 1600 1764 1936 2116

2508. 2518 3304 3423 3057 3190 3500 3883 3823 3646 3708 3333 3517 3241 3103 2776

l[x_]:=Length[x] xx=Table[{1,x1[[i]],x2[[i]]},{i,1,l[x1]}] {{1,16,256},{1,18,324},{1,20.,400.},{1,22,484},{1,24,576} ,{1,26,676},{1,28,784},{1,30,900},{1,32,1024},{1,34,1156} ,{1,36,1296},{1,38,1444},{1,40,1600},{1,42,1764},{1,44,19 36},{1,46,2116}} xpr=Transpose[xx] {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{16,18,20.,22,24,26,28 ,30,32,34,36,38,40,42,44,46},{256,324,400.,484,576,676,78 4,900,1024,1156,1296,1444,1600,1764,1936,2116}} w=xpr.xx

16., 496., 16736., 496., 16736., 603136., 16736., 603136., 2.28251  10 v=Inverse[w] {{9.16565,-0.617069,0.00958508},{-0.617069,0.0427959,0.000678396},{0.00958508,-0.000678396,0.0000109419}} xpy=xpr.y 52530., 1.64511  106, 5.55659  107 bb=v.xpy {-1070.4,293.483,-4.5358} yy =bb[[1]]+bb[[2]]*x1+bb[[3]]*x2 ٢٢٥


{2464.16,2742.7,2984.94,3190.9,3360.57,3493.96,3591.06,36 51.87,3676.4,3664.64,3616.59,3532.26,3411.64,3254.73,3061 .54,2832.06} e=y-yy {43.8358,-224.696,319.059,232.101,-303.571,-303.957,91.0562,231.131,146.604,-18.6356,91.4107,199.257,105.363,-13.7317,41.4603,-56.0613} ss22=Transpose[{y,yy,e}] {{2508.,2464.16,43.8358},{2518,2742.7,224.696},{3304,2984.94,319.059},{3423,3190.9,232.101},{30 57,3360.57,-303.571},{3190,3493.96,303.957},{3500,3591.06,91.0562},{3883,3651.87,231.131},{3823,3676.4,146.604},{36 46,3664.64,18.6356},{3708,3616.59,91.4107},{3333,3532.26,199.257},{3517,3411.64,105.363},{3241,3254.73,13.7317},{3103,3061.54,41.4603},{2776,2832.06,-56.0613}} TableForm[ss22]

2508. 2518 3304 3423 3057 3190 3500 3883 3823 3646 3708 3333 3517 3241 3103 2776

2464.16 2742.7 2984.94 3190.9 3360.57 3493.96 3591.06 3651.87 3676.4 3664.64 3616.59 3532.26 3411.64 3254.73 3061.54 2832.06

43.8358 224.696 319.059 232.101 303.571 303.957 91.0562 231.131 146.604 18.6356 91.4107 199.257 105.363 13.7317 41.4603 56.0613

err=e.e 540388. h[x_]:=Apply[Plus,x] c[x_]:=h[x^2]-(h[x]^2)/l[x] ssto=c[y] 2.62517  106 ssr=ssto-err 2.08478  106 mssr=ssr/p 1.04239  106 dfr=(l[x1]-p-1) 13 ٢٢٦


mmerr=err/dfr 41568.3 f=mssr/mmerr 25.0765 th=TableHeadings->{{source,regression,residual, Total},{anova}} TableHeadings{{source,regression,residual,Total},{anova} } rt1=List["df","SS","MS","F"] {df,SS,MS,F} rt2=List[p,ssr,mssr,f] rt3=List[dfr,err,mmerr,"--"] rt4=List[l[x1]-1,ssto,"--","--"] tf=TableForm[{rt1,rt2,rt3,rt4},th] 2, 2.08478  106, 1.04239  106, 25.0765 {13,540388.,41568.3,--} 15, 2.62517  106, , 

source regression residual Total

anova df 2 13 15

SS 2.08478  106 540388. 2.62517  106

MS 1.04239  106 41568.3

 errorm=v*mmerr {{381001.,-25650.5,398.436},{-25650.5,1778.95,28.1998},{398.436,-28.1998,0.454836}} g[x_]:=Sqrt[x] nn=Map[g,errorm] {{617.253,0. +160.158 ,19.9609},{0. +160.158 ,42.1776,0. +5.31035 },{19.9609,0. +5.31035 ,0.674415}} standbo=nn[[1,1]] 617.253 standb1=nn[[2,2]] 42.1776 standb3=nn[[3,3]] 0.674415 t11=bb[[1]]/standbo -1.73413 t22=bb[[2]]/standb1 6.95826 t33=bb[[3]]/standb3 -6.72554 <<Statistics`ContinuousDistributions` TT=Quantile[StudentTDistribution[l[x1]-p-1],.975] 2.16037 ww=bb[[1]]+TT*standbo 263.096 ٢٢٧

F 25.0765  


uu=bb[[1]]-TT*standbo -2403.89 jj=bb[[2]]+TT*standb1 384.602 qq=bb[[2]]-TT*standb1 202.364 aa=bb[[3]]+TT*standb3 -3.07882 pp=bb[[3]]-TT*standb3 -5.99279 TTa=N[%,5] -5.99279 ffee=Quantile[FRatioDistribution[p,l[x1]-p-1],.95] 3.80557 If[f>=ffee,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho If[Abs[t11]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Accept Ho If[Abs[t22]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho If[Abs[t33]>=TT,Print["Reject Ho"],Print["Accept Ho"]] Reject Ho

: ‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ‬ ‫ اﻟﻣدﺧﻼت‬:‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ‬x1‫ اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔ‬y . ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬ ‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬ :‫ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﺗﻌدد اﻟﻣﻘدرة‬

yˆ  1070.4  293.483x  4.5358x2 .

‫ ﺣﯿﺚ اﻟﻤﺨﺮج ھﻮ‬bb ‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ {-1070.4,293.483,-4.5358}

H 0 : 1  2  0 ‫ﻻﺧﺗﺑﺎر ﻣﻌﻧوﯾﺔ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫ﻧﺣﺻ ل ﻋﻠ ﻰ ﺟ دول ﺗﺣﻠﯾ ل‬. i  0,i  1,2 ‫ﺿد اﻟﻔرض اﻟﺑدﯾل ان واﺣد ﻋﻠﻰ اﻻﻗ ل ﻣ ن‬ ‫اﻟﺗﺑﺎﯾن ﻣن اﻻﻣر‬ (tf=TableForm[{rt1,rt2,rt3,rt4},th]

‫ اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر‬f f=mssr/mmerr

‫ اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر‬f ffee=Quantile[FRatioDistribution[p,l[x1]-p-1],.95]

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ If[f>=ffee,Print["Reject Ho"],Print["Accept Ho"]]

‫واﻟﻣﺧرج ھو‬ Reject Ho

‫ ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬.‫اى رﻓض ﻓرض اﻟﻌدم‬ ٢٢٨


‫‪H 0 : 0  0‬‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 0  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t11]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Accept Ho‬‬

‫اى ﻗﺑول ﻓرض اﻟﻌدم‪ .‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 1  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 1  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t22]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Reject Ho‬‬

‫اى رﻓض ﻓرض اﻟﻌدم‪ .‬ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم‬ ‫‪H 0 : 2  0‬‬ ‫ﺿد اﻟﻔرض اﻟﺑدﯾل‬ ‫‪H1 : 2  0‬‬

‫اﻟﻘرار اﻟذي ﯾﺗﺧذ ﻣن اﻻﻣر‬ ‫]]"‪If[Abs[t33]>=TT,Print["Reject Ho"],Print["Accept Ho‬‬

‫واﻟﻣﺧرج ھو‬ ‫‪Reject Ho‬‬

‫اى رﻓض ﻓرض اﻟﻌدم‪.‬‬ ‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 0‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪ww=bb[[1]]+TT*standbo‬‬

‫‪٢٢٩‬‬


‫‪uu=bb[[1]]-TT*standbo‬‬

‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 1‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪jj=bb[[2]]+TT*standb1‬‬ ‫‪qq=bb[[2]]-TT*standb1‬‬

‫‪95%‬ﻓﺗرة ﺛﻘﺔ ل ‪ 2‬ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن‬ ‫‪aa=bb[[3]]+TT*standb3‬‬

‫‪pp=bb[[3]]-TT*standb3‬‬

‫)‪ (٤-٥‬اﻛﺗﺷﺎف ﻣﺧﺎﻟﻔﺎت ﻓروض اﻟﺗﺣﻠﯾل ﻓﻰ اﻻﻧﺣداراﻟﻣﺗﻌدد‬ ‫ذﻛرﻧﺎ ﻋﻧد ﺗﻧﺎوﻟﻧﺎ ﻟﻧﻣوذج اﻻﻧﺣدار اﻟﺑﺳﯾط أﻧﮫ ﻣن اﻟﻣﺳﺗﺣﺳن اﻟﻛﺷف ﻋن ﻣﺧﺎﻟﻔﺎت‬ ‫ﻓروض اﻟﻧﻣوذج وذﻟك ﺑﺈﺳﺗﺧدام ﺗﺣﻠﯾل اﻟﺑواﻗﻲ أو أﺧﺗﺑﺎرات إﺣﺻﺎﺋﯾﺔ ﻣﻌﯾﻧ ﺔ‪ .‬اﯾﺿ ﺎ ً‬ ‫ﻧﺎﻗﺷﻧﺎ اﻟطرق اﻟﻌﻼﺟﯾﮫ ﻟﺗﺻﺣﯾﺢ ھذه اﻟﻣﺧﺎﻟﻔﺎت ‪.‬ﻧﻔس اﻟﺷﻲء ﯾﻣﻛن ﺗطﺑﯾﻘ ﮫ ﻓ ﻲ ﺣﺎﻟ ﺔ‬ ‫اﻻﻧﺣدار اﻟﺧطﻰ اﻟﻣﺗﻌدد ﻣﻊ إﺟراء ﺗﻌدﯾﻼت ﺻﻐﯾره‪.‬‬ ‫ان طرق اﻟﻛﺷف ﻋن اﻟﻣﺧﺎﻟﻔﺎت ﻟﻔروض ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﻣﺗﻌدد ﺗﺷﻣل‬ ‫اﻟﻛﺷف ﻋن اﻟﻣﺧﺎﻟﻔﺎت اﻟﺗﺎﻟﯾﺔ ‪:‬‬ ‫‪ .١‬داﻟﺔ اﻻﻧﺣدار ﻟﯾﺳت ﺧطﯾﺔ ‪٠‬‬ ‫‪ .٢‬ﺣدود اﻟﺧطﺄ ﻟﯾﺳت ﻣرﺗﺑطﮫ‪٠‬‬ ‫‪ .٣‬اﻟﻧﻣ وذج ﻣﻼﺋ م ﻟﺟﻣﯾ ﻊ اﻟﻣﺷ ﺎھدات ﺑﺎﺳ ﺗﺛﻧﺎء ﻣﺷ ﺎھدة واﺣ دة او ﻗﻠﯾ ل ﻣ ن‬ ‫اﻟﻣﺷﺎھدات اﻟﻘﺎﺻﯾﺔ ‪٠‬‬ ‫‪ .٤‬ﺣدود اﻟﺧطﺄ ﻟﯾﺳت طﺑﯾﻌﯾﺔ ‪٠‬‬ ‫‪ .٥‬ﺣدود اﻟﺧطﺄ ﻟﯾس ﻟﮭﺎ ﺗﺑﺎﯾن ﺛﺎﺑت ‪٠‬‬ ‫‪ .٦‬ﻣﺗﻐﯾر ﻣﺳﺗﻘل ﻣﮭم واﺣد او ﻋدد ﻣن اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ اﻟﻣﮭﻣﺔ ﻗد ﺣذﻓت ﻣ ن‬ ‫اﻟﻧﻣوذج ‪٠‬‬ ‫)‪ (١-٤-٥‬رﺳوم اﻟﺑواﻗﻰ‬ ‫اﻟﺑواﻗﻲ ‪ e j‬ﻣ ن ﻧﻣ وذج اﻻﻧﺣ دار اﻟﻣﺗﻌ دد ﺗﻠﻌ ب دور ﻣﮭ م ﻓ ﻲ اﻟﺣﻛ م ﻋﻠ ﻰ ﺻ ﻼﺣﯾﺔ‬ ‫اﻟﻧﻣوذج ﻛﻣﺎ ھو اﻟﺣﺎل ﻓﻲ ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط‪ ٠‬رﺳوم اﻟﺑواﻗﻲ ﻓ ﻲ ﺣﺎﻟ ﺔ‬ ‫‪٢٣٠‬‬


‫اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ﯾﻣﻛن ﺗطﺑﯾﻘﮭﺎ ﻣﺑﺎﺷرة ﻓﻲ اﻻﻧﺣدار اﻟﻣﺗﻌدد‪ ٠‬ھذا وھﻧﺎك ﻋدة‬ ‫رﺳوم ﻣﮭﻣﺔ ﻟﻠﺑواﻗﻲ ﻓﻲ ﺗﺣﻠﯾل اﻻﻧﺣدار اﻟﻣﺗﻌدد وھﻲ ‪:‬‬ ‫‪ -١‬رﺳ م اﻟﺑ واﻗﻲ ﻋﻠ ﻰ ورق اﻻﺣﺗﻣ ﺎل اﻟطﺑﯾﻌ ﻲ واﻟ ذي ﯾﻔﯾ د ﻓ ﻲ اﻟﻛﺷ ف ﻋﻣ ﺎ اذا‬ ‫ﻛﺎﻧت ﺣدود اﻟﺧطﺄ ﺗﺗوزع ﺑﺻورة طﺑﯾﻌﯾﺔ وﻓق اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ‪٠‬‬ ‫‪ -٢‬رﺳم اﻟﺑواﻗﻲ ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﻣﻘ درة ﻟﻺﺳ ﺗﺟﺎﺑﺔ ‪ yˆ j‬ﺣﯾ ث ‪ j  1,2, , n‬واﻟ ذي‬ ‫ﯾﻔﯾد ﻓﻲ ﺗﻘﯾﯾم ﺻﻼﺣﯾﺔ داﻟﺔ اﻻﻧﺣدار وﺛﺑﺎت ﺗﺑﺎﯾن ﺣدود اﻟﺧط ﺄ ﺑﺎﻻﺿ ﺎﻓﺔ اﻟ ﻰ‬ ‫ﺗﻘدﯾم ﻣﻌﻠوﻣﺎت ﻋن اﻟﻣﺷﺎھدات اﻟﻘﺎﺻﯾﺔ )اﻟﺧوارج( ‪.‬‬ ‫‪ -٣‬رﺳم اﻟﺑواﻗﻲ ﻓﻲ اﻟﺗﺗﺎﺑﻊ اﻟزﻣﻧﻲ ان وﺟد واﻟذي ﯾﻣﻛن ان ﯾﻘدم ﻣﻌﻠوﻣ ﺎت ﺣ ول‬ ‫ارﺗﺑﺎطﺎت ﻣﻣﻛﻧﺔ ﺑﯾن ﺣدود اﻟﺧطﺄ ‪.‬‬ ‫‪ -٤‬رﺳم اﻟﺑواﻗﻲ ﻣﻘﺎﺑل ﻛل ﻣﺗﻐﯾر ﻣﺳﺗﻘل ‪ x i‬ﺣﯾ ث ‪ j  1,2,  , k‬واﻟ ذي ﯾﻣﻛ ن‬ ‫ان ﯾﻘ دم ﻣﻌﻠوﻣ ﺎت اﺿ ﺎﻓﯾﺔ ﺣ ول ﺻ ﻼﺣﯾﺔ ﻧﻣ وذج اﻻﻧﺣ دار ﺑﺎﻟﻧﺳ ﺑﺔ ﻟ ذﻟك‬ ‫اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ) ﻣ ﺛﻼ ﻗ د ﻧﺣﺗ ﺎج اﻟ ﻰ ﺗﻣﺛﯾ ل ﻣﻧﺣﻧ ﻰ ﻟﺗ ﺄﺛﯾر ذﻟ ك اﻟﻣﺗﻐﯾ ر (‬ ‫وﺣ ول ﺗﻐﯾ رات ﻣﻣﻛﻧ ﺔ ﻓ ﻲ ﻣﻘ دار ﺗﺑ ﺎﯾن اﻟﺧط ﺄ ﻓﯾﻣ ﺎ ﯾﺗﻌﻠ ق ﺑ ذﻟك اﻟﻣﺗﻐﯾ ر‬ ‫اﻟﻣﺳﺗﻘل‪٠‬‬ ‫‪ -٥‬رﺳم اﻟﺑواﻗﻲ ﻣﻘﺎﺑل ﻣﺗﻐﯾرات ﻣﺳﺗﻘﻠﺔ ﻣﮭﻣ ﺔ ﺣ ذﻓت ﻣ ن اﻟﻧﻣ وذج ﻟرؤﯾ ﺔ ﻣ ﺎ اذا‬ ‫ﻛﺎن ﻟﮭذه اﻟﻣﺗﻐﯾرات اﻟﻣﺣذوﻓﺔ ﺗ ﺎﺛﯾرات ﻣﮭﻣ ﺔ ﻋﻠ ﻰ اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ ﻟ م ﻧﺗﻌ رف‬ ‫ﻋﻠﯾﮭﺎ ﺑﻌد ﻣن ﺧ ﻼل ﻧﻣ وذج اﻻﻧﺣ دار‪ ٠‬إن ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﻋﻧ د رﺳ م اﻟﺑ واﻗﻲ‬ ‫ﻣﻘﺎﺑ ل اﻟﻣﺗﻐﯾ ر اﻟﻣﺣ ذوف ﻗ د ﯾﺷ ﯾر إﻟ ﻰ أن ﻧﻣ وذج اﻻﻧﺣ دار اﻟﻣﺗﻌ دد ﻻﺑ د أن‬ ‫ﯾﺣﺗوي ﻋﻠﻰ ھذا اﻟﻣﺗﻐﯾر‪.‬‬ ‫‪ -٦‬رﺳ م اﻟﺑ واﻗﻲ ﻣﻘﺎﺑ ل ﺣ دود اﻟﺗﻔﺎﻋ ل اﻟﺗ ﻲ ﻟ م ﯾﺷ ﻣﻠﮭﺎ اﻟﻧﻣ وذج ﻣﺛ ل ‪ x1x 2‬و‬ ‫‪ x 1x 3‬و ‪ x 2 x 3‬وذﻟك ﻟرؤﯾﺔ ﻣﺎ اذا ﻛﻧﺎ ﻧﺣﺗﺎج ‪ ،‬ﻓﻲ اﻟﻧﻣ وذج ‪ ،‬ﻟ ﺑﻌض ﺣ دود‬ ‫اﻟﺗﻔﺎﻋل ھذه او ﻟﮭﺎ ﺟﻣﯾﻌﺎ ‪٠‬‬ ‫‪ -٧‬رﺳم اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل ‪ x i‬ﻣﻘﺎﺑل اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل ‪ x i‬و) ‪ ( i   i‬ھذا اﻟرﺳ م‬ ‫ﻣﻔﯾ د ﻓ ﻲ دراﺳ ﺔ اﻟﻌﻼﻗ ﺔ ﺑ ﯾن اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ وﺗﺷ ﺗت اﻟﺑﯾﺎﻧ ﺎت‪ ٠‬ﻋﻧ دﻣﺎ‬ ‫ﯾﻛون ھﻧﺎك ارﺗﺑﺎط ﻗوي ﺑﯾن ‪ x i , x i‬ﻋﻠﻰ اﻟرﺳم ﻓﺎن ھذا ﯾﻌﻧﻲ ﻋدم ﺿرورة‬ ‫وﺟود اﻟﻣﺗﻐﯾ رﯾن ‪ x i , x i‬ﻣﻌ ﺎ ﻓ ﻲ اﻟﻧﻣ وذج ‪٠‬ﻋﻧ دﻣﺎ ﯾوﺟ د ﻣﺗﻐﯾ رﯾن ﻣﺳ ﺗﻘﻠﯾن‬ ‫ﺑﯾﻧﮭﻣ ﺎ ﻋﻼﻗ ﺔ ﻗوﯾ ﺔ ﻓﺎﻧﻧ ﺎ ﻧﻘ ول ان ھﻧ ﺎك ﻣﺷ ﻛﻠﺔ ﺗﻌ دد اﻟﻌﻼﻗ ﺎت اﻟﺧطﯾ ﺔ‬ ‫‪ multicollinearity‬ﻓﻲ اﻟﺑﯾﺎﻧﺎت ھذه اﻟﻣﺷﻛﻠﺔ ﺗؤﺛر ﻋﻠﻰ ﺗﻘدﯾرات اﻟﻣرﺑﻌﺎت‬ ‫اﻟﺻ ﻐرى وﺗﺟﻌﻠﮭ ﺎ ﻟﯾﺳ ت ذات ﻓﺎﺋ دة ‪ ٠‬رﺳ م ‪ x i‬ﻣﻘﺎﺑ ل ‪ x i‬ﻣﻔﯾ د اﯾﺿ ﺎ ﻓ ﻲ‬ ‫اﻛﺗﺷﺎف اﻟﻧﻘﺎط اﻟﺑﻌﯾدة ﻋن ﺑﻘﯾﺔ اﻟﻧﻘﺎط واﻟﺗﻲ ﺗؤﺛر ﻋﻠﻰ ﺧواص اﻟﻧﻣوذج ‪٠‬‬ ‫وﺑﺎﻹﺿ ﺎﻓﺔ إﻟ ﻲ اﻟرﺳ وم اﻟﺳ ﺎﺑﻘﮫ ھﻧ ﺎك رﺳ وم أﺧ رى ﻟﻠﺑ واﻗﻰ ﺳ وف ﻧﻧﺎﻗﺷ ﮭﺎ‬ ‫ﺑﺈﺧﺗﺻﺎر‪.‬‬

‫‪٢٣١‬‬


‫ﻣﺛﺎل)‪(٧-٥‬‬

‫ﻓﻲ دراﺳﺔ ﻋن اﻟﻌﻼﻗﺔ ﺑﯾن اﻣﺗﺻﺎص اﻟﻣﺎء ﻓﻲ دﻗﯾق اﻟﻘﻣﺢ و اﻟﺧواص اﻟﻣﺧﺗﻠﻔ ﺔ‬ ‫ﻟﻠدﻗﯾق وﺗﺣت ﻓرض ﻧﻣوذج اﻧﺣدار ﺧطﻲ ﻣﺗﻌ دد ﺗ م اﻟﺣﺻ ول ﻋﻠ ﻰ اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ‬ ‫اﻟﺟدول اﻟﺗﺎﻟﻰ ﺣﯾث )‪ Y (%‬ﺗﻣﺛل ﻛﻣﯾﺔ اﻣﺗﺻﺎص اﻟﻣﺎء و )‪ x1 (%‬ﻛﻣﯾﺔ اﻟﺑروﺗﯾن‬ ‫و )‪ x 2 (%‬ﻛﻣﯾﺔ اﻟﻧﺷﺎ اﻟذي ﯾﺗﻌ رض ﻟﻠﻔﻘ د )اﻟ ﺗﺣطم ﻣﻘ ﺎس ﺑوﺣ دات ‪( Farrand‬‬ ‫واﻟﻣطﻠوب إﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ‪ ،‬ورﺳم ‪:‬‬ ‫)ب( رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪yˆ i‬‬ ‫)أ( رﺳم ‪ x1‬ﻣﻘﺎﺑل ‪x 2‬‬ ‫)ج( رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ x1‬و ‪x 2‬‬

‫‪x2‬‬

‫‪y‬‬

‫‪٢٣٢‬‬

‫‪x1‬‬


8 8 1 1 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

. . 0 0 . 0 1 2 2 0 . 1 1 3 2 2 2 3 1 3

5 9 . . 8 . . . . 2 . .

6 2 8 6 5 4 9 3

. 9 . . . .

9 1 4 2

2 3 3 2 2 2 3 3 3 2 3 2 3 2 2 2 2 2 3 2

3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

0 2 0 1 2 1 8 6 8 0 7 4 5 8 8 2 8 .

0 2 6 1 0 2 6 7 4 7 3 6 6 7 6 5 8 6 7 9

. . . . . . . .

9 7 7 9 9 9 3 2

. . . .

7 9 8 2

. . . . . .

8 9 8 2 8 2

: ‫اﻟﺣــل‬ : ‫ ھﻣﺎ‬y ‫ و‬X ‫اﻟﻣﺻﻔوﻓﺗﺎن‬ 1 1  X     1

8.5 8.9 

2 3 

        13.2 28

30.9 32.7   y        49.2

: ‫ ھﻲ‬X  X ‫اﻟﻣﺻﻔوﻓﺔ‬

٢٣٣


1 8.5 2  1   1  1 8.9 3  1      X X  8.5 8.9   13.2 .         2 3   28     1 13.2 28 218.2 478   20  218.2 2515.88 5271.8 .    478 5271.8 13322 

: ‫ ھو‬X  y ‫واﻟﻣﺗﺟﮫ‬ 30.9 1   1  32.7 1   X  y  8.5 8.9   13.2 .         2 3   28      49.2  879.8   9710.06 .    21894.8

: ‫ ﺗﻌطﻰ ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ‬b ‫ﻗﯾم‬ b  ( X  X) -1 X  y

:‫ﺣﯾث‬ 1

218.2 478   879.8  b 0   20  b   218.2 2515.88 5271.8 9710.06  1      b 2   478 5271.8 13322  21894.8 - 0.0762961 - 0.0103092   1.12878   - 0.0762961 0.00748409 - 0.000224073   - 0.0103092 - 0.000224073 0.000533635 

 879.8  9710.06   21894.8

 26.5433  0.63964 .    0.438 

: ‫إذن ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ‬ ٢٣٤


‫‪yˆ  26.5433  0.63964x1  0.438x 2‬‬ ‫اﻟﺑ واﻗﻲ ‪ e j‬ﻣﻌط ﺎة ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﺣﯾ ث ‪ e j‬ﺗﺣﺳ ب ﻣ ن اﻟﻌﻼﻗ ﺔ اﻟﺗﺎﻟﯾ ﺔ ‪:‬‬ ‫‪. e j  y j  yˆ j‬‬

‫‪yˆ j‬‬

‫‪ej‬‬ ‫‪- 1.95628‬‬ ‫‪- 0.850131‬‬

‫‪yj‬‬

‫‪32.8563‬‬ ‫‪33.5501‬‬ ‫‪34.6375‬‬ ‫‪41.8277‬‬ ‫‪42.4478‬‬ ‫‪42.2114‬‬ ‫‪47.5411‬‬ ‫‪48.235‬‬ ‫‪48.1168‬‬ ‫‪45.4596‬‬ ‫‪43.0789‬‬ ‫‪46.419‬‬ ‫‪46.9113‬‬ ‫‪46.6846‬‬ ‫‪45.3067‬‬ ‫‪45.169‬‬ ‫‪47.0587‬‬ ‫‪47.1866‬‬ ‫‪47.8512‬‬ ‫‪47.2506‬‬

‫‪2.06248‬‬ ‫‪0.0723431‬‬ ‫‪- 1.5478‬‬ ‫‪0.688559‬‬ ‫‪- 1.24115‬‬ ‫‪- 1.035‬‬ ‫‪- 4.11683‬‬ ‫‪2.24042‬‬ ‫‪0.821113‬‬ ‫‪0.380958‬‬ ‫‪- 0.711257‬‬ ‫‪0.315353‬‬ ‫‪1.49332‬‬ ‫‪0.730992‬‬ ‫‪1.74132‬‬ ‫‪- 0.986611‬‬ ‫‪- 0.0512205‬‬ ‫‪1.94943‬‬

‫‪30.9‬‬ ‫‪32.7‬‬ ‫‪36.7‬‬ ‫‪41.9‬‬ ‫‪40.9‬‬ ‫‪42.9‬‬ ‫‪46.3‬‬ ‫‪47.2‬‬ ‫‪44‬‬ ‫‪47.7‬‬ ‫‪43.9‬‬ ‫‪46.8‬‬ ‫‪46.2‬‬ ‫‪47‬‬ ‫‪46.8‬‬ ‫‪45.9‬‬ ‫‪48.8‬‬ ‫‪46.2‬‬ ‫‪47.8‬‬ ‫‪49.2‬‬

‫)أ( رﺳم ‪ x 2‬ﻣﻘﺎﺑل ‪ x1‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪: (٤-٥‬‬ ‫‪x2‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬

‫‪x1‬‬

‫‪20‬‬

‫‪17.5‬‬

‫‪15‬‬

‫‪12.5‬‬

‫‪10‬‬

‫‪7.5‬‬

‫‪٢٣٥‬‬

‫‪5‬‬

‫‪2.5‬‬


‫ﺷﻛل )‪(٤-٥‬‬ ‫ﯾﺗﺿﺢ ﻣن ﺷﻛل )‪ (٤-٥‬وﺟود ﺑﻌض اﻟﻣﺷﺎھدات اﻟﻘﺎﺻﯾﺔ‪.‬‬ ‫)ب( رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ yˆ i‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪: (٥-٥‬‬ ‫‪ei‬‬ ‫‪e‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪y‬‬ ‫‪50‬‬

‫‪40‬‬

‫‪30‬‬

‫‪10‬‬

‫‪20‬‬

‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل )‪(٥-٥‬‬

‫)ج( رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ x1‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪: (٦-٥‬‬

‫‪e‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬

‫‪x1‬‬

‫‪20‬‬

‫‪17.5‬‬

‫‪15‬‬

‫‪12.5‬‬

‫‪10‬‬

‫‪7.5‬‬

‫‪5‬‬

‫‪2.5‬‬ ‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل )‪(٦-٥‬‬ ‫‪٢٣٦‬‬


‫رﺳم اﻟﺑواﻗﻲ ‪ ei‬ﻣﻘﺎﺑل ‪ x 2‬ﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪: (٧-٥‬‬

‫‪e‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪x2‬‬ ‫‪40‬‬

‫‪35‬‬

‫‪30‬‬

‫‪20‬‬

‫‪25‬‬

‫‪15‬‬

‫‪5‬‬

‫‪10‬‬

‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫ﺷﻛل )‪(٧-٥‬‬

‫)‪ (٢-٤-٥‬اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻰ ﺳﺗﯾودﻧت‬ ‫ﻓﻲ اﻟﻔﺻل اﻟﺳﺎﺑق ﺗﻧﺎوﻟﻧﺎ ﻧوﻋﯾن ﻣن اﻟﺑواﻗﻲ ھﻣ ﺎ اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ وﺑ واﻗﻲ‬ ‫ﺳﺗﯾودﻧت وذﻟك ﻟﻠﻛﺷف ﻋن ﻣﺷ ﺎھدات ﻗﺎﺻ ﯾﺔ ﻓ ﻲ ‪ ٠ Y‬ﺗﻌ رف اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ‬ ‫ﻛﺎﻟﺗﺎﻟﻲ‪.‬‬ ‫‪, j  1,2,, n‬‬

‫‪ej‬‬ ‫‪MSE‬‬

‫‪dj ‬‬

‫ﻟﻠﻣﺛﺎل )‪ (٧-٥‬ﻓﺎن رﺳم اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ ‪ d j‬ﻣﻘﺎﺑ ل ˆ‪ y‬ﻣﻌط ﺎة ﻓ ﻲ ﺷ ﻛل )‪( ٨-٥‬‬ ‫وذﻟك ﻣن اﻟﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ‪٠‬‬ ‫‪yˆ j‬‬

‫‪dj‬‬

‫‪٢٣٧‬‬


‫‪- 1.12646‬‬ ‫‪- 0.489522‬‬

‫‪32.8563‬‬ ‫‪33.5501‬‬ ‫‪34.6375‬‬ ‫‪41.8277‬‬ ‫‪42.4478‬‬ ‫‪42.2114‬‬ ‫‪47.5411‬‬ ‫‪48.235‬‬ ‫‪48.1168‬‬ ‫‪45.4596‬‬ ‫‪43.0789‬‬ ‫‪46.419‬‬ ‫‪46.9113‬‬ ‫‪46.6846‬‬ ‫‪45.3067‬‬ ‫‪45.169‬‬ ‫‪47.0587‬‬ ‫‪47.1866‬‬ ‫‪47.8512‬‬ ‫‪47.2506‬‬

‫‪1.18762‬‬ ‫‪0.0416566‬‬ ‫‪- 0.891254‬‬ ‫‪0.396486‬‬ ‫‪- 0.714678‬‬ ‫‪- 0.595976‬‬ ‫‪- 2.37055‬‬ ‫‪1.29008‬‬ ‫‪0.472813‬‬ ‫‪0.219363‬‬ ‫‪- 0.409556‬‬ ‫‪0.181586‬‬ ‫‪0.859881‬‬ ‫‪0.42092‬‬ ‫‪1.00268‬‬ ‫‪- 0.56811‬‬ ‫‪- 0.0294938‬‬ ‫‪1.12252‬‬

‫‪d‬‬ ‫‪2‬‬ ‫‪1.5‬‬ ‫‪1‬‬ ‫‪0.5‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪50‬‬

‫‪47.5‬‬

‫‪45‬‬

‫‪42.5‬‬

‫‪37.5‬‬

‫‪40‬‬

‫‪35‬‬

‫‪32.5‬‬ ‫‪-0.5‬‬ ‫‪-1‬‬ ‫‪-1.5‬‬ ‫‪-2‬‬

‫ﺷﻛل )‪(٨-٥‬‬

‫ﯾﻣﻛن ﺗﻌرﯾف ﺑواﻗﻲ ﺳﺗﯾودﻧت ﻛﺎﻟﺗﺎﻟﻲ ‪:‬‬ ‫‪j  1,2,, n‬‬

‫‪,‬‬

‫‪ej‬‬ ‫) ‪MSE(1  h jj‬‬

‫‪٢٣٨‬‬

‫‪rj ‬‬


‫ﺣﯾ ث ‪ h jj‬ھ و اﻟﻌﻧﺻ ر ﻋﻠ ﻰ اﻟﻘط ر اﻟرﺋﯾﺳ ﻲ ﻟﻠﻣﺻ ﻔوﻓﺔ ‪H  X ( X X ) 1 X‬‬ ‫واﻟﻣﺳﻣﺎه ﺑﻣﺻﻔوﻓﺔ اﻟﻘﺑﻌﺔ و ‪. 0  h jj  1‬‬

‫ﻟﻠﻣﺛﺎل )‪ (٧-٥‬ﻗﯾم ﻛل ﻣن ‪ h jj‬واﻟﺑواﻗﻲ ‪ r j‬ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪٠‬‬

‫‪rj‬‬ ‫‪- 1.37185‬‬ ‫‪- 0.582809‬‬

‫‪1.40051‬‬ ‫‪0.0429803‬‬ ‫‪- 0.919357‬‬ ‫‪0.408513‬‬ ‫‪- 0.744403‬‬ ‫‪- 0.624735‬‬ ‫‪- 2.48605‬‬ ‫‪1.33193‬‬ ‫‪1.4029‬‬ ‫‪0.226797‬‬ ‫‪- 0.424674‬‬ ‫‪0.189825‬‬ ‫‪0.89627‬‬ ‫‪0.433915‬‬ ‫‪1.0482‬‬ ‫‪- 0.595816‬‬ ‫‪- 0.0308338‬‬ ‫‪1.17932‬‬

‫‪h jj‬‬ ‫‪0.325752‬‬ ‫‪0.294507‬‬ ‫‪0.280913‬‬ ‫‪0.0606484‬‬ ‫‪0.0602024‬‬ ‫‪0.0580149‬‬ ‫‪0.0782682‬‬ ‫‪0.0899469‬‬ ‫‪0.0907619‬‬ ‫‪0.0618541‬‬ ‫‪0.886413‬‬ ‫‪0.0644865‬‬ ‫‪0.0699287‬‬ ‫‪0.0849159‬‬ ‫‪0.0795539‬‬ ‫‪0.0590002‬‬ ‫‪0.0849517‬‬ ‫‪0.0908409‬‬ ‫‪0.08503‬‬ ‫‪0.0940101‬‬

‫رﺳم اﻟﺑواﻗﻲ ‪ r j‬ﻣﻘﺎﺑل ‪ yˆ j‬ﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪.(٩-٥‬‬ ‫ﺷﻛل )‪(٩-٥‬‬

‫‪٢٣٩‬‬

‫‪e‬‬ ‫‪- 1.95628‬‬ ‫‪- 0.850131‬‬

‫‪2.06248‬‬ ‫‪0.0723431‬‬ ‫‪- 1.5478‬‬ ‫‪0.688559‬‬ ‫‪- 1.24115‬‬ ‫‪- 1.035‬‬ ‫‪- 4.11683‬‬ ‫‪2.24042‬‬ ‫‪0.821113‬‬ ‫‪0.380958‬‬ ‫‪- 0.711257‬‬ ‫‪0.315353‬‬ ‫‪1.49332‬‬ ‫‪0.730992‬‬ ‫‪1.74132‬‬ ‫‪- 0.986611‬‬ ‫‪- 0.0512205‬‬ ‫‪1.94943‬‬


‫‪r‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪‬‬ ‫‪y‬‬

‫‪50‬‬

‫‪47.5‬‬

‫‪45‬‬

‫‪42.5‬‬

‫‪37.5‬‬

‫‪40‬‬

‫‪32.5‬‬

‫‪35‬‬

‫‪-1‬‬ ‫‪-2‬‬ ‫‪-3‬‬

‫)‪ (٣-٤-٥‬اﺳﺗﺧدم ﻣﺻﻔوﻓﺔ اﻟﻘﺑﻌﺔ ﻟﻠﺗﻌرف ﻋﻠﻰ ﻣﺷﺎھدات ﻗﺎﺻﯾﺔ ﻓﻰ ﻗﯾم‪x‬‬ ‫اﻟﻌﻧﺻ ر اﻟﻘط ري ‪ h jj‬ﻓ ﻲ ﻣﺻ ﻔوﻓﺔ اﻟﻘﺑﻌ ﺔ ‪ H‬ﯾﻌﺗﺑ ر ﻣؤﺷ ر ﻣﻔﯾ د ﻟﻣ ﺎ إذا ﻛﺎﻧ ت‬ ‫اﻟﻣﺷﺎھدة ﻗﺎﺻﯾﺔ أم ﻻ ﺑﺎﻟﻧﺳﺑﺔ ﻟﻘﯾم ‪ x‬وذﻟك ﻓﻲ دراﺳﺔ ﻣﺗﻌددة اﻟﻣﺗﻐﯾرات‪ .‬وھ و ﯾﺷ ﯾر‬ ‫إﻟﻰ ﻣﺎ إذا ﻛﺎﻧت اﻟﻘﯾم ‪ x‬ﻟﻠﻣﺷ ﺎھدة ‪ j‬ﻗﺎﺻ ﯾﺔ أم ﻻ وذﻟ ك ﻷن ‪ h jj‬ﯾﺷ ﯾر إﻟ ﻰ اﻟﻣﺳ ﺎﻓﺔ‬ ‫ﺑﯾن ﻗﯾم ‪ x‬ﻟﻠﻣﺷﺎھدة ‪ j‬وﻣﺗوﺳط اﻟﻘﯾم ‪ x‬ﻟﻠﻣﺷﺎھدات ‪ n‬ﺟﻣﯾﻌﺎ‪ .‬وھﻛذا ﯾﺷﯾر ﻛﺑر ﻗﯾﻣﺔ‬ ‫اﻟﻌزم ‪ h jj‬إﻟﻰ أن اﻟﻣﺷﺎھدة ‪ j‬ﺑﻌﯾدة ﻋن ﻣرﻛز اﻟﻣﺷﺎھدات ﺟﻣﯾﻌ ﺎ‪.‬وﻋ ﺎدة ﺗﻌﺗﺑ ر ﻗﯾﻣ ﺔ‬ ‫‪ h jj‬ﻛﺑﯾرة إذا ﺗﺟﺎوزت ﺿﻌف ﻣﺗوﺳط ﻗﯾم ‪] h jj‬وﻧرﻣز ﻟﮫ ﺑﺎﻟرﻣز ‪ h‬ﺣﯾث‪:‬‬ ‫‪p 1‬‬ ‫‪n‬‬

‫‪‬‬

‫‪ h jj‬‬ ‫‪n‬‬

‫‪h‬‬

‫وذﻟك ﻷن ﻣﺟﻣوع ﻗﯾم اﻟﻌﻧﺎﺻر اﻟﻘطرﯾﺔ ﯾﺳﺎوى ﻋدد ﻣﻌﺎﻟم ﻧﻣوذج اﻻﻧﺣدر اﻟﺧطﻲ ‪.‬‬ ‫وﺑﺎﻟﺗﺎﻟﻲ ﻓﺈن ﻗﯾم ‪ h jj‬اﻟﺗﻲ ﺗزﯾد ﻋن )‪ 2(p  1‬ﺗﻌﺗﺑر وﻓﻘﺎ ﻟﮭذه اﻟﻘﺎﻋدة ﻣؤﺷرا ﻟوﺟ ود‬ ‫‪2‬‬

‫ﻣؤﺷ رات ﻗﺎﺻ ﯾﺔ ﻣ ن ﺣﯾ ث ﻗ ﯾم ‪ x‬ﻟﮭ ذه اﻟﻣﺷ ﺎھدات‪ .‬اﯾﺿ ﺎ ھﻧ ﺎك اﻗﺗ راح ﺛ ﺎﻧﻰ أن‬ ‫اﻟراﻓﻌ ﮫ اﻟﺗ ﻰ ﺗزﯾ د ﻗﯾﻣﺗ ﮫ ﻋ ن ‪ 0.5‬ﻛﺑﯾ ره وﺗﺷ ﯾر إﻟ ﻰ أن اﻟﺣﺎﻟ ﺔ ﺷ ﺎذه وﺗﺳ ﺗدﻋﻲ‬ ‫دراﺳﺗﮭﺎ‪ .‬وﻷﻧﮫ ﻓﻲ اﻟﻌﯾﻧﺎت اﻟﺻ ﻐﯾرة ﯾﺗوﻗ ﻊ ﺗرﺷ ﯾﺢ ﻋ دد ﻛﺑﯾ ر ﻣ ن اﻟﺣ ﺎﻻت اﻟﺷ ﺎذة‬ ‫ﻟﻔﺣﺻﮭﺎ ﻓﮭﻧﺎك اﻗﺗراح ﺛﺎﻟث ﺑدراﺳﺔ ﻛل اﻟﺣ ﺎﻻت اﻟﺗ ﻰ ﺗزﯾ د ﻗ ﯾم راﻓﻌﺗﮭ ﺎ ) ‪ ( h jj‬ﻋ ن‬ ‫ﺛﻼﺛﮫ أﺿﻌﺎف ﻣﺗوﺳط ﻗﯾﻣﺔ اﻟراﻓﻌﺎت‬

‫‪3(p  1) ‬‬ ‫‪‬‬ ‫‪ h jj ‬‬ ‫‪‬‬ ‫‪n ‬‬ ‫‪‬‬

‫ﺑدﻻ ﻣ ن دراﺳ ﺔ اﻟﺣ ﺎﻻت اﻟﺗ ﻰ‬

‫ﺗزﯾد ﻗﯾم راﻓﻌﺗﮭﺎ ‪ h jj‬ﻋن ﺿﻌف ﻣﺗوﺳط ﻗﯾم اﻟراﻓﻌﺎت ‪.  h jj  2(p  1) ‬‬ ‫‪n‬‬

‫‪‬‬

‫‪‬‬

‫ﻟﻠﻣﺛﺎل )‪ (٧-٥‬ﯾﺗﺿﺢ ﻣن ﺟ دول ﻗ ﯾم اﻟراﻓﻌ ﺔ ان ھﻧ ﺎك ﺣ ﺎﻟﺗﯾن ﺗزﯾ د ﻗ ﯾم راﻓﻌﺗﮭ ﺎ‬ ‫ﻋ ن ﺿ ﻌف ﻣﺗوﺳ ط ﻗ ﯾم اﻟراﻓﻌ ﺎت ‪  2(p  1)  2(3)  0.3 ‬وھ ﻲ )‪ (1‬و )‪ .(11‬ھ ذا‬ ‫‪‬‬

‫‪20‬‬

‫‪2‬‬

‫‪‬‬

‫وﻗ د ﺑﻠﻐ ت ﻗ ﯾم اﻟراﻓﻌ ﺎت اﻟﻣﻧ ﺎظرة ﻟﮭ ذه اﻟﺣ ﺎﻻت ﻋﻠ ﻲ اﻟﺗ واﻟﻲ‬ ‫‪٢٤٠‬‬

‫‪,‬‬

‫‪0.886413‬‬


‫‪ .0.325752‬وإذا اﺧ ذﻧﺎ ﺑ ﺎﻻﻗﺗراح اﻟﺛ ﺎﻧﻰ ﻓﻧﺟ د أن اﻟﺣﺎﻟ ﺔ رﻗ م )‪ (11‬ھ ﻰ اﻟﺣﺎﻟ ﺔ‬ ‫اﻟوﺣﯾدة اﻟﺗﻰ ﺗزﯾد ﻗﯾﻣ ﺔ راﻓﻌﺗﮭ ﺎ ﻋ ن ﺛﻼﺛ ﺔ اﺿ ﻌﺎف ﻣﺗوﺳ ط ﻗ ﯾم اﻟراﻓﻌ ﺎت )‪.(0.45‬‬ ‫واذا اﺧذﻧﺎ ﺑﺎﻻﻗﺗراح اﻟﺛﺎﻟث ﻧﻼﺣظ وﺟود ﺣﺎﻟﺔ ﻗﺎﺻﯾﮫ واﺣدة وھﻲ اﻟﺣﺎﻟ ﺔ رﻗ م )‪(11‬‬ ‫واﻟﺗﻰ ﺗزﯾد ﻋن ‪.0.5‬‬

‫)‪ (٤-٤-٥‬اﺳ ﺗﺧدم ﺑ واﻗﻰ ﺳ ﺗﯾودﻧت اﻟﻣﺣذوﻓ ﺔ ﻟﻠﺗﻌ رف ﻋﻠ ﻰ ﻗ ﯾم ﻗﺎﺻ ﯾﺔ ﻟﻠﻣﺗﻐﯾ ر‬ ‫اﻟﺗﺎﺑﻊ‬

‫ﺑﺎﻗﻲ ﯾﺳﻣﻰ ﺑﺎﻗﻲ ﺳﺗﯾودﻧت اﻟﻣﺣذوف ﯾﻌرف ﻛﺎﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪,j  1,2,  ,n .‬‬

‫‪ej‬‬ ‫) ‪s 2(j) (1  h jj‬‬

‫‪tj ‬‬

‫ﺣﯾث ‪:‬‬ ‫]) ‪(n  p  1)MSE  [e j2 (1  h jj‬‬ ‫‪n p2‬‬

‫‪s 2(j) ‬‬

‫ﻓﺈﻧﮫ ﺗﺣت اﻟﻔروض اﻟﻘﯾﺎﺳﯾﮫ ﻓﺎن ‪ t j‬ﯾﺗﺑﻊ ﺗوزﯾﻊ ‪ t‬ﺑدرﺟﺎت ﺣرﯾﮫ ‪ ٠ n  p  2‬ﺗﻌﺗﺑر‬ ‫ﺑواﻗﻲ ﺳﺗﯾودﻧت اﻟﻣﺣذوﻓﺔ طرﯾﻘﺔ ﻣﻧﺎﺳﺑﺔ ﻷﻛﺗﺷﺎف اﻟﻘﯾم اﻟﻘﺎﺻ ﯾﮫ‪ ٠‬ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت‬ ‫اﻟﻣﺣذوﻓﮫ ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪٠‬‬

‫وﯾﺗم ﻣﻘﺎرﻧﺔ ﻗ ﯾم ‪ t j‬ﺑﺎﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ‬

‫)‪(n  p  2‬‬

‫‪‬‬ ‫‪2‬‬

‫‪t‬‬ ‫‪1‬‬

‫ﻋﻧ د درﺟ ﺎت‬

‫ﺣرﯾ ﺔ ‪n  p  2‬‬

‫و ذﻟ ك ﻟﺗﺣدﯾ د ﻣﺷ ﺎھدات اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ اﻟﻘﺎﺻ ﯾﮫ ﻟﻠﻣﺛ ﺎل )‪ .(٧-٥‬وﺑﻣ ﺎ ان‬ ‫‪٢٤١‬‬


‫‪t 0.05 (16)  1.746‬‬

‫ﺣﯾ ث‬

‫‪Mathematica‬‬ ‫وﺑﻣ ﺎ أن اﻟﻣﺷ ﺎھدة‬ ‫‪ 2.56256  1.746‬‬

‫‪  .1‬‬

‫وﯾﻣﻛ ن اﻟﺣﺻ ول ﻋﻠ ﻰ ھ ذه اﻟﻘﯾﻣ ﺔ ﻣ ن ﺑرﻧ ﺎﻣﺞ‬

‫‪ y9  44‬ﻟﮭ ﺎ ﺑ ﺎﻗﻲ ﺳ ﺗودﻧت اﻟﻣﺣ ذوف‬ ‫‪ t 9‬ﻓﺈﻧﻧﺎ ﻧﻌﺗﺑر أن اﻟﻣﺷﺎھدة ‪ y9‬ﻣﺷﺎھدة ﻗﺎﺻﯾﮫ‪.‬‬

‫‪t 9  2.56256‬‬

‫‪tj‬‬ ‫‪1.41407‬‬ ‫‪0.600746‬‬

‫‪1.44361‬‬ ‫‪0.0443031‬‬ ‫‪0.947652‬‬ ‫‪0.421085‬‬ ‫‪0.767313‬‬ ‫‪0.643962‬‬ ‫‪2.56256‬‬ ‫‪1.37292‬‬ ‫‪1.44607‬‬ ‫‪0.233777‬‬ ‫‪0.437743‬‬ ‫‪0.195667‬‬ ‫‪0.923854‬‬ ‫‪0.447269‬‬ ‫‪1.08046‬‬ ‫‪0.614154‬‬ ‫‪0.0317828‬‬ ‫‪1.21561‬‬

‫‪h jj‬‬ ‫‪0.325752‬‬ ‫‪0.294507‬‬ ‫‪0.280913‬‬ ‫‪0.0606484‬‬ ‫‪0.0602024‬‬ ‫‪0.0580149‬‬ ‫‪0.0782682‬‬ ‫‪0.0899469‬‬ ‫‪0.0907619‬‬ ‫‪0.0618541‬‬ ‫‪0.886413‬‬ ‫‪0.0644865‬‬ ‫‪0.0699287‬‬ ‫‪0.0849159‬‬ ‫‪0.0795539‬‬ ‫‪0.0590002‬‬ ‫‪0.0849517‬‬ ‫‪0.0908409‬‬ ‫‪0.08503‬‬ ‫‪0.0940101‬‬

‫‪1.95628‬‬ ‫‪0.850131‬‬

‫‪2.06248‬‬ ‫‪0.0723431‬‬ ‫‪1.5478‬‬ ‫‪0.688559‬‬ ‫‪1.24115‬‬ ‫‪1.035‬‬ ‫‪4.11683‬‬ ‫‪2.24042‬‬ ‫‪0.821113‬‬ ‫‪0.380958‬‬ ‫‪0.711257‬‬ ‫‪0.315353‬‬ ‫‪1.49332‬‬ ‫‪0.730992‬‬ ‫‪1.74132‬‬ ‫‪0.986611‬‬ ‫‪0.0512205‬‬ ‫‪1.94943‬‬

‫رﺳم ﺑواﻗﻲ ﺳﺗﯾودﻧت اﻟﻣﺣذوﻓﺔ ﻣﻘﺎﺑل ‪ yˆ j‬ﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪٠ (١٠-٥‬‬

‫‪٢٤٢‬‬

‫وﺑﻣ ﺎ أن‬


t 3 2 1  y

32.5

35

37.5

40

42.5

45

47.5

50

-1 -2 -3

(١٠-٥) ‫ﺷﻛل‬

(٨-٥)‫ﻣﺛﺎل‬ ‫ وﻓﯾﻣﺎ‬Mathematica ‫( ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬٧-٥) ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل‬ . ‫ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ p=2 2 y={30.9,32.7,36.7,41.9,40.9,42.9,46.3,47.2,44,47.7,43.9, 46.8,46.2,47,46.8,45.9,48.8,46.2,47.8,49.2}; x1={8.5,8.9,10.6,10.2,9.8,10.8,11.6,12,12.5,10.4,1.2,11.9 ,11.3,13,12.9,12,12.9,13.1,11.4,13.2};

x2={2,3,3,20,22,20,31,32,31,28,36,28,30,27,24,25,28,28,32 ,28} {2,3,3,20,22,20,31,32,31,28,36,28,30,27,24,25,28,28,32,28 } ss=Transpose[{x1,x2,y}]; TableForm[ss]; l[x_]:=Length[x] xx=Table[{1,x1[[i]],x2[[i]]},{i,1,l[x1]}]; xpr=Transpose[xx]; w=xpr.xx; v=Inverse[w]; xpy=xpr.y {879.8,9710.06,21894.8} {879.8`,9710.06`,21894.8`}; ٢٤٣


bb=v.xpy {26.5433,0.63964,0.438} yy =bb[[1]]+bb[[2]]*x1+bb[[3]]*x2 ; e=y-yy; ss22=Transpose[{y,yy,e}]; TableForm[ss22]; t=Transpose[{x1,x2}]; c=PlotRange{{0,20},{0,50}} PlotRange{{0,20},{0,50}} c2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} g= ListPlot[t,c,c2,AxesLabel{"x1","x2"}] x2 50 40 30 20 10 x1 2.5

5

7.5

10

12.5

15

17.5

20

Graphics t=Transpose[{y,e}]; c=PlotRange{{0,50},{-3,3}} PlotRange{{0,50},{-3,3}} c2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} g1= ListPlot[t,c,c2,AxesLabel{"y","e"}] e 3 2 1 y 10

20

30

40

-1 -2 -3

Graphics t=Transpose[{x1,e}]; c=PlotRange{{0,20},{-3,3}} PlotRange{{0,20},{-3,3}} c2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} ٢٤٤

50


g2= ListPlot[t,c,c2,AxesLabel{"x1","e"}] e 3 2 1 x1 2.5

5

7.5

10

12.5

15

17.5

20

-1 -2 -3

Graphics t=Transpose[{x2,e}]; c=PlotRange{{0,40},{-3,3}} PlotRange{{0,40},{-3,3}} c2=Prolog{PointSize[0.03]} Prolog{PointSize[0.03]} g2= ListPlot[t,c,c2,AxesLabel{"x2","e"}] e 3 2 1 x2 5

10

15

20

25

30

-1 -2 -3

Graphics

n=l[x1] 20 k[x_]:=Apply[Plus,x] ٢٤٥

35

40


mse=k[e^2]/(n-p-1) 2.83856

di  e 



mse

{-1.16113,-0.504588,1.22417,0.0429386,0.918683,0.408688,-0.736673,-0.614318,2.44351,1.32978,0.487365,0.226114,0.422161,0.187175,0.886345,0.433874,1.03354,-0.585594,0.0304015,1.15706} pp3=Transpose[{yy,di}]; TableForm[pp3]; aa=PlotRange{{30,50},{-2,2}} PlotRange{{30,50},{-2,2}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g  ListPlotpp3, aa, a2, AxesLabel  "y ", "d" d 2

1.5 1 0.5  y

32.5

35

37.5

40

42.5

45

47.5

50

-0.5 -1 -1.5 -2

Graphics

hjj=xx.v.xpr;

hii={hjj[[1,1]],hjj[[2,2]],hjj[[3,3]],hjj[[4,4]],hjj[[5,5 ]],hjj[[6,6]],hjj[[7,7]],hjj[[8,8]],hjj[[9,9]],hjj[[10,10 ]],hjj[[11,11]],hjj[[12,12]],hjj[[13,13]],hjj[[14,14]],hj j[[15,15]],hjj[[16,16]],hjj[[17,17]],hjj[[18,18]],hjj[[19 ,19]],hjj[[20,20]]} ٢٤٦


{0.325752,0.294507,0.280913,0.0606484,0.0602024,0.0580149 ,0.0782682,0.0899469,0.0907619,0.0618541,0.886413,0.06448 65,0.0699287,0.0849159,0.0795539,0.0590002,0.0849517,0.09 08409,0.08503,0.0940101}

e ri    N mse1  hii

{-1.41407,-0.600746,1.44361,0.0443031,0.947652,0.421085,-0.767313,-0.643962,2.56256,1.37292,1.44607,0.233777,0.437743,0.195667,0.923854,0.447269,1.08046,-0.614154,0.0317828,1.21561} pp4=Transpose[{e,hii,ri}]; TableForm[pp4]; pp5=Transpose[{yy,ri}]; aa=PlotRange{{30,50},{-3,3}} PlotRange{{30,50},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

g  ListPlotpp5, aa, a2, AxesLabel  "y", "r" r 3 2 1  y

32.5

35

37.5

40

42.5

45

47.5

50

-1 -2 -3

Graphics kk=3 3

s2j 

n  kk mse  e2 1  hii

n  kk  1

{2.66122,2.95194,2.64624,3.01562,2.85665,2.98451,2.91152, 2. 9424,1.85097,2.68157,2.64498,3.00627,2.98197,3.00918,2.86 455,2.98048,2.80886,2.94905,3.01579,2.75381}

e tj    N s2j1  hii

{-1.46043,-0.589096,1.49515,0.0429828,0.944647,0.41066,-0.757639,-0.632497,3.1734,1.41254,1.49805,0.227163,٢٤٧


0.427087,0.190039,0.919654,0.436491,1.08615,-0.602538,0.0308347,1.23418} pp7=Transpose[{e,hii,tj}]; TableForm[pp7]; pp9=Transpose[{yy,tj}]; aa=PlotRange{{30,50},{-3,3}} PlotRange{{30,50},{-3,3}} a2=Prolog{PointSize[.02]} Prolog{PointSize[0.02]}

 g33  ListPlotpp9, aa, a2, AxesLabel  "y ", "t" t 3 2 1  y

32.5

35

37.5

40

42.5

45

47.5

50

-1 -2 -3

Graphics <<Statistics`ContinuousDistributions` =.1 0.1 TT=Quantile[StudentTDistribution[n-kk-1],1-(/2)] 1.74588

‫ اﻟﻣدﺧﻼت‬:‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬x1 ‫ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬x2‫اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻧﻰ واﻟﻘﺎﺋﻤﺔ‬ y . ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬

: ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ‬ yˆ  26.5433  0.63964x1  0.438x 2 ‫وﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ bb=v.xpy

‫واﻟﻣﺧرج ھو‬ {26.5433,0.63964,0.438}

‫ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬e j ‫اﻟﺑواﻗﻲ‬ e=y-yy

٢٤٨


‫ﺟدول ‪ y j , yˆ j ,e j‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪TableForm[ss22‬‬

‫رﺳم ‪ x 2‬ﻣﻘﺎﺑل ‪ x1‬اﻟﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ (٤-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]}"‪g= ListPlot[t,c,c2,AxesLabel{"x1","x2‬‬

‫رﺳم اﻟﺑواﻗﻲ‬

‫‪e‬‬

‫ﻣﻘﺎﺑل‬

‫ˆ‪y‬‬

‫اﻟﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ (٥-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]}"‪g1= ListPlot[t,c,c2,AxesLabel{"y","e‬‬

‫رﺳم اﻟﺑواﻗﻲ ‪ e‬ﻣﻘﺎﺑل ‪ x1‬اﻟﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ (٦-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]}"‪g2= ListPlot[t,c,c2,AxesLabel{"x1","e‬‬

‫رﺳم اﻟﺑواﻗﻲ ‪ e‬ﻣﻘﺎﺑل ‪ x 2‬اﻟﻣوﺿﺢ ﻓﻲ ﺷﻛل )‪ (٧-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]}"‪g2= ListPlot[t,c,c2,AxesLabel{"x2","e‬‬

‫ﺟدول اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ‬

‫‪yˆ j , d j‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪TableForm[pp3‬‬

‫رﺳم اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ‬ ‫اﻻﻣر‬

‫ﻣﻘﺎﺑل ˆ‪ y‬اﻟﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪ ( ٨-٥‬ﻧﺣﺻ ل ﻋﻠﯾﮭ ﺎ ﻣ ن‬

‫‪d‬‬

‫‪‬‬

‫‪g  ListPlot pp3, aa, a2, AxesLabel  "y", "d"‬‬

‫ﺟدول‬

‫‪h j , e j , rj‬‬

‫واﻟﺑواﻗﻲ‬

‫‪r‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫]‪TableForm[pp4‬‬

‫رﺳم اﻟﺑواﻗﻲ‬

‫‪ri‬‬

‫ﻣﻘﺎﺑل ˆ‪ y‬اﻟﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪ ( ٩-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫‪‬‬ ‫‪g  ListPlotpp5, aa, a2, AxesLabel  "y‬‬ ‫‪", "r"‬‬

‫ﺟدول ﻗﯾم ﻛل ﻣن‬

‫‪h, e‬‬

‫واﻟﺑواﻗﻲ‬

‫‪tj‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]‪TableForm[pp7‬‬

‫رﺳم اﻟﺑواﻗﻲ‬

‫‪tj‬‬

‫ﻣﻘﺎﺑل ˆ‪ y‬اﻟﻣﻌطﺎة ﻓﻲ ﺷﻛل )‪ ( ١٠-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫‪٢٤٩‬‬


 g33  ListPlotpp9, aa, a2, AxesLabel  "y ", "t"

(٩-٥)‫ﻣﺛﺎل‬ : ‫إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ﻟﻠﺘﻌﺮف ﻋﻠﻰ ﻣﺸﺎھﺪات ﻗﺎﺻﯿﺔ ﻟﻠﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬ X1={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.48,4.53,4.5 5,4.62,5.86}; X2={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264,0.270,0.24 0,0.259,0.252,0.258,0.293}; X3={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.26 4,0.280,0.266,0.268,0.286}; y={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405 ,0.450,0.480,0.456,0.506};

: ‫اﻟﺣل‬

‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`LinearRegression`

. ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}]; Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>StudentizedResiduals] {StudentizedResiduals{0.639771,0.789271,-0.862064,1.06129,1.20324,1.24538,-1.35245,-1.49127,0.620229,0.813636,0.131561,1.51698,-0.412657,0.25586}} <<Statistics`NormalDistribution` ٢٥٠


‫;‪n=14‬‬ ‫;‪kk=4‬‬ ‫;‪=0.05‬‬ ‫])‪Quantile[StudentTDistribution[n-kk-1],1-(/2‬‬ ‫‪2.26216‬‬

‫اوﻻ ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ ‪ ownbavg‬ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه ‪teamera‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ ‪ winpct‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻟﺚ واﻟﻘﺎﺋﻤﺔ‪oppbavg‬اﻟﺜﺎﻧﻰ و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ ‫اﻟﺘﺎﺑﻊ ‪.‬اﯾﻀﺎ ﺣﺠﻢ اﻟﻌﯿﻨﺔ ﻣﻦ اﻻﻣﺮ‬ ‫‪ n=14‬وﻋﺪد اﻟﻤﻌﺎﻟﻢ ﻣﻦ اﻻﻣﺮ‬ ‫‪kk=4‬‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬

‫ﻣن اﻻﻣر‬

‫ﻗﯾم اﻟﺑواﻗﻲ ‪t j‬‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>StudentizedResiduals‬‬

‫وﯾﺗم ﻣﻘﺎرﻧﺔ ﻗﯾم ‪ t j‬ﺑﺎﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ‬

‫)‪(n  p  2‬‬

‫‪‬‬ ‫‪2‬‬

‫‪t‬‬ ‫‪1‬‬

‫ﻋﻧ د درﺟ ﺎت‬

‫ﺣرﯾ ﺔ ‪n  p  2‬‬

‫و ذﻟ ك ﻟﺗﺣدﯾ د ﻣﺷ ﺎھدات اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ اﻟﻘﺎﺻ ﯾﮫ ﻟﻠﻣﺛ ﺎل )‪ (٩-٥‬وﺑﻣ ﺎ ان‬ ‫‪ t 0.05 (9)  2.26216‬ﺣﯾ ث ‪   .05‬وﯾﻣﻛ ن اﻟﺣﺻ ول ﻋﻠ ﻰ ھ ذه اﻟﻘﯾﻣ ﺔ ﻣ ن اﻟﺑرﻧ ﺎﻣﺞ‬ ‫اﻟﺗﺎﻟﻰ وﺑﺎﺳﺗﺧدام اﻻﻣر‬ ‫])‪Quantile[StudentTDistribution[n-kk-1],1-(/2‬‬

‫ﯾﻼﺣظ ﻋدم وﺟود اى ﻣﺷﺎھدات ﻗﺎﺻﯾﺔ‪.‬‬ ‫)‪ (٥-٤-٥‬ﺗﺣدﯾد اﻟﻣﺷﺎھدات اﻟﻣؤﺛرة‬ ‫ﺑﻌد ﺗﺣدﯾد اﻟﻣﺷﺎھدات اﻟﻘﺎﺻﯾﮫ ﺑﺎﻟﻧﺳ ﺑﺔ ﻟﻘﯾﻣﮭ ﺎ ﻓ ﻲ ‪ x‬و )او( ﻗﯾﻣﺗﮭ ﺎ ﻓ ﻲ ‪ y‬ﺗﻛ ون‬ ‫ﻟﺧطوه اﻟﺗﺎﻟﯾﮫ ھو ﺗﺣدﯾد ﻣﺎ إذا ﻛﺎﻧت ھﻲ اﻟﻣﺷﺎھدات ﻣؤﺛرة )‪ (in fluential‬ام ﻻ؟‬ ‫وﺗﻌﺗﺑر اﻟﻣﺷﺎھدة ﻣؤﺛرة إذا ﻛﺎن اﺳﺗﺑﻌﺎدھﺎ ﯾﺣدث ﺗﻐﯾرا ﻣﻠﺣوظﺎ ﻓﻲ ﻗ ﯾم ﻧﻣ وذج‬ ‫اﻻﻧﺣدار واﻹﺣﺻﺎءات اﻟﻣرﺗﺑطﺔ ﺑﮭﺎ‪ .‬وﺳوف ﻧﻧﺎﻗش ھﻧﺎ ﻣﻘﯾﺎس ﻟﻠﺗﺄﺛﯾر وھﻲ ﻣﻘﺎﯾﯾس‬ ‫ﻣﺳ ﺗﺧدﻣﺔ ﻋﻠ ﻰ ﻧط ﺎق واﺳ ﻊ ﻓ ﻲ اﻟﺗطﺑﯾ ق اﻟﻌﻣﻠ ﻲ وﯾﻌﺗﻣ د ﻛ ل ﻣﻘ ﺎﯾﯾس ﻋﻠ ﻲ ﺣ ذف‬ ‫ﻣﺷﺎھدة واﺣدة ﻟﻘﯾﺎس ﺗﺄﺛﯾرھﺎ‪.‬‬ ‫)ا( اﻟﺗﺎﺛﯾر ﻋﻠﻰ اﻟﻘﯾم اﻟﻣﻘدرة‬ ‫ﻟﻘﯾﺎس ﺗﺄﺛﯾر اﻟﻣﺷﺎھدة ‪ j‬ﻋﻠﻲ اﻟﻘﯾﻣﺔ اﻟﻣﻘدرة ﺳوف ﺗﺳﺗﺧدم اﻟﻣﻘﯾﺎس اﻟﺗﺎﻟﻲ‪:‬‬ ‫‪, j  1,2,...,n.‬‬

‫)‪yˆ j  yˆ ( j‬‬ ‫‪s (2j) h jj‬‬

‫‪٢٥١‬‬

‫‪DFFITS j ‬‬


‫وﯾرﻣز اﻟﺣرﻓﺎن ‪ DF‬ﻟﻠﻔرق ﺑﯾن اﻟﻘﯾﻣﺔ اﻟﻣﻘدره ‪ yˆ j‬ﻟﻠﻣﺷﺎھدة ‪ y j‬ﻋﻧد اﺳ ﺗﺧدام‬ ‫ﺟﻣﯾﻊ اﻟﻣﺷﺎھدات ‪ n‬ﻓﻲ إﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة وﺑﯾن اﻟﻘﯾﻣﺔ اﻟﻣﻘدرة )‪ yˆ ( j‬اﻟﺗﻲ‬ ‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻋﻧد ﺣذف اﻟﻣﺷﺎھدة ‪ j‬ﻓﻲ ﻋﻣﻠﯾﺔ ﺗﻘدﯾر ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة‪ .‬وﻋﻠ ﻲ‬ ‫ذﻟك ‪ DFFITS j‬ﯾﻣﺛل ﻋدد اﻻﻧﺣراﻓﺎت اﻟﻣﻌﯾﺎرﯾﺔ واﻟﺗﻰ ﺗﺗﻐﯾرھﺎ اﻟﻘﯾم اﻟﻣﻘ دره ‪ yˆ j‬ﻋﻧ د‬ ‫ﺣ ذف اﻟﻣﺷ ﺎھدة ‪ .j‬وﯾﻣﻛ ن ﺣﺳ ﺎب ‪ DFFITS j‬ﻣﺳ ﺗﺧدﻣﯾن ﻓﻘ ط اﻟﻧﺗ ﺎﺋﺞ اﻟﻣﺗ وﻓره ﻣ ن‬ ‫ﺗﻘدﯾر ﻣﺟﻣوع اﻟﺑﯾﺎﻧﺎت ﺑﻛﺎﻣﻠﮭﺎ وذﻟك ﺗﺑﻌﺎ ً ﻟﻠﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫‪1‬‬

‫‪1‬‬

‫‪ h 2‬‬ ‫‪ h 2‬‬ ‫‪DFFITS j   jj    jj  t j‬‬ ‫‪ 1  h jj ‬‬ ‫‪ 1  h jj ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪‬‬

‫ﺣﯾث ‪ t j‬ﺗﻣﺛل ﺑﺎﻗﻲ ﺳﺗﯾودﻧت اﻟﻣﺣذوف‪ .‬ﻋﻣوﻣﺎ ً ﻓﻰ اﻟﻌﯾﻧﺎت اﻟﻛﺑﯾرة أى ﻣﺷﺎھدة‬ ‫ﺗﻛون ﻟﮭﺎ‬

‫‪p 1‬‬ ‫‪n‬‬

‫‪DFFITS j  2‬‬

‫ﻓﺈن أى ﻣﺷﺎھدة ﺗﻛون ﻟﮭﺎ‬

‫ﺗﻌﺗﺑ ر ﻣ ؤﺛرة‪ .‬اﻣ ﺎ ﻓ ﻰ اﻟﻌﯾﻧ ﺎت اﻟﺻ ﻐﯾرة واﻟﻣﺗوﺳ طﺔ‬

‫‪DFFITSj  1‬‬

‫ﺗﻌﺗﺑر ﻣؤﺛرة ‪.‬‬

‫)ب( اﻟﺗﺎﺛﯾر ﻋﻠﻰ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار‬ ‫ﻣﻘﯾﺎس اﻻﺛر ﻋﻠﻲ ﻛل ﻣﻌﺎﻣﻼت اﻻﻧﺣدار)ﻣﻘﯾﺎس ﻛوك(‬ ‫ﻟﻘ د اﻗﺗ رح )‪ (cook 1979‬ﻣﻘﯾ ﺎس )ﻣﺳ ﺎﻓﺔ ﻛ وك( ﻟﻣرﺑ ﻊ اﻟﻣﺳ ﺎﻓﺔ ﺑ ﯾن ﺗﻘ دﯾر‬ ‫اﻟﻣرﺑﻌﺎت اﻟﺻ ﻐرى اﻟﻣﺑﻧ ﻰ ﻋﻠ ﻰ ﻛ ل اﻟﻣﺷ ﺎھدات اﻟﺗ ﻰ ﻋ ددھﺎ ‪ n‬واﻟﺗﻘ دﯾر )‪ b ( j‬اﻟ ذى‬ ‫ﻧﺣﺻل ﻋﻠﯾﮫ ﺑﻌد ﺣذف اﻟﻣﺷﺎھدة رﻗم ‪.j‬‬ ‫وﯾﻣﻛن ﺣﺳﺎب ﻣﻘﯾﺎس ﻣﺳﺎﻓﺔ ﻛوك ‪ D j‬ﺑدون ﺗﻘدﯾر ﻧﻣوذج اﻧﺣدار ﺟدﯾد ﻓﻲ ﻛل‬ ‫ﻣرة ﺗﺣذف ﻓﯾﮭﺎ ﻣﺷﺎھدة ﻣﺧﺗﻠﻔﺔ واﻟﺻﯾﻐﺔ اﻟﻣﻛﺎﻓﺋﮫ ﺟﺑرﯾﺎ ھﻲ‪:‬‬ ‫‪e2j‬‬

‫‪ h jj ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪(p  1) MSE 1  h jj ‬‬

‫‪Dj ‬‬

‫وﻟﺗﺣدﯾ د أﺛ ر اﻟﻣﺷ ﺎھدة رﻗ م ‪ j‬ﻋﻠ ﻲ ﻣﻌ ﺎﻣﻼت اﻻﻧﺣ دار ﺗﻘ ﺎرن ﻗﯾﻣ ﺔ ‪ D j‬ﺑ ﺎﻟﻣﺋﯾن‬ ‫اﻟﻌﺷرﯾن ﻟﺗوزﯾﻊ ‪ F‬ﺑدرﺟﺎت ﺣرﯾﺔ )‪ (p+1, n-p-2‬و اﻟﻣﺷﺎھدة رﻗم ‪ j‬ﺗﻌﺗﺑر ﻣؤﺛرة إذا‬ ‫ﻛﺎﻧت ﻗﯾﻣﺔ ‪ D j‬اﻛﺑر ﻣن اﻟﻣﺋﯾن اﻟﻌﺷرﯾن ‪ .‬و اﻟﻣﺷﺎھدة رﻗم ‪ j‬ﺗﻌﺗﺑر ﻣؤﺛرة ﺟدا إذا‬ ‫ﻛﺎﻧت ﻗﯾﻣﺔ ‪ D j‬اﻛﺑر ﻣن اﻟﻣﺋﯾن اﻟﺧﻣﺳﯾن‪.‬‬ ‫ﻣﻘﯾﺎس اﻻﺛر ﻋﻠﻲ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار‬ ‫‪٢٥٢‬‬


‫ﻟﻘد اﻗﺗرح إﺣﺻﺎء ﻟﻘﯾﺎس اﻟﻔرق ﺑﯾن ﻗﯾم ﻣﻌﺎﻣﻼت اﻻﻧﺣدار اﻟﻣﻘدره ﺑﺈﺳﺗﺧدام ﻛل‬ ‫اﻟﻣﺷﺎھدات اﻟﺗﻰ ﻋددھﺎ ‪ n‬وﻗﯾم ﻣﻌﺎﻣﻼت اﻻﻧﺣ دار اﻟﻣﻘ دره ﺑﻌ د ﺣ ذف اﻟﻣﺷ ﺎھده رﻗ م‬ ‫)‪ (j‬أي ﺑﺈﺳﺗﺧدام )‪ (n-1‬ﻣن اﻟﻣﺷﺎھدات ھذا اﻹﺣﺻﺎء ﯾﺄﺧذ اﻟﺷﻛل اﻟﺗﺎﻟﻲ‪:‬‬ ‫)‪b i  b i ( j‬‬ ‫‪s (2j) c ii‬‬

‫‪DFBETASi, j ‬‬

‫ﺣﯾث ‪ c ii‬ھو اﻟﻌﻧﺻر رﻗم ‪ i‬ﻟﻠﻣﺻﻔوﻓﺔ ‪ b i ( j) , (X' X) -1‬ھﻲ ﻣﻌﺎﻣل اﻻﻧﺣدار رﻗم‬ ‫‪ i‬اﻟﻣﺣﺳوﺑﺔ ﺑدون اﺳﺗﺧدام اﻟﻣﺷﺎھدة رﻗم ‪ . j‬اﻟﻌﯾﻧﺎت اﻟﺻﻐﯾرةﺗﻌﺗﺑر اﻟﺣﺎﻟﺔ ﻣؤﺛرة اي‬ ‫ﺗﻌﺗﺑر اﻟﺣﺎﻟﺔ رﻗم ‪ j‬ﻣؤﺛرة إذا ﺗﺣﻘق اﻟﺷرط اﻟﺗﺎﻟﻲ‪:‬‬ ‫‪DFBETASi, j  1‬‬

‫ﻓﻲ ﺣﺎﻟﺔ اﻟﻌﯾﻧﺎت اﻟﻛﺑﯾرة ﺗﻛون‬ ‫‪DFBETAS i, j  2 / n‬‬

‫وﯾﻼﺣظ أﻧﮫ ﻟﺣﺳﺎب ‪ DFBETASi, j‬ﺗﺣﺗﺎج ﻟﺗﻘدﯾر )‪ (n‬ﻧﻣوذج اﻧﺣدار‪.‬‬ ‫ﻣﺛﺎل)‪(١٠-٥‬‬ ‫اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺗﻣﺛل ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ذات ﺣﺟ م )‪ (n = 14‬ﻣﺷ ﺎھدات‬ ‫ﻟﻛل ﻣن اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ‪ Y‬واﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﮫ ‪. x 1 , x 2 , x 3‬‬ ‫‪x3‬‬

‫‪x2‬‬

‫‪x1‬‬

‫‪y‬‬

‫‪0.625‬‬

‫‪0.24‬‬

‫‪0.276‬‬

‫‪3.33‬‬

‫‪0.512‬‬

‫‪0.254‬‬

‫‪0.249‬‬

‫‪3.51‬‬

‫‪0.488‬‬

‫‪0.249‬‬

‫‪0.249‬‬

‫‪3.55‬‬

‫‪0.524‬‬

‫‪0.245‬‬

‫‪0.26‬‬

‫‪3.65‬‬

‫‪0.588‬‬

‫‪0.25‬‬

‫‪0.271‬‬

‫‪3.8‬‬

‫‪0.475‬‬

‫‪0.252‬‬

‫‪0.241‬‬

‫‪4.2‬‬

‫‪0.513‬‬

‫‪0.254‬‬

‫‪0.269‬‬

‫‪4.22‬‬

‫‪0.463‬‬

‫‪0.27‬‬

‫‪0.264‬‬

‫‪4.27‬‬

‫‪0.512‬‬

‫‪0.274‬‬

‫‪0.27‬‬

‫‪4.31‬‬

‫‪٢٥٣‬‬


‫أوﺟ د ﻗ ﯾم‬ ‫ﺗﻠك اﻟﻘﯾم؟‬

‫‪0.405‬‬

‫‪0.264‬‬

‫‪0.24‬‬

‫‪4.48‬‬

‫‪0.45‬‬

‫‪0.28‬‬

‫‪0.259‬‬

‫‪4.53‬‬

‫‪0.48‬‬

‫‪0.266‬‬

‫‪0.252‬‬

‫‪4.55‬‬

‫‪0.456‬‬

‫‪0.268‬‬

‫‪0.258‬‬

‫‪4.62‬‬

‫‪0.506‬‬

‫‪0.268‬‬

‫‪0.293‬‬

‫‪5.86‬‬

‫‪DFFITS j‬‬

‫و ‪ DFBETASi,j‬وﻣﺳ ﺎﻓﺔ ﻛ وك ﻟﻠﻣﺷ ﺎھدات وﻣ ﺎذا ﺗﺳ ﺗﻧﺗﺞ ﻣ ن‬

‫اﻟﺣــل ‪:‬‬ ‫ﯾﻌطﻰ اﻟﺟدول اﻟﺗ ﺎﻟﻰ ﻗﺎﺋﻣ ﺔ ﺑﻘ ﯾم ‪ DFFITS j , D j , h j‬ﺑﺎﻟﻧﺳ ﺑﺔ ﻟ ـ ‪ D j‬اﻟﻣﺋ ﯾن‬ ‫اﻟﻌﺷ رﯾن ﻟﺗوزﯾ ﻊ ‪ F‬ﺑ درﺟﺎت ﺣرﯾ ﺔ )‪ (4, 10‬درﺟ ﺎت ﺣرﯾ ﺔ )ﻣ ﺄﺧوذ ﻣ ن اﻟﺣ زم‬ ‫اﻟﺟ ﺎھزة اﻟﺧﺎﺻ ﺔ ﺑﺎﻹﺣﺻ ﺎء ﻟﺑرﻧ ﺎﻣﺞ ‪ (Mathematic‬ﯾﺳ ﺎوى ‪ 0.406574‬ﯾﻼﺣ ظ أن‬ ‫ﻛ ل ﻗ ﯾم ﻣﺳ ﺎﻓﮫ ﻛ وك أﻗ ل ﻣ ن ھ ذه اﻟﻘﯾﻣ ﺔ‪ .‬وﻋﻠ ﻲ ذﻟ ك ﻻﯾوﺟ د اى ﺣﺎﻟ ﺔ ﻣ ؤﺛرة ﻓ ﻲ‬ ‫اﻟﺣﻘﯾﻘ ﺔ ﻓ ﺈن اﻟﻣﺋ ﯾن اﻟﺧﻣﺳ ﯾن ھ و ‪ 0.898817‬وﻋﻠ ﻲ ذﻟ ك ﻻ ﺗوﺟ د أي ﻗﯾﻣ ﺔ ﻟ ـ ‪D j‬‬ ‫ﺗﻘﺗرب ﻣن اﻟﻣﺳﺗوى اﻟﺿرورى ﻟوﺟود ﺣﺎﻟﺔ ﻣؤﺛرة ﻋﻠﻰ ﻧﻣوذج اﻻﻧﺣدار‪.‬‬

‫‪DFFITSj‬‬

‫‪Dj‬‬

‫‪hj‬‬

‫‪0.575188‬‬

‫‪0.0879027‬‬

‫‪0.446993‬‬

‫‪0.433307‬‬

‫‪0.0487779‬‬

‫‪0.231595‬‬

‫‪-0.389163‬‬

‫‪0.0388601‬‬

‫‪0.169291‬‬

‫‪-0.501698‬‬

‫‪0.0621402‬‬

‫‪0.182651‬‬

‫‪0.586544‬‬

‫‪0.0823222‬‬

‫‪0.192002‬‬

‫‪0.96858‬‬

‫‪0.222289‬‬

‫‪0.3769‬‬

‫‪-0.622104‬‬

‫‪0.0893455‬‬

‫‪0.174635‬‬

‫‪-0.696866‬‬

‫‪0.18167‬‬

‫‪0.179229‬‬

‫‪0.420653‬‬

‫‪0.0471378‬‬

‫‪0.315062‬‬

‫‪-0.556649‬‬

‫‪0.0801743‬‬

‫‪0.318829‬‬

‫‪0.101065‬‬

‫‪0.00283181‬‬

‫‪0.3171122‬‬

‫‪0.646137‬‬

‫‪0.0923556‬‬

‫‪0.153562‬‬

‫‪٢٥٤‬‬


‫‪-0.152264‬‬

‫‪0.00632049‬‬

‫‪0.119834‬‬

‫‪0.465906‬‬

‫‪0.059614‬‬

‫‪0.768295‬‬

‫اﻵن ﺑﺎﻟﻧﺳ ﺑﺔ ﻟﻘ ﯾم ‪ DFFITS j‬ﻻﯾوﺟ د أي ﻗ ﯾم ﻣ ؤﺛره وذﻟ ك ﻟﻌ دم وﺟ ود أى ﻗ ﯾم ﻟ ـ‬ ‫‪ DFFIT j‬ﺗزﯾ د ﻋ ن ‪ .1‬اﻟﻘﯾﻣ ﺔ اﻟﻘرﯾﺑ ﺔ ﻣ ن ‪ 1‬ﻓ ﻲ اﻟﺟ دول اﻟﺳ ﺎﺑق ھ ﻲ ‪96858‬‬

‫واﻟﻣﻘﺎﺑﻠﺔ ﻟﻠﻣﺷﺎھدة اﻟﺳﺎدﺳﺔ‪.‬‬ ‫ﯾﻌط ﻰ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﻗﺎﺋﻣ ﺔ ﺑﻘ ﯾم ‪ DFBETASi,j‬ﺣﯾ ث‬ ‫‪ . j  1,2,...,14 , i  0.1.2.3‬ﻟﻠﻣﺷﺎھدات ﻣن ‪ 1‬اﻟﻰ ‪ 14‬ﻓﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ ﯾﺗﺿ ﺢ‬ ‫ﻋ دم وﺟ ود ﻗ ﯾم ﻣطﻠﻘ ﮫ ﻟ ـ ‪ DFBETASi,j‬ﺗزﯾ د ﻋ ن اﻟواﺣ د اﻟﺻ ﺣﯾﺢ‪ .‬وﻋﻠ ﻲ ذﻟ ك‬ ‫ﻻﯾوﺟد أي ﺣﺎﻻت ﻟﮭﺎ ﺗﺎﺛﯾر ﻣﻌﻧوي ﻋﻠﻲ ﻧﻣوذج اﻻﻧﺣدار‪.‬‬ ‫‪b3‬‬

‫‪b1‬‬

‫‪b2‬‬

‫‪b0‬‬

‫‪-0.136519‬‬

‫‪0.382709‬‬

‫‪-0.115759‬‬

‫‪-0.0143844‬‬

‫‪0.209172‬‬

‫‪-0.101049‬‬

‫‪-0.289016‬‬

‫‪-0.0559135‬‬

‫‪-0.00171137‬‬

‫‪0.126155‬‬

‫‪0.108709‬‬

‫‪-0.123586‬‬

‫‪0.257519‬‬

‫‪-0.0718679‬‬

‫‪-0.0653034‬‬

‫‪-0.235483‬‬

‫‪-0.156987‬‬

‫‪0.358846‬‬

‫‪-0.0497338‬‬

‫‪-0.0000106592‬‬

‫‪-0.59404‬‬

‫‪-0.674636‬‬

‫‪0.62326‬‬

‫‪0.835436‬‬

‫‪0.409338‬‬

‫‪-0.220736‬‬

‫‪-0.307155‬‬

‫‪-0.226309‬‬

‫‪-0.530767‬‬

‫‪-0.124454‬‬

‫‪0.446869‬‬

‫‪0.486631‬‬

‫‪0.345162‬‬

‫‪0.150272‬‬

‫‪-0.301588‬‬

‫‪-0.355183‬‬

‫‪0.105511‬‬

‫‪0.470109‬‬

‫‪-0.233555‬‬

‫‪-0.309542‬‬

‫‪0.0865301‬‬

‫‪-0.00941033‬‬

‫‪-0.059592‬‬

‫‪-0.0680988‬‬

‫‪-0.105235‬‬

‫‪-0.396119‬‬

‫‪0.2822‬‬

‫‪0.25121‬‬

‫‪0.0124995‬‬

‫‪0.0557525‬‬

‫‪-0.0593643‬‬

‫‪-0.0263566‬‬

‫‪-0.10239‬‬

‫‪0.199504‬‬

‫‪-0.234257‬‬

‫‪-0.0907156‬‬

‫ﻟﻠﻣﺛ ﺎل )‪ (١٠-٥‬اﻟﻣطﻠ وب اﺳ ﺗﺧدام ﻣﺻ ﻔوﻓﺔ اﻟﻘﺑﻌ ﺔ ‪ H‬ﻟﻠﺗﻌ رف ﻋﻠ ﻲ‬ ‫ﻣﺷﺎھدات ﻗﺎﺻﯾﺔ ﻓﻲ ﻗﯾم ‪ x‬وﺗﺣدﯾد اﻟﻣﺷﺎھدات اﻟﻣؤﺛرة‪.‬‬ ‫ﺳ وف ﯾ ﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻛﺗ وب ﺑﻠﻐ ﺔ ‪ Mathematica‬وذﻟ ك ﺑﺎﺳ ﺗﺧدام‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ ‫`‪Statistics`LinearRegression‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت ‪.‬‬ ‫‪٢٥٥‬‬


<<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506};

Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}]; hd=Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionRepo rt->HatDiagonal] {HatDiagonal{0.446993,0.231595,0.169291,0.182651,0.19200 2,0.3769,0.174635,0.179229,0.315062,0.318829,0.371122,0.1 53562,0.119834,0.768295}} hdlist=hd[[1,2]] {0.446993,0.231595,0.169291,0.182651,0.192002,0.3769,0.17 4635,0.179229,0.315062,0.318829,0.371122,0.153562,0.11983 4,0.768295} hdlist[[1]] 0.446993 Sum[hdlist[[i]],{i,1,Length[hdlist]}] 4. kk=4; n=14; 2kk/n//N 0.571429 Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>CookD] {CookD{0.0879027,0.0487779,0.0388601,0.0621402,0.0823222 ,0.222289,0.0893455,0.108167,0.0471378,0.0801743,0.002831 81,0.0923556,0.00632049,0.0598614}} <<Statistics`NormalDistribution` n=14; kk=4; Quantile[FRatioDistribution[p,n-kk],0.2] 0.406574 Quantile[FRatioDistribution[p,n-kk],0.50] 0.898817

٢٥٦


‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>PredictedResponseDelta‬‬ ‫‪{PredictedResponseDelta{0.575188,0.433307,-0.389163,‬‬‫‪0.501698,0.586544,0.96858,-0.622104,-0.696866,0.420653,‬‬‫}}‪0.556649,0.101065,0.646137,-0.152264,0.465906‬‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>BestFitParametersDelta‬‬ ‫‪{BestFitParametersDelta{{-0.0143844,‬‬‫‪0.115759,0.382709,-0.136519},{-0.0559135,-0.289016,‬‬‫‪0.101049,0.209172},{-0.123586,0.108709,0.126155,‬‬‫{‪0.00171137},{-0.235483,-0.0653034,-0.0718679,0.257519},‬‬‫‪0.0000106592,-0.0497338,0.358846,‬‬‫{‪0.156987},{0.835436,0.62326,-0.674636,-0.59404},‬‬‫‪0.226309,-0.307155,‬‬‫‪0.220736,0.409338},{0.486631,0.446869,-0.124454,‬‬‫{‪0.530767},{-0.355183,-0.301588,0.150272,0.345162},‬‬‫‪0.309542,-0.233555,0.47019,0.105511},{-0.0680988,‬‬‫‪0.059592,-0.00941033,0.0865301},{0.25121,0.2822,‬‬‫‪0.396119,-0.105235},{-0.0263566,‬‬‫{‪0.0593643,0.0557525,0.0124995},‬‬‫}}}‪0.0907156,0.234257,0.199504,-0.10239‬‬

‫وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت واﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ‪:‬‬ ‫اوﻻ‪ :‬اﻟﻣدﺧﻼت‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ ‪ ownbavg‬ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه ‪teamera‬اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ ‫ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ ‪ winpct‬اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻟﺚ واﻟﻘﺎﺋﻤﺔ‪oppbavg‬اﻟﺜﺎﻧﻰ و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ ‫اﻟﺘﺎﺑﻊ ‪.‬اﯾﻀﺎ ﺣﺠﻢ اﻟﻌﯿﻨﺔ ﻣﻦ اﻻﻣﺮ‬ ‫‪ n=14‬وﻋﺪد اﻟﻤﻌﺎﻟﻢ ﻣﻦ اﻻﻣﺮ‬ ‫‪kk=4‬‬

‫ﺛﺎﻧﯾﺎ ‪ :‬اﻟﻣﺧرﺟﺎت‬ ‫ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ ﻟﻣﺻﻔوﻓﺔ اﻟﻘﺑﻌﺔ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫]]‪hdlist=hd[[1,2‬‬

‫)‪2(p  1‬‬ ‫ﻧﺤﺼﻞ ﻋﻠﻰ ‪ .571429‬‬ ‫‪n‬‬ ‫‪2kk/n//N‬‬

‫‪‬‬

‫‪2  h jj‬‬ ‫‪n‬‬

‫ﻣﻦ اﻻﻣﺮ‬

‫وﺑﻤﺎ ان اﻟﻤﺸﺎﻫﺪة اﻻﺧﻴﺮة ﻫﻰ اﻟﻮﺣﻴﺪة اﻟﺘﻰ اﻛﺒﺮ ﻣﻦ اﻟﻘﻴﻤﺔ اﻟﺴﺎﺑﻘﺔ‬

‫ﻓﺗﻌﺗﺑر ﻣﺷﺎھدة ﻗﺎﺻﯾﺔ‪.‬‬

‫ﯾﻌطﻰ اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>CookD‬‬

‫ﻗﺎﺋﻣﺔ ﺑﻘﯾم ‪D j‬‬

‫‪٢٥٧‬‬


‫اﻟﻣﺋ ﯾن اﻟﻌﺷ رﯾن ﻟﺗوزﯾ ﻊ ‪ F‬ﺑ درﺟﺎت ﺣرﯾ ﺔ )‪ (4, 10‬درﺟ ﺎت ﺣرﯾ ﺔ ﯾﺳ ﺎوى‬ ‫‪0.406574‬‬

‫ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪Quantile[FRatioDistribution[kk,n-kk],0.2‬‬

‫ﯾﻼﺣ ظ أن ﻛ ل ﻗ ﯾم ﻣﺳ ﺎﻓﮫ ﻛ وك أﻗ ل ﻣ ن ھ ذه اﻟﻘﯾﻣ ﺔ‪ .‬وﻋﻠ ﻲ ذﻟ ك ﻻﯾوﺟ د اى ﺣﺎﻟ ﺔ‬ ‫ﻣؤﺛرة‪ .‬ﻓﻲ اﻟﺣﻘﯾﻘﺔ ﻓﺈن اﻟﻣﺋﯾن اﻟﺧﻣﺳﯾن ھو ‪0.898817‬‬ ‫ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]‪Quantile[FRatioDistribution[kk,n-kk],0.50‬‬

‫وﻋﻠﻲ ذﻟك ﻻ ﺗوﺟد أي ﻗﯾﻣﺔ ﻟ ـ ‪ D j‬ﺗﻘﺗ رب ﻣ ن اﻟﻣﺳ ﺗوى اﻟﺿ رورى ﻟوﺟ ود ﺣﺎﻟ ﺔ‬ ‫ﻣؤﺛرة ﻋﻠﻰ ﻧﻣوذج اﻻﻧﺣدار‪.‬‬ ‫و ﯾﻌطﻰ اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>PredictedResponseDelta‬‬

‫ﻗﺎﺋﻣﺔ ﺑﻘﯾم‬

‫‪DFFITS j‬‬

‫ﺣﯾث‬

‫‪j  1, 2,...,14‬‬

‫ﯾﻼﺣظ ﻣن ﻣﺧرج اﻻﻣر اﻟﺳﺎﺑق ﻋدم وﺟود ﻗﯾم ﻣطﻠﻘﮫ ﻟـ ‪ DFFITS j‬ﺗزﯾ د ﻋ ن اﻟواﺣ د‬ ‫اﻟﺻﺣﯾﺢ‪ .‬وﻋﻠﻲ ذﻟك ﻻﯾوﺟد أي ﺣﺎﻻت ﻟﮭﺎ ﺗﺎﺛﯾر ﻣﻌﻧوي ﻋﻠﻲ ﻧﻣوذج اﻻﻧﺣدار‪.‬‬ ‫ﯾﻌطﻰ اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>BestFitParametersDelta‬‬

‫ﻗﺎﺋﻣﺔ ﺑﻘﯾم اﻟـ ‪ DFFITSi,j‬ﺣﯾث ‪ j  1,2,...,14 , i  0.1.2.3‬ﻟﻠﻣﺷﺎھدات ﻣن ‪ 1‬اﻟ ﻰ‬ ‫‪ . 14‬ﯾﻼﺣظ ﻣن ﻣﺧرﺟﺎت ھذا اﻻﻣر ﻋدم وﺟود ﻗﯾم ﻣطﻠﻘ ﮫ ﻟ ـ ‪ DFFITSi,j‬ﺗزﯾ د ﻋ ن‬ ‫اﻟواﺣ د اﻟﺻ ﺣﯾﺢ‪ .‬وﻋﻠ ﻲ ذﻟ ك ﻻﯾوﺟ د أي ﺣ ﺎﻻت ﻟﮭ ﺎ ﺗ ﺎﺛﯾر ﻣﻌﻧ وي ﻋﻠ ﻲ ﻧﻣ وذج‬ ‫اﻻﻧﺣدار‪.‬‬ ‫)‪ (٦-٤-٥‬اﻻرﺗﺑﺎط اﻟذاﺗﻰ‪Autocorrelation‬‬ ‫ﻋﻠﻣﻧ ﺎ ﻓﯾﻣ ﺎ ﺳ ﺑق أﻧ ﮫ ﻟﺗﻘ دﯾر ﻣﻌ ﺎﻟم ﻧﻣ وذج اﻹﻧﺣ دار اﻟﺧط ﻲ ﻓﯾﺟ ب ﺗﺣﻘ ق‬ ‫اﻟﻔروض اﻟﺗﺎﻟﯾﺔ ﻟﺣدود اﻟﺧطﺄ ‪:‬‬ ‫‪٢٥٨‬‬


‫‪E( i  j )  0 , i  j‬‬

‫‪Var( i )   2‬‬

‫‪E ( i )  0‬‬

‫ﻟﻐرض إﺧﺗﺑﺎرات اﻟﻔروض واﻟﺣﺻول ﻋﻠﻰ ﻓﺗرات ﺛﻘﺔ ﻋﺎدة ﯾﺿﺎف ﻓرض اﻹﻋﺗدال‬ ‫إي أن ‪ .  i ~ NID(0,  2 ) :‬ﺑﻌ ض ﺗطﺑﯾﻘ ﺎت اﻹﻧﺣ دار ﺗﺷ ﺗﻣل ﻋﻠ ﻰ ﻣﺗﻐﯾ رات‬ ‫ﻣﺳﺗﻘﻠﺔ وﻣﺗﻐﯾر إﺳﺗﺟﺎﺑﺔ ﯾﻛون ﻟﮫ طﺑﯾﻌﺔ اﻟﺗﺗﺎﺑﻊ ﻣﻊ اﻟ زﻣن و اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ‬ ‫ﺗﺳﻣﻰ اﻟﺳﻼﺳل اﻟزﻣﻧﯾﺔ ‪ .‬ﻣﻌظم اﻟﻣﺳﺎﺋل اﻹﻗﺗﺻﺎدﯾﺔ ﺗﻛون ﻋﻠﻰ ﺷ ﻛل ﺳﻼﺳ ل زﻣﻧﯾ ﺔ‬ ‫ﻣﻣﺎ ﯾؤدي إﻟﻰ أن اﻟﺧط ﺄ ﻓ ﻲ ﻓﺗ رة زﻣﻧﯾ ﺔ ‪  i‬ﯾﻛ ون ﻣرﺗﺑط ﺎ ﻣ ﻊ اﻟﺧط ﺄ ‪  j‬ﻓ ﻲ ﻓﺗ رة‬ ‫زﻣﻧﯾﺔ أﺧرى )‪ (i  j‬وھذا ﯾﺧﺎﻟف إﺣدى ﻓروض ﻧﻣوذج اﻹﻧﺣدار اﻟﺧطﻲ وھو ﻋدم‬ ‫إرﺗﺑﺎط ﻗﯾﻣﺔ ‪ ‬ﻓﻲ ﻓﺗرة زﻣﻧﯾﺔ ﻣﺎ ﻋن ﻗﯾﻣﺗﮭﺎ ﻓﻲ ﻓﺗرة زﻣﻧﯾﺔ ﺳﺎﺑﻘﺔ ‪ ،‬إي أن اﻹرﺗﺑ ﺎط‬ ‫ﺑﯾن ‪  i ,  j‬ﻻ ﯾﺳﺎوي اﻟﺻﻔر )‪ . (E ( i  j )  0‬وﻣﻌﻧﻰ ذﻟك وﺟود اﻹرﺗﺑ ﺎط اﻟ ذاﺗﻲ‬ ‫أو اﻹرﺗﺑﺎط اﻟﺗﺳﻠﺳﻠﻲ ‪ .‬واﻹرﺗﺑﺎط اﻟذاﺗﻲ ﺣﺎﻟﺔ ﺧﺎﺻﺔ ﻣن اﻹرﺗﺑﺎط إذ ﯾﻘﯾس ﻟﻧﺎ درﺟﺔ‬ ‫اﻹرﺗﺑ ﺎط ﺑ ﯾن اﻟﻘ ﯾم اﻟﻣﺗﺗﺎﻟﯾ ﺔ ﻟ ﻧﻔس اﻟﻣﺗﻐﯾ ر ﺧ ﻼل ﻓﺗ رة زﻣﻧﯾ ﺔ ﻣﺣ ددة وﻟ ﯾس ﺑ ﯾن‬ ‫ﻣﺗﻐﯾ رﯾن أو أﻛﺛ ر ‪ .‬وﺳﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ھﻧ ﺎ ﻓﻘ ط ﻋﻠ ﻰ اﻟﺣﺎﻟ ﺔ اﻟﺑﺳ ﯾطﺔ وھ ﻲ ﺣﺎﻟ ﺔ‬ ‫اﻟﻌﻼﻗﺔ اﻟﺧطﯾﺔ ﺑﯾن إي ﻗﯾﻣﺗﯾن ﻣﺗﺗﺎﻟﯾﺗﯾن ﻣن ﻗﯾم ‪‬‬ ‫وﺗﺗﺣدد إﺷﺎرة ﻣﻌﺎﻣل اﻹرﺗﺑﺎط اﻟ ذاﺗﻲ ﺣﺳ ب ﺗﻐﯾ ر إﺷ ﺎرة ﻗ ﯾم اﻟﺑ واﻗﻲ ‪ ،‬ﻓ ﺈذا ﺗﻐﯾ رت‬ ‫إﺷﺎرة اﻟﻘﯾم اﻟﻣﺗﺗﺎﻟﯾﺔ ﺑﺈﺳﺗﻣرار ﻓﯾﺄﺧذ اﻟﻣﻧﺣﻧﻰ اﻟﺗ ﺎرﯾﺧﻲ ﺷ ﻛل اﻷﺳ ﻧﺎن ﻛ ﺎن اﻹرﺗﺑ ﺎط‬ ‫ﺳﺎﻟﺑﺎ ‪ ،‬واﻟﻌﻛس إذا ﺣدث اﻟﺗﻐﯾر ﺑﺄن ﯾﺗﻠو ﻋددا ﻣن اﻟﻘﯾم اﻟﻣوﺟﺑﺔ ﻋددا أﺧر ﻣ ن اﻟﻘ ﯾم‬ ‫اﻟﺳﺎﻟﺑﺔ ﻛﺎن اﻹرﺗﺑﺎط ﻣوﺟﺑﺎ ‪.‬‬ ‫إذا ﻛﺎﻧت ﺣدود اﻟﺧطﺄ ﻓﻲ ﻧﻣوذج اﻹﻧﺣدار ﻣرﺗﺑطﺔ إرﺗﺑﺎط ذاﺗﻲ ﻣوﺟب ‪ ،‬ﻓﺈن‬ ‫إﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ﯾﺗرﺗب ﻋﻠﯾﮫ ﻋدد ﻣن اﻟﻌواﻗب اﻟﻣﮭﻣﺔ وھﻲ ‪:‬‬ ‫‪ -١‬ﻻ ﺗزال ﻣﻌ ﺎﻣﻼت اﻹﻧﺣ دار اﻟﻣﻘ درة ﻏﯾ ر ﻣﺗﺣﯾ زة إﻻ أﻧﮭ ﺎ ﻻ ﺗﻣﺗﻠ ك ﺧﺎﺻ ﯾﺔ أﻗ ل‬ ‫ﺗﺑﺎﯾن ‪.‬‬ ‫‪ -٢‬ﻣﺗوﺳط ﻣرﺑﻌﺎت اﻟﺧطﺄ ﯾﻣﻛن أن ﯾﺷﻛل ﺗﻘدﯾرا ﺑﺎﻟﻧﻘﺻﺎن ﻟﺗﺑﺎﯾن ﺣدود اﻟﺧطﺄ ‪.‬‬ ‫‪ -٣‬ﺗﻌطﻰ اﻟﺗﻘدﯾرات ﻟﻸﺧطﺎء اﻟﻣﻌﯾﺎرﯾﺔ ﻟﻣﻘدرات ﻣﻌﺎﻣﻼت اﻹﻧﺣدار‪،‬‬ ‫‪ ، s  e ( Bi ) , i  0,1,2,..., k‬واﻟﻣﺣﺳ وﺑﺔ ﺑطرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ﺗﻘ دﯾرا‬ ‫‪.‬‬ ‫ﺑﺎﻟﻧﻘﺻﺎن ﻟﻺﻧﺣراف اﻟﻣﻌﯾﺎري اﻟﺣﻘﯾﻘﻲ ﻟﻠﻣﻘدر ‪B i‬‬ ‫‪ -٤‬ﻟم ﺗﻌد ﻓﺗرات اﻟﺛﻘﺔ واﻹﺧﺗﺑﺎرات اﻟﺗﻲ ﺗﺳﺗﺧدم ﺗوزﯾﻌﺎت ‪ t‬أو ‪ F‬ﻗﺎﺑﻠﺔ ﻟﻠﺗطﺑﯾق ‪.‬‬ ‫ﺗوﺟ د ط رق ﻛﺛﯾ رة ﻻﻛﺗﺷ ﺎف ﻋ دم اﺳ ﺗﻘﻼل اﻷﺧط ﺎء وﺳ وف ﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ﻋﻠ ﻰ‬ ‫اﺧﺗﺑﺎر درﺑن ‪ -‬واﺗﺳون‪.‬‬ ‫اﺧﺗﺑﺎر درﺑن ‪ -‬واﺗﺳون‬ ‫إن اﻟﻧﻣوذج اﻟﺧطﻰ )‪ (١-٤‬ﻓﻲ وﺟود ارﺗﺑﺎط ذاﺗﻲ ﻣن اﻟرﺗﺑﮫ اﻷوﻟﻰ‬ ‫ھو‪:‬‬ ‫‪٢٥٩‬‬


‫‪Yi   0   1 x i   i‬‬

‫ﺣﯾث‪:‬‬ ‫‪ i   i 1  u i‬‬

‫ﺣﯾث ‪ ‬ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟ ذاﺗﻰ ﺑﺣﯾ ث ‪   1‬و ‪ u i‬ﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ ﯾﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ‬ ‫اﻟطﺑﯾﻌﻲ ﺑﻣﺗوﺳط ﯾﺳﺎوي ﺻﻔر وﺗﺑﺎﯾن ﺛﺎﺑت ‪  2u‬و ‪. E (u i u j )  0, i  j‬‬ ‫ﯾﺳﺗﺧدم اﺧﺗﺑﺎر درﺑن‪ -‬واﺗﺳون ﻻﺧﺗﺑﺎر ﺛﻼﺛﺔ ﻓروض وھﻲ ‪:‬‬ ‫‪ -١‬وﺟود ارﺗﺑﺎط ذاﺗﻲ ﻣوﺟب ‪:‬‬ ‫ﻓرض اﻟﻌدم ‪H 0 :   0‬‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪. H0 :   0‬‬ ‫‪ -٢‬وﺟود ارﺗﺑﺎط ذاﺗﻲ ﺳﺎﻟب ‪:‬‬ ‫ﻓرض اﻟﻌدم ‪H 0 :   0‬‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪. H0 :   0‬‬ ‫‪ -٣‬وﺟود ارﺗﺑﺎط ذاﺗﻲ ﺳﺎﻟب أو ﻣوﺟب )اﺧﺗﺑﺎر ذو ﺟﺎﻧﺑﯾن ( ‪:‬‬ ‫ﻓرض اﻟﻌدم ‪H 0 :   0‬‬

‫ﺿد اﻟﻔرض اﻟﺑدﯾل ‪:‬‬ ‫‪. H1 :   0‬‬ ‫وﯾﻧﺣﺻر اﻻﺧﺗﺑﺎر ﺑﺎﻟﺧطوات اﻟﺗﺎﻟﯾﺔ‪:‬‬ ‫أ‪ -‬ﺗﻘدﯾر ﻣﻌﺎﻟم اﻻﻧﺣدار ﺑﺎﺳ ﺗﺧدام أﺳ ﻠوب اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ﻟﻠﺣﺻ ول ﻋﻠ ﻰ‬ ‫ﻣﻌﺎﻣﻼت اﻻﻧﺣدار‪.‬‬ ‫ب‪ -‬طرح ﻗﯾم اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻣن اﻟﻘﯾم اﻟﻣﺷﺎھدة ﻟﻠﺣﺻول ﻋﻠﻰ اﻟﺑواﻗﻲ‪:‬‬ ‫‪e i  y i  yˆ i .‬‬

‫ج‪ -‬ﺣﺳﺎب ﻗﯾﻣﺔ إﺣﺻﺎﺋﯾﺔ ﻣﻘدرة ﻧرﻣز ﻟﮭﺎ ﺑﺎﻟرﻣز ‪ DW‬ﻋﻠﻰ اﻟﻧﺣو اﻟﺗﺎﻟﻲ‪:‬‬

‫‪٢٦٠‬‬


‫‪(e i  e i 1 ) 2‬‬ ‫‪.‬‬

‫‪n‬‬ ‫‪‬‬ ‫‪i 2‬‬

‫‪n 2‬‬ ‫‪ ei‬‬ ‫‪i 1‬‬

‫‪DW ‬‬

‫ﻣﻊ ﻣﻼﺣظﺔ أن‪:‬‬

‫‪0  DW  4.‬‬

‫د‪ -‬اﺳ ﺗﺧدام ﺟ داول درﺑ ن ‪ -‬واﺗﺳ ون ﻓ ﻲ اﻟﻣﻠﺣ ق )‪) (٨‬ﻓ ﻰ ﻛﺗ ﺎب اﻻﻧﺣ دار‬ ‫ﻟﻠدﻛﺗورة ﺛروت (ﻹﺟراء اﻻﺧﺗﺑﺎر وﻣن اﻟﻣﻼﺣظ أن ﺟداول درﺑ ن ‪ -‬واﺗﺳ ون‬ ‫ﺗﺄﺧذ ﻓﻲ اﻻﻋﺗﺑﺎر ﻛل ﻣن ﻋدد اﻟﻣﺷﺎھدات ‪ n‬وﻋدد اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ) ‪( k‬‬ ‫وﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ‪ ‬ﻓﻲ ﺣﺎﻟﺔ اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد و ‪ 2‬ﻓﻲ ﺣﺎﻟﺔ اﺧﺗﺑﺎر‬ ‫ذو ﺟ ﺎﻧﺑﯾن ‪ .‬وﻣﻣ ﺎ ھ و ﺟ دﯾر ﺑﺎﻟ ذﻛر أن اﻟﻔ رض اﻷﻛﺛ ر ﺷ ﯾوﻋﺎ ھ و اﻟﻔ رض‬ ‫اﻟﺑدﯾل ‪ H1 :   0 :‬وﯾﺣﺗوي اﻟﺟدول ﻋﻠ ﻰ ﻗﯾﻣﺗ ﯾن إﺣ داھﻣﺎ ‪ dL‬وھ ﻲ اﻟﻘﯾﻣ ﺔ‬ ‫اﻟﺻﻐرى و ‪ d U‬اﻟﻌﻠﯾﺎ ﺛم ﺗﺗم اﻟﻣﻘﺎرﻧﺔ ﻋﻠﻰ اﻟﻧﺣو اﻟﺗﺎﻟﻲ اﻟﻣوﺿﺢ ﻓﻲ اﻟﺟدول‬ ‫اﻟﺗﺎﻟﻰ‪.‬‬ ‫اﻟﻘرار‬

‫ﻗﯾﻣﺔ ‪ DW‬اﻟﻣﻘدره‬

‫اﻟﺣﺎﻟﺔ‬

‫ارﺗﺑﺎط ذاﺗﻲ ﺳﺎﻟب‬

‫‪4-dL < DW < 4‬‬

‫‪1‬‬

‫ﻗرار ﻏﯾر ﻣﺣدد‬

‫‪4-dU<DW<4-dL‬‬

‫‪2‬‬

‫ﻻﯾوﺟد ارﺗﺑﺎط ذاﺗﻲ‬

‫‪2 < DW < 4-dU‬‬

‫‪3‬‬

‫ﻻﯾوﺟد ارﺗﺑﺎط ذاﺗﻲ‬

‫‪dU < DW < 2‬‬

‫‪4‬‬

‫ﻗرار ﻏﯾر ﻣﺣدد‬

‫‪d L < DW < dU‬‬

‫‪5‬‬

‫ارﺗﺑﺎط ذاﺗﻲ ﻣوﺟب‬

‫‪0 < DW < dL‬‬

‫‪6‬‬

‫ﻣﻣﺎ ﺗﻘدم ﻧﺟد أن ھﻧﺎك ﺛﻼث ﻧﺗﺎﺋﺞ ﻟﻼﺧﺗﺑﺎر‪:‬‬ ‫‪ .١‬ﻻ ﯾوﺟد ارﺗﺑﺎط ذاﺗﻲ ﻓﻲ اﻟﺣﺎﻟﺗﯾن ‪. 3 ,4‬‬ ‫‪ .٢‬ﻗرار ﻏﯾر ﻣﺣدد أي ﻻﯾﻣﻛن اﻟﺟزم ﺑوﺟود أو ﻋ دم وﺟ ود ارﺗﺑ ﺎط ذاﺗ ﻲ وذﻟ ك‬ ‫ﯾﺳﺗﻠزم إﺿﺎﻓﺔ ﺑﯾﺎﻧﺎت إﻟﻰ اﻟﺳﻠﺳﻠﺔ اﻟزﻣﻧﯾﺔ إن أﻣﻛن ﻛﻣﺎ ﻓﻲ اﻟﺣﺎﻟﺗﯾن ‪.2,5‬‬ ‫‪ .٣‬وﺟ ود ارﺗﺑ ﺎط ذاﺗ ﻲ ﺳ ﺎﻟب ﻛﻣ ﺎ ﻓ ﻲ اﻟﺣﺎﻟ ﺔ اﻻوﻟ ﻰ أو وﺟ ود ارﺗﺑ ﺎط ذاﺗ ﻲ‬ ‫ﻣوﺟب ﻛﻣﺎ ﻓﻲ اﻟﺣﺎﻟﺔ اﻟﺳﺎدﺳﺔ‪.‬‬ ‫‪٢٦١‬‬


‫ﻣﺛﺎل)‪(١١-٥‬‬ ‫ﺗﺑ ﯾن اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﻗ ﯾم ﻟﻣﺗﻐﯾ رﯾن ‪ x, Y‬ﻧﺎﺗﺟ ﮫ ﻣ ن ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ‪.‬‬ ‫اﻟﻣطﻠوب إﺟراء اﺧﺗﺑﺎر ﻟﻼرﺗﺑﺎط اﻟذاﺗﻲ ﻣﺳﺗﺧدﻣﺎ ً ﻣﺳﺗوي ﻣﻌﻧوﯾﺔ ‪   0.05‬وأذﻛر‬ ‫اﻟﻔرﺿﯾﺎت اﻟﺑدﯾﻠﺔ وﻗﺎﻋدة اﻟﻘرار واﻟﻧﺗﯾﺟﺔ‪.‬‬ ‫‪12‬‬

‫‪15‬‬

‫‪17‬‬

‫‪9‬‬

‫‪8‬‬

‫‪13‬‬

‫‪12‬‬

‫‪7‬‬

‫‪15‬‬

‫‪10‬‬

‫‪14‬‬

‫‪18‬‬

‫‪x‬‬

‫‪12‬‬

‫‪18‬‬

‫‪20‬‬

‫‪12‬‬

‫‪11‬‬

‫‪17‬‬

‫‪10‬‬

‫‪10‬‬

‫‪16‬‬

‫‪14‬‬

‫‪11‬‬

‫‪20‬‬

‫‪y‬‬

‫اﻟﺣــل ‪:‬‬ ‫أوﻻ‪ :‬ﻹﺧﺗﺑ ﺎرﻓرض اﻟﻌ دم ‪ H 0 :   0‬ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ‪ H1 :   0 :‬ﯾ ﺗم‬ ‫إﯾﺟ ﺎد ﺗﻘ دﯾرات ﻣﻌ ﺎﻟم ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺑﺳ ﯾط ﺑطرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى‬ ‫ﺣﯾث‪:‬‬ ‫‪y i 171‬‬ ‫‪‬‬ ‫‪ 14.25‬‬ ‫‪n‬‬ ‫‪12‬‬ ‫‪x i 150‬‬ ‫‪x‬‬ ‫‪‬‬ ‫‪ 12.5‬‬ ‫‪n‬‬ ‫‪12‬‬ ‫‪ xi  yi‬‬ ‫)‪(171)(150‬‬ ‫‪2255 ‬‬ ‫‪ x i yi ‬‬ ‫‪n‬‬ ‫‪12‬‬ ‫‪b1 ‬‬ ‫‪‬‬ ‫‪2‬‬ ‫‪(171) 2‬‬ ‫) ‪2 ( x i‬‬ ‫‪2010 ‬‬ ‫‪ xi ‬‬ ‫‪12‬‬ ‫‪n‬‬ ‫‪117 .5‬‬ ‫‪‬‬ ‫‪ 0.87037 ,‬‬ ‫‪135‬‬ ‫‪b 0  y  b1 x  3.37037‬‬ ‫‪y‬‬

‫وﺑﺎﻟﺗﺎﻟﻲ ﻓﺈن ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ‪:‬‬ ‫‪yˆ  3.37037  0.87037 x.‬‬

‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗ ﺎﻟﻰ اﻟﻘ ﯾم اﻟﻼزﻣ ﺔ ﻟﺣﺳ ﺎب ﻗﯾﻣ ﺔ ﻻﺣﺻ ﺎء درﺑ ن ‪ -‬واﺗﺳ ون ‪ .‬وﻣ ن‬ ‫اﻟﻘﯾم اﻟواردة ﺑﺎﻟﺟدول ﯾﺗم ﺣﺳﺎب ‪ DW‬ﻋﻠﻰ اﻟﻧﺣو اﻟﺗﺎﻟﻲ ‪:‬‬

‫‪٢٦٢‬‬


‫‪150.794‬‬ ‫‪ 2.69363‬‬ ‫‪55.9815‬‬

‫‪(e i  e i 1 ) 2‬‬ ‫‪‬‬

‫‪n‬‬ ‫‪‬‬ ‫‪i 2‬‬

‫‪n 2‬‬ ‫‪ ei‬‬ ‫‪i 1‬‬

‫‪DW ‬‬

‫ﻗﯾﻣﺗ ﻲ ‪ d U , d L‬ﻣ ن ﺟ دول درﺑ ن‪ -‬واﺗﺳ ون ﻓ ﻲ ﻣﻠﺣ ق )‪) (٨‬ﻓ ﻰ ﻛﺗ ﺎب اﻻﻧﺣ دار‬ ‫ﻟﻠ دﻛﺗورة ﺛ روت (ﻋﻧ د ﻣﺳ ﺗوي ﻣﻌﻧوﯾ ﺔ ‪   0.05‬و ‪ ) k  1 , n  15‬ﻟﻌ دم وﺟ ود‬ ‫ﻗﯾﻣﺔ ﻋﻧد ‪(n=12‬ھﻲ‪d L  1.08 , d U  1.36 :‬‬ ‫ﻧﻼﺣ ظ أن ﻗﯾﻣ ﺔ ‪ DW‬ﺗﻘ ـﻊ ﺑ ﯾن ‪ 4  d L‬و ‪ 4  d U‬أي ﺑ ﯾن ‪, 4  1.36 4  1.08‬‬ ‫أي ﺑﯾن ‪ 2.92‬و ‪ 2.64‬ﻓ ﻲ ﻣﻧطﻘ ﺔ ﻗ رار ﻏﯾ ر ﻣﺣ دد أي أﻧ ﮫ ﻻ ﯾﻣﻛ ن اﻟﺣﻛ م ﻋﻠ ﻰ‬ ‫ﻗﯾﻣﺔ ‪ .DW‬ﻓﻲ ھذه اﻟﺣﺎﻟﺔ ﻓﺈﻧﻧﺎ ﻧﺣﺗﺎج اﻟﻰ ﻣزﯾ د ﻣ ن اﻟﻣﺷ ﺎھدات‪ .‬وﻓ ﻰ ﺣﺎﻟ ﺔ ﺑﯾﺎﻧ ﺎت‬ ‫ﺳﻼﺳل زﻣﻧﯾﺔ ﻗد ﯾﻛون ﻣن اﻟﻣﺳﺗﺣﯾل‪ ،‬ﺑﺎﻟطﺑﻊ ‪ ،‬اﻟﺣﺻول ﻋﻠﻰ ﻣزﯾد ﻣ ن اﻟﺑﯾﺎﻧ ﺎت او‬ ‫ﻣن اﻟﻣﻣﻛن أن ﺗﺗواﻓر اﻟﻣﺷﺎھدات اﻟﻣطﻠوﺑﺔ ﻓﻲ اﻟﻣﺳﺗﻘﺑل ﻣﻣ ﺎ ﯾ ؤدي إﻟ ﻰ ﺗ ﺎﺧﯾر ﻛﺑﯾ ر‬ ‫ﻋﻧد اﻻﻧﺗظﺎر ﻟﻠﺣﺻول ﻋﻠﯾﮭﺎ‪.‬‬ ‫‪e i2‬‬

‫‪(e i  e i 1 ) 2‬‬

‫‪e i 1‬‬

‫‪0.9273‬‬

‫‪-‬‬

‫‪-‬‬

‫‪20.757‬‬

‫‪30.4527‬‬

‫‪0.9624‬‬

‫‪-4.556‬‬

‫‪3.7079‬‬

‫‪42.0111‬‬

‫‪-4.556‬‬

‫‪12.0744 1.9256‬‬

‫‪10‬‬

‫‪0.1818‬‬

‫‪5.5319‬‬

‫‪16.426 -0.4264 1.9256‬‬

‫‪15‬‬

‫‪16‬‬

‫‪0.2882‬‬

‫‪0.9278‬‬

‫‪0.5360 -0.4264‬‬

‫‪9.4632‬‬

‫‪7‬‬

‫‪10‬‬

‫‪14.5558‬‬

‫‪18.7379‬‬

‫‪13.8152 -3.8152 0.5368‬‬

‫‪12‬‬

‫‪10‬‬

‫‪5.3564‬‬

‫‪37.5770‬‬

‫‪14.6856 2.3144 -3.8152‬‬

‫‪13‬‬

‫‪17‬‬

‫‪0.4409‬‬

‫‪2.7238‬‬

‫‪2.3144‬‬

‫‪0.664‬‬

‫‪10.336‬‬

‫‪8‬‬

‫‪11‬‬

‫‪0.6336‬‬

‫‪0.0174‬‬

‫‪0.664‬‬

‫‪0.796‬‬

‫‪11.204‬‬

‫‪9‬‬

‫‪12‬‬

‫‪3.3592‬‬

‫‪1.0750‬‬

‫‪0.796‬‬

‫‪18.1672 1.8328‬‬

‫‪17‬‬

‫‪20‬‬

‫‪2.4762‬‬

‫‪0.0672‬‬

‫‪1.832‬‬

‫‪16.4264 1.5736‬‬

‫‪15‬‬

‫‪18‬‬

‫‪ei‬‬

‫‪yˆ i‬‬

‫‪xi‬‬

‫‪yi‬‬

‫‪19.0376 0.9624‬‬

‫‪18‬‬

‫‪20‬‬

‫‪15.556‬‬

‫‪14‬‬

‫‪11‬‬ ‫‪14‬‬

‫‪٢٦٣‬‬


12

12

13.8152 -1.8252 1.5736

11.4840

3.2950

(١٢-٥) ‫ﻣﺛﺎل‬ ( ٣-٥ ‫ واﺗﺴﻮن ﻟﻼرﺗﺒﺎط اﻟﺬاﺗﻰ ﻟﻠﺒﻮاﻗﻰ )ﻣﺜﺎل‬- ‫إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ﻻﺧﺘﺒﺎر درﺑﻦ‬ X1={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.48,4.53,4.5 5,4.62,5.86}; X2={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264,0.270,0.24 0,0.259,0.252,0.258,0.293}; X3={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.274,0.26 4,0.280,0.266,0.268,0.286}; y={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0.512,0.405 ,0.450,0.480,0.456,0.506};

: ‫اﻟﺣل‬ ‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`LinearRegression`

‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}]; Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>DurbinWatsonD] {DurbinWatsonD2.09999}

‫ﻣن ھذا اﻟﻣﺛﺎل ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬

‫ واﺗﺳون‬-‫ﻗﯾﻣﺔ دارﺑن‬

dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],win pct[[i]]},{i,1,Length[winpct]}];

٢٦٤


Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>DurbinWatsonD] ‫واﻟﻤﺨﺮج ھو‬ {DurbinWatsonD2.09999}

‫ ﻹﺧﺗﺑﺎرﻓرض اﻟﻌدم‬: ‫ واﺗﺳون ﻛﻣﺎ ذﻛرﻧﺎ ﺳﺎﺑﻘﺎ ﻻﺧﺗﺑﺎر‬-‫واﻟﻣطﻠوب اﺳﺗﺧدام ﻟﺟداول دارﺑن‬ H1 :   0 : ‫ ﺿد اﻟﻔرض اﻟﺑدﯾل‬H 0 :   0 ‫( ﻣﺷﻛﻠﺔ ﻋدم اﻟﺧطﯾﺔ‬٧-٤-٥) ‫ واﻟ ذي ﯾﻣﻛ ن ان‬j  1,2,  , k ‫ ﺣﯾ ث‬x i ‫رﺳم اﻟﺑواﻗﻲ ﻣﻘﺎﺑل ﻛل ﻣﺗﻐﯾر ﻣﺳ ﺗﻘل‬ ‫ﯾﻘدم ﻣﻌﻠوﻣﺎت اﺿﺎﻓﯾﺔ ﺣول ﺻ ﻼﺣﯾﺔ ﻧﻣ وذج اﻻﻧﺣ دار ﺑﺎﻟﻧﺳ ﺑﺔ ﻟ ذﻟك اﻟﻣﺗﻐﯾ ر‬ ‫اﻟﻣﺳ ﺗﻘل ) ﻣ ﺛﻼ ﻗ د ﻧﺣﺗ ﺎج اﻟ ﻰ ﺗﻣﺛﯾ ل ﻣﻧﺣﻧ ﻰ ﻟﺗ ﺄﺛﯾر ذﻟ ك اﻟﻣﺗﻐﯾ ر ( وﺣ ول‬ ٠‫ﺗﻐﯾرات ﻣﻣﻛﻧﺔ ﻓﻲ ﻣﻘدار ﺗﺑﺎﯾن اﻟﺧطﺄ ﻓﯾﻣﺎ ﯾﺗﻌﻠق ﺑذﻟك اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل‬ (١٣-٥)‫ﻣﺛﺎل‬ (١٢-٥) ‫ﻟﮭذا اﻻﺧﺗﺑﺎر ﺳوف ﻧﺳﺗﺧدم اﻟﻣﺛﺎل‬ ‫ وذﻟ ك ﺑﺎﺳ ﺗﺧدام‬Mathematica ‫ﺳ وف ﯾ ﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻛﺗ وب ﺑﻠﻐ ﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`LinearRegression`

. ‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}]; multiSTerr=Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3}, RegressionReport->StandardizedResiduals][[1,2]] {0.659547,0.804585,-0.873353,-1.05465,1.17717,1.21243,1.29964,-1.40762,0.64024,-0.827745,0.138544,1.42698,0.430921,0.268724} eps=(Max[teamera]Min[teamera])/Length[teamera];ListPlot[Transpose[{teamera ,multiSTerr}],Prolog->{PointSize[0.02]},AxesOrigin>{Min[teamera]-eps,0},PlotRange->{{Min[teamera]eps,Max[teamera]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}] ٢٦٥


1.5 1 0.5

3.5

4

4.5

5

5.5

6

-0.5 -1 -1.5

Graphics eps=(Max[ownbavg]-Min[ownbavg])/Length[ownbavg]; ListPlot[Transpose[{ownbavg,multiSTerr}],Prolog>{PointSize[0.02]},AxesOrigin->{Min[ownbavg]eps,0},PlotRange->{{Min[ownbavg]eps,Max[ownbavg]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}] 1 0.5

0.24

0.25

0.26

0.27

0.28

0.29

-0.5 -1

Graphics eps=(Max[oppbavg]-Min[oppbavg])/Length[oppbavg]; ListPlot[Transpose[{oppbavg,multiSTerr}],Prolog>{PointSize[0.02]},AxesOrigin->{Min[oppbavg]eps,0},PlotRange->{{Min[oppbavg]eps,Max[oppbavg]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}]

٢٦٦


1 0.5

0.24

0.25

0.26

0.27

0.28

-0.5 -1

Graphics  

‫ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

r

‫ ﻣﻘﺎﺑل‬x1 ‫رﺳم‬

eps=(Max[teamera]Min[teamera])/Length[teamera];ListPlot[Transpose[{teamera ,multiSTerr} ],Prolog->{PointSize[0.02]},AxesOrigin->{Min[teamera]eps,0},PlotRange->{{Min[teamera]eps,Max[teamera]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}]

‫ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

r ‫ ﻣﻘﺎﺑل‬x2 ‫رﺳم‬ eps=(Max[ownbavg]-Min[ownbavg])/Length[ownbavg]; ListPlot[Transpose[{ownbavg,multiSTerr}],Prolog>{PointSize[0.02]},AxesOrigin->{Min[ownbavg]eps,0},PlotRange->{{Min[ownbavg]eps,Max[ownbavg]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}]

‫ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

r ‫ ﻣﻘﺎﺑل‬x3 ‫رﺳم‬ eps=(Max[oppbavg]-Min[oppbavg])/Length[oppbavg]; ListPlot[Transpose[{oppbavg,multiSTerr}],Prolog>{PointSize[0.02]},AxesOrigin->{Min[oppbavg]eps,0},PlotRange->{{Min[oppbavg]eps,Max[oppbavg]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}]

‫ﻣ ن اﻟرﺳ وم اﻟﺳ ﺎﺑﻘﺔ ﯾﺗﺿ ﺢ ﻋ دم وﺟ ود ﻣﺷ ﻛﻠﺔ اﻻرﺗﺑ ﺎط وذﻟ ك ﻻن ﺷ ﻛل‬ .‫اﻻﻧﺗﺷﺎر ﻋﺷواﺋﻰ ﻓﻰ ﺟﻣﯾﻊ اﻟرﺳوم‬ ‫( اﻻرﺗﺑﺎط اﻟﺧطﻰ اﻟﻣﺗﻌدد وطرق اﻟﻛﺷف ﻋﻠﯾﮫ‬٨-٤-٥) ٢٦٧


‫ﺗﻣﯾ ل اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ ﻓ ﻲ اﻟﻌدﯾ د ﻣ ن اﻟدراﺳ ﺎت ﻓ ﻲ ﻣﺟ ﺎل اﻻﻋﻣ ﺎل ‪،‬‬ ‫اﻻﻗﺗﺻ ﺎد ‪ ،‬واﻟﻌﻠ وم اﻻﺟﺗﻣﺎﻋﯾ ﺔ واﻟﺑﯾوﻟوﺟﯾ ﺔ ‪ ،‬اﻟ ﻲ ان ﺗﻛ ون ﻣرﺗﺑط ﺔ ﻓﯾﻣ ﺎ ﺑﯾﻧﮭ ﺎ‬ ‫وﻣرﺗﺑطﺔ ﻣﻊ ﻣﺗﻐﯾرات اﺧرى ذات ﺻﻠﺔ ﺑﺎﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ وﻏﯾر ﻣوﺟوده ﻓ ﻲ اﻟﻧﻣ وذج‪.‬‬ ‫ﻋﻠﻲ ﺳﺑﯾل اﻟﻣﺛﺎل ‪ ،‬ﻓﻲ إﻧﺣدار ﻧﻔﻘﺎت اﻟطﻌﺎم ﻟﻼﺳره ﻋﻠﻲ اﻟﻣﺗﻐﯾرات اﻟﻣﺳ ﺗﻘﻠﮫ‪ :‬دﺧ ل‬ ‫اﻻﺳ ره ‪ ،‬ﺗ وﻓﯾرات اﻻﺳ ره ‪ ،‬وﻋﻣ ر رب اﻷﺳ ره ‪ ،‬ﺳ ﺗﻛون اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﮫ‬ ‫ﻣرﺗﺑط ﮫ ﻓﯾﻣ ﺎ ﺑﯾﻧﮭ ﺎ‪ .‬وأﻛﺛ ر ﻣ ن ذﻟ ك ﺳ ﺗﻛون اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﮫ ﻣرﺗﺑط ﮫ اﯾﺿ ﺎ‬ ‫ﺑﻣﺗﻐﯾرات اﺟﺗﻣﺎﻋﯾﺔ – اﻗﺗﺻﺎدﯾﺔ ﻏﯾر ﻣوﺟوده ﻓﻲ اﻟﻧﻣوذج وﻟﮭﺎ ﺗﺎﺛﯾرھ ﺎ ﻋﻠ ﻲ ﻧﻔﻘ ﺎت‬ ‫طﻌﺎم اﻻﺳره ‪ ،‬ﻣﺛل ﺣﺟم اﻻﺳ ره‪ .‬وﻋﻧ دﻣﺎ ﺗﻛ ون اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﮫ ﻣرﺗﺑط ﺔ ﻓﯾﻣ ﺎ‬ ‫ﺑﯾﻧﮭﺎ ﯾﻘﺎل اﻧﮫ ﯾوﺟد ارﺗﺑﺎط ﺧطﻲ ﻣﺗﻌدد ﻓﯾﻣﺎ ﺑﯾﻧﮭﺎ‪.‬‬ ‫)ا(ﻋواﻣل اﻟﺗﺿﺧم‬ ‫ﺗﺳ ﻣﻲ اﻟﻌﻧﺎﺻ ر اﻟﻘطرﯾ ﺔ ﻓ ﻲ اﻟﻣﺻ ﻔوﻓﺔ ‪) X'X-1‬واﻟﺗ ﻲ ﻋﻠ ﻲ ﺷ ﻛل ﻣﺻ ﻔوﻓﺔ‬ ‫اﻻرﺗﺑﺎط( ﻋواﻣل ﺗﺿ ﺧم اﻟﺗﺑ ﺎﯾن )‪ (VIFi‬ﺣﯾ ث ﯾﻣﻛ ن اﻋﺗﺑ ﺎرھم ﻣﻘﯾ ﺎس ھ ﺎم ﻟﻠﻛﺷ ف‬ ‫ﻋن اﻻرﺗﺑﺎط اﻟﺧطﻲ‪ .‬وﻋﻠﻰ ذﻟك اﻟﻌﻧﺻر‪ cii‬رﻗم ‪ i‬ﻋﻠﻲ اﻟﻘطر ﻟﻠﻣﺻﻔوﻓﺔ ‪ C‬ﯾﻣﻛن‬ ‫ﻛﺗﺎﺑﺗﮫ ﻋﻠﻲ اﻟﺷﻛل ‪ ، c ii  (1  R i2 ) 1‬ﺣﯾث ‪ R i2‬ھو ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟذي ﻧﺣﺻل‬ ‫ﻋﻠﯾﮫ ﻟﻧﻣوذج اﻧﺣدار اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل رﻗم ‪ i‬ﻋﻠ ﻲ ﺑﻘﯾ ﺔ اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﮫ وﻋ ددھﺎ‬ ‫‪ .k-1‬ﯾﻣﻛن ﺗﻌرﯾف ﻣﻌﺎﻣل ﺗﺿﺧم اﻟﺗﺑﺎﯾن ﻛﺎﻟﺗﺎﻟﻲ‪:‬‬ ‫‪VIFi  c ii  (1  R i2 ) 1‬‬

‫ﻛﺑر واﺣد أو اﻛﺛر ﻣن ‪ VIF‬ﯾدل ﻋﻠﻲ وﺟود اﻻرﺗﺑﺎط اﻟﺧطﻲ‪ .‬ﺗدل اﻟﺧﺑره اﻟﺗﺟرﯾﺑﯾ ﺔ‬ ‫ﻋﻠﻲ أن أي واﺣد ﻣن ‪ VIF‬ﯾزﯾ د ﻋ ن ‪ 10‬ﯾﻛ ون ﻣؤﺷ ر ﻋﻠ ﻲ أن ﻣﻌ ﺎﻣﻼت اﻻﻧﺣ دار‬ ‫ﺗﻘ دﯾرھﺎ ﻏﯾ ر دﻗﯾ ق ﺑﺳ ﺑب وﺟ ود اﻻرﺗﺑ ﺎط اﻟﺧط ﻲ‪ .‬ﯾﺄﺧ ذ ﻋﺎﻣ ل اﻟﺗﺿ ﺧم ﻗﯾﻣ ﺎ ﻏﯾ ر‬ ‫ﺳﺎﻟﺑﮫ أى ان ‪VIF  0‬‬ ‫)ب(ﺗﺣﻠﯾل اﻟﻘﯾم اﻟﻣﻣﯾزة‬ ‫ﯾﻣﻛ ن اﺳ ﺗﺧدام اﻟﻘ ﯾم اﻟﻣﻣﯾ زه ﻟﻠﻣﺻ ﻔوﻓﺔ ‪ ، 1 ,  2 ,...,  k , X' X‬ﻛﻣﻘﯾ ﺎس‬ ‫ﻟوﺟود اﻻرﺗﺑﺎط اﻟﺧطﻲ ﻓﻲ اﻟﺑﯾﺎﻧﺎت ‪ .‬ﻋﻧد وﺟود واﺣد أو اﻛﺛر ﻣن اﻟﻣﺗﻐﯾرات ﺑﯾﻧﮭﻣﺎ‬ ‫ارﺗﺑﺎط ﺧطﻲ ﻗوي ﻓﺈن واﺣد أو اﻛﺛر ﻣن اﻟﻘﯾم اﻟﻣﻣﯾزة ﺳوف ﺗﻛون ﺻ ﻐﯾرة‪ .‬ﺑﻌ ض‬ ‫اﻟﻣﺣﻠﻠ ﯾن ﯾﻔﺿ ﻠون اﺧﺗﺑ ﺎر رﻗ م اﻟﺣﺎﻟ ﺔ ‪ condition number‬ﻟﻠﻣﺻ ﻔوﻓﺔ ‪X'X‬‬ ‫واﻟﻣﻌرف ﻛﺎﻟﺗﺎﻟﻲ‪:‬‬ ‫‪ max‬‬ ‫‪ min‬‬

‫‪w‬‬

‫ﺣﯾث ‪  max‬اﻛﺑر ﻗﯾﻣﺔ ﻣﻣﯾزة و ‪  min‬اﺻﻐر ﻗﯾﻣﺔ ﻣﻣﯾزة ‪.‬ﻋﻣوﻣﺎ إذا ﻛﺎن رﻗم‬ ‫اﻟﺣﺎﻟ ﺔ اﻗ ل ﻣ ن ‪ 100‬ﻓﮭ ذا ﯾ دل ﻋﻠ ﻲ ﻋ دم وﺟ ود ﻣﺷ ﻛﻠﺔ اﻻرﺗﺑ ﺎط اﻟﺧط ﻲ‪ .‬ارﻗ ﺎم‬ ‫اﻟﺣﺎﻟﺔ ﺑﯾن ‪ 1000 , 100‬ﺗدل ﻋﻠﻲ ارﺗﺑﺎط ﺧط ﻲ ﻗ وى وﻋﻧ دﻣﺎ ﺗزﯾ د ‪ w‬ﻋ ن ‪1000‬‬ ‫ﻓﮭذا ﯾدل ﻋﻠﻲ وﺟود ارﺗﺑﺎط ﺧطﻲ ﻗوي ﺟدا‪ ،‬وﻗد ﯾﺳﺗﺧدم ﺟذر اﻟرﻗم اﻟﺳﺎﺑق اى ‪:‬‬

‫‪٢٦٨‬‬


 max  min

‫ واﻟ ذى ﯾ ﺗم ﺣﺳ ﺎﺑﮫ‬condition index ‫وھﻧ ﺎك ﻣﻘﯾ ﺎس آﺧ ر ﯾﺳ ﻣﻰ ﻣؤﺷ ر اﻟﺣﺎﻟ ﺔ‬ :‫ﻛﻣﺎﯾﻠﻰ‬ w *i 

 max i

: ‫وﻗد ﯾﺳﺗﺧدم ﺟذر اﻟرﻗم اﻟﺳﺎﺑق اى‬  max i

.‫ ﯾدل ﻋﻠﻰ وﺟود ارﺗﺑﺎط ﺧطﻲ‬30 ‫واى رﻗم ﯾزﯾد ﻋﻠﻰ‬ (١٤-٥)‫ﻣﺛﺎل‬ ‫ﻟﮭذا اﻻﺧﺗﺑﺎر ﺳوف ﻧﺳﺗﺧدم اﻟﻣﺛﺎل اﻟﺳﺎﺑق‬ ‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`LinearRegression`

‫وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت‬ <<Statistics`LinearRegression` teamera={3.33,3.51,3.55,3.65,3.80,4.20,4.22,4.27,4.31,4.4 8,4.53,4.55,4.62,5.86}; ownbavg={0.276,0.249,0.249,0.260,0.271,0.241,0.269,0.264, 0.270,0.240,0.259,0.252,0.258,0.293}; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270, 0.274,0.264,0.280,0.266,0.268,0.286}; winpct={0.625,0.512,0.488,0.524,0.588,0.475,0.513,0.463,0 .512,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i] ],winpct[[i]]},{i,1,Length[winpct]}]; Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>VarianceInflation] {VarianceInflation{0.,4.17858,1.14993,3.95366}} Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>EigenstructureTable]

٢٦٩


‫‪x3‬‬ ‫‪0.0508254‬‬ ‫‪‬‬ ‫‪0.0338397‬‬ ‫‪0.915335‬‬

‫‪x2‬‬ ‫‪0.0649444‬‬ ‫‪0.899539‬‬ ‫‪0.035517‬‬

‫‪x1‬‬ ‫‪0.0505137‬‬ ‫‪0.0147281‬‬ ‫‪0.934758‬‬

‫‪Index‬‬ ‫‪1.‬‬ ‫‪1.58955‬‬ ‫‪3.9427‬‬

‫‪EigenV‬‬ ‫‪2.05464‬‬ ‫‪EigenstructureTable‬‬ ‫‪0.813183‬‬ ‫‪0.132175‬‬

‫ﻗﯾم ‪ VIF‬ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>VarianceInflation‬‬

‫وﺑﻣﺎ ان ﻛل ﻗﯾم ‪ VIF‬ﻻ ﺗزﯾد ﻋن ‪ 10‬ﻓﮭ ذا ﯾﻌﻧ ﻰ ﻋ دم وﺟ ود ﻣﺷ ﻛﻠﺔ ارﺗﺑ ﺎط ﺧط ﻰ‬ ‫ﺑﯾن اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ‪.‬‬

‫اﻻﻣر‬ ‫‪Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport‬‬‫]‪>EigenstructureTable‬‬

‫ﯾ ؤدى إﻟ ﻰ اﻟﺣﺻ ول ﻋﻠ ﻰ ﺟ دول ﯾﺣﺗ وى اﻟﻌﻣ ود اﻻول ﻟ ﮫ ﻋﻠ ﻰ اﻟﻘ ﯾم اﻟﻣﻣﯾ زة‬ ‫‪1 , 2 , 3‬‬

‫ﺣﯾ ث‬

‫‪1  2.05464,  2  .813183,  3  .132175‬‬

‫و ﻗ ﯾم‬

‫اﻟﻌﻣود اﻟﺛﺎﻧﻰ ‪1,1.58955,3.9427‬وﺑﻣﺎ ان اﻛﺑر ﻗﯾﻣﺔ ل‬

‫‪ max‬‬ ‫‪i‬‬ ‫‪ max‬‬ ‫‪i‬‬

‫اﻟﻣﻘﺎﺑﻠ ﺔ ﻟﮭ ﺎ ﻓ ﻰ‬

‫ﻻ ﺗزﯾد ﻋن ‪30 30‬‬

‫ﻓﮭذا ﯾﻌﻧﻰ ﻋدم وﺟود ﻣﺷﻛﻠﺔ ارﺗﺑﺎط ﺧطﻰ ﺑﯾن اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ‪.‬‬

‫)‪ (٥-٥‬ﻧﻣﺎزج اﻻﻧﺣدار اﻟﻐﯾر ﺧطﯾﺔ‬ ‫ﯾﺗﻧﺎول ھذا اﻟﻔﺻل ﻣﻘدﻣﮫ ﻣﺧﺗﺻره ﻋن ﻣﺷﺎﻛل اﻟﺗﻘدﯾر ﻟﻠﻧﻣﺎذج اﻟﻐﯾر ﺧطﯾﮫ ‪.‬ﻓﻲ‬ ‫اﻟﻔﺻل اﻟﺳﺎﺑق ﻛ ﺎن اھﺗﻣﺎﻣﻧ ﺎ ﺑﺗوﻓﯾ ق ﻧﻣ ﺎذج اﻻﻧﺣ دار ‪ ،‬ﺑﺈﺳ ﺗﺧدام طرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت‬ ‫اﻟﺻﻐري ‪ ،‬واﻟﺗﻰ ﺗﻛون ﺧطﯾﮫ ﻓﻲ اﻟﻣﻌﺎﻟم وﻋﻠﻲ اﻟﺷﻛل‪:‬‬ ‫‪٢٧٠‬‬


‫‪Y  0  0 X1  2 X 2  ...   p X p   .‬‬

‫وﺑﺎﻟرﻏم ﻣن أن اﻟﻧﻣوذج اﻟﺳ ﺎﺑق ﯾﻣﺛ ل أﻧ واع ﻋدﯾ ده ﻣ ن اﻟﻌﻼﻗ ﺎت ﻓ ﺈن ھﻧ ﺎك ﺣ ﺎﻻت‬ ‫ﯾﻛون ﻓﯾﮭﺎ ھذا اﻟﻧﻣوذج ﻏﯾر ﻣﻧﺎﺳ ب‪ .‬ﻋﻠ ﻲ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ‪ ،‬إذا ﻛﺎﻧ ت ھﻧ ﺎك ﻣﻌﻠوﻣ ﺎت‬ ‫ﻣﺗ وﻓره ﻋ ن ﺷ ﻛل اﻟﻌﻼﻗ ﺔ ﺑ ﯾن اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ واﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﮫ ﻻ ﺗﻣﺛ ل ﺑﮭ ذا‬ ‫اﻟﻧﻣوذج‪.‬‬ ‫ﯾﻛﺗب ﻧﻣوذج اﻻﻧﺣدار اﻟﻐﯾر ﺧطﻲ ﻋﻠﻲ اﻟﺻورة اﻟﺗﺎﻟﯾﮫ‪:‬‬ ‫‪Y j  f ( x j , )  j , j ,2,..., n.‬‬

‫ﺣﯾ ث ﺣ د اﻟﺧط ﺄ اﻟﻌﺷ واﺋﻲ ﻟ ﮫ ‪ . Var ( j )   2 , E( j )  0‬ﻋ ﺎدة ﯾﻔﺗ رض أن‬ ‫‪ j‬ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ‪ .‬اﻟداﻟﮫ ‪ f‬ھﻲ داﻟﮫ اﻟﺗوﻗﻊ او ﻧﻣوذج اﻧﺣدار اﻟﻣﺟﺗﻣ ﻊ ﺣﯾ ث‬ ‫‪ x j‬ﻗﯾﻣﺔ ﻣن ﻣﺗﻐﯾرات اﻻﻧﺣدار و ‪ ‬ﻣﺗﺟﮫ ﻣن اﻟدرﺟ ﺔ )‪ (k x 1‬ﻣ ن اﻟﻣﻌ ﺎﻟم اﻟﻐﯾ ر‬ ‫ﻣﻌﻠوﻣ ﮫ‪ .‬اﯾﺿ ﺎ ﯾﻼﺣ ظ أن ﺣ د اﻟﺧط ﺄ ﺗﺟﻣﯾﻌ ﻲ ‪ .additive‬ﯾﻼﺣ ظ أن ھﻧ ﺎك ﺗﺷ ﺎﺑﮫ‬ ‫ﻛﺑﯾر ﺑﯾن ھ ذا اﻟﻧﻣ وذج واﻟﻧﻣ وذج اﻟﺧط ﻲ ﻓﯾﻣ ﺎ ﻋ دا أن ) ‪ E(Yj‬داﻟ ﮫ ﻏﯾ ر ﺧطﯾ ﮫ ﻓ ﻲ‬ ‫اﻟﻣﻌﺎﻟم‪.‬‬ ‫اﻵن ﻓﻲ ﻧﻣﺎذج اﻻﻧﺣ دار اﻟﻐﯾ ر ﺧط ﻲ ﻓ ﺈن واﺣ د ﻋﻠ ﻲ اﻷﻗ ل ﻣ ن ﻣﺷ ﺗﻘﺎت داﻟ ﮫ‬ ‫اﻟﺗوﻗﻊ ﺑﺎﻟﻧﺳﺑﺔ ﻟﻠﻣﻌﺎﻟم ﺗﻌﺗﻣد ﻋﻠﻲ واﺣد ﻋﻠﻲ اﻻﻗل ﻣن اﻟﻣﻌﺎﻟم اﻣﺎ ﻓﻰ ﻧﻣﺎذج اﻻﻧﺣدار‬ ‫اﻟﺧطﯾﮫ ﻓﺈن اﻟﻣﺷﺗﻘﺎت ﻻ ﺗﻛون دوال ﻓﻲ ‪. ' s‬‬ ‫ان اﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ﻟﺗﻘ دﯾر ﻣﻌ ﺎﻟم اﻟﻧﻣ وزج اﻟﻐﯾ ر ﺧط ﻰ ﺗﺣﺗ ﺎج‬ ‫اﻟﻰ ﻋﻣﻠﯾﺎت ﻛﺛﯾرة وﻟﮭﺎ ﺑﻌض اﻟﻌﯾوب‪ .‬اﻟطرﯾﻘﺔ اﻻﻛﺛر اﻧﺗﺷﺎرا ﻓﻲ اﻟﺑراﻣﺞ اﻟﺟﺎھزه‬ ‫ﻋﻠﻲ اﻟﺣﺎﺳب اﻵﻟﻲ واﻟﻣﺗﺧﺻﺻﮫ ﻓﻲ اﻻﻧﺣدار اﻟﻐﯾر ﺧطﻲ ھﻲ طرﯾﻘﺔ اﻟﺗﻛرارات ﻟـ‬ ‫ﺟ ﺎوس – ﯾﻧ وﺗن ‪ . Gauss-Newlon‬وھﻧ ﺎك ﺑﻌ ض اﻟﺗﺣﺳ ﯾﻧﺎت ﻟﮭ ذه اﻟطرﯾﻘ ﺔ‬ ‫‪.‬ودون اﻟدﺧول ﻓﻰ اﻟﺗﻔﺎﺻﯾل ﺳوف ﻧوﺿﺢ ﻛﯾﻔﯾﺔ ﺗﻘ دﯾر ﻣﻌ ﺎﻟم اﻟﻧﻣ وزج اﻟﻐﯾ ر ﺧط ﻰ‬ ‫ﺑﺑرﻧ ﺎﻣﺞ ﺟ ﺎھز ﺑﺎﺳ ﺗﺧدام ‪ Mathematica‬ﻣ ن ﺧ ﻼل اﻟﻣﺛ ﺎﻟﯾﯾن اﻟﺗ ﺎﻟﯾﯾن ‪.‬وﻟﻠﺣﺻ ول‬ ‫ﻋﻠﻰ ﺗﻔﺎﺻﯾل اﻛﺛر ﯾﻣﻛن اﻟرﺟوع اﻟﻰ ﻛﺗﺎب اﻻﻧﺣدار ﻟﻠدﻛﺗورة ﺛروت‪.‬‬ ‫ﻣﺛﺎل)‪(١٥-٥‬‬ ‫ﻓﻰ ﺗﺟرﺑﮫ ﻟﻘﯾﺎس درﺟﺔ ﺣراره ﻛوب ﻣن اﻟﺷﺎي )‪ (y‬ﻋﻧد ازﻣ ﮫ ﻣﺧﺗﻠﻔ ﮫ )‪ (x‬ﺗ م‬ ‫اﻟﺣﺻول ﻋﻠﻲ اﻟﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬ ‫‪y‬‬

‫‪x‬‬

‫‪y‬‬

‫‪x‬‬

‫‪y‬‬

‫‪x‬‬

‫‪y‬‬

‫‪x‬‬

‫‪64.73‬‬

‫‪3‬‬

‫‪66.67‬‬

‫‪2‬‬

‫‪68.71‬‬

‫‪1‬‬

‫‪70.86‬‬

‫‪0‬‬

‫‪58.74‬‬

‫‪7‬‬

‫‪60.25‬‬

‫‪6‬‬

‫‪61.57‬‬

‫‪5‬‬

‫‪63.25‬‬

‫‪4‬‬

‫‪٢٧١‬‬


‫‪53.82‬‬

‫‪11‬‬

‫‪54.94‬‬

‫‪10‬‬

‫‪56.17‬‬

‫‪9‬‬

‫‪57.6‬‬

‫‪8‬‬

‫‪49.81‬‬

‫‪15‬‬

‫‪50.64‬‬

‫‪14‬‬

‫‪51.7‬‬

‫‪13‬‬

‫‪52.64‬‬

‫‪12‬‬

‫‪46.45‬‬

‫‪19‬‬

‫‪47.24‬‬

‫‪18‬‬

‫‪48.04‬‬

‫‪17‬‬

‫‪48.85‬‬

‫‪16‬‬

‫‪43.64‬‬

‫‪23‬‬

‫‪44.27‬‬

‫‪22‬‬

‫‪45.03‬‬

‫‪21‬‬

‫‪45.8‬‬

‫‪20‬‬

‫‪41.05‬‬

‫‪27‬‬

‫‪41.78‬‬

‫‪26‬‬

‫‪42.27‬‬

‫‪25‬‬

‫‪43.01‬‬

‫‪24‬‬

‫‪38.9‬‬

‫‪31‬‬

‫‪39.37‬‬

‫‪30‬‬

‫‪39.97‬‬

‫‪29‬‬

‫‪40.57‬‬

‫‪28‬‬

‫‪36.71‬‬

‫‪35‬‬

‫‪37.37‬‬

‫‪34‬‬

‫‪37.84‬‬

‫‪33‬‬

‫‪38.31‬‬

‫‪32‬‬

‫‪34.98‬‬

‫‪39‬‬

‫‪35.41‬‬

‫‪38‬‬

‫‪35.79‬‬

‫‪37‬‬

‫‪36.33‬‬

‫‪36‬‬

‫‪33.39‬‬

‫‪43‬‬

‫‪33.81‬‬

‫‪42‬‬

‫‪34.18‬‬

‫‪41‬‬

‫‪34.53‬‬

‫‪40‬‬

‫‪32.04‬‬

‫‪47‬‬

‫‪32.38‬‬

‫‪46‬‬

‫‪32.72‬‬

‫‪45‬‬

‫‪33.05‬‬

‫‪44‬‬

‫‪30.92‬‬

‫‪51‬‬

‫‪31.15‬‬

‫‪50‬‬

‫‪31.48‬‬

‫‪49‬‬

‫‪31.82‬‬

‫‪48‬‬

‫‪29.81‬‬

‫‪55‬‬

‫‪30.03‬‬

‫‪54‬‬

‫‪30.63‬‬

‫‪53‬‬

‫‪30.59‬‬

‫‪52‬‬

‫‪28.81‬‬

‫‪59‬‬

‫‪29.14‬‬

‫‪58‬‬

‫‪29.36‬‬

‫‪57‬‬

‫‪29.59‬‬

‫‪56‬‬

‫‪28.81‬‬

‫‪59‬‬

‫‪29.14‬‬

‫‪58‬‬

‫‪29.36‬‬

‫‪57‬‬

‫‪28.59‬‬

‫‪60‬‬

‫‪28.03‬‬

‫‪63‬‬

‫‪28.25‬‬

‫‪62‬‬

‫‪28.09‬‬

‫‪61‬‬

‫‪28.59‬‬

‫‪60‬‬

‫‪27.37‬‬

‫‪67‬‬

‫‪27.48‬‬

‫‪66‬‬

‫‪27.7‬‬

‫‪65‬‬

‫‪27.81‬‬

‫‪64‬‬

‫‪26.7‬‬

‫‪71‬‬

‫‪26.82‬‬

‫‪70‬‬

‫‪27.04‬‬

‫‪69‬‬

‫‪27.15‬‬

‫‪68‬‬

‫‪26.15‬‬

‫‪75‬‬

‫‪26.26‬‬

‫‪74‬‬

‫‪26.37‬‬

‫‪73‬‬

‫‪26.69‬‬

‫‪72‬‬

‫‪25.71‬‬

‫‪79‬‬

‫‪25.71‬‬

‫‪78‬‬

‫‪25.82‬‬

‫‪77‬‬

‫‪26.04‬‬

‫‪76‬‬

‫‪25.16‬‬

‫‪83‬‬

‫‪25.27‬‬

‫‪82‬‬

‫‪25.38‬‬

‫‪81‬‬

‫‪25.49‬‬

‫‪80‬‬

‫‪24.73‬‬

‫‪87‬‬

‫‪24.94‬‬

‫‪86‬‬

‫‪24.95‬‬

‫‪85‬‬

‫‪24.59‬‬

‫‪84‬‬

‫‪24.28‬‬

‫‪91‬‬

‫‪24.39‬‬

‫‪90‬‬

‫‪24.51‬‬

‫‪89‬‬

‫‪24.62‬‬

‫‪88‬‬

‫‪23.95‬‬

‫‪95‬‬

‫‪24.06‬‬

‫‪94‬‬

‫‪24.17‬‬

‫‪93‬‬

‫‪24.17‬‬

‫‪92‬‬

‫‪23.73‬‬

‫‪98‬‬

‫‪23.73‬‬

‫‪97‬‬

‫‪23.84‬‬

‫‪96‬‬

‫واﻟﻣطﻠوب ﺗوﻓﯾق اﻟﻧﻣوذج‪:‬‬ ‫‪ 2  j‬‬

‫‪3 x j‬‬

‫‪y j  1e‬‬

‫اﻟﺣــل ‪:‬‬ ‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻟﻠﺑﯾﺎﻧﺎت ﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺳ ﺎﺑق ﻣﻌط ﺎه ﻓ ﻲ ﺷ ﻛل )‪.(١١-٥‬‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ‪:‬‬ ‫‪٢٧٢‬‬


‫‪yˆ  21.978  47.0884 e 0.033242‬‬

‫واﻟﻣﻣﺛﻠ ﮫ ﺑﯾﺎﻧﯾ ﺎ ﻓ ﻲ ﺷ ﻛل )‪ .(١٢-٥‬ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﻟﻠﺑﯾﺎﻧ ﺎت ﻣ ﻊ ﻣﻌﺎدﻟ ﮫ اﻻﻧﺣ دار‬ ‫اﻟﻣﻘدره ﻣﻌطﻲ ﻓﻲ ﺷﻛل )‪.(١٣-٥‬‬ ‫‪70‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬ ‫‪80‬‬

‫‪100‬‬

‫‪40‬‬

‫‪60‬‬

‫‪20‬‬

‫ﺷﻛل )‪(١١-٥‬‬ ‫‪70‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬ ‫‪100‬‬

‫‪80‬‬

‫‪40‬‬

‫‪60‬‬

‫‪20‬‬

‫ﺷﻛل )‪(١٢-٥‬‬ ‫‪70‬‬ ‫‪60‬‬ ‫‪50‬‬ ‫‪40‬‬ ‫‪30‬‬ ‫‪20‬‬ ‫‪10‬‬ ‫‪100‬‬

‫‪80‬‬

‫‪40‬‬

‫‪60‬‬

‫‪٢٧٣‬‬

‫‪20‬‬


(١٣-٥) ‫ﺷﻛل‬ ‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`NonlinearFit` .‫وﻓﯿﻤﺎ ﯾﻠﻰ ﺧﻄﻮات اﻟﺒﺮﻧﺎﻣﺞ و اﻟﻤﺨﺮﺟﺎت‬ <<Statistics`NonlinearFit` temps={{0,70.86},{1,68.71},{2,66.67}, {3,64.73},{4,63.25},{5,61.57},{6,60.25}, {7,58.74},{8,57.6},{9,56.17},{10,54.94}, {11,53.82},{12,52.64},{13,51.7},{14,50.64}, {15,49.81},{16,48.85},{17,48.04},{18,47.24}, {19,46.45},{20,45.8},{21,45.03},{22,44.27}, {23,43.64},{24,43.01},{25,42.27},{26,41.78}, {27,41.05},{28,40.57},{29,39.97},{30,39.37}, {31,38.9},{32,38.31},{33,37.84},{34,37.37}, {35,36.71},{36,36.33},{37,35.79},{38,35.41}, {39,34.98},{40,34.53},{41,34.18},{42,33.81}, {43,33.39},{44,33.05},{45,32.72},{46,32.38}, {47,32.04},{48,31.82},{49,31.48},{50,31.15}, {51,30.92},{52,30.59},{53,30.63},{54,30.03}, {55,29.81},{56,29.59},{57,29.36},{58,29.14}, {59,28.81},{60,28.59},{61,28.09},{62,28.25}, {63,28.03},{64,27.81},{65,27.7},{66,27.48}, {67,27.37},{68,27.15},{69,27.04},{70,26.82}, {71,26.7},{72,26.69},{73,26.37},{74,26.26}, {75,26.15},{76,26.04},{77,25.82},{78,25.71}, {79,25.71},{80,25.49},{81,25.38},{82,25.27}, {83,25.16},{84,24.95},{85,24.95},{86,24.94}, {87,24.73},{88,24.62},{89,24.51},{90,24.39}, {91,24.28},{92,24.17},{93,24.17},{94,24.06}, {95,23.95},{96,23.84},{97,23.73},{98,23.73}}; everyOtherTemps=Table[temps[[j]],{j,1,99,2}]; dots=ListPlot[everyOtherTemps,PlotRange>{0,70},PlotStylePointSize[0.015]] 70 60 50 40 30 20 10 20

Graphics

40

60

80

٢٧٤

100


NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps}] NonlinearFit::lmpnocon: Warning: The sum of squares has achieved a minimum, but at least one parameter estimate fails to satisfy either an accuracy goal of 1 digit(s) or a precision goal of 1 digit(s). These goals are less strict than those for the sum of squares, specified by AccuracyGoal->6 and PrecisionGoal->6. NonlinearFit::lmcv: NonlinearFit failed to converge to the requested accuracy or precision for the sum of squares within 30 iterations. 1.  9.55394  1023 E1.t NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps},MaxIterations->40] NonlinearFit::lmpnocon: Warning: The sum of squares has achieved a minimum, but at least one parameter estimate fails to satisfy either an accuracy goal of 1 digit(s) or a precision goal of 1 digit(s). These goals are less strict than those for the sum of squares, specified by AccuracyGoal->6 and PrecisionGoal->6. NonlinearFit::lmcv: NonlinearFit failed to converge to the requested accuracy or precision for the sum of squares within 40 iterations. 1.  9.33002  1026 E1.t NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps},Method->FindMinimum] FindMinimum::fmmp: Machine precision is insufficient to achieve the requested accuracy or precision. 21.978  47.0884 E0.0332431t

Tt_ : 21.9779835282673641` 47.0883658406797778` E0.0332431321361424636`t approx=Plot[T[t],{t,0,100},PlotRange->{0,70}] 70 60 50 40 30 20 10 20

40

Graphics Show[approx,dots]

60

80

٢٧٥

100


70 60 50 40 30 20 10 20

Graphics

40

60

80

100

‫ اﻟﻣدﺧﻼت‬:‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬temps. ‫ﻻزواج ﻗﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ و اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬

‫( ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬١١-٥) ‫ﺷﻛل‬ everyOtherTemps=Table[temps[[j]],{j,1,99,2}]; dots=ListPlot[everyOtherTemps,PlotRange>{0,70},PlotStylePointSize[0.015]]

.‫وﻗد ﻓﺷل اﻻﻣر اﻟﺗﺎﻟﻰ ﻓﻰ اﻟﺣﺻول ﻋﻠﻰ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة‬ NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps}]

‫ اﻻن اﻟﻣﺣﺎوﻟﺔ اﻟﺛﺎﻧﯾﺔ ﻣﻊ اﻻﻣر اﻟﺗﺎﻟﻰ‬. beta0  1, beta1  3 ,eps  2 ‫ﺣﻴﺚ‬ NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps},MaxIterations->40] ‫ﺣﯾث اﺿﯾف إﻟﯾﮫ اﻟﺧﯾﺎر اﻟﺗﺎﻟﻰ‬ MaxIterations->40

.‫اى ان ﻋدد اﻟﺗﻛرارات ارﺑﻌﯾن وﻗد ﻓﺷل اﯾﺿﺎ ھذا اﻻﻣر‬ ‫اﻻن اﻟﻣﺣﺎوﻟﺔ اﻟﺛﺎﻟﺛﺔ ﻣﻊ اﻻﻣر اﻟﺗﺎﻟﻰ‬ NonlinearFit[temps,beta0 Exp[beta1*t]+eps,t,{beta0,beta1,eps},Method->FindMinimum] FindMinimum::fmmp: Machine precision is insufficient to achieve the requested accuracy or precision. ‫ﺣﯾث اﺿﯾف إﻟﯾﮫ اﻟﺧﯾﺎر اﻟﺗﺎﻟﻰ‬ Method->FindMinimum

‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻣن اﻟﻣﺧرج‬ 21.978  47.0884 E0.0332431t

٢٧٦


‫ﺷﻛل )‪ (١٢-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬ ‫]}‪approx=Plot[T[t],{t,0,100},PlotRange->{0,70‬‬

‫ﺷﻛل )‪ (١٣-٥‬ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر‬

‫]‪Show[approx,dots‬‬ ‫واﻟﺬى ﯾﺘﻀﺢ ﻣﻨﮫ ﺗﻄﺎﺑﻖ اﻟﺒﯿﺎﻧﺎت ﻣﻎ ﻣﻌﺎدﻟﺔ اﻻﻧﺤﺪار اﻟﻤﻘﺪرة‪.‬‬

‫ﻣﺛﺎل)‪(١٥-٥‬‬ ‫ﺑﻔرض اﻟﻧﻣوزج اﻟﻐﯾر ﺧطﻰ اﻟﺗﺎﻟﻰ ‪:‬‬ ‫‪1‬‬ ‫‪ j‬‬ ‫‪2  x j‬‬

‫‪yj ‬‬

‫واﻟﻣﺳﻣﻰ ﻣﻌﺎدﻟﺔ ‪ (1913) Michaelis-Menten‬واﻟﺗﻲ اﺳﺗﺧدﻣت ﻟوﺻف اﻟﻌﻼﻗ ﺔ‬ ‫اﻟﻌﻼﻗﺔ ﺑﯾن ﻣﺗﻐﯾرﯾن‪.‬‬

‫ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺑﯾﺎﻧﺎت ﻟﻘﯾم ‪ x, y‬واﻟﻣطﻠوب اﯾﺟﺎد ﺗﻘدﯾر ﻟﻛل ﻣن ‪. 1 ,  2‬‬

‫‪y‬‬

‫‪x‬‬

‫‪٢٧٧‬‬


‫‪0 .4 1 7‬‬ ‫‪0 .4 1 7‬‬ ‫‪0 .4 1 7‬‬ ‫‪0 .8 3 3‬‬ ‫‪0 .8 3 3‬‬ ‫‪0 .8 3 3‬‬ ‫‪1 .6 7‬‬ ‫‪1 .6 7‬‬ ‫‪3 .7 5‬‬ ‫‪3 .7 5‬‬ ‫‪6 .2 5‬‬ ‫‪6 .2 5‬‬ ‫‪6 .2 5‬‬

‫‪0. 0 7 73 8 95‬‬ ‫‪0. 0 6 88 7 14‬‬ ‫‪0. 0 8 19 3 51‬‬ ‫‪0. 0 7 37 0 34‬‬ ‫‪0. 0 7 38 7 53‬‬ ‫‪0. 0 7 12 3 96‬‬ ‫‪0. 0 6 50 4 2‬‬ ‫‪0. 0 5 47 6 67‬‬ ‫‪0. 0 4 97 1 28‬‬ ‫‪0. 0 6 42 7 27‬‬ ‫‪0. 0 6 13 0 05‬‬ ‫‪0. 0 6 43 5 76‬‬ ‫‪0. 0 3 93 8 92‬‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻟﻠﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق ﻣﻌطﺎه ﻓﻲ ﺷﻛل )‪.(١٤-٥‬‬ ‫‪0.1‬‬ ‫‪0.08‬‬ ‫‪0.06‬‬ ‫‪0.04‬‬ ‫‪0.02‬‬

‫‪6‬‬

‫‪5‬‬

‫‪4‬‬

‫‪3‬‬

‫‪2‬‬

‫‪1‬‬

‫ﺷﻛل )‪(١٤-٥‬‬ ‫ﻟﮭ ذا اﻟﻣﺛ ﺎل ﺗ م اﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﺟ ﺎھز ﺧ ﺎص ﺑﺎﻻﻧﺣ دار واﻟﻣﺳ ﻣﻲ ‪Levenberg‬‬ ‫‪ Marquardt‬واﻟذي ﯾرﺑط ﺑﯾن طرﯾﻘﺔ ‪ Steepest‬و طرﯾﻘﺔ ﺟﺎوس – ﻣﺎرﻛوف‪.‬‬ ‫ﯾﺗطﻠب ﺗوﻓﯾق ﻧﻣ ﺎذج اﻻﻧﺣ دار اﻟﻐﯾ ر ﺧط ﻲ ﺑﮭ ذه اﻟطرﯾﻘ ﺔ اﻟﺣﺻ ول ﻋﻠ ﻰ ﻗ ﯾم‬ ‫ﻣﺑدﺋﯾ ﮫ ﻟﻣﻌ ﺎﻟم اﻟﻧﻣ وذج‪ .‬اﻟﻘ ﯾم اﻟﺟﯾ دة ‪ ،‬أي ان اﻟﻘ ﯾم اﻟﻣﺑدﺋﯾ ﺔ واﻟﺗ ﻲ ﺗﻘﺗ رب ﻣ ن ﻗ ﯾم‬ ‫اﻟﻣﻌﺎﻟم اﻟﺣﻘﯾﻘﯾﺔ ﺳ وف ﺗ ؤدي اﻟ ﻰ ﺗﺻ ﻐﯾر ﺻ ﻌوﺑﺎت اﻟﺗﻘ ﺎرب‪ .‬داﺋﻣ ﺎ اﻻﺧﺗﯾ ﺎر اﻟﺟﯾ د‬ ‫ﻟﻠﻘﯾم اﻟﻣﺑدﺋﯾﮫ ﯾﻛون ﻣﻔﯾد‪ .‬ﻓﻲ ﻧﻣﺎذج اﻻﻧﺣدار اﻟﻐﯾر ﺧطﯾﮫ ﻓﺈن اﻟﻣﻌﺎﻟم ﻏﺎﻟﺑﺎ ﯾﻛ ون ﻟﮭ ﺎ‬ ‫ﻣﻌﻧﻲ ﻓﯾزﯾﺎﺋﻲ وھذا ﯾﺳﺎﻋد ﻓﻲ اﺧﺗﯾﺎر اﻟﻘﯾم اﻟﻣﺑدﺋﯾﮫ ﻟﻠﻣﻌﺎﻟم‪.‬‬ ‫ﻓ ﻲ ھ ذا اﻟﻣﺛ ﺎل ﺳ وف ﻧوﺿ ﺢ ﻛﯾ ف أن ﻣﻌرﻓ ﺔ اﻟﻘ ﯾم اﻟﻣﺑدﺋﯾ ﮫ ﻟﻣﻌ ﺎﻟم اﻟﻧﻣ وزج‬ ‫ﺳ وف ﺗﺳ ﺎﻋدﻧﺎ ﻓ ﻲ اﻟوﺻ ول اﻟ ﻰ اﻟﻘﯾﻣ ﺔ اﻟﻧﮭﺎﺋﯾ ﺔ ﻟﺗﻘ دﯾر اﻟﻣﻌ ﺎﻟم ﻛﻣ ﺎ أن ﻣﺟﻣ وع‬ ‫ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﺳوف ﯾﻛون أﻗل ﻣن ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑ واﻗﻲ وذﻟ ك ﻓ ﻲ ﺣﺎﻟ ﺔ ﻋ دم‬ ‫ﻣﻌرﻓﺔ اﻟﻘﯾم اﻟﻣﺑدﺋﯾﮫ ﻟﻣﻌﺎﻟم اﻟﻧﻣوزج‪.‬‬

‫‪٢٧٨‬‬


‫ﺑﺈﺳﺗﺧدام ‪  2  1 , 1  1‬ﻛﻘﯾم ﻣﺑدﺋﯾﮫ ﻓﺈن ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ‪:‬‬ ‫‪0.421171‬‬ ‫‪4.40374  4‬‬

‫‪yˆ ‬‬

‫واﻟﻣﻣﺛﻠﮫ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )‪.(١٥-٥‬‬

‫‪0.09‬‬ ‫‪0.08‬‬ ‫‪0.07‬‬ ‫‪0.06‬‬ ‫‪0.05‬‬

‫‪7‬‬

‫‪6‬‬

‫‪5‬‬

‫‪4‬‬

‫‪2‬‬

‫‪3‬‬

‫‪1‬‬

‫ﺷﻛل )‪(١٥-٥‬‬ ‫ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻲ ﻛﺎﻧ ت ‪ .0.00212771‬اﻵن ﺑﻔ رض أن ھﻧ ﺎك ﻣﻌﻠوﻣ ﺎت‬ ‫ﻣﺑدﺋﯾﮫ ﻋن ‪ 1 ,  2‬ﺣﯾث ‪ 1  0.5,  2  17‬ﻓﺈن ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ‪:‬‬ ‫‪0.875918‬‬ ‫‪10.838  x‬‬

‫‪yˆ ‬‬

‫واﻟﻣﻣﺛﻠﮫ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺣﮫ ﻓﻲ ﺷﻛل )‪.(١٦-٥‬‬

‫‪٢٧٩‬‬


‫‪0.08‬‬

‫‪0.07‬‬

‫‪0.06‬‬

‫‪0.05‬‬

‫‪7‬‬

‫‪5‬‬

‫‪6‬‬

‫‪4‬‬

‫‪3‬‬

‫‪2‬‬

‫‪1‬‬

‫ﺷﻛل )‪(١٦-٥‬‬ ‫ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻲ ﻛﺎﻧ ت ‪ .000910677‬واﻟﺗ ﻰ أﻗ ل ﻣ ن ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت‬ ‫اﻟﺑ واﻗﻲ ﻓ ﻲ ﺣﺎﻟ ﺔ ﻋ دم ﻣﻌرﻓ ﺔ اﻟﻘ ﯾم اﻟﻣﺑدﺋﯾ ﮫ‪ .‬وھ ذا ﯾﻌﻧ ﻲ أن اﻟﺣ ل ﺑﺎﺳ ﺗﺧدام اﻟﻘ ﯾم‬ ‫اﻟﻣﺑدﺋﯾﮫ ‪ 1  0.5,  2  17‬ﻛﺎﻧت أﻛﺛر دﻗﮫ ‪ .‬ﻋدد اﻟﺗﻛ رارات ﻟﻠوﺻ ول اﻟ ﻰ اﻟﺣ ل‬ ‫اﻟﻧﮭﺎﺋﻲ ﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‪.‬‬ ‫‪ˆ 2‬‬

‫‪ˆ 1‬‬

‫اﻟﺧطوه‬

‫‪17‬‬ ‫‪7.1388‬‬ ‫‪8.25897‬‬ ‫‪9.47141‬‬ ‫‪10.3259‬‬ ‫‪10.6872‬‬ ‫‪10.8141‬‬ ‫‪10.8354‬‬ ‫‪10.8377‬‬ ‫‪108379‬‬ ‫‪10.838‬‬

‫‪0.5‬‬ ‫‪0.997294‬‬ ‫‪0.924735‬‬ ‫‪0.9117‬‬ ‫‪0.90256‬‬ ‫‪0.885534‬‬ ‫‪0.877484‬‬ ‫‪0.876086‬‬ ‫‪0.875935‬‬ ‫‪0.87592‬‬ ‫‪0.785918‬‬

‫‪1‬‬ ‫‪2‬‬

‫وﺑﻣﺎ أن ‪ s2= 0.00008279‬ﻓﺈن ﻣﺻﻔوﻓﮫ اﻟﺗﻐﺎﯾر ﻟﻠﻣﺗﺟﮫ ˆ‪ ‬ﺳوف‬ ‫‪0.0632335 0.886452 ‬‬ ‫‪‬‬ ‫‪‬‬ ‫‪ 0.886452 12.6386 ‬‬ ‫‪٢٨٠‬‬

‫ﺗﻛون‪:‬‬


‫وﻋﻠﻲ ذﻟك ﺧطﺎ ﻣﻌﯾﺎري ﻣﻘرب ﻟﻠﻣﻌﺎﻟم ﺳوف ﯾﻛون‬ 0.0632335  0.251463, 12.6386  3.55508.

:‫ﻣﺻﻔوﻓﺔ ﻣﻌﺎﻣﻼت اﻻرﺗﺑﺎط ھﻲ‬ 1 0.991589  0.991589  1  

.‫ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻲ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ‬ S.O.V

df

SS

MS

F

‫اﻻﻧﺣدار‬

2

0.0557833

0.02789

336.9

‫اﻟﺧطﺄ‬

11

0.0009107 0.00008279

‫اﻟﻛﻠﻲ‬

13

0.056694

‫ وذﻟك ﺑﺎﺳﺗﺧدام‬Mathematica ‫ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ‬ ‫اﻟﺣزﻣﺔ اﻟﺟﺎھزة‬ Statistics`NonlinearFit` .‫وﻓﯿﻤﺎ ﯾﻠﻰ ﺧﻄﻮات اﻟﺒﺮﻧﺎﻣﺞ و اﻟﻤﺨﺮﺟﺎت‬ <<Statistics`NonlinearFit` ecology={{0.417,0.0773895},{0.417,0.0688714},{0.417,0.081 9351},{0.833,0.0737034},{0.833,0.0738753},{0.833,0.071239 6},{1.670,0.0650420},{1.670,0.0547667},{3.750,0.0497128}, {3.750,0.0642727},{6.250,0.0613005},{6.250,0.0643576},{6. 250,0.0393892}}; NonlinearFit[ecology,v/(k+x),x,{v,k}]

0.421171 4.40374  x NonlinearFit[ecology,v/(k+x),x,{{v,0.5},{k,17}}]

0.875918 10.838  x ecoplot=ListPlot[ecology,DisplayFunction->Identity];

appx_ :

0.875917980809416363` 10.8379705459261256`  x

aplot=Plot[app[x],{x,0,7},DisplayFunction->Identity]; Show[ecoplot,aplot,DisplayFunction->$DisplayFunction]

٢٨١


0.08

0.07

0.06

0.05

1

2

3

4

5

6

7

Graphics

app2x_ :

0.421171044208916445` 4.4037426263852204`  x

aplot2=Plot[app2[x],{x,0,7},DisplayFunction->Identity]; Show[ecoplot,aplot2,DisplayFunction->$DisplayFunction] 0.09 0.08 0.07 0.06 0.05

1

2

3

4

5

6

7

Graphics nrg1=NonlinearRegress[ecology,v/(k+x),x,{v,k},RegressionR eport->FitResiduals] {FitResiduals{-0.00997692,-0.018495,-0.00543132,0.00672275,-0.00655085,-0.00918655,-0.00430092,0.0145762,-0.00194091,0.012619,0.0217678,0.0248249,0.000143484}} err1=nrg1[[1,2]]; sumsq1=Sum[err1[[j]]^2,{j,1,Length[err1]}] 0.00212771 nrg1=NonlinearRegress[ecology,v/(k+x),x,{v,k},RegressionR eport->StartingParameters] {StartingParameters{v1,k1}} nrg2=NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}}, RegressionReport->FitResiduals]

٢٨٢


{FitResiduals{-0.000435491,-0.00895359,0.00411011,0.0013476,-0.0011757,-0.0038114,-0.00498679,-0.0152621,0.0103311,0.00422885,0.0100412,0.0130983,-0.0118701}} err2=nrg2[[1,2]]; sumsq2=Sum[err2[[j]]^2,{j,1,Length[err2]}] 0.000910677

NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},ShowP rogress->True] Iteration:1 Iteration:2 Iteration:3 Iteration:4 Iteration:5 Iteration:6 Iteration:7 Iteration:8 Iteration:9 Iteration:10 Iteration:11

ChiSquared:0.0211263 Parameters:{0.5,17.} ChiSquared:0.0273833 Parameters:{0.997294,7.1388} ChiSquared:0.00913711 Parameters:{0.924735,8.25897} ChiSquared:0.00340141 Parameters:{0.9117,9.47141} ChiSquared:0.0015738 Parameters:{0.90256,10.3259} ChiSquared:0.00104566 Parameters:{0.885534,10.6872} ChiSquared:0.000927715 Parameters:{0.877484,10.8141} ChiSquared:0.000912423 Parameters:{0.876086,10.8354} ChiSquared:0.000910851 Parameters:{0.875935,10.8377} ChiSquared:0.000910693 Parameters:{0.87592,10.8379} ChiSquared:0.000910677 Parameters:{0.875918,10.838}

NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}}]

٢٨٣


BestFitParametersv0.875918,k10.838,

ParameterCITablev k

Estimate 0.875918 10.838

AsymptoticSE 0.251463 3.55508

CI 0.322452,1.42938, 3.01329,18.6627

Model EstimatedVariance0.000082789,ANOVATableError UncorrectedTotal CorrectedTotal

DF 2 11 13 12

SumOfSq 0.0557833 0.00091068 0.056694 0.00165764

MeanSq 0.0278916 0.000082789,

1. 0.991589 AsymptoticCorrelationMatrix , 0.991589 1. FitCurvatureTable MaxIntrinsic MaxParameterEffects 95.%ConfidenceRegion

Curvature 0.0771249  0.734794 0.50111

NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regre ssionReport->AsymptoticCovarianceMatrix] AsymptoticCovarianceMatrix  

0.0632335 0.886452  0.886452 12.6386

NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regre ssionReport->HatDiagonal] {HatDiagonal{0.172201,0.172201,0.172201,0.120973,0.12097 3,0.120973,0.0817874,0.0817874,0.133218,0.133218,0.230156 ,0.230156,0.230156}} p=2; n=Length[ecology]; 2 p/n//N 0.307692 NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regre ssionReport->StandardizedResiduals] {StandardizedResiduals{-0.0526054,-1.08156,0.496484,0.157969,-0.137819,-0.446784,-0.571957,-1.75048,1.21956,0.499207,1.25776,1.64069,-1.48685}} .‫وﻓﯿﻤﺎ ﯾﻠﻰ ﺧﻄﻮات اﻟﺒﺮﻧﺎﻣﺞ و اﻟﻤﺨﺮﺟﺎت‬

‫ اﻟﻣدﺧﻼت‬:‫اوﻻ‬ ‫اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه‬ecology. ‫ﻻزواج ﻗﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ و اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ‬

‫ اﻟﻣﺧرﺟﺎت‬: ‫ﺛﺎﻧﯾﺎ‬

:‫ ﻛﻘﯾم ﻣﺑدﺋﯾﮫ ﻓﺈن ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ‬ 2  1 , 1  1 ‫ﺑﺈﺳﺗﺧدام‬ ٢٨٤


‫‪0.421171‬‬ ‫‪4.40374  4‬‬

‫‪yˆ ‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ‪:‬‬ ‫]}‪NonlinearFit[ecology,v/(k+x),x,{v,k‬‬ ‫‪ v  1 , k  2‬ﺣﯿﺚ‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘ درة ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ )ﺷ ﻛل )‪ ((١٥-٥‬ﻧﺣﺻ ل‬ ‫ﻋﻠﯾﮫ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ‪:‬‬ ‫]‪Show[ecoplot,aplot2,DisplayFunction->$DisplayFunction‬‬

‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﻛﺎﻧت ‪ 0.00212771‬ﻣن اﻻﻣر‬ ‫]}]‪sumsq1=Sum[err1[[j]]^2,{j,1,Length[err1‬‬

‫ﺑﻔ رض أن ھﻧ ﺎك ﻣﻌﻠوﻣ ﺎت ﻣﺑدﺋﯾ ﮫ ﻋ ن ‪ 1 ,  2‬ﺣﯾ ث ‪ 1  0.5,  2  17‬ﻓ ﺈن‬ ‫ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ‪:‬‬ ‫‪0.875918‬‬ ‫‪10.838  x‬‬

‫‪yˆ ‬‬

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ‪:‬‬ ‫]}}‪NonlinearFit[ecology,v/(k+x),x,{{v,0.5},{k,17‬‬

‫ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﻛﺎﻧت‬

‫‪0.000910677‬‬

‫ﻣن اﻻﻣر‬

‫]}]‪sumsq2=Sum[err2[[j]]^2,{j,1,Length[err2‬‬

‫ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻓﻲ ھذه اﻟﺣﺎﻟﺔ )ﺷ ﻛل )‪ ((١٦-٥‬ﻧﺣﺻ ل‬ ‫ﻋﻠﯾﮫ ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ‪:‬‬ ‫]‪Show[ecoplot,aplot,DisplayFunction->$DisplayFunction‬‬

‫ﻋدد اﻟﺗﻛرارات ﻟﻠوﺻول اﻟﻰ اﻟﺣل اﻟﻧﮭﺎﺋﻲ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ ‫‪NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},ShowP‬‬ ‫]‪rogress->True‬‬

‫‪ s2= 0.00008279‬و ﺧطﺎ ﻣﻌﯾﺎري ﻣﻘرب ﻟﻠﻣﻌﺎﻟم ‪:‬‬ ‫‪0.0632335  0.251463,‬‬ ‫‪12.6386  3.55508.‬‬

‫وﻣﺻﻔوﻓﺔ ﻣﻌﺎﻣﻼت اﻻرﺗﺑﺎط‪:‬‬ ‫‪٢٨٥‬‬


1 0.991589  0.991589  1  

: 1 ,  2 ‫ ﻓﺗرة ﺛﻘﺔ ﻟـ‬95%‫وﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن و‬ ‫( ﻋﻠﻲ اﻟﺗ واﻟﻲ ﻧﺣﺻ ل ﻋﻠ ﯾﮭم‬322452 , 142938) , (3.01329 , 18.6628) ‫ﻓﻰ اﻟﺟدول ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ‬ NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}}]

‫و ﻣﺻﻔوﻓﮫ اﻟﺗﻐﺎﯾر ﻟﻠﺗﻘدﯾرات‬ 0.0632335 0.886452     0.886452 12.6386 

‫ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر‬ NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regre ssionReport->AsymptoticCovarianceMatrix]

٢٨٦

الانحدار وكيفية معالجة مخالفات فروضه  
الانحدار وكيفية معالجة مخالفات فروضه  
Advertisement