اﺳﺘﺨﺪام ﺑﺮﻧﺎﻣﺞMathematica ﻛﻠﻐﺔ ﺑﺮﻣﺠﺔ ﻓﻰ ﻣﺠﺎل اﻻﺣﺼﺎء اﻻﺳﺘﺪﻻﻟﻰ ﺗﺄﻟﻴﻒ
اﻟﺪﻛﺘﻮرة /ﺛﺮوت ﻣﺤﻤﺪ ﻋﺒﺪ اﻟﻤﻨﻌﻢ أﺳﺘﺎذ ﻣﺸﺎرك ﺟﺎﻣﻌﺔ اﻟﺪﻣﺎم
ﻛﻠﻴﺔ اﻟﻌﻠﻮم ﺑﺎﻟﺪﻣﺎم – ﻗﺴﻢ اﻟﺮﻳﺎﺿﻴﺎت )ﺳﺎﺑﻘﺎ(
٢٠١٢م
١
٢
إﻟ ﻰ اﺑﻧﺗ ﻰ ﻓ ﻰ ﷲ اﻟ دﻛﺗورة ﻣﻧ ﺎل اﻟﻌ وھﻠﻰ واﻟﺗ ﻰ ﻛ ﺎن ﻟ ﻰ اﻟﺷ رف ﻓ ﻰ اﻟﺗ درﯾس ﻟﮭ ﺎ ﻓ ﻰ ﻣرﺣﻠ ﺔ اﻟﻣﺎﺟﺳ ﺗﯾر واﻟ دﻛﺗوراة وﻣﻧﺎﻗﺷ ﺔ رﺳ ﺎﻟﺔ اﻟ دﻛﺗوراه اﻟﺧﺎﺻ ﺔ ﺑﮭ ﺎ .وﻗ د ﻟﻣﺳ ت ﻓﯾﮭ ﺎ اﻻدب اﻟﺟ م واﻻﺣﺗ رام واﻟﺗﻘ دﯾر واﻻﻋﺗ راف ﺑﺎﻟﺟﻣﯾ ل.وﻻﻧﻧ ﻰ اؤﻣ ن ﺑ ﺎن ﻛ ل اﺳ ﺗﺎذ ﻻ ﺑ د ان ﯾﻌط ﻰ اﻗﺻ ﻰ ﻣ ﺎ ﻋﻧ ده ﻟﺗﻠﻣﯾ ذة ﺣﺗ ﻰ ﺗﻛ ون اﻟﺧط وة اﻻوﻟ ﻰ ﻟ ﮫ ﻟﯾﻧﺗﮭ ل ﻣ ن اﻟﻌﻠ م وﯾﺗﻔ وق ﻋﻠ ﻰ اﺳ ﺗﺎذه ﺑﻌ د ذﻟ ك ﻻﻧﻧ ﻰ اؤﻣ ن ﺑ ﺎن ﻛ ل ﺟﯾ ل ﻻﺑ د ان ﯾﻛ ون اﻛﺛ ر ﺗﻔوﻗ ﺎ ﻣ ن اﻟﺟﯾ ل اﻟ ذى ﻗﺑﻠ ﮫ ﺣﺗ ﻰ ﯾﺗﻘ دم اﻟﻌﻠ م .وﻗ د ﺗﻔﮭﻣ ت ط ﺎﻟﺑﺗﻰ ذﻟ ك وﻗ د ﻟﻣﺳ ت ذﻟ ك ﻣ ن ﺧ ﻼل ﻗﯾﺎﻣﮭ ﺎ ﺑﻔ ك اﻟﻣﻌ ﺎدﻻت اﻟﺧﺎﺻ ﺔ ﺑﻛﺛﯾ ر ﻣ ن اﻻﺑﺣ ﺎث اﻟﺧﺎﺻ ﺔ ﺑﺎﻟﺗﺣﻠﯾ ل اﻟﺑﯾﯾ زى ﺧ ﻼل ﺗدرﯾﺳ ﻰ ﻟﮭ ﺎ ﻓ ﻰ ﻣرﺣﻠ ﺔ ﺗﻣﮭﯾ دى دﻛﺗ وراه .وﻟﻘ د ﺷ ﺟﻌﺗﻧﻰ ھ ذه اﻟﺛ روة اﻟﺗ ﻰ ﺟﻣﻌﺗﮭ ﺎ ﻋﻠ ﻰ اﻟﺑ دء ﻓ ﻰ ﻋﻣ ل ﻛﺗ ﺎب ﻓ ﻰ اﻟﺗﺣﻠﯾ ل اﻟﺑﯾﯾ زى ﺗﻛ ون ﻣ ﺎ ﻗﺎﻣ ت ﺑﻌﻣﻠ ﺔ ﺗﻠﻣﯾ ذﺗﻰ ﻓﺻ ل ﻣﺗﻘ دم ﻓ ﻰ ھ ذا اﻟﻛﺗ ﺎب وﷲ ﯾﻌﯾﻧﻧ ﻰ ﻋﻠ ﻰ اﻻﻧﺗﮭ ﺎء ﻣﻧ ﮫ .وھ ذا اﻟﻛﺗ ﺎب ﺳ وف ﯾﻛ ون اﻟﻛﺗ ﺎب اﻻول ﻋﻠ ﻰ ﻣﺳ ﺗوى اﻟﻌ ﺎﻟم اﻟﻌرﺑ ﻰ ،وﻟﻠﻌﻠ م ﻓ ﺈن اﻟﻛﺗ ب اﻻﺟﻧﺑﯾ ﺔ ﻓ ﻰ ھ ذا اﻟﻔ رع ﻧ ﺎدرة.ﻓﺎﺳ ﺎل ﷲ ﻟﮭ ﺎ اﻟﺻ ﺣﺔ واﻟﻌﺎﻓﯾ ﺔ ﻓ ﻰ اﻟ دﻧﯾﺎ واﻟﺟﻧﺔ ﻓﻰ اﻻﺧرة. د .ﺛروت ﻣﺣﻣد ﻋﺑد اﻟﻣﻧﻌم
٣
ﺑﺳم ﷲ اﻟرﺣﻣن اﻟرﺣﯾم ﺗﻣﮭﯾد اﻟﺣﻣد رب اﻟﻌﺎﻟﻣﯾن واﻟﺻﻼة واﻟﺳﻼم ﻋﻠ ﻰ أﺷ رف اﻟﻣرﺳ ﻠﯾن ﻣﺣﻣ د وﻋﻠ ﻰ آﻟ ﮫ وﺻﺣﺑﮫ أﺟﻣﻌﯾن .أﻣﺎ ﺑﻌد ،ﻓﺎﻟﺣﻣد اﻟذي ھ داﻧﺎ وﻣ ﺎ ﻛﻧ ﺎ ﻟﻧﮭﺗ دي ﻟ وﻻ أن ھ داﻧﺎ ﷲ اﻟ ذي أﻧﻌم ﻋﻠﻲ ﺑﻛﺗﺎﺑﺔ ھذا اﻟﻛﺗﺎب ﺗﻠﺑﯾﺔ ﻟﻧداء اﻟﺗﻌرﯾب اﻟذي ﯾﺗﺑﻧﺎه اﻟﻛﺛﯾر ﻣن اﻟﻌﻠﻣﺎء واﻟﻣﺛﻘﻔﯾن. ﯾﺧ دم ﺑرﻧ ﺎﻣﺞ Mathematicaﻗطﺎﻋ ﺎ ﻛﺑﯾ را ﻣ ن اﻟﺗﺧﺻﺻ ﺎت اﻟﻌﻠﻣﯾ ﺔ اﻟﻣﺧﺗﻠﻔ ﺔ ﺣﯾ ث ﯾﻘ وم ﺑ ﺈﺟراء اﻟﻌﻣﻠﯾ ﺎت اﻟﺣﺳ ﺎﺑﯾﺔ اﻟﻌددﯾ ﺔ Numerical Calculationاﻟﻣﺗﻌ ﺎرف ﻋﻠﯾﮭﺎ ﻣﺛل اﻟﺟﻣﻊ واﻟطرح واﻟﻘﺳ ﻣﺔ وﺣﺳ ﺎب اﻻﺳس واﻟﻠوﻏﺎرﺗﻣ ﺎت و اﻟ دوال اﻟﻣﺛﻠﺛﯾ ﺔ و اﻟزاﺋدﯾ ﺔ ﺳ واء ﻟﻼﻋ داد اﻟﺣﻘﯾﻘﯾ ﺔ او اﻻﻋ داد اﻟﻣرﻛﺑ ﺔ وﻛ ذﻟك ﯾﻘ وم ﺑ ﺈﺟراء اﻟﻌﻣﻠﯾ ﺎت اﻟرﯾﺎﺿﯾﺔ اﻟرﻣزﯾ ﺔ Symbolicاﻟﻣﺗﻌ ﺎرف ﻋﻠﯾﮭ ﺎ ﻓ ﻰ ﻓ روع ﻛﺛﯾ رة ﻣ ن اﻟرﯾﺎﺿ ﯾﺎت ﻣﺛ ل اﻟﺟﺑ ر اﻟﺧط ﻰ واﻻﺣﺻ ﺎء واﻟﺗﻔﺎﺿ ل واﻟﺗﻛﺎﻣ ل واﻟ دوال اﻟﺧﺎﺻ ﺔ واﻟﻣﻌ ﺎدﻻت اﻟﺗﻔﺎﺿ ﻠﯾﺔ واﻟﺗﺣﻠﯾ ل اﻟﻌ ددى واﻟﺑرﻣﺟ ﺔ اﻟﺧطﯾ ﺔ .ﻛﻣ ﺎ ﯾﻘ وم ﺑرﺳ م اﻟ دوال ﺳ واء اﻟﻣﺑﺎﺷ رة او اﻟﺑﺎراﻣﺗرﯾ ﺔ ﻓ ﻰ ﺑﻌ دﯾن او ﺛ ﻼث اﺑﻌ ﺎد .ﻛﻣ ﺎ ﯾﻣﻛ ن اﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ Mathematica ﻛﻠﻐﺔ ﺑرﻣﺟﺔ ﻟﻛﺗﺎﺑﺔ ﺑراﻣﺞ ﺗﺣل ﻣﺷﻛﻼت ﻛﺑﯾرة ﯾﻌﺟز ﺣﻠﮭﺎ اﻣر واﺣد وھذا ھدﻓﻧﺎ ﻓ ﻰ ھ ذا اﻟﻛﺗ ﺎب وﻟﻛ ن ﻓ ﻰ ﻣﺟ ﺎل اﻻﺣﺻ ﺎء اﻻﺳ ﺗدﻻﻟﻰ .وﺳ وف ﺗرﻓ ق ھ ذه اﻟﺑ راﻣﺞ )اﻟﻣﻛﺗوﺑ ﺔ ﺑﺎﻻﺻدار ( 5ﻣﻊ اﻟﻛﺗﺎب وﻓﻰ ﻛل ﻓﺻل ﺳوف ﯾﺗم ﺷرح اﻟﺑرﻧﺎﻣﺞ اﻟﺧﺎص ﺑﻛل ﻣﺛﺎل ﻣ ﻊ ﺷرح ﻛﯾﻔﯾﺔ اﺳﺗﺧدام اﻟﺑرﻧﺎﻣﺞ ﻋن طرﯾق ﺷرح ﻛﯾﻔﯾﺔ اﺳ ﺗﺑدال اﻟﻣ دﺧﻼت اﻟﻣﻌروﺿ ﺔ ﻓ ﻰ اﻟﺑرﻧﺎﻣﺞ ﺑﺎﻟﻣدﺧﻼت اﻟﺧﺎﺻﺔ ﺑﻣﺳﺗﺧدم اﻟﻛﺗﺎب.اﯾﺿﺎ ﺳوف ﯾﺗم ﺷ رح ﻛﯾﻔﯾ ﺔ اﻟﺗﻌ رف ﻋﻠ ﻰ اﻟﻣﺧرﺟﺎت .وﺳوف ﯾﺎﺧذ ﻛل ﺑرﻧﺎﻣﺞ ﻧﻔس رﻗم اﻟﻣﺛﺎل اﻟﺧ ﺎص ﺑ ﮫ وذﻟ ك ﻟﺳ ﮭوﻟﺔ اﻟﺗﻌ رف ﻋﻠﯾﮫ. ھذا اﻟﻛﺗ ﺎب ﯾﺻﻠﺢ ﻛﻣﻘ رر ﻟط ﻼب ﻛﻠﯾ ﺎت اﻟﻌﻠ وم ﺗﺧﺻ ص اﺣﺻ ﺎء ،ﻛﻣ ﺎ ﯾﺻ ﻠﺢ ﻷن ﯾﻛ ون ﻣﻘ ررا ً ﻟط ﻼب اﻟدراﺳ ﺎت اﻟﻌﻠﯾ ﺎ اﻟﻣﺗﺧﺻﺻ ون ﻓ ﻰ اﻻﺣﺻ ﺎء ﺣﯾ ث ﯾﻘ وم ﺑﺎﻟﺗ درﯾس ﻋﺿ و ھﯾﺋ ﺔ ﺗ درﯾس ﻣﺗﺧﺻ ص ﻓ ﻰ اﻻﺣﺻ ﺎء ﺑﺎﻻﺿ ﺎﻓﺔ إﻟ ﻰ اﻟﻣﺎﻣ ﮫ ﺑﺑرﻧ ﺎﻣﺞ ، Mathematicaﺣﯾث ﯾﺑدا ﺑﺗ درﯾس اواﻣ ر اﻟﺑرﻧ ﺎﻣﺞ وﺑﺎﻟﺗ ﺎﻟﻰ ﻓﮭ م اﻟﺑ راﻣﺞ اﻟﻣرﻓﻘ ﺔ ﻓ ﻰ اﻟﻛﺗ ﺎب وﯾﻣﻛ ن ﺑﻧ ﺎء ﻋﻠ ﻰ اﻟﻣ ﺎم اﻟطﺎﻟ ب ﺑﺎﻟﻠﻐ ﺔ اﻋ ﺎدة ﻛﺗﺎﺑ ﺔ ھ ذه اﻟﺑ راﻣﺞ ﺑﺎﺳ ﻠوب اﺧ ر واﻟﺣﺻ ول ﻋﻠ ﻰ ﻧﻔ س اﻟﻧﺗ ﺎﺋﺞ وذﻟ ك ﻟﯾ زداد ﻣﮭ ﺎرة اﻟطﺎﻟ ب ﻣ ن اﻟﻠﻐ ﺔ واﻟﺗ ﻰ ﺗﺳ ﺎﻋده ﻓ ﻰ رﺳ ﺎﻟﺔ اﻟﻣﺎﺟﺳ ﺗﯾر واﻟ دﻛﺗوراه ﻓ ﻰ ﻋﻣ ل ﺑ راﻣﺞ ﻓ ﻰ ﻣﺟ ﺎل اﻟﻔ رع اﻟ ذى ﯾﻌﻣ ل ﻓﯾ ﮫ . ﯾﺻﻠﺢ ھذا اﻟﻛﺗﺎب أﯾﺿﺎ ً ﻷن ﯾﻛون ﻣرﺟﻌﺎ ً ﻟﻛ ل اﻟﻣﺳ ﺗﺧدﻣﯾن ﻟﮭ ذا اﻟﺑرﻧ ﺎﻣﺞ ﻣﺛ ل اﻟطﻠﺑ ﺔ و اﻟﻣﮭﻧدﺳﯾن ورﺟﺎل اﻻﻋﻣ ﺎل واﻋﺿ ﺎء ھﯾﺋ ﺔ اﻟﺗ درﯾس ﻓ ﻰ ﻣﺟ ﺎل اﻻﺣﺻ ﺎء واﻟ ذﯾن ﯾﻠﻣ ون ﺑﺎﻟﻠﻐﺔ واﻟذﯾن ﻟدﯾﮭم ﻣﺑﺎدئ ﻓﻰ ﻋﻠم اﻻﺣﺻﺎء ،ھذا وﯾﻣﻛن ﻓﻰ ﺣﺎﻟ ﺔ ﻋ دم اﻻﻟﻣﺎم ﺑﺎﻟﺑرﻧ ﺎﻣﺞ اﻻﺳﺗﻌﺎﻧﺔ ﺑﺎﻟﻣﺗﺧﺻﺻﯾن ﻓﻰ ادﺧﺎل اﻟﺑﯾﺎﻧﺎت واﻟﺣﺻول ﻋﻠﻰ اﻟﻣﺧرﺟﺎت. ٤
وﻓﻲ وﺿﻊ ھذا اﻟﻛﺗﺎب اﺳﺗﻌﻧت ﺑﻛﺛﯾر ﻣن اﻟﻣراﺟﻊ اﻟﻌرﺑﯾﺔ واﻷﺟﻧﺑﯾﺔ ﻛﻣﺎ اﺳ ﺗﻌﻧت ﺑﺧﺑرﺗ ﻲ ﻓ ﻲ ﺗ درﯾس ھ ذا اﻟﻣﻘ رر ﻟط ﻼب اﻟدراﺳ ﺎت اﻟﻌﻠﯾ ﺎ ﻓ ﻲ ﻣرﺣﻠ ﺔ اﻟﻣﺎﺟﺳ ﺗﯾر واﻟ دﻛﺗوراه وﻛﻣ ﺎ اﺳ ﺗﻌﻧت ﺑﺧﺑرﺗ ﻲ ﻓ ﻲ اﻻﺳﺗﺷ ﺎرات اﻹﺣﺻ ﺎﺋﯾﺔ ﻓ ﻲ ﻣرﺣﻠ ﺔ اﻟﻣﺎﺟﺳ ﺗﯾر واﻟدﻛﺗوراه . وﯾﻌﺗﺑ ر ھ ذا اﻟﻛﺗ ﺎب اﻟﻣرﺟ ﻊ اﻻول ﻋﻠ ﻰ ﻣﺳ ﺗوى اﻟﻌ ﺎﻟم اﻟﻌرﺑ ﻰ ﻓ ﻰ ھ ذا اﻟﻣﺟ ﺎل ﻛﻣ ﺎ اﻋﺗﺑ ره اﻓﺿ ل ﻣ ن اﻟﻛﺗ ﺎب اﻻﺟﻧﺑ ﻰ واﻟﻣﻧ ﺎظر ﻟ ﮫ ﻓ ﻰ ھ ذا اﻟﻣﺟ ﺎل واﻟ ذى اﺳ ﺗﻌﻧت ﺑ ﮫ ﻓ ﻰ ﺗدرﯾس ﻣﻘرر ﺣﺎﺳب اﻟﻰ ﻣﺗﻘدم ﻟطﻠﺑﺔ اﻟدﻛﺗوراه. ﯾﺣﺗوي ھذا اﻟﻛﺗﺎب ﻋﻠﻰ ﺳﺑﻌﺔ ﻓﺻول ،ﯾﻘدم اﻟﻔﺻل اﻷول ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧ ﺔ ،أﻣ ﺎ اﻟﻔﺻ ل اﻟﺛ ﺎﻧﻲ ﻓﯾﮭ ﺗم ﺑﻔﺗ رات اﻟﺛﻘ ﺔ ،ﺑﯾﻧﻣ ﺎ ﯾﮭ ﺗم اﻟﻔﺻ ل اﻟﺛﺎﻟ ث ﺑﺎﺧﺗﺑ ﺎرات اﻟﻔ روض ،وﯾﺗط رق اﻟﻔﺻ ل اﻟراﺑ ﻊ إﻟ ﻰ اﻻﻧﺣ داراﻟﺧطﻰ اﻟﺑﺳ ﯾط واﻻرﺗﺑ ﺎط ،وﯾﻘ دم اﻟﻔﺻ ل اﻟﺧ ﺎﻣس ﻧﻣ ﺎزج اﻻﻧﺣدار اﻟﺧط ﻰ اﻟﻣﺗﻌ دد وﻧﻣ ﺎزج اﻻﻧﺣ دار ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾ ﺔ واﻟﻧﻣ ﺎزج اﻟﻐﯾ ر ﺧطﯾ ﺔ ، أﻣ ﺎ اﻟﻔﺻ ل اﻟﺳ ﺎدس ﻓﯾﻘ دم ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾن ،واﺧﯾ را ﯾﻘ دم اﻟﻔﺻ ل اﻟﺳ ﺎﺑﻊ اﻻﺧﺗﺑ ﺎرات اﻟﻼﻣﻌﻠﻣﯾﺔ. وأﺳ ﺄل ﷲ أن أﻛ ون ﻗ د وﻓﻘ ت ﻓ ﻲ ھ ذا اﻟﻣﺟﮭ ود اﻟﻣﺗواﺿ ﻊ ﺧدﻣ ًﺔ ﻟﻘﺿ ﺎﯾﺎ اﻟﺑﺣ ث اﻟﻌﻠﻣﻲ ﻓﻲ وطﻧﻧﺎ اﻟﻌرﺑﻲ. ﻛﻣ ﺎ أﺗوﺟ ﮫ ﺑﺎﻟﺷ ﻛر إﻟ ﻰ دار اﻟﻧﺷ ر اﻟﺗ ﻲ أﺗﺎﺣ ت ﻟ ﻲ اﻟﻔرﺻ ﺔ ﻟﻧﺷ ر ھ ذا اﻟﻌﻣ ل اﻟﻌﻠﻣﻲ. وإﻧﻧﻲ أرﺣب ﺑﻛل ﻧﻘد ﺑﻧﺎء ﯾﮭدف إﻟﻰ اﻷﻓﺿل ،وﻣﺎ اﻟﻛﻣﺎل إﻻ وﺣده. وﷲ وﻟﻲ اﻟﺗوﻓﯾق
د .ﺛروت ﻣﺣﻣد ﻋﺑد اﻟﻣﻧﻌم
٥
اﻟﻔﺼـﻞ اﻷول :ﺗﻮزﻳﻌﺎت اﻟﻤﻌﺎﻳﻨﺔ )(١ -١ )(٢ -١ )(٣ -١ )(٤ -١ )(٥ -١ )(٦ -١ )(٧ -١ )(٨ -١
ﻣﻘدﻣﺔ ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ اﻟطﺑﯾﻌﯾﺔ ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ ﻟﻠﻣﺗوﺳط ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ ﻟﻠﻔرق ﺑﯾن ﻣﺗوﺳطﻲ ﻣﺟﺗﻣﻌﯾن اﻟﺗوزﯾﻌﺎت اﻟﻌﯾﻧﯾﺔ ﻟﻠﻧﺳب ﺗوزﯾﻊ t ﺗوزﯾﻊ ﻣرﺑﻊ ﻛﺎى ﺗوزﯾﻊ F
اﻟﻔﺼـﻞ اﻟﺜﺎﻧﻲ :ﻓﺘﺮات اﻟﺜﻘﺔ )(١ -٢ )(٢ -٢ )( ٣ - ٢ )( ٤ - ٢ )(٥ -٢ )( ٦ - ٢ )(٧ -٢
ﻣﻘدﻣﺔ ﻓﺗرة ﺛﻘﺔ ﻟﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق ﺑﯾن ﻣﺗوﺳطﻰ ﻣﺟﺗﻣﻌﯾن 1 2 ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق ﺑﯾن ﻧﺳﺑﺗﯾن ﻓﺗرة ﺛﻘﺔ ﻟﻠﺗﺑﺎﯾن ﻓﺗرة ﺛﻘﺔ ﻟﻧﺳﺑﺔ ﺗﺑﺎﯾﻧﯾن
اﻟﻔﺼﻞ اﻟﺜﺎﻟـﺚ :اﺧﺘﺒﺎرات اﻟﻔﺮوض )(١ -٣ )(٢ -٣ )(٣ -٣ )(٤ -٣ )(٥ -٣ )(٦ -٣ )(٧ -٣ )(٨ -٣ )(٩ -٣
اﻟﻔروض اﻻﺣﺻﺎﺋﯾﺔ اﺧﺗﺑﺎرات ﻣن ﺟﺎﻧب واﺣد او ﻣن ﺟﺎﻧﺑﯾن اﺧﺗﺑﺎر ﺣول ﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ اﺧﺗﺑﺎرات ﺣول ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ 2
اﺧﺗﺑﺎرات ﺗﺧص ﺗﺑﺎﯾﻧﻰ ﻣﺟﺗﻣﻌﯾن اﺧﺗﺑﺎرات ﺗﺧص اﻟﻣﺗوﺳطﺎت اﺧﺗﺑﺎرات tﻟﻼزواج اﺧﺗﺑﺎرات ﺗﺧص ﻧﺳﺑﺔ ﻣﺟﺗﻣﻊ اﺧﺗﺑﺎرات ﺗﺧص اﻟﻔرق ﺑﯾن ﻧﺳﺑﺗﯾن
اﻟﻔﺼﻞ اﻟﺮاﺑﻊ :اﻻﻧﺤﺪار اﻟﺨﻄﻰ اﻟﺒﺴﻴﻂ واﻻرﺗﺒﺎط )(١ -٤ )(٢ -٤ )(٣ -٤
ﻣﻔﺎھﯾم اﺳﺎﺳﯾﺔ ﻣﻘدﻣﺔ ﻓﻰ اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط ﺷﻛل اﻻﻧﺗﺷﺎر ٦
) (٤ -٤ﻧﻣوزج اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط ) (٥ -٤ﻓروض ﻧﻣوزج اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط ) (٦ -٤طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ) (٧ - ٤ﺗﺣﻠﯾل اﻻﻧﺣدار ) (٨ - ٤ ﺗﻘدﯾر 2 ) (٩ - ٤ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﺑﺳﯾط ) (١٠ - ٤اﺳﺗدﻻﻻت ﺗﺧص ﻣﻌﺎﻣﻼت اﻻﻧﺣدار ) (١ -١٠ -٤ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ 1 ) (٢ -١٠ -٤اﺧﺗﺑﺎرات ﻓروض ﺗﺧص اﻟﻣﯾل ) (٣ -١٠ -٤ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ 0 ) (٤ -١٠ -٤اﺧﺗﺑﺎرات ﻓروض ﺗﺧص 0 ) (١١ - ٤اﻟﺗﻧﺑؤ ) (١٢ - ٤ﻣﺧﺎﻟﻔﺎت ﻧﻣوزج اﻻﻧﺣدار وﻛﯾﻔﯾﺔ اﻛﺗﺷﺎﻓﮭﺎ ﺑﺎﻟﺑواﻗﻰ ) (١ -١٢ -٤رﺳوم اﻟﺑواﻗﻰ ) (٢ -١٢ -٤رﺳوم ﺑواﻗﻰ اﺧرى ﻻﺧﺗﺑﺎر اﻻﻋﺗدال ) (٣ -١٢ -٤اﺧﺗﺑﺎر ﻧﻘص اﻻﻋﺗدال ) (١٣ - ٤اﺧﺗﺑﺎر ﺧطﯾﺔ اﻻﻧﺣدار ) (١٤ - ٤ﺗﺣوﯾﻼت اﻟﻰ اﻟﺧط اﻟﻣﺳﺗﻘﯾم ) (١ -١٤ -٤اﻟﻧﻣوزج اﻻﺳﻰ ) (٢ -١٤ -٤ﻧﻣوزج اﻟﻘوى ) (٣ -١٤ -٤ﻧﻣوزج ﯾﻌطﻰ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻋﻠﻰ اﻟﺷﻛل yˆ b0 b1 x
)(١٥ - ٤
)(١٦ - ٤
اﻛﺗﺷﺎف وﺗﺻﺣﯾﺢ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن )(١ -١٥ -٤طرﯾﻘﺔ ﺟوﻟد – ﻛوادت ﻻﻛﺗﺷﺎف ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن ) (٢ -١٥ -٤ﺗﺻﺣﯾﺢ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن ) (٣ -١٥ -٤طرﯾﻘﺔ ﻟﺣﺳﺎب اﻻوزان ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺧطﻰ اﻟﺑﺳﯾط
اﻟﻔﺼﻞ اﻟﺨﺎﻣﺲ :ﻧﻤﺎزج اﻻﻧﺤﺪار اﻟﺨﻄﻰ اﻟﻤﺘﻌﺪد وﻧﻤﺎزج اﻻﻧﺤﺪار ﻣﻦ اﻟﺪرﺟﺔ اﻟﺜﺎﻧﻴﺔ واﻟﻨﻤﺎزج اﻟﻐﻴﺮ ﺧﻄﻴﺔ )(١ -٥ )(٢ -٥ )(٣ -٥ )(٤ -٥
اﻻﻧﺣدار اﻟﺧطﻰ اﻟﻣﺗﻌدد ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﺗﻌدد اﻻﻧﺣدار ﻣن اﻟدرﺟﺔ اﻟﺛﺎﻧﯾﺔ اﻛﺗﺷﺎف ﻣﺧﺎﻟﻔﺎت ﻓروض اﻟﺗﺣﻠﯾل ﻓﻰ اﻻﻧﺣدار اﻟﻣﺗﻌدد ) (١ -٤ -٥رﺳوم اﻟﺑواﻗﻰ ) (٢ -٤ -٥اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻰ ﺳﺗودﻧت ٧
) (٣ -٤ -٥اﺳﺗﺧدام ﻣﺻﻔوﻓﺔ اﻟﻘﺑﻌﺔ ﻟﻠﺗﻌرف ﻋﻠﻰ ﻣﺷﺎھدات ﻗﺎﺻﯾﺔ ﻓﻰ ﻗﯾم x ) (٤ -٤ -٥اﺳﺗﺧدام ﺑواﻗﻰ ﺳﺗودﻧت اﻟﻣﺣذوﻓﺔ ﻟﻠﺗﻌرف ﻋﻠﻰ ﻗﯾم ﻗﺎﺻﯾﺔ ﻟﻠﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ) ( ٥ -٤ -٥ﺗﺣدﯾد اﻟﻣﺷﺎھدات اﻟﻣؤﺛرة
)(٥ -٥
) (٦ -٤ -٥اﻻرﺗﺑﺎط اﻟذاﺗﻰ ) (٧ -٤ -٥ﻣﺷﻛﻠﺔ ﻋدم اﻟﺧطﯾﺔ ) (٨ -٤ -٥اﻻرﺗﺑﺎط اﻟﺧطﻰ اﻟﻣﺗﻌدد وطرق اﻟﻛﺷف ﻋﻠﯾﮫ ﻧﻣﺎزج اﻻﻧﺣدار اﻟﻐﯾر ﺧطﯾﺔ
اﻟﻔﺼـﻞ اﻟﺴﺎدس :ﺗﺤﻠﻴﻞ اﻟﺘﺒﺎﻳﻦ )(١ -٦ )(٢ -٦
)(٣ -٦ )(٤ -٦ )(٥ -٦
ﻣﻘدﻣﺔ اﻟﺗﺻﻧﯾف اﻻﺣﺎدى: ) (١-٢-٦اﺧﺗﺑﺎرات ﺗﺟﺎﻧس ﻋدة ﺗﺑﺎﯾﻧﺎت ) (٢-٢-٦اﺧﺗﺑﺎر ﻧﯾوﻣن –ﻛﻠز ﻟﻠﻣدى اﻟﻣﺗﻌدد اﻟﺗﺻﻧﯾف اﻟﺛﻧﺎﺋﻰ ،ﻣﺷﺎھدة واﺣدة ﻓﻰ ﻛل ﺧﻠﯾﺔ اﻟﺗﺻﻧﯾف اﻟﺛﻧﺎﺋﻰ ،ﻋدة ﻣﺷﺎھدات ﻓﻰ ﻛل ﺧﻠﯾﺔ ﺑﻌض ﺗﺻﺎﻣﯾم اﻟﺗﺟﺎرب اﻟﺑﺳﯾطﺔ ) (١ -٥ -٦ﺗﺻﻣﯾم و ﺗﺣﻠﯾل اﻟﺗﺟﺎرب ذات اﻟﻌﺎﻣل اﻟواﺣد:اﻟﺗﺻﻣﯾم اﻟﺗﺎم ﻟﻠﺗﻌﺷﯾﺔ ) (٢ -٥ -٦ﺗﺻﻣﯾم اﻟﻘطﺎﻋﺎت اﻟﻛﺎﻣﻠﺔ اﻟﻌﺷواﺋﯾﺔ )ﺗﺟﺎرب ذات اﻟﻌﺎﻣل اﻟواﺣد( ) ( ٣ -٥ -٦ﺗﺻﻣﯾم اﻟﻣرﺑﻊ اﻟﻼﺗﯾﻧﻲ :ﺗﺟﺎرب ذات اﻟﻌﺎﻣل اﻟواﺣد
اﻟﻔﺼـﻞ اﻟﺴﺎﺑﻊ :اﻻﺧﺘﺒﺎرات اﻟﻼﻣﻌﻠﻤﻴﺔ )(١ -٧ )( ٢ - ٧ )(٣ -٧ )(٤ -٧ )(٥ -٧ )(٦ -٧ )(٧ -٧ )(٨ -٧ )(٩ -٧ )(١٠ -٧ )(١١ -٧
ﻣﻘدﻣـﺔ اﺧﺗﺑﺎر ﻣرﺑﻊ ﻛﺎي ﻟﻼﺳﺗﻘﻼل اﺧﺗﺑﺎر ﻣرﺑﻊ ﻛﺎي ﻟﻠﺗﺟﺎﻧس اﺧﺗﺑﺎر اﻹﺷﺎرة ﻟﻌﯾﻧﺔ واﺣدة اﺧﺗﺑﺎر إﺷﺎرة اﻟرﺗب اﺧﺗﺑﺎرات ﺗﺗﻌﻠق ﺑﻣﻌﻠﻣﺔ اﻟﻧﺳﺑﺔ اﺧﺗﺑﺎر اﻟدورات اﺧﺗﺑﺎر اﻹﺷﺎرة ﻟﻌﯾﻧﺗﯾن ﻣرﺗﺑطﺗﯾن "ﻋﯾﻧﺔ ﻣزدوﺟﺔ" اﺧﺗﺑﺎر Mann-Whitney-Wilcoxon اﺧﺗﺑﺎر Kruskal-Wallis اﺧﺗﺑﺎر ﻓرﯾدﻣﺎن ﻟﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻟﻠرﺗب ﻓﻲ اﺗﺟﺎھﯾن ٨
)(١٢ -٧ )(١٣ -٧
اﺧﺗﺑﺎر ﻛوﻛران ﻟﻠﻌﯾﻧﺎت اﻟﻣرﺗﺑطﺔ اﺧﺗﺑﺎرات ﺣول اﻻرﺗﺑﺎط اﻟﻣراﺟﻊ اﻟﻣﻼﺣق
٩
اﻟﻔﺻل اﻷول ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ
١٠
) ( ١-١ﻣﻘدﻣﺔ
Introduction
ﯾﮭﺗم ﻓرع اﻹﺣﺻﺎء اﻻﺳﺗدﻻﻟﻲ ﺑﺎﻟﺗﻌﻣﯾم واﻟﺗﻧﺑؤ ،ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﯾﻣﻛن اﻟﻘول أن ﻣﺗوﺳط دﺧل اﻟﻔرد ﻓﻲ ﺑﻠد ﻣﺎ 86000$ﻓﻲ اﻟﺳﻧﺔ وذﻟك ﺑﻧﺎء ﻋﻠﻰ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ اﺧﺗﯾرت ﻣن ھذا اﻟﺑﻠد. وﺑﺗوﺿﯾﺢ آﺧر ﯾﻣﻛن أن ﻧﺗوﻗﻊ ﺑﻧﺎء ﻋﻠﻰ أراء ﻣﺟﻣوﻋﺔ ﻣن اﻷﺷﺧﺎص ﻓﻲ اﻟﺷﺎرع أن %80ﻣن أﺻوات اﻟﻧﺎﺧﺑﯾن ﻓﻲ ﻣدﯾﻧﺔ ﻣﺎ ﺳوف ﺗﻌطﻰ ﻟﻣرﺷﺢ ﻣﻌﯾن .ﻛﻣﺎ ﯾﻣﻛن اﻟﺗوﻗﻊ أن ﻋﻣر اﻟﻣﺻﺑﺎح اﻟﻛﮭرﺑﺎﺋﻲ ﻣن إﻧﺗﺎج ﻣﺻﻧﻊ ﻣﺎ ﯾﺗراوح ﺑﯾن 1150ﺳﺎﻋﺔ و 1250ﺳﺎﻋﺔ ﺑدرﺟﺔ ﺛﻘﺔ ﻣﻌﯾﻧﺔ .ﻓﺈﻧﻧﺎ ﻧﺟد ﻓﻲ ﻛل ﻣﺛﺎل ﻣن اﻷﻣﺛﻠﺔ اﻟﺳﺎﺑﻘﺔ ،ﺗم ﺣﺳﺎب إﺣﺻﺎء ﻣن ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﺗم اﺧﺗﯾﺎرھﺎ ﻣن اﻟﻣﺟﺗﻣﻊ ﻣوﺿﻊ اﻟدراﺳﺔ ،وﻣن ﺗﻠك اﻹﺣﺻﺎءات أﻣﻛﻧﻧﺎ اﻟوﺻول إﻟﻰ ﺟﻣل ﺗﺧص ﻗﯾم اﻟﻣﻌﺎﻟم واﻟﺗﻲ ﻗد ﺗﻛون ﺻﺣﯾﺣﺔ أو ﻏﯾر .اﻟﺗﻌﻣﯾم ﻣن اﻹﺣﺻﺎء إﻟﻰ اﻟﻣﻌﻠﻣﺔ ﯾﻛون ﺑﺛﻘﺔ ﻓﻘط إذا اﺳﺗطﻌﻧﺎ أن ﻧﻔﮭم اﻟﻌﻼﻗﺔ ﺑﯾن اﻟﻣﺟﺗﻣﻊ وﻋﯾﻧﺎﺗﮫ. ﻣن اﻟﻣﻌروف ان اﻹﺣﺻﺎء ﻣﺗﻐﯾر ﻋﺷواﺋﻲ ﯾﻌﺗﻣد ﻗﯾﻣﺗﮫ ﻓﻘط ﻋﻠﻰ اﻟﻌﯾﻧﺔ ،وﺑﺎﻟﺗﺎﻟﻲ ﻓﺈن ﻧﻔس اﻟﺣﺳﺎﺑﺎت ﻟﻌﯾﻧﺎت ﻣﺧﺗﻠﻔﺔ ﻣن اﻟﻣﺟﺗﻣﻊ ﺗؤدي إﻟﻰ ﻗﯾم ﻣﺧﺗﻠﻔﺔ ﻟﻺﺣﺻﺎء .ھذه اﻻﺧﺗﻼﻓﺎت ﻓﻲ ﻗﯾم اﻹﺣﺻﺎء ﺗﻌﺗﻣد ﻋﻠﻰ ﺣﺟم اﻟﻣﺟﺗﻣﻊ وﺣﺟم اﻟﻌﯾﻧﺎت واﻟطرﯾﻘﺔ اﻟﺗﻲ اﺳﺗﺧدﻣت ﻓﻲ اﺧﺗﯾﺎر اﻟﻌﯾﻧﺎت اﻟﻌﺷواﺋﯾﺔ .إذا ﻛﺎن ﺣﺟم اﻟﻣﺟﺗﻣﻊ ﻛﺑﯾرا ً أو ﻻ ﻧﮭﺎﺋﻲ ﻓﺈن اﻟﺗوزﯾﻊ اﻹﺣﺗﻣﺎﻟﻲ ﻟﻺﺣﺻﺎء ﻓﻲ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑﺈرﺟﺎع ﺳوف ﯾﻛون ﻧﻔﺳﮫ ﻓﻲ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑدون إرﺟﺎع .وﻣن ﻧﺎﺣﯾﺔ أﺧرى ﻓﺈن اﻟﺳﺣب ﺑﺈرﺟﺎع ﻣن ﻣﺟﺗﻣﻊ ﺻﻐﯾر ﻣﺣدود ﯾﻌطﻲ ﺗوزﯾﻌﺎ ً ﻟﻺﺣﺻﺎء ﯾﺧﺗﻠف ﻗﻠﯾﻼ ً ﻋن اﻟﺳﺣب ﺑدون إرﺟﺎع. أﺧﯾرا ً اﻟﻣﻌﺎﯾﻧﺔ ﻣﻊ اﻹرﺟﺎع ﻣن ﻣﺟﺗﻣﻊ ﻣﺣدود ﯾﻛﺎﻓﺊ اﻟﻣﻌﺎﯾﻧﺔ ﻣن ﻣﺟﺗﻣﻊ ﻻ ﻧﮭﺎﺋﻲ وذﻟك ﻟﻌدم وﺟود ﺣدود ﻟﺣﺟم اﻟﻌﯾﻧﺔ اﻟﻣﺧﺗﺎرة ﻣن اﻟﻣﺟﺗﻣﻊ. ﺗﻌرﯾف : اﻟﺗوزﯾﻊ اﻹﺣﺗﻣﺎﻟﻲ ﻷي إﺣﺻﺎء ﯾﺳﻣﻰ اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ .sampling distribution ﺗﻌرﯾف : اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻷي إﺣﺻﺎء ﯾﺳﻣﻲ اﻟﺧطﺄ اﻟﻣﻌﯾﺎري standard error ﻟﻺﺣﺻﺎء. ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل اﻟﺗوزﯾﻊ اﻻﺣﺗﻣﺎﻟﻲ ﻟﻺﺣﺻﺎء Xﯾﺳﻣﻰ اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻠﻣﺗوﺳط ،ﻛﻣﺎ أن اﻟﺧطﺄ اﻟﻣﻌﯾﺎري ﻟﻠﻣﺗوﺳط ھو اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء . X ﻓﻲ ھذا اﻟﻔﺻل ﺳوف ﻧدرس ﺑﻌض ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ اﻷﻛﺛر اﺳﺗﺧداﻣﺎ ﻓﻲ اﻹﺣﺻﺎء .اﻟﺗطﺑﯾﻘﺎت ﻋﻠﻰ ﺗﻠك اﻟﺗوزﯾﻌﺎت اﻟﻌﯾﻧﯾﺔ ﺗﺧص ﻣﺷﺎﻛل اﻻﺳﺗدﻻل اﻹﺣﺻﺎﺋﻲ اﻟﺗﻲ ﺳوف ﻧﺗﻧﺎوﻟﮭﺎ ﻓﻲ اﻟﻔﺻول اﻟﺗﺎﻟﯾﺔ.
) ( ٢-١ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ اﻟطﺑﯾﻌﯾﺔ Normal Sampling Distributions
١١
إذا أﺧذﻧﺎ ﻋﯾﻧﺎت ﻣﺗﻛررة ﻣن اﻟﺣﺟم nﻣن ﺗوزﯾﻊ ﻣﺗﺻل ﻟﮫ ﻣﺗوﺳط µوﺑﺗﺑﺎﯾن .σ2ﻟﻛل ﻋﯾﻧﺔ ﺛم ﺣﺳﺎب اﻟﻘﯾﻣﺔ yﻹﺣﺻﺎء ﻣﺎ ،Yواﻟذي ﻧﻔﺳﮫ ﻣﺗﻐﯾر ﻋﺷواﺋﻲ ﻣﺗﺻل .ﺑﻔرض أن Yﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ﺑﻣﺗوﺳط Yواﻧﺣراف ﻣﻌﯾﺎري . Yاﻟﻧظرﯾﺔ اﻟﺗﺎﻟﯾﺔ ﺗﻧص ﻋﻠﻰ أن: ﻧظرﯾﺔ : إذا ﻛﺎن yﻗﯾﻣﺔ ﻟﻺﺣﺻﺎء Yواﻟذي ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﺑﻣﺗوﺳط Yواﻧﺣراف ﻣﻌﯾﺎري ، Y ﻓﺈن: y Y z Y ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ Zﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﺣﯾث: Y Y Z . Y ﯾﻣﻛن ﺗطﺑﯾق اﻟﻧظرﯾﺔ اﻟﺳﺎﺑﻘﺔ ﻟﻺﺣﺻﺎءات اﻟﻣﺣﺳوﺑﺔ ﻣن ﻋﯾﻧﺎت ﻋﺷواﺋﯾﺔ اﺧﺗﯾرت ﻣن ﻣﺟﺗﻣﻌﺎت ﻣﺗﻘطﻌﺔ ،ﺳواء ﻣﺣدودة أو ﻏﯾر ﻣﺣدودة ،واﻟﺗﻲ اﻟﺗوزﯾﻌﺎت اﻟﻌﯾﻧﯾﺔ ﻹﺣﺻﺎءاﺗﮭﺎ ﺗﻘرﯾﺑﺎ ً ﺗﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً .ھذا وﯾﻣﻛﻧﻧﺎ اﺳﺗﺧدام ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﻓﻲ اﻟﻣﻠﺣق ) (١ﻓﻲ ﺣﺳﺎب اﻻﺣﺗﻣﺎﻻت اﻟﺗﻲ ﯾﺄﺧذھﺎ اﻷﺣﺻﺎء ﻓﻲ ﻓﺗرات ﻣﻌﯾﻧﺔ وﺳوف ﻧﺣﺗﺎج إﻟﻰ ﺣﺳﺎب اﻟﻘﯾﻣﺔ z واﻟﺗﻰ 2
ﺗﻣﺛل ﻗﯾﻣﺔ zاﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوي 2 اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻲ ﻓﻰ ﻣﻠﺣق ) (١ﺣﯾث ﯾﺗم ﺣﺳﺎب ) . P(0 Z z
واﻟﻣﺳﺗﺧرﺟﮫ ﻣن ﺟدول اﻟﺗوزﯾﻊ
2
ﯾﻘوم ﺑرﻧﺎﻣﺞ Mathematicaﺑﺣﺳﺎب اﻟﻘﯾﻣﺔ z ﻛﻣﺎ ﯾﺗﺿﺢ ﻣن اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ . 2
ﻣﺛﺎل )(١-١ ﻗدر اﻟﻘﯾم z
ﻟﻠﻘﯾم .1,.05,.01,.001,.0001,.00001
2
اﻟﺣــل : ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة : Statistics`ContinuousDistributionsوذﻟك ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰ : `<<Statistics`ContinuousDistributions وﻟﻠﺗذﻛﯾر ﻓﺈن اﻟﺣزﻣﺔ اﻟﺟﺎھزة DiscriptiveStatisticsﺗﺗﺣﻣل ﺗﻠﻘﺎﺋﯾﺎ . اﻻﻣر] zdist=NormalDistribution[0,1ﺣﯾث ١٢
: ﯾﺳﺗﺧدم اﻻﻣرz ﯾﻌرف اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻲ وﻟﺣﺳﺎب ﻗﯾم ﻋدﯾدة ﻟـzdist 2 commonvalues=Map[{#,(100-#)/100,(100#)/200,Quantile[zdist,(100+#)/200]}&,{90,95,99,99.9,99.99,9 9.999}]//N
{x,(100 x) /100, (100 x) / 200, z }
وذﻟﻚ ﻟﺘﻘﺪﯾﺮ اﻟﻘﺎﺋﻤﺔ
2
: ﺑﺣﯾث انX=90,95,99,99.9,99.999 : ﻟﻛل ﻣن اﻟﻘﯾم
(100 x) (100 x) , . 100 200 2
: ﺑﺎﺳﺗﺧدام اﻻﻣر
TableFormcommonvalues, TableHeadings , "Confidence Level", , 2, z2 ﯾﺗم اظﮭﺎر اﻟﺟدول اﻟﺗﺎﻟﻰ Confidence Level
2
z
90. 95. 99. 99.9 99.99 99.999
0.1 0.05 0.01 0.001 0.0001 0.00001
0.05 0.025 0.005 0.0005 0.00005 5. 106
1.64485 1.95996 2.57583 3.29053 3.89059 4.41717
2
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`ContinuousDistributions` zdist=NormalDistribution[0,1];
commonvalues=Map[{#,(100-#)/100,(100#)/200,Quantile[zdist,(100+#)/200]}&,{90,95,99,99.9,99.99,99 .999}]//N; TableFormcommonvalues,
TableHeadings , "Confidence Level", , 2, z2
١٣
z
2
1.64485 1.95996 2.57583 3.29053 3.89059 4.41717
0.05 0.025 0.005 0.0005 0.00005 5. 106
2
0.1 0.05 0.01 0.001 0.0001 0.00001
Confidence Level 90. 95. 99. 99.9 99.99 99.999
) (٣-١ﺗوزﯾﻌﺎت اﻟﻣﻌﺎﯾﻧﺔ ﻟﻠﻣﺗوﺳط Sampling Distributions of the Mean ﯾﻌﺗﺑر ﺗوزﯾﻊ اﻟﻣﻌﺎﯾﻧﺔ ﻟﻠﻣﺗوﺳط Xأھم ﺗوزﯾﻊ ﻣﻌﺎﯾﻧﺔ ﺳوف ﻧﺗﻧﺎوﻟﮫ ﻓﻲ ھذا اﻟﻔﺻل .إن ﺷﻛل وﻧوع اﻟﺗوزﯾﻊ اﻻﺣﺗﻣﺎﻟﻲ ﻟﻣﺟﺗﻣﻊ ﻣﺗوﺳط اﻟﻌﯾﻧﺎت ) اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻠﻣﺗوﺳط ( ﯾﻌﺗﻣد ﻋﻠﻰ ﺷﻛل اﻟﻣﺟﺗﻣﻊ اﻷﺻﻠﻲ اﻟذي اﺧﺗﯾرت ﻣﻧﮫ اﻟﻌﯾﻧﺎت .اﻟﻧظرﯾﺔ اﻵﺗﯾﺔ ﺗﻌطﻲ اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻠﻣﺗوﺳط إذا ﻛﺎن اﻟﻣﺟﺗﻣﻊ اﻷﺻﻠﻲ اﻟﺗﻲ اﺧﺗﯾرت ﻣﻧﮫ اﻟﻌﯾﻧﺎت ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً. ﻧظرﯾﺔ : إذا أﺧذﻧﺎ ﻋﯾﻧﺎت ﻣﺗﻛررة ﻣن ﻣﺟﺗﻣﻊ ﻣﻌروف أﻧﮫ ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﺑﻣﺗوﺳط µواﻧﺣراف ﻣﻌﯾﺎري σﻓﺈن اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﺑﻣﺗوﺳط X واﻧﺣراف
ﻣﻌﯾﺎري n ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء . X
X ﺣﯾث Xو Xﯾرﻣزان ﻟﻠﻣﺗوﺳط واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻋﻠﻰ اﻟﺗواﻟﻲ
ﻓﻲ ﻛﺛﯾر ﻣن اﻟﺣﺎﻻت ﯾﻛون اﻟﺗوزﯾﻊ اﻻﺣﺗﻣﺎﻟﻲ ﻟﻠﻣﺟﺗﻣﻊ اﻷﺻﻠﻲ ﻏﯾر طﺑﯾﻌﻲ وﯾﺗطﻠب اﻷﻣر ﻣﻌرﻓﺔ اﻟﺗوزﯾﻊ اﻻﺣﺗﻣﺎﻟﻲ ﻟﻠوﺳط اﻟﺣﺳﺎﺑﻲ . X ﻓﻰ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑﺎرﺟﺎع ﻣن ﻣﺟﺗﻣﻊ ﻣﺣدود ﻓﺈن اﻟﻣﺗوﺳط اﻟﺣﺳﺎﺑﻲ ﻟﻺﺣﺻﺎء Xﯾﺳﺎوي ﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﯾرت ﻣﻧﮫ اﻟﻌﯾﻧﺎت اﻟﻌﺷواﺋﯾﺔ وﻻ ﯾﻌﺗﻣد ﻋﻠﻰ ﺣﺟم اﻟﻌﯾﻧﺔ .ﺑﯾﻧﻣﺎ اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻺﺣﺻﺎء Xﯾﻌﺗﻣد ﻋﻠﻰ ﺣﺟم اﻟﻌﯾﻧﺔ وﯾﺳﺎوي اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻣﺟﺗﻣﻊ اﻷﺻﻠﻲ σﻣﻘﺳوﻣﺎ ﻋﻠﻰ . nﻟﻠﺗﺳﮭﯾل ﺳوف ﻧﺳﺗﺧدم ﻣﺟﺗﻣﻌﺎ ﻣﻧﻔﺻﻼ ﻣﻧﺗظﻣﺎ واﻟﻣوﺿﺢ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ:
ﻣﺛﺎل ): (٢-١ ﻣﺟﺗﻣﻊ ﻣﺣدود ﯾﺗﻛون ﻣن اﻟﻘﯾم . 1, 2, 3, 4 أوﺟد اﻟﻣدرج اﻟﺗﻛراري ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﻋﻧد ﺳﺣب ﻋﯾﻧﺎت ﻋﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م n 4 2 2 . X ﻣﻊ اﻹرﺟﺎع و ﺗﺣﻘق أن , X n ١٤
اﻟﺣــل: 1 2 3 4 2.5 4
واﻧﺣراﻓﮫ اﻟﻣﻌﯾﺎري:
(1 2.5)2 (2 2.5) 2 (3 2.5) 2 (4 2.5) 2 1.118. 4 اﻟﻣدرج اﻟﺗﻛراري ﻟﮭذا اﻟﻣﺟﺗﻣﻊ ﻣوﺿﺢ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ.
ﺑﻔرض أﻧﮫ ﺗم اﺧﺗﯾﺎر ﻛل اﻟﻌﯾﻧﺎت ﻣن اﻟﺣﺟم n 2ﻣن ھذا اﻟﻣﺟﺗﻣﻊ ﺑﺈرﺟﺎع واﻟذي ﯾﻛﺎﻓﺊ اﻟﻣﻌﺎﯾﻧﺔ ﻣن ﻣﺟﺗﻣﻊ ﻻ ﻧﮭﺎﺋﻲ .ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ اﻟﺗﻲ ﯾﻣﻛن اﺧﺗﯾﺎرھﺎ )ﻋدد اﻟﻌﯾﻧﺎت Nn =42 =16ﻋﯾﻧﺔ ( ﻣن ھذا اﻟﻣﺟﺗﻣﻊ ﻣﻊ ﻗﯾﻣﺗﮭﺎ. 8
7
6
5
4
3
2
1
رﻗم اﻟﻌﯾﻧﺔ
2,4
2,3
2,2
2,1
1,4
1,3
1,2
1,1
اﻟﻘﯾم
16
15
14
13
12
11
10
9
رﻗم اﻟﻌﯾﻧﺔ
4,4
4,3
4,2
4,1
3,4
3,3
3,2
3,1
اﻟﻘﯾم
ﻟﻛل ﻋﯾﻧﺔ ﺗم ﺣﺳﺎب xواﻟﺗوزﯾﻊ اﻟﺗﻛراري ﻟﻣﺟﺗﻣﻊ ﻣﺗوﺳط اﻟﻌﯾﻧﺎت اﻟﺗﻲ ﺣﺟم ﻛل ﻣﻧﮭﺎ n 2
ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ وﺗوزﯾﻌﮫ اﻟﺗﻛراري ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ : 4
3.5
3
2.5
2
1.5
1
x
1
2
3
4
3
2
1
fاﻟﺗﻛرار
١٥
ﯾﻼﺣظ أن ﺗوزﯾﻊ اﻟﻣﻌﺎﯾﻧﺔ ﻟﻺﺣﺻﺎء Xﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ ﺗﻘرﯾﺑﺎ ً طﺑﯾﻌﻲ .اﻟﻣﺗوﺳط واﻹﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﺗم ﺣﺳﺎﺑﮭﺎ ﻣن اﻟﺟدوﻟﯾن اﻟﺳﺎﺑﻘﯾﯾن وھﻣﺎ ﻋﻠﻰ اﻟﺗواﻟﻲ : f x 40 X 2.5 f 16 2 10 ) f (x 2.5 X 16 f
1.118 . 2 n
0.791
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematica ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
وﻓﯾﻣﺎ ﯾﻠﻰ
}a={1,2,3,4 }{1,2,3,4 n=2 2 ]}a1=Table[a,{i,n }}{{1,2,3,4},{1,2,3,4 ]]a2=Outer[List,Apply[Sequence,a1 {{{1,1},{1,2},{1,3},{1,4}},{{2,1},{2,2},{2,3},{2,4}},{{3,1}, }}}{3,2},{3,3},{3,4}},{{4,1},{4,2},{4,3},{4,4 ]a3=Flatten[a2,n-1 }{{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2 }},{3,3},{3,4},{4,1},{4,2},{4,3},{4,4 ]fh=Transpose[a3
١٦
{{1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4},{1,2,3,4,1,2,3,4,1,2,3,4, 1,2,3,4}}
ax ApplyPlus,
fh N n
{1.,1.5,2.,2.5,1.5,2.,2.5,3.,2.,2.5,3.,3.5,2.5,3.,3.5,4.} <<Statistics`DataManipulation` ff=Frequencies[ax] {{1,1.},{2,1.5},{3,2.},{4,2.5},{3,3.},{2,3.5},{1,4.}} <<Graphics`Graphics` BarChart[ff] 4
3
2
1
1.
1.5
2.
2.5
3.
3.5
4.
Graphics w[x_]:=Length[x] z=Transpose[ff] {{1,2,3,4,3,2,1},{1.,1.5,2.,2.5,3.,3.5,4.}}
xb
Dotz1, z2 wax
2.5
vxb 0.625
sxb
Dotz1, z2 xb^2 wax
vxb
0.790569 =Mean[a]//N 2.5 2=Mean[(a-)^2] 1.25
2 1.11803 xb True
s
١٧
s
sxb
n
True
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت اﻟﻘﺎﺋﻣﺔ } a={1,2,3,4وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=2
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﻣدرج اﻟﺗﻛرارى ﻟﺗوزﯾﻊ Xﻣن اﻻﻣر ]BarChart[ff
اﻟﻣﺗوﺳط ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﻣﻦ اﻻﻣﺮ Dotz1, z2 xb wax واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﻣﻦ اﻻﻣﺮ sxb vxb وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﻣن اﻻﻣر =Mean[a]//N
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻣن اﻻﻣر s 2 وﯾﻣﻛن اﺛﺑﺎت ان X ﻣن اﻻﻣر xb
واﻟﻣﺧرج ھو True
وﯾﻣﻛن اﺛﺑﺎت ان
n
X
ﻣن اﻻﻣر s
sxb n واﻟﻣﺧرج ھو True
١٨
ﻧظرﯾﺔ :إذا اﺧﺘﯿﺮت ﻛﻞ اﻟﻌﯿﻨﺎت اﻟﻤﻤﻜﻨﺔ ﻣﻦ اﻟﺤﺠﻢ nﺑﺈرﺟﺎع ﻣﻦ ﻣﺠﺘﻤﻊ ﻣﺤﺪود ﻣﻦ اﻟﺤﺠﻢ Nوﻟﮫ ﻣﺘﻮﺳﻂ µواﻧﺤﺮاف ﻣﻌﯿﺎري σﻓﺈن اﻟﺘﻮزﯾﻊ اﻟﻌﯿﻨﻲ ﻟﻺﺣﺼﺎء Xﺗﻘﺮﯾﺒﺎ ً ﯾﺘﺒﻊ ﺗﻮزﯾﻌﺎ ً طﺒﯿﻌﯿﺎ ً ﺑﻤﺘﻮﺳﻂ x وﻋﻠﻰ ذﻟﻚ: x واﻧﺤﺮاف ﻣﻌﯿﺎري n x =z n ھﻲ ﻗﯿﻤﺔ ﻟﻤﺘﻐﯿﺮ ﻋﺸﻮاﺋﻲ Zﯾﺘﺒﻊ اﻟﺘﻮزﯾﻊ اﻟﻄﺒﯿﻌﻲ اﻟﻘﯿﺎﺳﻲ .اﻟﻨﻈﺮﯾﺔ اﻟﺴﺎﺑﻘﺔ ﺻﺤﯿﺤﺔ ﻷي ﻣﺠﺘﻤﻊ ﻣﺤﺪود ﻋﻨﺪﻣﺎ . n 30 ﻓﻰ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑدون ارﺟﺎع ﻣن ﻣﺟﺗﻣﻊ ﻣﺣدود ﻓﺈن اﻟﻣﺗوﺳط اﻟﺣﺳﺎﺑﻲ ﻟﻺﺣﺻﺎء Xﯾﺳﺎوي ﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﯾرت ﻣﻧﮫ اﻟﻌﯾﻧﺎت اﻟﻌﺷواﺋﯾﺔ واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻺﺣﺻﺎء Xھو Nn X n N 1 ﻟﻠﺗﺳﮭﯾل ﺳوف ﻧﺳﺗﺧدم ﻣﺟﺗﻣﻌﺎ ﻣﻧﻔﺻﻼ ﻣﻧﺗظﻣﺎ واﻟﻣوﺿﺢ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ:
ﻣﺛﺎل ): (٣-١ ﺑﻔ رض أﻧﻧ ﺎ ﺳ ﺣﺑﻧﺎ ﻛ ل اﻟﻌﯾﻧ ﺎت اﻟﻣﻣﻛﻧ ﺔ ﻣ ن اﻟﺣﺟ م n 2ﻣ ن ﻣﺟﺗﻣﻌﻧ ﺎ اﻟﻣﻧ ﺗظم واﻟ ذى ﻣﺷ ﺎھداﺗﮫ 1, 2, 3, 4وﻟﻛ ن ﺑ دون إرﺟ ﺎع .ﻟﻛ ل ﻋﯾﻧ ﺔ ﺗ م ﺣﺳ ﺎب ﻣﺗوﺳ ط اﻟﻌﯾﻧ ﺔ . xﯾﻌط ﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ اﻟﺗﻰ ﯾﻣﻛن اﺧﺗﯾﺎرھﺎ ﻣن ھذا اﻟﻣﺟﺗﻣﻊ ﺑدون إرﺟ ﺎع ﻣ ﻊ ﻗ ﯾم ﻛ ل !N !4 ﻋﯾﻧﺔ (. ﻋﯾﻧﺔ ) ﻋدد اﻟﻌﯾﻧﺎت 12 !(N n)! 2 6
5
4
3
2
1
رﻗم اﻟﻌﯾﻧﺔ
2,4
2,3
2,1
1,4
1,3
1,2
اﻟﻘﯾم
12
11
10
9
8
7
رﻗم اﻟﻌﯾﻧﺔ
4,3
4,2
4,1
3,4
3,2
3,1
اﻟﻘﯾم
اﻟﺗوزﯾ ﻊ اﻟﺗﻛ راري ﻟﻣﺟﺗﻣ ﻊ ﻣﺗوﺳ ط اﻟﻌﯾﻧ ﺎت ﻣ ن اﻟﺣﺟ م n = 2ﻣﻌط ﻰ ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ. اﻟﻣدرج اﻟﺗﻛراري ﻟﻣﺟﺗﻣﻊ ﻣﺗوﺳط اﻟﻌﯾﻧﺎت ﻣوﺿﺢ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ : 3.5
3.0
2.5
2.0
1.5
x
2
2
4
2
2
f
١٩
ﯾﺗﺿﺢ ﻣن اﻟﺷﻛل اﻟﺳﺎﺑق أن اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻺﺣﺻﺎء Xﻓﻲ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑدون إرﺟﺎع ﻣن ﻣﺟﺗﻣﻊ ﻣﺣدود ﺑﻌﯾدا ﻋن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ ﺣﯾث .n = 2ﻣن اﻟﺟدول اﻟﺳﺎﺑق ﯾﻣﻛن ﺣﺳﺎب اﻟﻣﺗوﺳط واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻺﺣﺻﺎء Xﻋﻠﻰ اﻟﺗواﻟﻲ : f x 30 X 2.5 ، f 12
f (x 2.5)2 5 0.645 f 12 1.118 4 2 N n 0.645 . 2 4 1 n N 1 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . X
}a={1,2,3,4 }{1,2,3,4 n=2 2 ]}a1=Table[a,{i,n }}{{1,2,3,4},{1,2,3,4 ]]a2=Outer[List,Apply[Sequence,a1 {{{1,1},{1,2},{1,3},{1,4}},{{2,1},{2,2},{2,3},{2,4}},{{3,1}, }}}{3,2},{3,3},{3,4}},{{4,1},{4,2},{4,3},{4,4 ]a3=Flatten[a2,n-1 }{{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2 }},{3,3},{3,4},{4,1},{4,2},{4,3},{4,4 ]l[x_]:=Length[x ]m=l[a 4 ٢٠
a4 Dropa3, 1, m n, m 1 {{1,2},{1,3},{1,4},{2,1},{2,3},{2,4},{3,1},{3,2},{3,4},{4,1} ,{4,2},{4,3}} q=Transpose[a4] {{1,1,1,2,2,2,3,3,3,4,4,4},{2,3,4,1,3,4,1,2,4,1,2,3}}
xa ApplyPlus,
q N n
{1.5,2.,2.5,1.5,2.5,3.,2.,2.5,3.5,2.5,3.,3.5} <<Statistics`DataManipulation` ff=Frequencies[xa] {{2,1.5},{2,2.},{4,2.5},{2,3.},{2,3.5}} <<Graphics`Graphics` BarChart[ff] 4
3
2
1
1.5
2.
2.5
3.
3.5
Graphics w=Transpose[ff] {{2,2,4,2,2},{1.5,2.,2.5,3.,3.5}}
xb
Dotw1, w2 lxa
2.5
vxb
Dotw1, w2 xb^2 lxa
0.416667
sxb
vxb
0.645497 =Mean[a]//N 2.5 xb True 2=Mean[(a-)^2] 1.25
s
2
٢١
1.11803 ssxb False
s mn sxb m1 n True
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت اﻟﻘﺎﺋﻣﺔ } a={1,2,3,4وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=2
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﻣدرج اﻟﺗﻛرارى ﻟﺗوزﯾﻊ Xﻣن اﻻﻣر ]BarChart[ff
واﻟﻣﺗوﺳط ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﻣﻦ اﻻﻣﺮ Dotz1, z2 xb wax واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء Xﻣﻦ اﻻﻣﺮ sxb vxb وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﻣن اﻻﻣر =Mean[a]//N
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻣن اﻻﻣر s 2 وﯾﻣﻛن اﺛﺑﺎت ان X ﻣن اﻻﻣر xb
واﻟﻣﺧرج ھو True
وﯾﻣﻛن اﺛﺑﺎت ان Nn x n N 1 ﻣن اﻻﻣر s mn sxb m1 n واﻟﻣﺧرج ھو True
٢٢
ﻧظرﯾﺔ :إذا اﺧﺘﯿﺮت ﻛﻞ اﻟﻌﯿﻨﺎت اﻟﻤﻤﻜﻨﺔ ﻣﻦ اﻟﺤﺠﻢ nﺑﺪون ارﺟﺎع ﻣﻦ ﻣﺠﺘﻤﻊ ﻣﺤﺪود ﻣﻦ اﻟﺤﺠﻢ Nوﻟﮫ ﻣﺘﻮﺳﻂ µواﻧﺤﺮاف ﻣﻌﯿﺎري σﻓﺈن اﻟﺘﻮزﯾﻊ اﻟﻌﯿﻨﻲ ﻟﻺﺣﺼﺎء Xﺗﻘﺮﯾﺒﺎ ً ﯾﺘﺒﻊ ﺗﻮزﯾﻌﺎ ً طﺒﯿﻌﯿﺎ ً Nn Nn ﻣﻌﺎﻣﻞ . X ﯾﺴﻤﻰ اﻟﻤﻘﺪار ﺑﻤﺘﻮﺳﻂ x واﻧﺤﺮاف ﻣﻌﯿﺎري N 1 n N 1 Nn ﯾﻤﻜﻦ اﺳﻘﺎطﮭﺎ ﻣﻦ اﻟﺘﺼﺤﯿﺢ.إذا ﻛﺎن ﺣﺠﻢ اﻟﻌﯿﻨﺔ ﺻﻐﯿﺮ ﺟﺪا ﺑﺎﻟﻨﺴﺒﺔ ﻟﺤﺠﻢ اﻟﻨﺠﺘﻤﻊ ﻓﺈن N 1 اﻟﻤﻌﺎدﻟﺔ.وﻗﺪ ﺟﺮت اﻟﻌﺎدة ﻋﻠﻰ اھﻤﺎل ھﺬا اﻟﺤﺪ ﻋﻨﺪﻣﺎ ﺗﻜﻮن . n .05N ﻟﻠﻣﺟﺗﻣﻌﺎت اﻟﻛﺑﯾرة او اﻻﻧﮭﺎﺋﯾﺔ ﺳواء ﻛﺎﻧت ﻣﺗﺻﻠﺔ او ﻣﺗﻘطﻌﺔ ﺗﻧص اﻟﻧظرﯾﺔ ﻋﻠﻰ : إذا اﺧﺘﯿﺮت ﻛﻞ اﻟﻌﯿﻨﺎت اﻟﻤﻤﻜﻨﺔ ﻣﻦ اﻟﺤﺠﻢ nﻣﻦ ﻣﺠﺘﻤﻊ ﻛﺒﯿﺮ او ﻻﻧﮭﺎﺋﻰ Nﺑﻤﺘﻮﺳﻂ µ ﻧظرﯾﺔ: واﻧﺤﺮاف ﻣﻌﯿﺎري σﻓﺈن اﻟﺘﻮزﯾﻊ اﻟﻌﯿﻨﻲ ﻟﻺﺣﺼﺎء Xﺗﻘﺮﯾﺒﺎ ً ﯾﺘﺒﻊ ﺗﻮزﯾﻌﺎ ً طﺒﯿﻌﯿﺎ ً ﺑﻤﺘﻮﺳﻂ x x وﻋﻠﻰ ذﻟﻚ: واﻧﺤﺮاف ﻣﻌﯿﺎري n x =z n ھﻲ ﻗﯿﻤﺔ ﻟﻤﺘﻐﯿﺮ ﻋﺸﻮاﺋﻲ Zﯾﺘﺒﻊ اﻟﺘﻮزﯾﻊ اﻟﻄﺒﯿﻌﻲ اﻟﻘﯿﺎﺳﻲ .اﻟﺘﻘﺮﯾﺐ ﺳﻮف ﯾﻜﻮن ﺟﯿﺪا إذا ﻛﺎﻧﺖ n 30ﺑﺼﺮف اﻟﻨﻈﺮ ﻋﻦ ﺷﻜﻞ اﻟﺘﻮزﯾﻊ اﻻﺻﻠﻰ اﻟﺬى اﺧﺘﯿﺮت ﻣﻨﮫ اﻟﻌﯿﻨﺎت .إذا ﻛﺎﻧﺖ n 30 اﻟﺘﻘﺮﯾﺐ ﺳﻮف ﯾﻜﻮن ﺟﯿﺪ ﻓﻘﻂ أذا ﻛﺎن اﻟﻤﺠﺘﻤﻊ ﻻ ﯾﺨﺘﻠﻒ ﻛﺜﯿﺮا ﻋﻦ اﻟﺘﻮزﯾﻊ اﻟﻄﺒﯿﻌﻰ.
) :( ٤-١اﻟﺗوزﯾﻌﺎت اﻟﻌﯾﻧﯾﺔ ﻟﻠﻔرق ﺑﯾن ﻣﺗوﺳطﻲ ﻣﺟﺗﻣﻌﯾن Sampling Distribution of Different Between Two Populations Means ﺑﻔرض أن ﻟدﯾﻧﺎ ﻣﺟﺗﻣﻌﯾن اﻷول ﻣﺗوﺳطﮫ 1وﺗﺑﺎﯾﻧﮫ 12واﻟﺛﺎﻧﻲ ﻣﺗوﺳطﮫ 2وﺗﺑﺎﯾﻧﮫ . 22اذا ﻛﺎن اﻟﺳﺣب ﺑﺎرﺟﺎع وﺑﻔرض أن ﻗﯾم اﻟﻣﺗﻐﯾر X1ﺗﻣﺛل ﻣﺗوﺳطﺎت ﻟﻌﯾﻧﺎت ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n1 اﺧﺗﯾرت ﻣن اﻟﻣﺟﺗﻣﻊ اﻷول ،وﻗﯾم اﻟﻣﺗﻐﯾر X 2ﺗﻣﺛل ﻣﺗوﺳطﺎت ﻟﻌﯾﻧﺎت ﻋﺷواﺋﯾﺔ ﻣن اﻟﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻲ وﻣﺳﺗﻘﻠﺔ ﻋن اﻟﻣﺟﺗﻣﻊ اﻷول .اﻟﺗوزﯾﻊ ﻟﻠﻔروق x1 x2ﺑﯾن اﻟﻔﺋﺗﯾن ﻣن ﻣﺗوﺳطﺎت اﻟﻌﯾﻧﺗﯾن اﻟﻣﺳﺗﻘﻠﺗﯾن ﯾﺳﻣﻰ اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء X1 X 2واﻟذى ﻣﺗوﺳطﮫ X X 1 2 2
12 22 وﺗﺑﺎﯾﻧﮫ n1 n 2
2X1 X 2
.
ﻣﺛﺎل ): (٤-١ ٢٣
1
ﻧﻔرض أن اﻟﻣﺟﺗﻣﻊ اﻷول ﻣن اﻟﺣﺟم N1 3وﯾﺗﻛون ﻣن اﻟﻘﯾم 4, 5, 6واﻟﺗﻲ ﻣﺗوﺳطﮭﺎ: 456 1 5 3 وﺗﺑﺎﯾﻧﮭﺎ: 2 2 2 )(4 5) (5 5) (6 5 2 12 3 3 اﻟﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻲ ﯾﺗﻛون ﻣن اﻟﻘﯾﻣﺗﯾن 1, 4وﻟﮭﻣﺎ اﻟﻣﺗوﺳط: 1 4 2 2.5. 2 واﻟﺗﺑﺎﯾن: 2 2 )(1 2.5) (4 2.5 9 22 . 2 4 ﻣن اﻟﻣﺟﺗﻣﻊ اﻷول ﺗم اﺧﺗﯾﺎر ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ ﻣن اﻟﺣﺟم n1 2ﻣﻊ اﻹرﺟﺎع وﺣﺳﺎب اﻟﻣﺗوﺳط x1ﻟﻛل ﻋﯾﻧﺔ .ﺑﻧﻔس اﻟﺷﻛل ﻟﻠﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻲ ﺗم اﺧﺗﯾﺎر ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ ﻣن اﻟﺣﺟم n 2 3وﺣﺳﺎب x 2ﻟﻛل ﻋﯾﻧﺔ .اﻟﻔﺋﺗﺎن ﻣن ﻛل اﻟﻌﯾﻧﺎت وﻣﺗوﺳطﺎﺗﮭﺎ ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ. رﻗم اﻟﻣﺟﺗﻣﻊ اﻟﻌﯾﻧﺔ اﻷول
9
8
7
6
5
4
3
2
1
6, 6
6, 5
6, 4
5, 6
5, 5
5, 4
4, 6
4, 5
4, 4
اﻟﻘﯾم
6
5.5
5
5.5
5
4.5
5
4.5
4
x1
7
6
5
4
3
2
1
8
1, 1, 1 1, 1, 4 1, 4, 1 4, 1, 1 4, 4, 1 1, 4, 4 4, 1, 4 4, 4, 4 4
3
3
3
2
2
2
اﻟﻔروق اﻟﻣﻣﻛﻧﺔ واﻟﺗﻲ ﻋددھﺎ 72ﻣن x1 x2ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ. ٢٤
1
رﻗم اﻟﻣﺟﺗﻣﻊ اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﻲ اﻟﻘﯾم x2
x1 6 5 4 4 4 3 3 3 2
5 4 3 3 3 2 2 2 1
5.5 4.5 3.5 3.5 3.5 2.5 2.5 2.5 1.5
5 4 3 3 3 2 2 2 1
5.5 4.5 3.5 3.5 3.5 2.5 2.5 2.5 1.5
x2 5 4 3 3 3 2 2 2 1
4.5 3.5 2.5 2.5 2.5 1.5 1.5 1.5 0.5
4 3 2 2 2 1 1 1 0
4.5 3.5 2.5 2.5 2.5 1.5 1.5 1.5 0.5
1 2 2 2 3 3 3 4
اﻟﺗوزﯾﻊ اﻟﺗﻛراري ﻟﻺﺣﺻﺎء X1 X 2ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ وﻣدرﺟﮫ اﻟﺗﻛراري ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ. ﻣن اﻟواﺿﺢ أن اﻟﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ X1 X 2ﺗﻘرﯾﺑﺎ ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ طﺑﯾﻌﯾﺎ وھذا اﻟﺗﻘرﯾب ﯾﺗﺣﺳن ﻋﻧدﻣﺎ ﯾزﯾد .n1, n2ﺣﯾث ﻣﺗوﺳط اﻟﻔروق ﻟﻣﺟﺗﻣﻊ اﻟﻌﯾﻧﺎت اﻟﻣﺳﺗﻘﻠﺔ ھو:
X1 X2 1 2. ھذه اﻟﻧﺗﯾﺟﺔ ﯾﻣﻛن اﻟﺗﺣﻘق ﻣﻧﮭﺎ ﻣن اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺣﯾث : f (x1 x 2 ) 180 2.5 5 2.5 1 2 . 72 f
X1 X2
5
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0
x1 x 2
1
2
6
8
13
12
13
8
6
2
1
f
٢٥
أﯾﺿﺎ اﻟﺗﺑﺎﯾن ﻟﻔروق اﻟﻣﺗوﺳطﺎت اﻟﻣﺳﺗﻘﻠﺔ ھو
22 n2
12 n1
2X1 X 2
2 9 / 2 / 3 1.08333. 3 4 ھذه اﻟﻧﺗﯾﺟﺔ ﯾﻣﻛن اﻟﺗﺣﻘق ﻣﻧﮭﺎ ﺑﺳﮭوﻟﺔ وذﻟك ﺑﺣﺳﺎب اﻟﺗﺑﺎﯾن ) (1.08333ﻣن اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق . ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . }a={4,5,6 }{4,5,6 n1=2 2 }b={1,4 }{1,4 n2=3 3 ]}a1=Table[a,{i,n1 }}{{4,5,6},{4,5,6 ]}b1=Table[b,{i,n2 }}{{1,4},{1,4},{1,4 ]a2=Flatten[Outer[List,Apply[Sequence,a1]],n1-1 }}{{4,4},{4,5},{4,6},{5,4},{5,5},{5,6},{6,4},{6,5},{6,6 ]b2=Flatten[Outer[List,Apply[Sequence,b1]],n2-1 {{1,1,1},{1,1,4},{1,4,1},{1,4,4},{4,1,1},{4,1,4},{4,4,1},{4, }}4,4 ]a3=Transpose[a2 ٢٦
{{4,4,4,5,5,5,6,6,6},{4,5,6,4,5,6,4,5,6}} b3=Transpose[b2] {{1,1,1,1,4,4,4,4},{1,1,4,4,1,1,4,4},{1,4,1,4,1,4,1,4}}
c1 ApplyPlus,
a3 N n1
{4.,4.5,5.,4.5,5.,5.5,5.,5.5,6.}
c2 ApplyPlus,
b3 N n2
{1.,2.,2.,3.,2.,3.,3.,4.} xa=Outer[Subtract,c1,c2] {{3.,2.,2.,1.,2.,1.,1.,0.},{3.5,2.5,2.5,1.5,2.5,1.5,1.5,0.5} ,{4.,3.,3.,2.,3.,2.,2.,1.},{3.5,2.5,2.5,1.5,2.5,1.5,1.5,0.5} ,{4.,3.,3.,2.,3.,2.,2.,1.},{4.5,3.5,3.5,2.5,3.5,2.5,2.5,1.5} ,{4.,3.,3.,2.,3.,2.,2.,1.},{4.5,3.5,3.5,2.5,3.5,2.5,2.5,1.5} ,{5.,4.,4.,3.,4.,3.,3.,2.}} ss=Flatten[xa] {3.,2.,2.,1.,2.,1.,1.,0.,3.5,2.5,2.5,1.5,2.5,1.5,1.5,0.5,4., 3.,3.,2.,3.,2.,2.,1.,3.5,2.5,2.5,1.5,2.5,1.5,1.5,0.5,4.,3.,3 .,2.,3.,2.,2.,1.,4.5,3.5,3.5,2.5,3.5,2.5,2.5,1.5,4.,3.,3.,2. ,3.,2.,2.,1.,4.5,3.5,3.5,2.5,3.5,2.5,2.5,1.5,5.,4.,4.,3.,4., 3.,3.,2.} <<Statistics`DataManipulation` f=Frequencies[ss] {{1,0.},{2,0.5},{6,1.},{8,1.5},{13,2.},{12,2.5},{13,3.},{8,3 .5},{6,4.},{2,4.5},{1,5.}} <<Graphics`Graphics` BarChart[f] 12 10 8 6 4 2 0.
0.5
1. 1.5
2.
2.5
3. 3.5
4.
Graphics w=Transpose[f]
٢٧
4.5
5.
{{1,2,6,8,13,12,13,8,6,2,1},{0.,0.5,1.,1.5,2.,2.5,3.,3.5,4., }}4.5,5. ]l[x_]:=Length[x
Dotw1, w2 lss
xb 2.5
Dotw1, w2 xb^2 lss
vxb
1.08333
vxb
sxb
1.04083 ]1=Mean[a 5 2=Mean[b]//N 2.5 1-2xb True 21=Mean[(a-1)^2]//N 0.666667 22=Mean[(b-2)^2]//N 2.25
vxb
22
n2
21
n1 True
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت اﻟﻘﺎﺋﻣﺔ } a={4,5,6ﻟﻠﻣﺟﺗﻣﻊ اﻻول وﺣﺟم اﻟﻌﯾﻧﺔ ﻟﻠﻣﺟﺗﻣﻊ اﻻول ﻣن اﻻﻣر n1=2
اﻟﻘﺎﺋﻣﺔ } b={1,4ﻟﻠﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻰ وﺣﺟم اﻟﻌﯾﻧﺔ ﻟﻠﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻰ ﻣن اﻻﻣر n2=3
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﻣدرج اﻟﺗﻛرارى ﻟﺗوزﯾﻊ X1 X2ﻣن اﻻﻣر ]BarChart[f
واﻟﻣﺗوﺳط ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء X1 X 2ﻣﻦ اﻻﻣﺮ Dotw1, w2 xb lss اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء X1 X 2ﻣﻦ اﻻﻣﺮ ٢٨
sxb vxb وﯾﻣﻛن اﺛﺑﺎت ان X1 X2 1 2ﻣن اﻻﻣر 1-2xb
واﻟﻣﺧرج ھو True
وﯾﻣﻛن اﺛﺑﺎت ان 12 22 2 X1 X 2 n1 n 2 ﻣن اﻻﻣر 22
vxb n2 واﻟﻣﺧرج ھو
21
n1
True ﺗﻘﺗﺻر اﻟدراﺳﺔ ﻣن اﻻن وﻓﻰ اﻟﻔﺻول اﻟﺗﺎﻟﯾﺔ ﻋﻠﻰ اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻠﻔروق ﺑﯾن اﻟﻣﺗوﺳطﺎت اﻟﻣﺳﺗﻘﻠﺔ ﻓﻘط إذا ﻛﺎن ﺣﺟم اﻟﻣﺟﺗﻣﻊ اﻟذى ﺗﺧﺗﺎر ﻣﻧﮫ اﻟﻌﯾﻧﺎت ﻛﺑﯾرا او ﻻﻧﮭﺎﺋﻰ . إذا اﺧﺗﯾرت ﻋﯾﻧﺎت ﻣﺳﺗﻘﻠﺔ ﻣن اﻟﺣﺟم ﻣن ﻣﺟﺗﻣﻌﯾن ﻛﺑﯾرﯾن )او ﻻﻧﮭﺎﺋﯾﯾن (ﻣﺗﻘطﻌﺔ او ﻣﺗﺻﻠﺔ ﻧظرﯾﺔ:
ﺑﻣﺗوﺳطﻰ 1 , 2وﺗﺑﺎﯾﻧﻰ 12 , 22ﻋﻠﻰ اﻟﺗواﻟﻰ ﻓﺈن اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻔروق اﻟﻣﺗوﺳطﺎت X1 X 2ﺗﻘﺮﯾﺒﺎ ً ﯾﺘﺒﻊ ﺗﻮزﯾﻌﺎ ً طﺒﯿﻌﯿﺎ ً ﺑﻤﺘﻮﺳﻂ و ﺗﺒﺎﯾﻦ ﻣﻌﻄﻰ ﻛﺎﻟﺘﺎﻟﻰ:
X1 X2 1 2 , 12 22 n1 n 2
2X1 X 2
وﻋﻠﻰ ذﻟﻚ: ) (x1 x 2 ) (1 2 22 n2
12 n1
=z
ھﻲ ﻗﯿﻤﺔ ﻟﻤﺘﻐﯿﺮ ﻋﺸﻮاﺋﻲ Zﯾﺘﺒﻊ اﻟﺘﻮزﯾﻊ اﻟﻄﺒﯿﻌﻲ اﻟﻘﯿﺎﺳﻲ .اﻟﺘﻘﺮﯾﺐ ﺳﻮف ﯾﻜﻮن ﺟﯿﺪا إذا ﻛﺎن ﻛﻞ ﻣﻦ n1 , n 2 30ﺑﺼﺮف اﻟﻨﻈﺮ ﻋﻦ ﺷﻜﻞ اﻟﺘﻮزﯾﻊ اﻻﺻﻠﻰ اﻟﺬى اﺧﺘﯿﺮت ﻣﻨﮫ اﻟﻌﯿﻨﺎت .إذا ﻛﺎن ﻛﻞ ﻣﻦ n1 , n 2 30اﻟﺘﻘﺮﯾﺐ اﻟﻄﺒﯿﻌﻰ ﻟﺘﻮزﯾﻊ X1 X 2ﯾﻜﻮن ﺟﯿﺪ ﺟﺪا .إذا ﻛﺎن اﻟﻌﯾﻧﺗﯾن ﺗم اﺧﺗﯾﺎرھﻣﺎ ﻣن ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن ﻓﺈن :
) (x1 x 2 ) (1 2 2
n2 2
12 n1
٢٩
z
ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ ﺑﺻرف اﻟﻧظر ﻋن ﺣﺟم ﻛﻼ ﻣن . n1, n 2
) ( ٥-١اﻟﺗوزﯾﻌﺎت اﻟﻌﯾﻧﯾﺔ ﻟﻠﻧﺳب Sampling Distributions of Proportions ﺑﻔرض أن ﻟدﯾﻧﺎ ﻣﺟﺗﻣﻌﺎ ﻣﺎ وأن ﺑﻌض ﻣﻔ ردات ھ ذا اﻟﻣﺟﺗﻣ ﻊ ﺗﺗ وﻓر ﻓﯾﮭ ﺎ ﺻ ﻔﺔ ﻣﻌﯾﻧ ﺔ وأن ﻧﺳ ﺑﺔ ھذه اﻟﻣﻔردات ھﻲ .pﻓﻌﻠﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل pﻗ د ﺗﻛ ون ﻧﺳ ﺑﺔ اﻷﻓ راد اﻟﻣﺻ ﺎﺑﯾن ﺑﺗﺳ وس اﻷﺳ ﻧﺎن ﻓﻲ ﻣدﯾﻧﺔ ﻣﺎ أو ﻧﺳﺑﺔ اﻟطﻠﺑﺔ اﻟﻣدﺧﻧﯾن ﻓﻲ ﻛﻠﯾﺔ ﻣﺎ أو ﻧﺳﺑﺔ اﻟوﺣدات اﻟﻣﻌﯾﺑﺔ ﻓﻲ ﻣﺻﻧﻊ ﻣ ﺎ ...اﻟ ﺦ .إذا أﺧذﻧﺎ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم nﻣن ھذا اﻟﻣﺟﺗﻣﻊ ووﺟدﻧﺎ ﻣن ﺑﯾﻧﮭ ﺎ xﻣﻔ رده ﺗﺗ وﻓر ﻓﯾﮭ ﺎ x اﻟﺻ ﻔﺔ ،وﺗ م ﺣﺳ ﺎب pˆ واﻟﺗ ﻲ ﺗﻣﺛ ل ﻧﺳ ﺑﺔ اﻟﻣﻔ ردات ﻓ ﻲ اﻟﻌﯾﻧ ﺔ واﻟﺗ ﻰ ﺗﺗ وﻓر ﻓﯾﮭ ﺎ اﻟﺻ ﻔﺔ n اﻟﻣﻌﻧﯾﺔ .إذا أﺧ ذﻧﺎ ﻋﯾﻧ ﺎت ﻣﺗﻛ ررة ﻣ ن اﻟﺣﺟ م nﻣ ن ھ ذا اﻟﻣﺟﺗﻣ ﻊ ﻓ ﺈن ˆ Pﺗﺗﻐﯾ ر ﻣ ن ﻋﯾﻧ ﺔ إﻟ ﻰ أﺧرى وﺗﻣﺛل ﻗﯾﻣﺔ ﻟﻺﺣﺻﺎء ˆ . Pاﻵن ﺳ وف ﻧﺗﻌ رف ﻋﻠ ﻰ ﻛﯾﻔﯾ ﺔ اﺷ ﺗﻘﺎق اﻟﺗوزﯾ ﻊ اﻟﻌﯾﻧ ﻲ ﻟﻠﻧﺳ ﺑﺔ وﺧﺻﺎﺋﺻﮫ ﺳواء ﻓﻲ ﺣﺎﻟﺔ اﻟﺳﺣب ﺑﺈرﺟﺎع أو ﺑدون إرﺟﺎع وذﻟك ﻣن اﻷﻣﺛﻠﺔ اﻟﺗﺎﻟﯾﺔ:
ﻣﺛﺎل ):(٥-١ ﻣﺟﺗﻣﻊ ﯾﺗﻛون ﻣن اﻟﻘﯾم 1, 2, 3, 4ﻓﺈذا ﺗم ﺳﺣب ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ ﻣن اﻟﺣﺟ م n = 2ﻣ ن ھ ذا اﻟﻣﺟﺗﻣﻊ )ﺑﺈرﺟﺎع( .اﻟﻣطﻠ وب إﯾﺟ ﺎد اﻟﺗوزﯾ ﻊ اﻟﻌﯾﻧ ﻰ ﻟﻺﺣﺻ ﺎء ˆ Pواﻟ ذي ﯾﻣﺛ ل ﻧﺳ ﺑﺔ ظﮭ ور اﻟ رﻗم 4 ﻓﻲ اﻟﻌﯾﻧﺔ .وإﺛﺑﺎت أن اﻟﻣﺗوﺳط واﻟﺗﺑﺎﯾن ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻺﺣﺻﺎء ˆ Pھﻣﺎ ﻋﻠﻰ اﻟﺗواﻟﻲ :
Pˆ p, pq . n
2Pˆ
اﻟﺣــل : اﻟﺟدول اﻟﺗﺎﻟﻰ ﯾﺣﺗوى ﻋﻠﻰ ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ وﻧﺳﺑﺔ ظﮭور اﻟرﻗم 4ﻓﯾﮭﺎ. ﻋدد ﻣرات ظﮭور 4 0
3,1
9
0
0
0
3, 2
10
0
0
0
0
3, 3
11
0
0
1, 3
0.5
1
3, 4
12
0.5
1
1,4
ﻧﺳﺑﺔ ظﮭور 4 0
اﻟﻘﯾم
ﻧﺳﺑﺔ رﻗم اﻟﻌﯾﻧﺔ ظﮭور 4
٣٠
ﻋدد ﻣرات ظﮭور 4 0
اﻟﻘﯾم
رﻗم اﻟﻌﯾﻧﺔ
1, 1
1
1, 2
2 3 4
0.5
1
4, 1
13
0
0
2, 1
5
0.5
1
4, 2
14
0
0
2, 2
6
0.5
1
4, 3
15
0
0
2, 3
7
1
2
4, 4
16
0.5
1
2, 4
8
اﻟﺗوزﯾ ﻊ اﻟﺗﻛ راري ﻟﻧﺳ ﺑﺔ ظﮭ ور اﻟ رﻗم 4ﻟﻠﻌﯾﻧ ﺎت ﻣ ن اﻟﺣﺟ م n = 2اﻟﺗ ﻲ ﺗ م اﺧﺗﯾﺎرھ ﺎ ﻣ ن اﻟﻣﺟﺗﻣﻊ اﻟ ذى ﺣﺟﻣ ﮫ ) N = 4ﺑﺈرﺟ ﺎع( ﻣﻌط ﺎة ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ وﻣ درﺟﮭﺎ اﻟﺗﻛ راري ﻓ ﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ . 1
0.5
0
ˆP
1
6
9
f
اﻟﺗوزﯾ ﻊ اﻟﺗﻛ راري ﻓ ﻲ اﻟﺷ ﻛل اﻟﺗ ﺎﻟﻰ ﻣﻠﺗ و ﻧﺎﺣﯾ ﺔ اﻟﯾﻣ ـﯾن وذﻟ ك ﻷن . p 0.5إذا ﻛﺎﻧ ت p 0.5ﻓﺈن اﻟﺗوزﯾﻊ ﺳوف ﯾﻛون ﻣﻠﺗوﯾﺎ ﻧﺎﺣﯾﺔ اﻟﯾﺳﺎر .
اﻟﻣﺗوﺳط واﻟﺗﺑﺎﯾن ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﺗم ﺣﺳﺎﺑﮭﻣﺎ ﻣن اﻟﺟدول اﻟﺳﺎﺑق وھﻣﺎ : f pˆ 4 Pˆ 0.25 p, f 16
f (pˆ 0.25)2 0.094 f ٣١
ˆ2P
(0.25)(0.75) pq . 2 n
. Mathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ : وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ x={1,2,3,4} {1,2,3,4} n=2 2 a=4 4 x1=Table[x,{i,n}] {{1,2,3,4},{1,2,3,4}} x2=Flatten[Outer[List,Apply[Sequence,x1]],n-1] {{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2} ,{3,3},{3,4},{4,1},{4,2},{4,3},{4,4}} {{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2} ,{3,3},{3,4},{4,1},{4,2},{4,3},{4,4}} {{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2} ,{3,3},{3,4},{4,1},{4,2},{4,3},{4,4}} l[x_]:=Length[x] x3=Table[Count[x2[[i]],a],{i,l[x2]}] {0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,2}
px
x3 N n
{0.,0.,0.,0.5,0.,0.,0.,0.5,0.,0.,0.,0.5,0.5,0.5,0.5,1.} <<Statistics`DataManipulation` ff=Frequencies[px] {{9,0.},{6,0.5},{1,1.}} <<Graphics`Graphics` BarChart[ff]
٣٢
8
6
4 2
0.
0.5
1.
Graphics w=Transpose[ff] {{9,6,1},{0.,0.5,1.}}
pb
Dotw1, w2 lpx
0.25
vp
Dotw1, w2 pb^2 l px
0.09375
sp
vp
0.306186 m=l[x] 4 xx=Count[x,a] 1
p
xx N m
0.25 q=1-p 0.75 ppb True
p q sp n True
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣرa={1,2,3,4} اﻟﻘﺎﺋﻣﺔ n=2
اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻻﻣر ٣٣
a=4 ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ˆ اﻟﻣدرج اﻟﺗﻛرارى ﻟﺗوزﯾﻊ Pﻣن اﻻﻣر ]BarChart[ff
واﻟﻣﺗوﺳط ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﻣﻦ اﻻﻣﺮ
Dotw1, w2 l px واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﻣﻦ اﻻﻣﺮ sp vp pb
وﻧﺳﺑﺔ اﻟﺻﻔﺔ ﻣن اﻻﻣر xx p N m وﯾﻣﻛن اﺛﺑﺎت ان Pˆ pﻣن اﻻﻣر ppb
واﻟﻣﺧرج ھو True
وﯾﻣﻛن اﺛﺑﺎت ان pq Pˆ n ﻣن اﻻﻣر
p q sp n واﻟﻣﺧرج ھو True
ﻣﺛﺎل ):(٦-١ أوﺟد اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻺﺣﺻﺎء ˆ Pﻟﻠﺑﯾﺎﻧﺎت ﻟﻠﻣﺛ ﺎل اﻟﺳ ﺎﺑق إذا ﻛ ﺎن اﻟﺳ ﺣب ﺑ دون إرﺟ ﺎع وأﺛﺑ ت أن ﻣﺗوﺳط وﺗﺑﺎﯾن اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pھﻣﺎ ﻋﻠﻰ اﻟﺗواﻟﻲ
Pˆ p, pq N n . . n N 1 ٣٤
2Pˆ
اﻟﺟدول اﻟﺗﺎﻟﻰ ﯾﺣﺗوى ﻋﻠﻰ ﻛل اﻟﻌﯾﻧﺎت وﻧﺳﺑﺔ ظﮭور اﻟرﻗم 4ﻓﯾﮭﺎ .
ﻋدد ﻣرات ظﮭور 4 0
اﻟﻘﯾم
رﻗم اﻟﻌﯾﻧﺔ
1,2
1
0
0
3, 2
10
0
0
1, 3
2
0.5
1
3, 4
11
0.5
1
1, 4
3
0.5
1
4,1
12
0
0
2, 1
4
0.5
1
4, 2
13
0
0
2, 3
5
0.5
1
4, 3
14
0.5
1
2,4
6
ﻧﺳﺑﺔ ظﮭور 4 0
ﻋدد ﻣرات ظﮭور 4 0
اﻟﻘﯾم
رﻗم اﻟﻌﯾﻧﺔ
ﻧﺳﺑﺔ ظﮭور 4
3,1
9
0
اﻟﺗوزﯾﻊ اﻟﺗﻛراري ﻟﻧﺳﺑﺔ ظﮭور اﻟرﻗم 4ﻟﻠﻌﯾﻧﺎت ﻣ ن اﻟﺣﺟ م n = 2واﻟﺗ ﻰ ﺗ م اﺧﺗﯾﺎرھ ﺎ ﻣ ن اﻟﻣﺟﺗﻣﻊ اﻟذى ﺣﺟﻣ ﮫ ) N = 4ﺑ دون إرﺟ ﺎع ( ﻣﻌط ﺎة ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ وﻣ درﺟﮭﺎ اﻟﺗﻛ راري ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ : 0.5
0
ˆP
6
6
f
اﻟﻣﺗوﺳط واﻟﺗﺑﺎﯾن ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﺗم ﺣﺳﺎﺑﮭﻣﺎ ﻣن اﻟﺟدول اﻟﺳﺎﺑق وھﻣﺎ : f pˆ 3 .25 p, f 12 f (pˆ 0.25)2 2 Pˆ 0.0625 . f (0.25)(0.75) 4 2 pq N n . 2 4 1 n N 1 Pˆ
٣٥
Nn ﻓﻲ ﺻﯾﻐﺔ ˆ 2Pﯾﺳﺗﺧدم إذا ﻛﺎن اﻟﻣﺟﺗﻣﻊ ﯾﺗﺿﺢ ﻣن اﻟﻣﺛﺎل اﻟﺳﺎﺑق أن ﻣﻌﺎﻣل اﻟﺗﺻﺣﯾﺢ N 1 ﻣﺣدود واﻟﺳﺣب ﺑدون إرﺟﺎع .إذا ﻛﺎن ﺣﺟم اﻟﻌﯾﻧﺔ أﺻﻐر ﻣن 0.05Nﯾﻣﻛن اﻋﺗﺑﺎر
Nn . 1 N 1 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . }x={1,2,3,4 }{1,2,3,4 n=2 2 a=4 4 ]}x1=Table[x,{i,n }}{{1,2,3,4},{1,2,3,4 ]x2=Flatten[Outer[List,Apply[Sequence,x1]],n-1 }{{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2 }},{3,3},{3,4},{4,1},{4,2},{4,3},{4,4 ]l[x_]:=Length[x ]m=l[x 4 ]}x3=Drop[x2,{1,l[x2],m+1
٣٦
{{1,2},{1,3},{1,4},{2,1},{2,3},{2,4},{3,1},{3,2},{3,4},{4,1} ,{4,2},{4,3}} xa=Table[Count[x3[[i]],a],{i,l[x3]}] {0,0,1,0,0,1,0,0,1,1,1,1}
pa
xa N n
{0.,0.,0.5,0.,0.,0.5,0.,0.,0.5,0.5,0.5,0.5} <<Statistics`DataManipulation` ff=Frequencies[pa] {{6,0.},{6,0.5}} <<Graphics`Graphics` BarChart[ff] 6 5 4 3 2 1
0.
0.5
Graphics w=Transpose[ff] {{6,6},{0.,0.5}}
pb
Dotw1, w2 lpa
0.25
vp
Dotw1, w2 pb^2 l pa
0.0625
sp
vp
0.25 m=l[x] 4 xx=Count[x,a] 1
p
xx N m
0.25 q=1-p 0.75 ٣٧
ppb True
p q mn sp n m1 True
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت اﻟﻘﺎﺋﻣﺔ } x={1,2,3,4وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=2
اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻻﻣر a=4 ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ˆ اﻟﻣدرج اﻟﺗﻛرارى ﻟﺗوزﯾﻊ Pﻣن اﻻﻣر ]BarChart[ff
واﻟﻣﺗوﺳط ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﻣﻦ اﻻﻣﺮ Dotw1, w2 pb l pa واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﺗوزﯾﻊ اﻟﻌﯾﻧﻲ ﻟﻺﺣﺻﺎء ˆ Pﻣﻦ اﻻﻣﺮ sp vp وﻧﺳﺑﺔ اﻟﺻﻔﺔ ﻣن اﻻﻣر xx p N m وﯾﻣﻛن اﺛﺑﺎت ان Pˆ pﻣن اﻻﻣر ppb
واﻟﻣﺧرج ھو True
وﯾﻣﻛن اﺛﺑﺎت ان pq N n Pˆ n N 1 ﻣن اﻻﻣر
p q m n sp n m 1 واﻟﻣﺧرج ھو True ٣٨
ﻧظرﯾﺔ: إذا ﻛﺎﻧت pھﻰ ﻧﺳﺑﺔ ﺻﻔﺔ ﻣﻌﯾﻧﺔ ﻓﻲ ﻣﺟﺗﻣﻊ ﻣﺎ واﺧﺗﯾرت ﻣن ھذا اﻟﻣﺟﺗﻣﻊ ﻋﯾﻧﺎت ﻛﺑﯾرة، ﺣﺟم ﻛل ﻣﻧﮭﺎ nوﻛﺎن اﻹﺣﺻﺎء ˆ Pﯾﻣﺛل ﻧﺳﺑﺔ وﺟود ھذه اﻟﺻﻔﺔ ﻓﻲ اﻟﻌﯾﻧﺎت ﻓﺈن ˆ Pﺗﻘرﯾﺑﺎ ً ﺗﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﻣﺗوﺳطﺔ وﺗﺑﺎﯾﻧﮫ ﻋﻠﻰ اﻟﺗواﻟﻲ :
Pˆ p, pq . n
2Pˆ
وﻋﻠﻰ ذﻟك :
pˆ p pq n ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻰ Zﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻰ٠ وﺿﻊ اﻟﻌﺎﻟم ) Cochran (1963ﻗواﻋد ﻟﺣﺟم اﻟﻌﯾﻧﺔ اﻟﻼزم ﻟﺗطﺑﯾق اﻟﻧظرﯾﺔ اﻟﺳﺎﺑﻘﺔ ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ . z
ﯾﺳﺗﺧدم اﻟﺗﻘرﯾب اﻟطﺑﯾﻌﻰ إذا ﻛﺎن nﻋل اﻷﻗل ﯾﺳﺎوى
إذا ﻛﺎﻧت pﺗﺳﺎوى
30
0.5
50
.4 - .6
80
.3 - .7
200
.2 - .8
600
.1 - .9
1400
0.95
إذا ﻛﺎن ﻟدﯾﻧﺎ ﻣﺟﺗﻣﻌﺎن ﻣﺳﺗﻘﻼن ) ﻣﺟﺗﻣﻌﺎت ﻛﺑﯾرة أو ﻻﻧﮭﺎﺋﯾﺔ ( وإذا ﻛﺎﻧ ت p1ھ ﻲ ﻧﺳ ﺑﺔ ﺗوﻓر ﺻﻔﺔ ﻣﺎ ﻓﻲ اﻟﻣﺟﺗﻣﻊ اﻷول وﻛﺎﻧت p2ھﻰ ﻧﺳﺑﺔ ﺗ وﻓر اﻟﺻ ﻔﺔ ﻧﻔﺳ ﮭﺎ ﻓ ﻲ اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻰ . إذا اﺧﺗرﻧﺎ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻛﺑﯾرة ﺣﺟﻣﮭﺎ n1ﻣن اﻟﻣﺟﺗﻣﻊ اﻷول وﺣﺳ ﺑﻧﺎ ﻣﻧﮭ ﺎ ﻧﺳ ﺑﺔ ﺗ وﻓر اﻟﺻ ﻔﺔ ﻣﺣ ل اﻟدراﺳ ﺔ وﻟ ﺗﻛن . pˆ1وإذا اﺧﺗرﻧ ﺎ ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻛﺑﯾ رة ﺣﺟﻣﮭ ﺎ n2ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻰ ٣٩
وﺣﺳﺑﻧﺎ ﻣﻧﮭﺎ ﻧﺳﺑﺔ ﺗوﻓر اﻟﺻﻔﺔ اﻟﻣطﻠوﺑﺔ وﻟﺗﻛن . pˆ 2ﺑﺗﻛرار اﻟﻣﻌﺎﯾﻧﺔ ﻣن اﻟﺣﺟ م n1و n2ﻓ ﺈن اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻺﺣﺻﺎء Pˆ2 Pˆ1ﺗﺣدده اﻟﻧظرﯾﺔ اﻟﺗﺎﻟﯾﺔ : ﻧظرﯾﺔ: اﻟﺗوزﯾﻊ اﻟﻌﯾﻧﻰ ﻟﻺﺣﺻﺎء Pˆ1 Pˆ2ﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﺑﻣﺗوﺳط : ˆ ˆ p1 p 2 , P1 P 2
وﺗﺑﺎﯾن :
p1q1 p2q 2 . n1 n2
2Pˆ
وﻋﻠﻰ ذﻟك ﺗﻛون : ) (pˆ 1 pˆ 2 ) (p1 p 2 . p1q1 p 2q 2 n1 n2 ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻰ Zاﻟذى ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻰ . ﺗﻌط ﻰ اﻟﻧظرﯾ ﺔ اﻟﻧظرﯾ ﺔ اﻟﺳ ﺎﺑﻘﺔ ﻧﺗﺎﺋﺟ ﺎ ً ﺟﯾ دة ،إذا ﻛﺎﻧ ت n2 , n1ﻣﺣ ددﺗﺎن طﺑﻘ ﺎ ﻟﻘواﻋ د . Cochran z
) ( ٦-١ﺗوزﯾـﻊ t
t Distribution
ﻓﻲ ﻣﻌظم اﻷﺑﺣﺎث وﻏﺎﻟﺑﺎ ﯾﻛون ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ اﻟذى ﺗﺧﺗﺎر ﻣﻧﮫ اﻟﻌﯾﻧﺎت ﻣﺟﮭوﻻ .ﻟﻠﻌﯾﻧﺎت اﻟﻌﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n >30ﻓﺈن اﻟﺗﻘدﯾر اﻟﺟﯾد ﻟﻠﻣﻌﻠﻣﺔ 2ھو .s2إذا ﻛﺎﻧت n > 30ﻓﺈن : x z s n ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻰ Zﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻰ .أﻣﺎ إذا ﻛﺎن ﺣﺟم اﻟﻌﯾﻧﺔ ﺻﻐﯾرً ) ( n < 30ﻓﺈن ﻗﯾم ) (x ) /(s / nﻻ ﺗﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻰ .ﻓﻲ ھذه اﻟﺣﺎﻟﺔ ﯾﻛون اھﺗﻣﺎﻣﻧﺎ ﺑﺗوزﯾﻊ ﻹﺣﺻﺎء ﻣﺎ ﺳوف ﻧرﻣز ﻟﮫ ﺑﺎﻟرﻣز ، Tواﻟذى ﻗﯾﻣﮫ ﺗﻌطﻰ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : x t , s n 2
,i 1,2,...,n
n
) (xi x
i 1
n 1 ٤٠
s
إذا ﻛﺎن xو s2ھﻣﺎ اﻟﻣﺗوﺳط اﻟﺣﺳﺎﺑﻰ واﻟﺗﺑﺎﯾن ﻋﻠﻰ اﻟﺗواﻟﻲ ﻟﻌﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n ﻣﺄﺧوذة ﻣن ﻣﺟﺗﻣﻊ طﺑﯾﻌﻰ ﻟﮫ ﻣﺗوﺳط وﺗﺑﺎﯾن 2ﻏﯾر ﻣﻌروف ﻓﺈن :
x s n
t
ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻰ Tﻟﮫ ﺗوزﯾﻊ tﺑدرﺟﺎت ﺣرﯾﺔ . n 1 ﺑﻔرض أن tﺗرﻣز ﻟﻘﯾﻣﺔ tاﻟﺗﻰ ﺗوﺟد ﻋﻠﻰ اﻟﻣﺣور اﻷﻓﻘﻲ ﺗﺣت ﻣﻧﺣﻧﻰ ﺗوزﯾﻊ t ﺑدرﺟﺎت ﺣرﯾﺔ واﻟﺗﻲ اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﻗدرھﺎ ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ :
ﻏﺎﻟﺒﺎ ﻣﺎ ﻧﺣﺗﺎج اﻟﻰ اﻟﻘﯾﻣﺔ t وھﻲ ﻗﯾﻣﺔ tﺑدرﺟﺔ ﺣرﯾﺔ ) (n 1واﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ 2
α ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوي 2
وﺗﺳﺗﺧرج ﻣن ﺟدول ﺗوزﯾﻊ
α tﻓﺈن ﻣﺳﺎﺣﺔ ﻣﺳﺎوﯾﺔ ﻗدرھﺎ 2
t
ﻓﻰ ﻣﻠﺣق ) . (٢وﻧظرا ﻟﺧﺎﺻﯾﺔ اﻟﺗﻣﺎﺛل ﻟﺗوزﯾﻊ
ﺗﻘﻊ ﻋﻠﻰ ﯾﺳﺎر اﻟﻘﯾﻣﺔ . - t αوﻓﯾﻣﺎ ﯾﻠﻰ ﺑرﻧﺎﻣﺞ ﯾﺣﺳب t ﻟﻘﯾم 2
2
ﻣﺧﺗﻠﻔﺔ ﻣن و ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ.
ﻣﺛﺎل )(٧-١ ﻗدر اﻟﻘﯾم t ﻟﻠﻘﯾم .05,.025,.01,.005,.001,.0005وذﻟك ﺑدرﺟﺎت ﺣرﯾﺔ ﻣن ١اﻟﻰ١٥ 2
٤١
: اﻟﺣل : وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزةMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ : وذﻟك ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰStatistics`ContinuousDistributions <<Statistics`ContinuousDistributions`
اﻻﻣر Quantile[StudentTDistribution[n],1-#] : ﯾﺳﺗﺧدم اﻻﻣرﯾن اﻟﺗﺎﻟﯾﯾنt و ﻟﺣﺳﺎب اﻟﻘﯾم اﻟﻣطﻠوﺑﺔ ﻟـt ﯾﻌرف ﺗوزﯾﻊ 2
tvals[n_]:={n,Map[Quantile[StudentTDistribution[n],1#]&,{.1,.05,.025,.01,.005,.001,.0005}]}//Flatten; commonvalues=Table[tvals[n],{n,1,15}]; : ﺑﺎﺳﺗﺧدام اﻻﻣر اﻟﺗﺎﻟﻰ
TableFormcommonvalues, TableHeadings , "Degrees of Freedom", t.1, t.05, t.025, t.01, t.005, t.001, t.0005 ﯾﺗم اظﮭﺎر اﻟﺟدول اﻟﻣطﻠوب . وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`ContinuousDistributions` tvals[n_]:={n,Map[Quantile[StudentTDistribution[n],1#]&,{.1,.05,.025,.01,.005,.001,.0005}]}//Flatten; commonvalues=Table[tvals[n],{n,1,15}];
TableFormcommonvalues, TableHeadings , "Degrees of Freedom", t.1, t.05, t.025, t.01, t.005, t.001, t.0005
٤٢
t0.0005 636.619 31.5991 12.924 8.6103 6.86883 5.95882 5.40788 5.04131 4.78091 4.58689 4.43698 4.31779 4.22083 4.14045 4.07277
t0.001 318.309 22.3271 10.2145 7.17318 5.89343 5.20763 4.78529 4.50079 4.29681 4.1437 4.0247 3.92963 3.85198 3.78739 3.73283
t0.005 63.6567 9.92484 5.84091 4.60409 4.03214 3.70743 3.49948 3.35539 3.24984 3.16927 3.10581 3.05454 3.01228 2.97684 2.94671
) ( ٧-١ﺗوزﯾﻊ ﻣرﺑﻊ ﻛﺎى
t0.01 31.8205 6.96456 4.5407 3.74695 3.36493 3.14267 2.99795 2.89646 2.82144 2.76377 2.71808 2.681 2.65031 2.62449 2.60248
t0.025 12.7062 4.30265 3.18245 2.77645 2.57058 2.44691 2.36462 2.306 2.26216 2.22814 2.20099 2.17881 2.16037 2.14479 2.13145
t0.05 6.31375 2.91999 2.35336 2.13185 2.01505 1.94318 1.89458 1.85955 1.83311 1.81246 1.79588 1.78229 1.77093 1.76131 1.75305
t0.1 3.07768 1.88562 1.63774 1.53321 1.47588 1.43976 1.41492 1.39682 1.38303 1.37218 1.36343 1.35622 1.35017 1.34503 1.34061
DegreesofFreedom 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Chi - Square Distribution
إذا ﺗﻛرر ﺳﺣب ﻋﯾﻧﺎت ﻣن اﻟﺣﺟم nﻣن ﺗوزﯾﻊ طﺑﯾﻌﻰ ﺗﺑﺎﯾﻧﮫ 2وإذا ﺗم ﺣﺳﺎب ﺗﺑﺎﯾن اﻟﻌﯾﻧ ﺔ s2 ﻟﻛل ﻋﯾﻧﺔ ﻓﺈﻧﻧﺎ ﻧﺣﺻل ﻋﻠﻰ ﻗﯾم ﻟﻺﺣﺻﺎء . S2اﻟﺗوزﯾﻊ اﻟﻌﯾﻧ ﻰ ﻟﻺﺣﺻ ﺎء S2ﻟ ﮫ ﺗطﺑﯾﻘ ﺎت ﻗﻠﯾﻠ ﺔ ﻓ ﻲ اﻹﺣﺻﺎء .اھﺗﻣﺎﻣﻧﺎ ﺳوف ﯾﻛون ﻓﻲ ﺗوزﯾﻊ اﻟﻣﺗﻐﯾر X2واﻟﺗﻲ ﺗﺣﺳب ﻗﯾﻣﺗﮫ ﻣن اﻟﺻﯾﻐﺔ اﻵﺗﯾﺔ : (n 1)s2 2 . 2 ﺗوزﯾ ﻊ اﻟﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻰ X2ﯾﺳ ﻣﻰ ﺗوزﯾ ﻊ ) 2ﺗوزﯾ ﻊ ﻣرﺑ ﻊ ﻛ ﺎى ( ﺑ درﺟﺎت ﺣرﯾ ﺔ n 1ﺣﯾث ﺗﺳﺎوى اﻟﻣﻘﺎم ﻓﻲ ﺻﯾﻐﺔ .s2 ﺑﻔرض أن 2ﺗرﻣز ﻟﻘﯾﻣﺔ 2اﻟﺗﻲ ﺗوﺟد ﻋﻠﻰ اﻟﻣﺣور اﻷﻓﻘﻰ ﺗﺣت ﻣﻧﺣﻧﻰ 2ﺑدرﺟﺎت ﺣرﯾﺔ واﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﻗدرھﺎ ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ :
٤٣
اﻟﺟدول ﻓﻲ ﻣﻠﺣق ) (٣ﯾﻌطﻰ ﻗﯾم 2وذﻟك ﻟﻘﯾم ﻣﺧﺗﻠﻔﺔ ﻣن و ﺣﯾث ﺗﺄﺧذ اﻟﻘﯾم : .995 , .99, .975, .95, .90, .10, .05, 0.025, .01, .005 ودرﺟﺎت ﺣرﯾﺔ ﻣن 1إﻟﻰ . 40ﯾوﺿﺢ اﻟﺻف اﻟﺛﺎﻧﻰ ﻣن اﻟﺟدول ﻗﯾم واﻟﻌﻣود اﻷول ﻣن اﻟﺷﻣﺎل ﻗﯾم درﺟﺎت اﻟﺣرﯾﺔ أﻣﺎ ﻣﺣﺗوﯾﺎت اﻟﺟدول ﻓﮭﻲ ﻟﻘﯾم اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوى .05ﻓﺈﻧﻧﺎ ﻧﺑﺣث ﻓﻲ اﻟﺟدول ﻋﻧد ﺗﻘﺎطﻊ اﻟﺻف اﻟذى ﺑﮫ 6ﻣﻊ اﻟﻌﻣود .05وﻋﻠﻰ ذﻟك 2 12.592 . .05وﻟﻌدم ﺗﻣﺎﺛل ﻣﻧﺣﻧﻰ ﺗوزﯾﻊ 2ﻓﻼ ﺑد
ﻣن اﺳﺗﺧدام اﻟﺟدول ﻹﯾﺟﺎد
2 .95 1.635ﻋﻧد . 6
ﻣﺛﺎل ):(٨-١ أوﺟد اﻟﻧﻘﺎط اﻟﺗﺎﻟﯾﺔ ﻣن ﺟدول ﺗوزﯾﻊ 2ﻓﻲ ﻣﻠﺣق ): (٣ 2 ν=12 ، .95 أ- 2 بν=1 ، .05 -
اﻟﺣــل: أ= 5.226 - ب= 3.843 -
2 .95 2 .05
وﻓﯾﻣﺎ ﯾﻠﻰ ﺑرﻧﺎﻣﺞ ﯾﺣﺳب ﻟﻘﯾم ﻣﺧﺗﻠﻔﺔ ﻣن و ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ. 2
ﻣﺛﺎل )(٩-١ ٤٤وذﻟك ﺑدرﺟﺎت ﺣرﯾﺔ ﻣن ١اﻟﻰ١٥ ﻗدر اﻟﻘﯾم 2ﻟﻠﻘﯾم .995,.99,.01,.975,.95 2
: اﻟﺣل : وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزةMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ : وذﻟك ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰStatistics`ContinuousDistributions <<Statistics`ContinuousDistributions`
ﻟﺣﺳﺎب اﻟﻘﯾم اﻟﻣطﻠوﺑﺔ ﯾﺳﺗﺧدم اﻻﻣر واﻟداﻟﺔ اﻟﺗﺎﻟﯾﯨﯾن m=Map[Quantile[ChiSquareDistribution[n],#]&,{0.005` ,0.01`,0.025`,0.05`}]; cv[n_]=Flatten[{n,m}];
ﯾﺗم اظﮭﺎر اﻟﺟدول اﻟﻣطﻠوب ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ TableForm t, TableHeadings
, "Degrees of Freedom
TableSpacing
", .9952, .992, .9752, .952,
1
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`ContinuousDistributions` m=Map[Quantile[ChiSquareDistribution[n],#]&,{0.005` ,0.01`,0.025`,0.05`}]; cv[n_]=Flatten[{n,m}]; TableForm t, TableHeadings
, "Degrees of Freedom
TableSpacing
", .9952, .992, .9752, .952,
1
٤٥
2 0.95
2 0.975
2 0.99
2 0.995
0.00393214 0.102587 0.351846 0.710723 1.14548 1.63538 2.16735 2.73264 3.32511 3.9403 4.57481 5.22603 5.89186 6.57063 7.26094
0.000982069 0.0506356 0.215795 0.484419 0.831212 1.23734 1.68987 2.17973 2.70039 3.24697 3.81575 4.40379 5.00875 5.62873 6.26214
0.000157088 0.0201007 0.114832 0.297109 0.554298 0.87209 1.23904 1.6465 2.0879 2.55821 3.05348 3.57057 4.10692 4.66043 5.22935
0.0000392704 0.0100251 0.0717218 0.206989 0.411742 0.675727 0.989256 1.34441 1.73493 2.15586 2.60322 3.07382 3.56503 4.07467 4.60092
) (٨- ١ﺗوزﯾﻊ F
Degrees of Freedom
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
F Distribution
ﯾﻌﺗﺑر ﺗوزﯾﻊ Fﻣن اﻟﺗوزﯾﻌﺎت اﻻﺣﺗﻣﺎﻟﯾﺔ اﻟﮭﺎﻣﺔ اﻟﺗﻰ ﺗﺳﺗﺧدم ﻓﻲ ﻣﺟﺎل اﻹﺣﺻﺎء اﻟﺗطﺑﯾﻘﻰ . ﻧظرﯾﺔ: إذا ﻛﺎﻧ ت
s12
,
s22
ﺗﻣ ﺛﻼن ﺗﺑ ﺎﯾﻧﻲ ﻋﯾﻧﺗ ﯾن ﻋﺷ واﺋﯾﺗﯾن ﻣﺳ ﺗﻘﻠﺗﯾن ﻣ ن اﻟﺣﺟ م
n 2 , n1
ﻣﺄﺧوذﺗﯾن ﻣﺟﺗﻣﻌﯾن ﻣن طﺑﯾﻌﯾﯾن ﺑﺗﺑﺎﯾﻧﺗﻰ 22 , 12ﻋﻠﻰ اﻟﺗواﻟﻲ ﻓﺈن : s12 / 12 22s12 f 2 2 2 2. s 2 / 2 1 s 2 ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ Fﯾﺗﺑﻊ ﺗوزﯾﻊ Fﺑدرﺟﺎت ﺣرﯾﺔ ٠ 1, 2ﺑﻔرض أن ) f (1, 2 ﺗرﻣز ﻟﻘﯾﻣﺔ fﻋﻠﻰ اﻟﻣﺣور اﻷﻓﻘﻲ ﺗﺣت ﻣﻧﺣﻧﻰ ﺗوزﯾﻊ Fﺑدرﺟﺎت ﺣرﯾﺔ 1 n1 1و 2 n2 1واﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوى واﻟﻣوﺿﺣﺔ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ :
٤٦
ﻻﺳﺗﺧراج ﻗﯾم ) f (1, 2ﯾوﺟد ﺟدوﻻن ﻓﻲ ﻣﻠﺣق ) (٤وﻣﻠﺣق ) ، (٥اﻷول ﻋﻧد 0.05 واﻵﺧر ﻋﻧد .01وﻓﻲ ﻛل ﻣﻧﮭﻣﺎ ﯾﻛون اﻟﺻف اﻷول ﻟﻘﯾم 1واﻟﻌﻣود اﻷول ﻟﻘﯾم 2أﻣﺎ
ﻣﺣﺗوﯾﺎت اﻟﺟدول ﻓﮭو ﻟﻘﯾم ) . f (1, 2ﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﻣن ﺟدول ﺗوزﯾﻊ Fﻧﻼﺣظ أن :
f.05 (1,4) 7.71 f.05 (4,1) 224.6 وﻓﯾﻣﺎ ﯾﻠﻰ ﺑرﻧﺎﻣﺞ ﯾﺣﺳب ) f (1, 2ﻟﻘﯾم ﻣﺧﺗﻠﻔﺔ ﻣن ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ.
1, 2
ﺣﯾث .05وذﻟك
ﻣﺛﺎل )(١٠-١ ﻗ در اﻟﻘ ﯾم ) f (1, 2ﺣﯾ ث 1ﺗﺎﺧ ذ اﻟﻘ ﯾم 1,2,3,4 1,2,3,4,5,6,…,15و 0.05
و 2ﺗﺎﺧ ذ اﻟﻘ ﯾم
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ Mathematicaوذﻟك ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة : Statistics`ContinuousDistributionsوذﻟك ﺑﺗﺣﻣﯾل اﻻﻣر اﻟﺗﺎﻟﻰ : `<<Statistics`ContinuousDistributions
ﻟﺣﺳﺎب اﻟﻘﯾم اﻟﻣطﻠوﺑﺔ ﯾﺳﺗﺧدم اﻟداﻟﺗﯾن اﻟﺗﺎﻟﯾﯨﯾن f[n1_,n2_]:=Quantile[FRatioDistribution[n1,n2],1;].05 ]}v[n1_]:=Table[Flatten[{n2,f[n1,n2]}],{n2,1,15 ﯾﺗم اظﮭﺎر اﻟﺟدول اﻟﻣطﻠوب ﻣن اﻻﻣر اﻟﺗﺎﻟﻰ ]}}TableForm[v[n1],TableHeadings{{},{"",1,2,3,4 وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
`<<Statistics`ContinuousDistributions f[n1_,n2_]:=Quantile[FRatioDistribution[n1,n2],1;].05 ]}v[n1_]:=Table[Flatten[{n2,f[n1,n2]}],{n2,1,15 }n1={1,2,3,4 }{1,2,3,4
]}}TableForm[v[n1],TableHeadings{{},{"",1,2,3,4 ٤٧
4 224.583 19.2468 9.11718 6.38823 5.19217 4.53368 4.12031 3.83785 3.63309 3.47805 3.35669 3.25917 3.17912 3.11225 3.05557
3 215.707 19.1643 9.27663 6.59138 5.40945 4.75706 4.34683 4.06618 3.86255 3.70826 3.58743 3.49029 3.41053 3.34389 3.28738
2 199.5 19. 9.55209 6.94427 5.78614 5.14325 4.73741 4.45897 4.25649 4.10282 3.9823 3.88529 3.80557 3.73889 3.68232
1 161.448 18.5128 10.128 7.70865 6.60789 5.98738 5.59145 5.31766 5.11736 4.9646 4.84434 4.74723 4.66719 4.60011 4.54308
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ﻻﺳﺗﺧراج ﻗﯾم ) f (1, 2ﻣن اﻟﺟدول اﻟﺳﺎﺑق اﻟﻣﺳﺗﺧرج ﻣن اﻟﺑرﻧﺎﻣﺞ ﯾﻛون اﻟﺻف اﻷول ﻟﻘﯾم 1واﻟﻌﻣود اﻷول ﻟﻘﯾم 2أﻣﺎ ﻣﺣﺗوﯾﺎت اﻟﺟدول ﻓﮭو ﻟﻘﯾم ) . f (1, 2ﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل :
f.05 (1,4) 7.70865 f.05 (4,1) 224.583
٤٨
اﻟﻔﺻل اﻟﺛﺎﻧﻰ ﻓﺗرات اﻟﺛﻘﺔ
٤٩
) (١-٢ﻣﻘدﻣـﺔ
Introduction
ﯾﻌﺗﺑ ر اﻻﺳ ﺗدﻻل اﻹﺣﺻ ﺎﺋﻲ statistical inferenceﻓ رع ﻓ ﻲ ﻋﻠ م اﻹﺣﺻ ﺎء ﯾﮭ ﺗم ﺑطرق اﻻﺳﺗدﻻل أو اﻟﺗﻌﻣﯾم ﺑﺷ ﺎن اﻟﻣﺟﺗﻣ ﻊ وذﻟ ك ﺑﺎﻻﻋﺗﻣ ﺎد ﻋﻠ ﻰ ﻣﻌﻠوﻣ ﺎت ﯾ ﺗم اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ ﻣن ﻋﯾﻧﺎت ﻣﺧﺗﺎرة ﻣن اﻟﻣﺟﺗﻣﻊ .ﺳوف ﻧﺗﻧ ﺎول ﻓ ﻲ ھ ذا اﻟﻔﺻ ل اﻻﺳ ﺗدﻻل ﻋ ن ﻣﻌ ﺎﻟم ﻣﺟﺗﻣﻌ ﺎت ﻣﺟﮭوﻟﺔ ﻣﺛل اﻟﻣﺗوﺳط ،اﻟﻧﺳﺑﺔ ،اﻻﻧﺣراف اﻟﻣﻌﯾﺎري . ﯾﻧﻘﺳ م ﻓ رع اﻻﺳ ﺗدﻻل اﻹﺣﺻ ﺎﺋﻲ إﻟ ﻰ ﻓ رﻋﯾن أﺳﺎﺳ ﯾن :اﻟﺗﻘ دﯾر estimation واﺧﺗﺑﺎرات اﻟﻔ روض . tests of hypothesesﺳ وف ﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ﻓ ﻲ ھ ذا اﻟﻔﺻ ل ﻋﻠ ﻰ ﻣوﺿ وع اﻟﺗﻘ دﯾر ﺑﯾﻧﻣ ﺎ ﻣوﺿ وع اﺧﺗﺑ ﺎرات اﻟﻔ روض ﺳ وف ﻧﺗﻧﺎوﻟ ﮫ ﻓ ﻲ اﻟﻔﺻ ل اﻟﺗ ﺎﻟﻰ .اﻷﻣﺛﻠ ﺔ اﻟﺗﺎﻟﯾ ﺔ ﺗوﺿ ﺢ اﻟﻔ رق ﺑ ﯾن اﻟﻔ رﻋﯾن .ﯾﻘ وم ﻣﺻ ﻧﻊ ﺑﺈﻧﺗ ﺎج ﻗﺿ ﺑﺎﻧﺎ ﺣدﯾدﯾ ﺔ ،ﻓ ﺈذا اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣﻛوﻧ ﮫ ﻣ ن 200ﻗﺿ ﯾب ﻣ ن إﻧﺗ ﺎج ھ ذا اﻟﻣﺻ ﻧﻊ وﻗﯾﺳ ت أطواﻟﮭ ﺎ وﺗ م ﺣﺳ ﺎب ﻣﺗوﺳ ط طول اﻟﻘﺿﯾب ﻓﻲ اﻟﻌﯾﻧﺔ .ھذا اﻟﻣﺗوﺳط ﯾﻣﻛن أن ﯾﺳﺗﺧدم ﻟﺗﻘدﯾر اﻟﻣﻌﻠﻣ ﺔ اﻟﺣﻘﯾﻘﯾ ﺔ ﻟﻠﻣﺟﺗﻣ ﻊ μ .اﻟﻣﻌﻠوﻣ ﺎت ﻋ ن ﺗوزﯾ ﻊ اﻟﻣﻌﺎﯾﻧ ﺔ ﻟﻺﺣﺻ ﺎء Xﺳ وف ﯾﺳ ﺎﻋدﻧﺎ ﻓ ﻲ ﺣﺳ ﺎب درﺟ ﺔ اﻟﺛﻘ ﺔ ﻓ ﻲ ﺗﻘ دﯾرﻧﺎ .ھ ذه اﻟﻣﺷ ﻛﻠﺔ ﺗﻧﺗﻣ ﻲ إﻟ ﻰ ﻓ رع اﻟﺗﻘ دﯾر .اﻵن إذا ﻛ ﺎن ﻣﻌروﻓ ﺎ أن ﺟﺳ م اﻹﻧﺳ ﺎن اﻟﺑ ﺎﻟﻎ ﯾﺣﺗ ﺎج ﯾوﻣﯾ ﺎ ﻓ ﻲ اﻟﻣﺗوﺳ ط إﻟ ﻰ 800ﻣﻠﻠﯾﺟراﻣ ﺎت ﻣ ن اﻟﻛﺎﻟﺳ ﯾوم ﻟﻛ ﻲ ﯾﻘ وم ﺑوظﺎﺋﻔ ﮫ ﺧﯾ ر ﻗﯾ ﺎم. ﯾﻌﺗﻘ د ﻋﻠﻣ ﺎء اﻟﺗﻐذﯾ ﺔ أن اﻷﻓ راد ذوى اﻟ دﺧل اﻟﻣ ﻧﺧﻔض ﻻ ﯾﺳ ﺗطﯾﻌون ﺗﺣﻘﯾ ق ھ ذا اﻟﻣﺗوﺳ ط . ﻻﺧﺗﺑ ﺎر ذﻟ ك اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 50ﺷﺧﺻ ﺎ ﺑﺎﻟﻐ ﺎ ﻣ ن ﺑ ﯾن ذوى اﻟ دﺧل اﻟﻣ ﻧﺧﻔض وﺗ م ﺣﺳﺎب ﻣﺗوﺳط ﻣﺎ ﯾﺗﻧﺎوﻟوﻧﮫ ﻣن اﻟﻛﺎﻟﺳﯾوم ﯾوﻣﯾﺎ .ﻓﻲ ھ ذا اﻟﻣﺛ ﺎل ﻟ م ﻧﺣ ﺎول ﺗﻘ دﯾر ﻣﻌﻠﻣ ﺔ وﻟﻛ ن ﺑدﻻ ﻣن ذﻟك ﻧﺣﺎول اﻟوﺻول إﻟﻰ ﻗ رار ﺻ ﺣﯾﺢ ﻋ ن اﻟﻔ رض اﻟ ذي وﺿ ﻌﮫ ﻋﻠﻣ ﺎء اﻟﺗﻐذﯾ ﺔ .ﻣ رة أﺧرى ﻧﻌﺗﻣد ﻋﻠﻰ ﻧظرﯾﺔ اﻟﻣﻌﺎﯾﻧﺔ ﻟﺗﻣدﻧﺎ ﺑﻣﻘﯾﺎس ﻟدرﺟﺔ اﻟﺛﻘﺔ ﻓﻲ اﻟﻘرار اﻟذي ﻧﺗﺧذه. ﯾ ﺗم ﺗﻘ دﯾر ﻣﻌﻠﻣ ﺔ اﻟﻣﺟﺗﻣ ﻊ إﻣ ﺎ ﻛﺗﻘ دﯾر ﺑﻧﻘط ﺔ point estimateأو ﻛﺗﻘ دﯾر ﺑﻔﺗ رة . interval estimateﺗﻘ دﯾر اﻟﻧﻘط ﺔ ﻟﻣﻌﻠﻣ ﺔ ﻣﺟﺗﻣ ﻊ ﻣ ﺎ ھ ﻲ ﻗﯾﻣ ﺔ وﺣﯾ دة ) ﻣﻔ ردة ( ˆθ ﻟﻺﺣﺻﺎء ˆ . Θﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل اﻟﻘﯾﻣﺔ xﻟﻺﺣﺻﺎء ، Xواﻟﻣﺣﺳ وﺑﺔ ﻣ ن ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن x pˆ ھ ﻲ ﺗﻘ دﯾر ﺑﻧﻘط ﺔ اﻟﺣﺟ م ، nھ ﻲ ﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻣﻌﻠﻣ ﺔ اﻟﻣﺟﺗﻣ ﻊ . ﺑ ﻧﻔس اﻟﺷ ﻛل ، n ﻟﻠﻣﻌﻠﻣﺔ اﻟﺣﻘﯾﻘﯾﺔ pواﻟﺗﻲ ﺗﻣﺛل ﻧﺳﺑﺔ ﺻﻔﺔ ﻣﺎ ﻓﻲ ﻣﺟﺗﻣﻊ . اﻹﺣﺻ ﺎء اﻟﻣﺳ ﺗﺧدم ﻹﯾﺟ ﺎد ﺗﻘ دﯾر اﻟﻧﻘط ﺔ ﯾﺳ ﻣﻰ اﻟﻣﻘ در estimatorأو داﻟ ﺔ اﻟﻘ رار .decision functionﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل داﻟ ﺔ اﻟﻘ رار ، Sواﻟﺗ ﻲ ﺗﻛ ون داﻟ ﺔ ﻓ ﻲ اﻟﻌﯾﻧ ﺔ اﻟﻌﺷواﺋﯾﺔ ،ھﻲ ﻣﻘدر ﻟﻠﻣﻌﻠﻣﺔ . σﻋﯾﻧﺎت ﻣﺧﺗﻠﻔﺔ ﺗؤدى إﻟﻰ ﺗﻘدﯾرات ﻣﺧﺗﻠﻔﺔ . أي ﺗﻘدﯾر ﺑﻔﺗرة ﻟﻣﻌﻠﻣﺔ ھو ﻓﺗرة ﻋﻠﻰ اﻟﺷﻛل b a bﺣﯾ ث a , bﺗﻌﺗﻣ دان ﻋﻠ ﻰ اﻟﺗﻘ دﯾر ﺑﻧﻘط ﺔ ˆ ﻟﻌﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﺧﺎﺻ ﺔ ﻣﺧﺗ ﺎرة ﻣ ن اﻟﻣﺟﺗﻣ ﻊ ﻣوﺿ ﻊ اﻟدراﺳ ﺔ وأﯾﺿ ﺎ ﻋﻠ ﻰ اﻟﺗوزﯾ ﻊ اﻟﻌﯾﻧ ﻲ ﻟﻺﺣﺻ ﺎء ˆ . Θﻋﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل إذا اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﺗﻣﺛ ل درﺟ ﺎت اﻟﺗﺣﺻﯾل ﻓﻲ اﻣﺗﺣ ﺎن اﻟﻘﺑ ول ﻟﺧﻣﺳ ﯾن طﺎﻟﺑ ﺎ ﻣ ن اﻟﻣﺗﻘ دﻣﯾن ﻟﻼﻟﺗﺣ ﺎق ﻓ ﻲ ﻛﻠﯾ ﺔ ﻣ ﺎ وﺗ م اﻟﺣﺻ ول ﻋﻠﻰ اﻟﻔﺗرة 500 , 550واﻟﺗﻲ ﻧﺗوﻗﻊ أن اﻟﻣﺗوﺳ ط اﻟﺣﻘﯾﻘ ﻲ ﻟ درﺟﺎت اﻟﺗﺣﺻ ﯾل داﺧﻠﮭ ﺎ .اﻟﻘﯾﻣﺗ ﺎن اﻟﻧﮭﺎﺋﯾﺗﺎن 500و 550ﺳوف ﺗﻌﺗﻣدان ﻋﻠﻰ ﻣﺗوﺳط اﻟﻌﯾﻧﺔ اﻟﻣﺣﺳوﺑﺔ xوأﯾﺿ ﺎ ﻋﻠ ﻰ اﻟﺗوزﯾ ﻊ اﻟﻌﯾﻧﻲ . X ﻋﯾﻧﺎت ﻣﺧﺗﻠﻔﺔ ﺗؤدى إﻟﻰ ﻗﯾم ﻣﺧﺗﻠﻔ ﺔ ﻟ ـ ˆ وﺑﺎﻟﺗ ﺎﻟﻲ إﻟ ﻰ ﺗﻘ دﯾرات ﺑﻔﺗ رة ﻟﻣﻌﻠﻣ ﺔ اﻟﻣﺟﺗﻣ ﻊ . ﺑﻌ ض ھ ذه اﻟﻔﺗ رات ﺳ وف ﺗﺣﺗ وى ﻋﻠ ﻰ واﻟ ﺑﻌض اﻵﺧ ر ﻻ ﯾﺣﺗ وى ﻋﻠ ﻰ . اﻟﺗوزﯾ ﻊ اﻟﻌﯾﻧ ﻲ ﻟﻺﺣﺻ ﺎء ˆ Θﺳ وف ﯾﺳ ﺎﻋدﻧﺎ ﻓ ﻲ إﯾﺟ ﺎد a , bﻟﻛ ل اﻟﻌﯾﻧ ﺎت اﻟﻣﻣﻛﻧ ﺔ ﺑﺣﯾ ث أن أي ﻧﺳ ﺑﺔ ٥٠
ﺧﺎﺻ ﺔ ﻣ ن ھ ذه اﻟﻔﺗ رات ﺳ وف ﺗﺣﺗ وى ﻋﻠ ﻰ . ﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ،ﯾ ﺗم ﺣﺳ ﺎب a , bﺑﺣﯾ ث ﺗﻛ ون 0. 95ﻣ ن ﻛ ل اﻟﻔﺗ رات اﻟﻣﻣﻛﻧ ﺔ ،ﻣ ﻊ ﺗﻛ رار اﻟﻣﻌﺎﯾﻧ ﺔ ،ﺳ وف ﺗﺣﺗ وي ﻋﻠ ﻰ . θوﻋﻠ ﻰ ذﻟك ﯾﻛ ون ﻟ دﯾﻧﺎ اﺣﺗﻣ ﺎل 0.95ﻻﺧﺗﯾ ﺎر واﺣ دة ﻣ ن ھ ذه اﻟﻌﯾﻧ ﺎت واﻟﺗ ﻲ ﺗ ؤدى إﻟ ﻰ ﻓﺗ رة ﺗﺣﺗ وي ﻋﻠ ﻰ .ھ ذه اﻟﻔﺗ رة اﻟﻣﺣﺳ وﺑﺔ ﻣ ن ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ،ﺗﺳ ﻣﻲ 95%ﻓﺗ رة ﺛﻘ ﺔ confidence . intervalﺑﻣﻌﻧ ﻰ آﺧ ر ﯾﻛ ون ﻟ دﯾﻧﺎ 95%ﺛﻘ ﺔ أن ﻓﺗرﺗﻧ ﺎ اﻟﻣﺣﺳ وﺑﺔ ﺗﺣﺗ وى ﻋﻠ ﻰ اﻟﻣﻌﻠﻣ ﺔ . θ ﻋﻣوﻣ ﺎ ﺗوزﯾ ﻊ ˆ Θﺳ وف ﯾﺳ ﺎﻋدﻧﺎ ﻓ ﻲ ﺣﺳ ﺎب a , bﺑﺣﯾ ث ﯾﻛ ون ﻷي ﻧﺳ ﺑﮫ ﺧﺎﺻ ﺔ ، 0 < α < 1 , 1 αﻣن اﻟﻔﺗرات اﻟﻣﺣﺳوﺑﺔ ﻣن ﻛل اﻟﻌﯾﻧﺎت اﻟﻣﻣﻛﻧﺔ ﺳوف ﺗﺣﺗوى ﻋﻠ ﻰ اﻟﻣﻌﻠﻣ ﺔ . اﻟﻔﺗ رة اﻟﻣﺣﺳ وﺑﺔ ﺗﺳ ﻣﻰ (1 α )100 %ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ . θﺗﻌﺗﺑ ر ﻓﺗ رة اﻟﺛﻘ ﺔ اﻷط ول ، ھ ﻲ اﻷﻛﺛ ر ﺛﻘ ﺔ ﻓ ﻲ اﻟﺣﺻ ول ﻋﻠ ﻰ ﻓﺗ رة ﺗﺣﺗ وي ﻋﻠ ﻰ اﻟﻣﻌﻠﻣ ﺔ اﻟﻣﺟﮭوﻟ ﺔ .ﺑ ﺎﻟطﺑﻊ ﯾﻛ ون ﻣ ن اﻷﻓﺿل اﻟﺣﺻول ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ أن ﻣﺗوﺳط اﻟﻌﻣر ﻟﻧوع ﻣﻌﯾن ﻣن اﻟﺑطﺎرﯾ ﺎت ﯾﻧﺣﺻ ر ﺑ ﯾن 8و 5أﺳ ﺎﺑﯾﻊ ﻋ ن اﻟﺣﺻ ول ﻋﻠ ﻰ 99%ﻓﺗ رة ﺛﻘ ﺔ أن ﻣﺗوﺳ ط اﻟﻌﻣ ر ﯾﻧﺣﺻ ر ﺑ ﯾن 11و 2 أﺳﺑوﻋﺎ .داﺋﻣﺎ ﯾﻔﺿل اﻟﺣﺻول ﻋﻠﻰ ﻓﺗرة ﻗﺻﯾرة ﺑدرﺟﺔ ﻋﺎﻟﯾﺔ ﻣن اﻟﺛﻘﺔ .
μ
) (٢-٢ﻓﺗرة ﺛﻘﺔ ﻟﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ Confidence Interval for Population Mean μ ﻹﯾﺟﺎد ﻓﺗ رة ﺛﻘ ﺔ ﻟﻣﺗوﺳ ط اﻟﻣﺟﺗﻣ ﻊ μوذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻌﯾﻧ ﺔ ﻣﺧﺗ ﺎرة ﻣ ن ﻣﺟﺗﻣ ﻊ طﺑﯾﻌﻲ أو ،ﻋﻧد ﻋدم ﺗﺣﻘ ق ھ ذا اﻟﻔ رض إذا ﻛﺎﻧ ت nﻛﺑﯾ رة ﺑدرﺟ ﺔ ﻛﺎﻓﯾ ﺔ ،وﻋﻠ ﻰ ذﻟ ك ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م nﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟ ذي ﺗﺑﺎﯾﻧ ﮫ 2ﻣﻌﻠ وم وﻧﺣﺳ ب ﻣﺗوﺳ ط اﻟﻌﯾﻧ ﺔ x وذﻟك ﻟﻠﺣﺻول ﻋﻠﻰ (1 α)100%ﻓﺗرة ﺛﻘﺔ ﻋﻠﻰ اﻟﺷﻛل :
x z , n n 2
x z 2
ﺣﯾث z ﺗﻣﺛل ﻗﯾﻣﺔ zاﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوي 2
واﻟﻣﺳﺗﺧرﺟﮫ ﻣن ﺟدول
2
اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻲ ﻓﻰ ﻣﻠﺣق ).(١ ﺣﯾث ﻟﻠﻌﯾﻧﺎت اﻟﻌﺷواﺋﯾﺔ اﻟﺻ ﻐﯾرة اﻟﻣﺧﺗ ﺎرة ﻣ ن ﻣﺟﺗﻣﻌ ﺎت ﻏﯾ ر طﺑﯾﻌﯾ ﺔ ،ﻻ ﻧﺗوﻗ ﻊ أن درﺟ ﺔ ﺛﻘﺗﻧﺎ ﺗﻛون ﻣﺿﺑوطﺔ .ﻟﻠﻌﯾﻧﺎت ﻣ ن اﻟﺣﺟ م n > 30وﺑﺻ رف اﻟﻧظ ر ﻋ ن ﺷ ﻛل اﻟﻣﺟﺗﻣ ﻊ ﻓ ﺈن ﻧظرﯾ ﺔ اﻟﻣﻌﺎﯾﻧﺔ ﺗؤﻣن ﻟﻧﺎ ﻧﺗﺎﺋﺞ ﺟﯾدة. ﻟﺣﺳ ﺎب (1 α )100 %ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ μﻧﻔﺗ رض أن σﻣﻌﻠوﻣ ﺔ وﻟﻛ ن ﻋﻣوﻣ ﺎ ﻻ ﯾﺗ واﻓر ھ ذا اﻟﻔ رض ،ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﯾﻣﻛ ن اﻻﺳﺗﻌﺎﺿ ﺔ ﻋ ن σﺑ ﺎﻻﻧﺣراف اﻟﻣﻌﯾ ﺎري ﻟﻠﻌﯾﻧ ﺔ sﺑﺷ رط أن > n .30
٥١
ﻣﺛﺎل )(١-٢ اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 44ﻣﺷ ﺎھدة ﺣﯾ ث اﻟﻣﺷ ﺎھدات ﻛﺎﻟﺗ ﺎﻟﻰ : 85,94.5,76.7,79.2,83,80.2,68.7,89.1,74.1,87.8,44.9,77.6,85.1, 75.7,81.5,66.2,83.4,79.8,94,91.8,96.3,73.5,82.2,76.1,78.5,69. 1,75.4,71.7,78.2,77.7,88.7,79.9,86.1,63.8,78.7,82.6,98.6,81.3 ,63.4,76.6,84.2,89.7,87.7,54.6وﻛﺎن اﻻﻧﺣراف ﻣﻌﯾﺎري ﻟﻠﻣﺟﺗﻣﻊ ھ و 10.5
أوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﺗوﺳط .
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ContinuousDistributions grades={85,94.5,76.7,79.2,83,80.2,68.7,89.1,74.1,87.8,44.9,7 7.6,85.1,75.7,81.5,66.2,83.4,79.8,94,91.8,96.3,73.5,82.2,76. 1,78.5,69.1,75.4,71.7,78.2,77.7,88.7,79.9,86.1,63.8,78.7,82. ;}6,98.6,81.3,63.4,76.6,84.2,89.7,87.7,54.6 =10.5 10.5
=.1 0.1
]n=Length[grades 44
]m=Mean[grades
2
79.3841
z Quantile NormalDistribution0, 1, 1
n
1.64485
low m z
n
76.7804
up m z 81.9878
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت gradesواﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻣن اﻻﻣر =10.5 ﻣن اﻻﻣر =0. 1 ٥٢
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=Length[grades]
وﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر m=Mean[grades]
z Quantile NormalDistribution0, 1, 1
2
اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرz و
76.7804 واﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ
ﻣن اﻻﻣر low=m-z s/Sqrt[n] 81.9878 واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر up=m+z s/Sqrt[n]
(٢-٢) ﻣﺛﺎل وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ
Mathematica
ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ : اﻟﺟﺎھزة
Statistics`ConfidenceIntervals
: ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰ <<Statistics`ConfidenceIntervals`
. واﻟﺬى ﯾﻜﻮن ﻣﻦ ﺿﻤﻦ ﺧطوات اﻟﺑرﻧﺎﻣﺞ . وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`ConfidenceIntervals` grades={85,94.5,76.7,79.2,83,80.2,68.7,89.1,74.1,87.8,44.9,7 7.6,85.1,75.7,81.5,66.2,83.4,79.8,94,91.8,96.3,73.5,82.2,76. 1,78.5,69.1,75.4,71.7,78.2,77.7,88.7,79.9,86.1,63.8,78.7,82. 6,98.6,81.3,63.4,76.6,84.2,89.7,87.7,54.6}; =10.5 10.5
n=Length[grades] 44
m=Mean[grades] 79.3841
NormalCI[m,/Sqrt[n],ConfidenceLevel->.90] {76.7804,81.9878} ٥٣
ﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت gradesواﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻣن اﻻﻣر =10.5
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر ]n=Length[grades
وﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر ]m=Mean[grades وﻋﻧد اﻟرﻏﺑﺔ ﻓﻰ اﻟﺣﺻول ﻋﻠﻰ 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ μﯾﺳﺗﺧدم اﻻﻣر ]NormalCI[m,/Sqrt[n],ConfidenceLevel->.90 ﺣﯾث اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 76.7804
واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 81.9878و ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن ﻣﺧرﺟﺎت اﻻﻣر
اﻟﺳﺎﺑق ﻋﻠﻰ اﻟﺷﻛل }{76.7804,81.9878
واﻟﺻورة اﻟﻌﺎﻣﺔ ﻟﻼﻣر اﻟﺳﺎﺑق ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻰ (NormalCI[Mean, , ]),ConfidenceLevel->c n اﻟﺧطﺎ اﻟﻣﻌﯾﺎرى ﺣﯾث meanﻣﺗوﺳط اﻟﻌﯾﻧﺔ )ﻟﮭذا اﻟﻣﺛﺎل ﻣﺗوﺳط اﻟﻌﯾﻧﺔ (79.3841و n 10.5 ( و ) cﻟﮭذا اﻟﻣﺛﺎل .( (1 ) c .95 ﻟﻠﻣﺗوﺳط )ﻟﮭذا اﻟﻣﺛﺎل 44 اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻻﻣر ) (min, maxﺣﯾث minاﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ و maxاﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ.ﻟﮭذا اﻟﻣﺛﺎل } . (min, max) ={76.7804,81.9878ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ﻧﻔس اﻟﻧﺗﺎﺋﺞ ﺑﺎﺳﺗﺧدام اﻻﻣر : ]MeanCI[list, options,ConfidenceLevel->c
ﺣﯾث listﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ و optionsﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔ .ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﯾﻣﻛن وﺿﻊ اﻟﺧﯾﺎر : >KnownStandardDeviation-
ﺣﯾث اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى اﻟﻣﺟﺗﻣﻊ ﯾوﺿﻊ ﺑﻌد اﻟﺳﮭم ) وھو ﻟﮭذا اﻟﻣﺛﺎل (10.5وﻗد ﯾﺳﺗﺧدم اﻟﺧﯾﺎر >KnownVariance-
ﺣﯾث ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﯾوﺿﻊ ﺑﻌد اﻟﺳﮭم .ﻟﻼﻣرﯾن اﻟﺳﺎﺑﻘﯾن و ﻟﻠرﻏﺑﺔ ﻓﻰ اﻟﺣﺻول ﻋﻠﻰ ﻣﻌﯾﻧﺔ ،ﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل 0.1أو 0 .01ﯾﺳﺗﺧدم اﻟﺧﯾﺎر > SignificanceLevel-ﺣﯾث ﯾوﺿﻊ c 0.9أو . c 0.99ﻋﻧد ﻋدم اﺳﺗﺧدام ھذا اﻟﺧﯾﺎر ﯾﻛون اﻟﻣﻔﺗرض c 0.95اى . 0.05 ٥٤
ﻣﺛﺎل )(٣-٢ ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق وﺑﻔرض ان ﻏﯾر ﻣﻌﻠوﻣﺔ اوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﺗوﺳط .
اﻟﺣــل: وﺣﯾث أن ﺣﺟم اﻟﻌﯾﻧﺔ ﻛﺑﯾر ،ﻓﺈن اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻣﺟﺗﻣﻊ σﯾﻣﻛ ن اﻻﺳﺗﻌﺎﺿ ﺔ ﻋﻧ ﮫ ﺑ ﺎﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻌﯾﻧﺔ s 10.5096وﯾﺗم اﻟﺣﺻول ﻋﻠﻰ 90%ﻓﺗرة ﺛﻘﺔ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : s s x z 0.05 x z 0.05 . n n ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ContinuousDistributions grades={85,94.5,76.7,79.2,83,80.2,68.7,89.1,74.1,87.8,44.9,7 7.6,85.1,75.7,81.5,66.2,83.4,79.8,94,91.8,96.3,73.5,82.2,76. 1,78.5,69.1,75.4,71.7,78.2,77.7,88.7,79.9,86.1,63.8,78.7,82. ;}6,98.6,81.3,63.4,76.6,84.2,89.7,87.7,54.6 =.1 0.1
]n=Length[grades 44
]m=Mean[grades 79.3841
]s=StandardDeviation[grades
2
10.5096
z Quantile NormalDistribution0, 1, 1 1.64485
]low=m-z s/Sqrt[n 76.778
]up=m+z s/Sqrt[n 81.9902 ﻟﮭذا اﻟﻣﺛﺎل : اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻣن اﻻﻣر ]s=StandardDeviation[grades ٥٥
76.778 اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ
ﻣن اﻻﻣر low=m-z s/Sqrt[n] 81.9902 واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر up=m+z s/Sqrt[n]
(٤-٢) ﻣﺛﺎل وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔMathematica
ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ : اﻟﺟﺎھزة . وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎتStatistics`ConfidenceIntervals
<<Statistics`ConfidenceIntervals` grades={85,94.5,76.7,79.2,83,80.2,68.7,89.1, 74.1,87.8,44.9,77.6,85.1,75.7,81.5,66.2,83.4,79.8,94,91.8,96 .3,73.5,82.2,76.1,78.5,69.1,75.4,71.7,78.2,77.7,88.7,79.9,86 .1,63.8,78.7,82.6,98.6,81.3,63.4,76.6,84.2,89.7,87.7,54.6}; n=Length[grades]
44
m=Mean[grades] 79.3841
s=StandardDeviation[grades] 10.5096
sig=StandardErrorOfSampleMean[grades] 1.58439
NormalCI[m,s/Sqrt[n],ConfidenceLevel->.90] {76.778,81.9902}
NormalCI[m,sig,ConfidenceLevel->.90] {76.778,81.9902}
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ grades ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=Length[grades]
وﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر m=Mean[grades]
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﻣن اﻻﻣر s=StandardDeviation[grades]
٥٦
s و n ]sig=StandardErrorOfSampleMean[grades واﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 76.778واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 81.9905ﻣن اﻻﻣرﯾن اﻻﺧﯾرﯾن.
ﻣن اﻻﻣر
ﻣﺛﺎل )(٥-٢ اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 100ﻣ رﯾض ﺑﺎﻟﺳ ﻛر وﻛ ﺎن ﻣﺗوﺳ ط أﻋﻣ ﺎرھم x 55 ﺑﺎﻧﺣراف ﻣﻌﯾﺎري s 20أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﺗوﺳط .
اﻟﺣــل: وﺣﯾث أن ﺣﺟم اﻟﻌﯾﻧﺔ ﻛﺑﯾر ، n 30ﻓﺈن اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻣﺟﺗﻣﻊ σﯾﻣﻛن اﻻﺳﺗﻌﺎﺿﺔ ﻋﻧﮫ ﺑﺎﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻌﯾﻧﺔ .s=20ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﮫ : s s x z 0.025 < μ < x + z 0.025 . n n ﺑﺎﺳﺗﺧدام ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻓﺈن ﻗﯾﻣﺔ zاﻟﺗﻲ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﻣﺳﺎﺣﺔ ﻗدرھﺎ 0.025وﻋﻠﻰ ﯾﺳﺎرھﺎ ﻣﺳﺎﺣﺔ ﻗدرھﺎ 0.975ھﻲ . z.025=1.96وﻋﻠﻰ ذﻟك ﻓﺈن 95%ﻓﺗرة ﺛﻘﺔ ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل : ) (1 .96 )(20 ) (1 .96 )(20 55 < μ < 55 + . 100 100 واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ :
51.08 < μ < 58.92 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . n=100 m=55 s=20 =.05 0.05
2
`<<Statistics`ContinuousDistributions
z Quantile NormalDistribution0, 1, 1 1.95996
s low m z n
51.0801
٥٧
s
up m z
n
58.9199
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=100
وﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر m=55 واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﻣن اﻻﻣر s=20 ﻣن اﻻﻣر =0.05
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 51.0801ﻣن اﻻﻣر
s
low m z
n
واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 58.9199ﻣن اﻻﻣر
s up m z n
ﻣﺛﺎل )(٦-٢ ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ اﻟﺟﺎھزة :
Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ
Statistics`ConfidenceIntervals
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ConfidenceIntervals n=100 100
m=55 55
s=20 20
]]NormalCI[m,(s)/Sqrt[n }{51.0801,58.9199 اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 51.0801واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 85.9199ﻣن اﻻﻣر ]]NormalCI[m,(s)/Sqrt[n و ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن ﻣﺧرﺟﺎت اﻻﻣر اﻟﺳﺎﺑق ﻋﻠﻰ اﻟﺷﻛل ٥٨
}{51.0801,58.9199
ﻓ ﻲ ﻣﻌظ م اﻷﺣﯾ ﺎن ﯾﻛ ون اﻟﻣطﻠ وب ﺗﻘ دﯾر ﻣﺗوﺳ ط اﻟﻣﺟﺗﻣ ﻊ ﻋﻧ دﻣﺎ ﯾﻛ ون اﻟﺗﺑ ﺎﯾن ﻏﯾ ر ﻣﻌﻠ وم وﺣﺟم اﻟﻌﯾﻧﺔ أﻗل ﻣن ،30ﻓﻘد ﺗﻛون اﻟﺗﻛﺎﻟﯾف ﻋﺎﻣﻼ ﻣﺣ ددا ﻟﺣﺟ م اﻟﻌﯾﻧ ﺔ .طﺎﻟﻣ ﺎ ﻛ ﺎن ﺷ ﻛل اﻟﻣﺟﺗﻣ ﻊ )ﺗﻘرﯾﺑﺎ( ﻧﺎﻗوﺳﻰ ﻓﺈﻧﮫ ﯾﻣﻛن ﺣﺳﺎب ﻓﺗرات اﻟﺛﻘﺔ ﻋﻧدﻣﺎ ﺗﻛون σ2ﻏﯾر ﻣﻌﻠوﻣﺔ وﺣﺟم اﻟﻌﯾﻧﺔ ﺻﻐﯾر . طرﯾﻘﺔ إﯾﺟﺎد (1 )100%ﻓﺗ رة ﺛﻘ ﺔ ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ھ ﻲ ﻧﻔﺳ ﮭﺎ اﻟطرﯾﻘ ﺔ اﻟﻣﺗﺑﻌ ﺔ ﻓ ﻲ ﺣﺎﻟ ﺔ اﻟﻌﯾﻧﺎت اﻟﻛﺑﯾرة ﻓﯾﻣﺎ ﻋدا اﺳﺗﺧدام ﺗوزﯾﻊ tﺑدﻻ ﻣن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ. ﻟﻌﯾﻧ ﺔ ﺧﺎﺻ ﺔ ﻣ ن اﻟﺣﺟ م ، nﯾﺣﺳ ب اﻟﻣﺗوﺳ ط xواﻻﻧﺣ راف اﻟﻣﻌﯾ ﺎري sوﯾ ﺗم اﻟﺣﺻ ول ﻋﻠﻰ (1 )100%ﻓﺗرة ﺛﻘﺔ ﻛﻣﺎ ﯾﺄﺗﻲ : s s x t x t . n n 2 2
ﻣﺛﺎل )( ٧-٢ ﻓﻲ اﺧﺗﺑﺎر ﻟﻠزﻣن اﻟذي ﯾﺳﺗﻐرﻗﮫ ﺗﺟﻣﯾﻊ ﻣﺎﻛﯾﻧﺔ ﻣﻌﯾﻧﺔ وﺟد أن اﻟ زﻣن اﻟ ذي اﺳ ﺗﻐرﻗﮫ ﺗﺟﻣﯾ ﻊ 6 ﻣﺎﻛﯾﻧ ﺎت ھ و ﻋﻠ ﻰ اﻟﺗ واﻟﻲ ) 12, 13, 11, 5, 10, 12 :ﻣﻘﺎﺳ ﮫ ﺑﺎﻟ دﻗﺎﺋق ( .أوﺟ د 95%ﻓﺗ رة ﺛﻘﺔ ﻟﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ وذﻟك ﺗﺣت ﻓرض أن اﻟزﻣن ) ﻓﻲ ھذا اﻟﻣﺛﺎل ( ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً.
اﻟﺣــل: ﻣﺗوﺳط اﻟﻌﯾﻧﺔ واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ھﻣﺎ . x 10.5 , s 2.881 :ﺑﺎﺳﺗﺧدام ﺟدول ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻓﺈن t0.025 = 2.571وذﻟك ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 5 n-1=6-1 وﻋﻠﻰ ذﻟك 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ μھﻲ : )( 2.571)( 2.881 )(2.571)(2.881 . < μ < 10.5 + 6 6 اﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ :
10.5
7.476 13.524 .
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;}x={12.,13.,11.,5,10,12 =.05 0.05
٥٩
n=Length[x] 6
m
Apply Plus , x N n
10.5
Apply Plus , x m2 s N n1 2.88097
<<Statistics`ContinuousDistributions`
t Quantile StudentTDistribution
n 1, 1
2
2.57058
s low m t n 7.47661
s up m t n 13.5234
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ x ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت ﻣن اﻻﻣرو =0.05
اﻟﻣﺧرﺟﺎت:ﺛﺎﻧﯾﺎ ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=Length[x] وﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر m
Apply Plus , x N n واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻣن اﻻﻣر
Apply Plus , x m2 s N n1 اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرt
t Quantile StudentTDistribution
n 1, 1 2
ﻣن اﻻﻣر7.47661 واﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ
٦٠
low m z
s
n
ﻣن اﻻﻣر13.5234 واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ
s up m z n
( ٨-٢) ﻣﺛﺎل وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة
Mathematica
ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ :
Statistics`ConfidenceIntervals
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`ConfidenceIntervals` a={12,13,11,5,10,12} {12,13,11,5,10,12}
MeanCI[a,KnownStandardDeviationNone,ConfidenceLevel>0.99] {5.75759,15.2424}
MeanCI[a,KnownVarianceNone,ConfidenceLevel->0.99] {5.75759,15.2424}
MeanCI[a,ConfidenceLevel->0.99] {5.75759,15.2424}
MeanCI[a,KnownStandardDeviationNone] {7.47661,13.5234}
MeanCI[a,KnownVarianceNone] {7.47661,13.5234}
MeanCI[a] {7.47661,13.5234}
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت: اوﻻ a ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ ﻣن اﻻﻣرμ ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ99% ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ MeanCI[a,KnownStandardDeviation->None,ConfidenceLevel->.99]
٦١
ﺣﯾث اﻟﺧﯾﺎر KnownStandardDeviation->Noneﯾﻌﻧﻰ ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻏﯾر ﻣﻌروف ﻛﻣﺎ ﯾﺳﺗﺧدم اﻟﺧﯾﺎر ConfidenceLevel->.99ﻋﻧد اﻟرﻏﺑﺔ ﻓﻰ اﺳﺗﺧدام .01
ﺣﯾث اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 5.75759واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 15.2424و ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن ﻣﺧرج اﻻﻣراﻟﺳﺎﺑق ﻋﻠﻰ اﻟﺷﻛل }{5.75759,15.2424
واﻻﻣر اﻟﺳﺎﺑق ﯾﻛﺎﻓﺊ اﻻﻣر : ]MeanCI[a,KnownVariance->None,ConfidenceLevel->.99
ﺣﯾث اﻟﺧﯾﺎر KnownVariance->Noneﯾﻌﻧﻰ ان ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﻏﯾر ﻣﻌروف وﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ﻧﻔس اﻟﻧﺗﺎﺋﺞ ﺑﺎﺳﺗﺧدام اﻻﻣر : ]MeanCI[a,ConfidenceLevel->0.99 وﻋﻧد اﻟرﻏﺑﺔ ﻓﻰ اﻟﺣﺻول ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ μﯾﺳﺗﺧدم اﻻﻣر ]MeanCI[a,KnownStandardDeviationNone ﺣﯾث اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 7.47661واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 13.5234و ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن ﻣﺧرج اﻻﻣر اﻟﺳﺎﺑق ﻋﻠﻰ اﻟﺷﻛل }{7.47661,13.5234
واﻻﻣر اﻟﺳﺎﺑق ﯾﻛﺎﻓﺊ اﻻﻣر ]MeanCI[a,KnownVarianceNone او اﻻﻣﺮ ]MeanCI[a
ﻣﺛﺎل )(٩-٢ ﻧﻔرض إن ﻣﻔﺗﺷﺎ ﯾرﻏب ﻓﻲ إﺟراء ﻣراﺟﻌﺔ ﺳرﯾﻌﺔ ﻋﻠﻰ وزن اﻟﺧﺑز اﻟذي ﯾﻧﺗﺟﮫ اﺣ د اﻟﻣﺧ ﺎﺑز ﻣﺎ ﻓﯾﺄﺧذ ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 15رﻏﯾﻔ ﺎ ﻣ ن إﻧﺗ ﺎج اﻟﻣﺧﺑ ز .ﻧﻔ رض أن ﻣﺗوﺳ ط وزن اﻟرﻏﯾف x 15.8وأن اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ھو 0.3رطل.أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻣﺗوﺳ ط وزن أﻧﺗ ﺎج اﻟﻣﺧﺑز ﺑﺄﻛﻣﻠﮫ وذﻟك ﺗﺣت ﻓرض أن اﻟﻣﺟﺗﻣﻊ ﺗﻘرﯾﺑﺎ طﺑﯾﻌﻲ.
اﻟﺣــل: ﻣﺗوﺳط اﻟﻌﯾﻧﺔ واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎة ھﻣ ﺎ . x 15.8 , s 0.3 :ﺑﺎﺳ ﺗﺧدام ﺟ دول ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻓﺈن t0.025 = 2.145وذﻟك ﻋﻧد درﺟﺎت ﺣرﯾﮫ . 14وﻋﻠ ﻰ ذﻟ ك 95% ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ھﻲ :
٦٢
.
)(2.145)(0.3 15
< μ < 15.8 +
)(2.145)(0.3 15
15.8
واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ:
15.63 < μ < 15.97 . ﻓﻰ ھذا اﻟﻣﺛﺎل ﻻ ﺗوﺟد ﻗﺎﺋﻣﺔ ﺑﺎﻟﻣﺷﺎھدات ﺣﯾث ﯾﺗوﻓر ﺣﺟم اﻟﻌﯾﻧﺔ واﻟوﺳط اﻟﺣﺳﺎﺑﻰ واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ContinuousDistributions =.05 0.05
n=15 15
m=15.8 15.8
s=.3 0.3
=n-1
2
14
t QuantileStudentTDistribution, 1 2.14479
]low=m-t s/Sqrt[n 15.6339
]up=m+t s/Sqrt[n 15.9661 ﻟﮭذا اﻟﻣﺛﺎل : درﺟﺎت اﻟﺣرﯾﺔ ﺗﻌطﻰ ﻣن اﻻﻣر =n-1 ﻟﻠﺛﻘﺔ اﻻدﻧﻰ واﻟﺣد 15.6339 ﻣن اﻻﻣر ]low=m-t s/Sqrt[n واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 15.9661ﻣن ]up=m+t s/Sqrt[n
ﻣﺛﺎل )(١٠-٢ ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة .Statistics`ConfidenceIntervalsوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت. `<<Statistics`ConfidenceIntervals n=15 ٦٣
m=15.8 s=.3 15 15.8 0.3
=n-1 14
s StudentTCI m, , , ConfidenceLevel 0.99 n
}{15.5694,16.0306
s StudentTCIm, , n
}{15.6339,15.9661
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 15.5694و اﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 16.0306ﻣن اﻻﻣر
s StudentTCI m, , , ConfidenceLevel 0.99 n ﺣﯾث واﻻﻣر اﻟﺗﺎﻟﻰ :
.01
,
s
اﻟﺧﯾﺎر اﻟﻣﻔﺗرض
StudentTCIm,
n
ﺣﯾث .05اﻟﺧﯾﺎر اﻟﻣﻔﺗرض واﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 15.6339 واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ . 15.9661
) (٣-٢ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق ﺑﯾن ﻣﺗوﺳطﻲ ﻣﺟﺗﻣﻌﯾن μ 1 μ 2
Confidence Interval for the Difference Between two Populations Means إذا ﻛﺎن ﻟدﯾﻧﺎ ﻣﺟﺗﻣﻌﺎن ،اﻟﻣﺟﺗﻣﻊ اﻷول ﻟﮫ ﻣﺗوﺳط μ1وﺗﺑﺎﯾن σ12واﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ ﻟ ﮫ ﻣﺗوﺳ ط μ 2
وﺗﺑﺎﯾن . 22وﻋﻠﻰ ذﻟك ،ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ 1 2ﻻ ﺑ د ﻣ ن اﺧﺗﯾ ﺎر ﻋﯾﻧ ﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n1ﻣن اﻟﻣﺟﺗﻣﻊ اﻷول وﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n2ﻣن اﻟﻣﺟﺗﻣﻊ اﻟﺛ ﺎﻧﻲ وﻣﺳ ﺗﻘﻠﺔ ﻋ ن اﻟﻌﯾﻧ ﺔ اﻷوﻟ ﻲ وﺣﺳ ﺎب اﻟﻔ رق ﺑ ﯾن اﻟﻣﺗوﺳ طﯾن . x1 x 2ﺑﻔ رض أن اﻟﻌﯾﻧﺗ ﯾن اﻟﻣﺳ ﺗﻘﻠﯾن ﺗ م اﺧﺗﯾﺎرھﻣﺎ ﻣن ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن ،أو ﻓ ﻲ ﺣﺎﻟ ﺔ ﻋ دم ﺗ واﻓر ذﻟ ك اﻟﻔ رض ،إذا ﻛ ﺎن ﻛ ﻼ ﻣ ن n1و n2 أﻛﺑر ﻣن أو ﯾﺳﺎوي 30ﻓﺈﻧﮫ ﯾﻣﻛن إﯾﺟﺎد (1 )100%ﻓﺗرة ﺛﻘﺔ ﻛﺎﻵﺗﻲ :
٦٤
12 22 12 22 1 2 (x1 x 2 ) z . n1 n 2 n n2 1 2
(x1 x 2 ) z 2
درﺟﺔ اﻟﺛﻘﺔ ﺗﻛون ﻣﺿﺑوطﺔ ﻋﻧدﻣﺎ ﺗﺧﺗﺎر اﻟﻌﯾﻧﺎت ﻣن ﻣﺟﺗﻣﻌﺎت طﺑﯾﻌﯾﺔ .ﻟﻠﻣﺟﺗﻣﻌﺎت اﻟﻐﯾر طﺑﯾﻌﯾﺔ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ﻓﺗرات ﺛﻘﺔ ﺗﻘرﯾﺑﯾﺔ واﻟﺗﻲ ﺗﻛون ﺟﯾدة ﺟدا ﻋﻧدﻣﺎ n2 , n1ﺗزﯾد ﻋن .30إذا ﻛﺎﻧت σ 22 , σ12ﻣﺟﮭوﻟﺗﯾن واﻟﻌﯾﻧﺎت اﻟﻣﺧﺗﺎرة ﻛﺑﯾرة ﺑدرﺟﺔ ﻛﺎﻓﯾﺔ ،ﻓﺈﻧﮫ ﯾﻣﻛن اﺳﺗﺑدال σ 22 , σ12ﺑـ s 22 , s12ﻋﻠﻰ اﻟﺗواﻟﻲ ﺑدون اﻟﺗﺄﺛﯾر ﻋﻠﻰ ﻓﺗرة اﻟﺛﻘﺔ .
ﻣﺛﺎل )(١١-٢ أﻋط ﻰ اﺧﺗﺑ ﺎر ﻓ ﻲ ﻣ ﺎدة اﻹﺣﺻ ﺎء إﻟ ﻰ 75طﺎﻟﺑ ﺔ و 50طﺎﻟﺑ ﺎ ً .ﻓ ﺈذا ﻛ ﺎن ﻣﺗوﺳ ط اﻟﻧﻘ ﺎط ﻣ ن ﻋﯾﻧ ﺔ اﻟطﺎﻟﺑ ﺎت x1 80ﺑ ﺎﻧﺣراف ﻣﻌﯾ ﺎري . s1 7وﻛ ﺎن ﻣﺗوﺳ ط اﻟﻧﻘ ﺎط ﻟﻌﯾﻧ ﺔ اﻟطﻠﺑ ﺔ x 2 70ﺑﺎﻧﺣراف ﻣﻌﯾﺎري . s 2 6أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟـ . 1 2
اﻟﺣــل: اﻟﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟـ μ1 μ 2ھو . x 1 x 2 =80-70=10وﺣﯾث أن ﻛ ﻼ ﻣ ن n1 , n2ﻛﺑﯾ رة ﻓﺈﻧ ﮫ ﯾﻣﻛ ن اﺳ ﺗﺧدام s1=7ﺑ دﻻ ﻣ ن σ1و s2=6ﺑ دﻻ ﻣ ن . σ 2ﺑﺎﺳ ﺗﺧدام α = 0 .05ﻓ ﺈن z 0.005 1.96
وذﻟك ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﻓﻲ ﻣﻠﺣق ) .(١وﺑﺎﻟﺗﻌوﯾض ﻓ ﻲ 95%ﻓﺗ رة ﺛﻘ ﺔ ﻟ ـ μ 1 μ 2اﻟﺗﺎﻟﯾ ﺔ :
12 22 2 2 1 2 (x1 x 2 ) z 1 2 . n1 n 2 n1 n 2 2 ﻧﺣﺻل ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻋﻠﻰ اﻟﺷﻛل : 72 62 μ 2 < 10 1.96 + . 75 50 أو:
(x1 x 2 ) z 2
72 62 10 1.96 + < μ1 75 50
7.703 < μ1 μ 2 < 12.297. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ٦٥
2
;n1=75;xb1=80;s1=7 ;n2=50;xb2=70;s2=6 =.05 0.05 `<<Statistics`ContinuousDistributions
0, 1, 1
z Quantile NormalDistribution 1.95996 xb=xb1-xb2 10
s1 2 s22 s N n1 n2 1.17189 low=xb-z*s 7.70313 up=xb+z*s 12.2969 وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﺣﺟم اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر n1=75 وﺣﺟم اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر n2=50 وﻣﺗوﺳط اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر xb1=80 وﻣﺗوﺳط اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر xb2=70 واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر s1=7 واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر s2=6 ﻣن اﻻﻣر =0.05
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر low=xb-z*s واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
up=xb+z*s
٦٦
ﻣﺛﺎل )(١٢-٢ ﻟﻠﺑﯾﺎﻧ ﺎت اﻟﺗﺎﻟﯾ ﺔ أوﺟ د 95%ﻓﺗ رة ﺛﻘ ﺔ ﻟ ـ 1 2
ﺣﯾ ث 12 22 10.5ﺗﺣ ت ﻓ رض أن
اﻟﻣﻔردات ﻣﺄﺧوذة ﻣن ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن: }public={825,990,1054,921,816,818,1071,1121,926,956,867,935 private={840,600,890,780,915,915,1230,1302,922,845,923,1030, }879,757,921,848,870,826,831,1005,1002,915,813,842,774
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ اﻟﺟﺎھزة :
Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ
Statistics`ConfidenceIntervals
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ConfidenceIntervals ;}public={825,990,1054,921,816,818,1071,1121,926,956,867,935 private={840,600,890,780,915,915,1230,1302,922,845,923,1030, ;}879,757,921,848,870,826,831,1005,1002,915,813,842,774 MeanDifferenceCI[public,private,KnownStandardDeviation{10. ]}5,10.5 }{35.4393,49.894
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت publicو ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت private ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ 35.4393واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 49.894ﻣن اﻻﻣر MeanDifferenceCI[public,private,KnownStandardDeviation{10. ]}5,10.5
.واﻻﻣر اﻟﺳﺎﺑق ﯾوﺿﻊ ﺑﺻورة ﻋﺎﻣﺔ ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻰ ]MeanDifferenceCI[list1, list2, options ﺣﯾث list1ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻻوﻟﻰ و list2ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ و optionsﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔ ﺣﯾث ﯾﺳﺗﺧدم اﻟﺧﯾﺎر } KnownStandardDeviation{ {1 , 2 ٦٧
او اﻟﺧﯾﺎر : 2 2 } KnownVariance{ {1 , 2
واﻟﺧﯾﺎر اﻟﻣﻔﺗرض ھو 95%ﻓﺗرة ﺛﻘﺔ وﻟﻛن ﻻى ﻓﺗرة ﺛﻘﺔ اﺧرى ﯾﺳﺗﺧدم اﻟﺧﯾﺎر : ConfidenceLevel->c
ﻣن اﻻﻣر اﻟﺳﺎﺑق. ﻧﺣﺻل ﻋﻠﻰ ﻗﺎﺋﻣﺔ } {min, maxﺗﻣﺛل ﻓﺗرة اﻟﺛﻘﺔ وذﻟك ﺑﺎﺳﺗﺧدام اﻟﻣﺷﺎھدات ﻣن اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻓﻰ list1واﻟﻣﺷﺎھدات ﻓﻰ اﻟﻌﯾﻧﻰ اﻟﺛﺎﻧﯾﺔ ﻓﻰ list2 إذا ﻛﺎﻧت σ 22 , σ12ﻣﺟﮭوﻟﺗﯾن واﻟﻌﯾﻧﺎت اﻟﻣﺧﺗﺎرة ﻛﺑﯾرة ﺑدرﺟﺔ ﻛﺎﻓﯾﺔ ،ﻓﺈﻧﮫ ﯾﻣﻛن اﺳﺗﺑدال σ 22 , σ12ﺑـ s 22 , s12ﻓﻰ اﻟﺧﯾﺎر : 2
2
} KnownVariance{ {1 , 2
ﻻﯾﺟﺎد (1 )100%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ﺗﺳﺗﺧدم اﻟطرﯾﻘﺔ اﻟﺳﺎﺑﻘﺔ إذا ﻛﺎن 22 , 12ﻣﻌﻠوﻣﺗﺎن أو ﯾﻣﻛن ﺗﻘدﯾرھﻣﺎ ﻣن ﻋﯾﻧﺎت ﻛﺑﯾرة .إذا ﻛﺎﻧت أﺣﺟﺎم اﻟﻌﯾﻧﺎت ﺻﻐﯾرة ،ﻓﺳوف ﺗﺳﺗﺧدم ﺻﯾﻐﺔ اﺧرى ﻟﻠﺣﺻول ﻋﻠﻰ ﻓﺗرات ﺛﻘﺔ واﻟﺗﻲ ﺗﻛون ﺻﺣﯾﺣﺔ ﻋﻧدﻣﺎ ﺗﻛون اﻟﻣﺟﺗﻣﻌﺎت ﺗﻘرﯾﺑﺎ ً ﺗﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ. ﺑﻔرض أن 12 22 2ﻓﺈﻧﮫ ﯾﻣﻛن اﺳﺗﺧدام s 2pﻛﺗﻘدﯾر ﻟﻠﺗﺑﺎﯾن اﻟﻌﺎم . σ2ﺣﯾث :
(n1 1)s12 (n 2 1)s 22 n1 n 2 2 ﻷي ﻋﯾﻧﺗﯾن ﻋﺷواﺋﯾﺗﯾن ﻣﺳﺗﻘﻠﺗﯾن ﻣن اﻟﺣﺟم n2 , n1ﯾﺗم اﺧﺗﯾﺎرھﻣﺎ ﻣن ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن ﻓﺈن اﻟﻔرق ﺑﯾن ﻣﺗوﺳطﻲ اﻟﻌﯾﻧﺗﯾن ، x1 x 2 ،واﻟﺗﺑﺎﯾن اﻟﻌﺎم ﻟﻠﻌﯾﻧﺔ s2pﯾﺗم ﺣﺳﺎﺑﮭﻣﺎ واﺳﺗﺧداﻣﮭﻣﺎ ﻓﻲ إﯾﺟﺎد (1 )100%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ﻋﻠﻰ اﻟﺷﻛل : s 2p
1 1 1 1 1 2 (x1 x 2 ) t s p . n1 n 2 n n 1 2 2
(x1 x 2 ) t s p 2
ﻣﺛﺎل )( ١٣-٢ اﺧﺗﯾرت ﻣﺟﻣوﻋﺗ ﺎن ﻣ ن اﻷراﻧ ب ،اﻷوﻟ ﻰ ﻣ ن 13أرﻧﺑ ﺎ ً وأﻋطﯾ ت اﻟﻐ ذاء Aواﻟﺛﺎﻧﯾ ﺔ ﻣ ن 15أرﻧﺑﺎ ً وأﻋطﯾت اﻟﻐذاء Bوﻛﺎﻧت اﻟزﯾﺎدة ﻓﻲ اﻟوزن ﺑﻌد ﻓﺗرة ﻣﻌﯾﻧﺔ ھﻲ : A: 35, 30, 30, 23, 21, 12, 24, 23, 33, 27, 29, 25, 21. B: 20, 17, 34, 31, 29, 39, 30, 46, 7, 21, 33, 43, 21, 34, 20. أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔ رق ﺑ ﯾن ﻣﺗوﺳ طﻲ اﻟﻣﺟﺗﻣﻌ ﯾن ،وذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻣﺟﺗﻣﻌ ﯾن ﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻌﺎن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺣﯾث . 12 22
٦٨
اﻟﺣــل: s 1 = 6.05, s 2 = 10.58,
x 1 = 25.62, x 2 = 28.33,
n 1 = 13, n 2 = 15,
ﻹﯾﺟﺎد ﻓﺗرة ﺛﻘﺔ ﻟـ μ1 μ 2ﺳوف ﻧﺳﺗﺧدم اﻟﺗﻘدﯾر ﺑﻧﻘطﺔ . =25.62-28.33=-2.71 x1 x 2اﻟﺗﺑﺎﯾن اﻟﻌﺎم s 2pھو : 2 2 2 2 )2 (n1 1)s1 (n 2 1)s 2 (12)(6.05) (14)(10.58 sp 77.1669. n1 n 2 2 13 15 2 α ﺑﺄﺧذ اﻟﺟذر اﻟﺗرﺑﯾﻌﻲ ﻟﻠﺗﺑﺎﯾن اﻟﻌﺎم ﻓﺈن .sp=8.784ﺑﺎﺳﺗﺧدام = .025ﻓﺈن t.025=2.056ﺗﺳﺗﺧرج 2
ﻣن ﺟدول ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 13 15 2 26ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
1 1 1 2 n1 n 2 1 1 , n1 n 2
(x1 x 2 )t s p 2
(x1 x 2 )t s p 2
ﻓﺈن 95%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ھﻲ : 1 1 + < < μ1 μ 2 13 15
) 2 .71 ( 2.056 )(8.784
1 1 + . 13 15
) 2 .71 + ( 2.056 )(8 .784
واﻟﺗﻲ ﯾﻣﻛن اﺧﺗزاﻟﮭﺎ إﻟﻰ : -9.553 < μ 1 μ 2 < 4.133. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;}a={35,30,30,23,21,12,24,23,33,27,29,25,21 ;}b={20,17,34,31,29,39,30,46,7,21,33,43,21,34,20 =.05 0.05
]plu[w_]:=Apply[Plus,w ]l[w_]:=Length[w ]n1=l[a 13
]n2=l[b ٦٩
15
plu a N n1
xb1 25.6154
xb2
plu b N n2
28.3333
plu a xb1 2 s1 n1 1 6.04895
plu b xb2 2 s2 n2 1 10.5808
<<Statistics`ContinuousDistributions` t Quantile StudentTDistribution n1 n2 2,
1
2
2.05553
xb=xb1-xb2 -2.71795
n1 1s12 n2 1s2 2 sp n1 n2 2 8.78462
1 1 s sp N n1 n2 3.32878
low=xb-t*s -9.56035
up=xb+t*s 4.12445
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت: اوﻻ b و ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎتa ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت ﻣن اﻻﻣر =0.05
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر low=xb-t*s واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
up=xb+t*s ٧٠
ﺗﻔﺗرض اﻟطرﯾﻘﺔ اﻟﺳﺎﺑﻘﺔ ﻟﻠﺣﺻول ﻋﻠﻰ ﻓﺗرات ﺛﻘﺔ ﻟـ 1 2أن اﻟﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن وأن . 12 22أﯾﺿﺎ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ﻧﺗﺎﺋﺞ ﺟﯾدة إذا ﻛﺎﻧت اﻟﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن و . n1 n 2
12 22وذﻟك ﺗﺣت ﺷرط أن
ﻣﺛﺎل )(١٤-٢ ﻓﯾﻣ ﺎ ﯾﻠ ﻲ ﺑﯾﺎﻧ ﺎت ﻋﯾﻧﺗ ﺎن اﻟﻛ ﺎﺑﻼت اﻟﻣ ﺄﺧوذة ﻣ ن ﺷ رﻛﺗﯾن ﻣﻧﺗﺟ ﺔ ﻟﻘط ﻊ ﻏﯾ ﺎر ﻣﻛ ﺎﺋن ﻣﻌﯾﻧ ﺔ وﺗﺗﺿ ﻣن اﻟﺑﯾﺎﻧ ﺎت ﻋ دد اﻷﯾ ﺎم اﻟﺗ ﻲ ﺗﺳ ﺗﻐرﻗﮭﺎ ﻛ ل ﺷ رﻛﺔ ﻓ ﻲ ﺗﺣﻘﯾ ق طﻠ ب اﻟﻘط ﻊ وﻋ دد اﻟﻛﺎﺑﻼت ﻓﻲ ﻋﺷرة : 19,14,18,13,10,12,14,11,16,10ﺷرﻛﺔ A : 21,20,19,13,14,18,15,19,25,20ﺷرﻛﺔ B أوﺟ د 95%ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻔ رق ﺑ ﯾن ﻣﺗوﺳ طﻲ اﻟﻣﺟﺗﻣﻌ ﯾن وذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻣﺟﺗﻣﻌ ﯾن ﺗﻘرﯾﺑﺎ ﯾﺗﺑﻌﺎن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺣﯾث . 12 2 2
اﻟﺣــل: n1 10, اﻟﺷرﻛﺔ : Aﻓﺈن s1 3.16 x 2 13.7, وﻟﻠﺷرﻛﺔ : Bﻓﺈن n 2 10, s 2 3.6 x 2 18.4, ﻹﯾﺟﺎد 95%ﻓﺗرة ﺛﻘﺔ ﻟ ـ 1 2ﺳ وف ﻧﺳ ﺗﺧدم اﻟﺗﻘ دﯾر ﺑﻧﻘط ﺔ x1 x 2 13.7 18.4 4.7 2 واﻟﺗﺑﺎﯾن اﻟﻌﺎم s pھو:
2
2
(n 1)s12 (n 2 1)s 2 2 9 3.16 9 3.6 1 11.4921. . n1 n 2 2 10 10 2
2
sp
α ﺑﺄﺧذاﻟﺟذراﻟﺗرﺑﯾﻌﻲ ﻟﻠﺗﺑﺎﯾن اﻟﻌﺎم ﻓﺈن s p 3.39وﺑﺎﺳﺗﺧدام = 0.025 2 ﻧﺳﺗﺧرج ﻣن ﺟدول اﻟﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ 10 10 2 18 ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ:
ﻓﺈنt 0.025 = 2.101
1 1 1 1 , (x1 x 2 ) t s p 1 2 n1 n 2 n n 1 2 2 ﻓﺈن 95%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ھﻲ:
٧١
(x 1 x 2 ) t s p 2
1 1 1 1 + < μ 1 μ 2 < ( 4.7) + (2.101)(3.39) + 10 10 10 10 :واﻟﺗﻲ ﯾﻣﻛن اﺧﺗزاﻟﮭﺎ إﻟﻰ 7.8852 1 2 1.5148 . وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت
4.7 ) (2.101)(3.39)
(
a={19,14,18,13,10,12,14,11,16,10}; b={21,20,19,13,14,18,15,19,25,20}; =.05 0.05
plu[w_]:=Apply[Plus,w] l[w_]:=Length[w] n1=l[a] 10
n2=l[b] 10
plu a N n1
xb1 13.7
plu b N n2
xb2 18.4
plu a xb1 2 s1 n1 1 3.16403
plu b xb2 2 s2 n2 1 3.59629
<<Statistics`ContinuousDistributions` t Quantile StudentTDistribution n1 n2 2,
1
2
2.10092
xb=xb1-xb2 -4.7
n1 1s12 n2 1s2 2 sp n1 n2 2 ٧٢
3.38707
1 1 s sp N n1 n2 1.51474
low=xb-t*s -7.88236
up=xb+t*s -1.51764
اﻵن وﻋﻧد اﻟرﻏﺑﺔ ﻓﻲ إﯾﺟﺎد (1 α )100 %ﻓﺗرة ﺛﻘﺔ ﻟـ μ 1 μ 2ﻓﻲ ﺣﺎﻟﺔ اﻟﻌﯾﻧ ﺎت اﻟﺻ ﻐﯾرة ﻋﻧ دﻣﺎ ﺗﻛ ون 12 22وﻋﻧ د ﺻ ﻌوﺑﺔ اﻟﺣﺻ ول ﻋﻠ ﻰ ﻋﯾﻧ ﺎت ذات أﺣﺟ ﺎم ﻣﺗﺳ ﺎوﯾﺔ ﻓ ﺈن درﺟ ﺎت اﻟﺣرﯾﺔ ﺗﺣﺳب ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : 2 2 2 s1 s 2 + n1 n 2 =ν s12 2 s 22 2 ) ( ) ( n1 n + 1 n1 1 n 2 1 وﺑﻣﺎ أن νﻧﺎدرا ً ﻣﺎ ﺗﻛون ﻋدد ﺻﺣﯾﺢ ،ﻓﺈﻧﻧﺎ ﻧﻘرﺑﮭﺎ إﻟﻰ أﻗرب رﻗم ﺻﺣﯾﺢ .ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (1 α)100%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ﻛﺎﻟﺗﺎﻟﻲ :
s12 s 22 s 2 s2 1 2 (x1 x 2 ) t 1 2 n1 n 2 n1 n 2 2
(x1 x 2 ) t 2
ﻣﺛﺎل )(١٥-٢ ﺧﻼل 20ﺳﻧﺔ ﻣﺎﺿﯾﺔ ﻛﺎن ﻣﺗوﺳ ط ﺳ ﻘوط اﻟﻣط ر ﻓ ﻲ اﻟﻣﻧطﻘ ﺔ Aﻓ ﻲ ﻗط ر ﻣ ﺎ ﺧ ﻼل ﺷ ﮭر ﯾﻧ ﺎﯾر 1.8ﺑوﺻ ﺔ ﺑ ﺎﻧﺣراف ﻣﻌﯾ ﺎري 0.4ﺑوﺻ ﺔ .ﺑﯾﻧﻣ ﺎ ﻛ ﺎن ﻣﺗوﺳ ط ﺳ ﻘوط اﻟﻣط ر ﻓ ﻲ اﻟﻣﻧطﻘﺔ Bﻣ ن ﻧﻔ س اﻟﻘط ر ﺧ ﻼل 15ﺳ ﻧﺔ ﻣﺎﺿ ﯾﺔ 1.03ﺑوﺻ ﺔ ﺑ ﺎﻧﺣراف 0.25ﺑوﺻ ﺔ . أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2وذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻣﻔ ردات ﻣ ﺄﺧوذة ﻣ ن ﻣﺟﺗﻣﻌ ﯾن طﺑﯾﻌﯾﯾن ﺣﯾث . 12 22
اﻟﺣــل: s 1 = 0 .4 , ﻟﻠﻣﻧطﻘﺔ Aﻓﺈن وﻟﻠﻣﻧطﻘﺔ Bﻓﺈن s 2 = 0.25,
x 1 = 1.8, x 2 = 1.03,
٧٣
n 1 = 20, n 2 = 15,
وﻋﻠﻰ ذﻟك 95%ﻓﺗرة ﺛﻘﺔ ﻟـ 1 2ﺣﯾث 12 22و n1 n 2ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭ ﺎ ﻛ ﺎﻵﺗﻲ : 2 s12 s 22 + n1 n 2 =ν s12 2 s 22 2 ) ( ) ( n1 n + 1 n1 1 n 2 1
2
= 32.11 ≈32.
2
.4 2 .25 2 + 20 15
.25 2 15 14
2
+
.4 2 20 19
=
وﻋﻠ ﻰ ذﻟ ك x 1 x 2 = 1.8 1.03 = 0.77وﺗﺣ ت ﻓ رض أن α = 0 .05وﻣن اﻟﺟ دول ﻓ ﻲ ﻣﻠﺣ ق ) (٢ﻓﺈن t0.025 = 2.042ﺑدرﺟﺎت ﺣرﯾﺔ . 32وﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
s12 s 22 + < μ1 μ 2 n1 n 2
( x1 x 2 ) t α 2
s12 s 22 < (x1 x 2 ) + t α + . n1 n 2 2 ﯾﻣﻛن إﯾﺟﺎد 95%ﻓﺗرة ﺛﻘﺔ ) ﺗﻘرﯾﺑﯾﺔ ( ﻛﺎﻟﺗﺎﻟﻲ : .4 2 .25 2 .4 2 .25 2 0.77 2.042 + < μ 1 μ 2 < 0.77 + 2.042 + . 20 15 20 15 واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ : 0.545 < μ 1 μ 2 < 0.995 . ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
;n1=20;xb1=1.8;s1=.4 ٧٤
n2=15;xb2=1.03;s2=0.25; =.05 0.05
s12 w1 n1 0.008
s22 w2 n2 0.00416667
vv
w1 w22 w12 n11
w22 n21
N
32.1206
v=Round[vv] 32
<<Statistics`ContinuousDistributions`
t Quantile StudentTDistribution
v, 1
2
2.03693
xb=xb1-xb2 0.77
s1 2 s2 2 ss N n1 n2 0.110303
low=xb-t*ss 0.545321
up=xb+t*ss 0.994679
(١٦-٢) ﻣﺛﺎل وذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻣﻔ ردات ﻣ ﺄﺧوذة ﻣ ن1 2 ﻓﺗ رة ﺛﻘ ﺔ ﻟ ـ95% ﻟﻠﺑﯾﺎﻧ ﺎت اﻟﺗﺎﻟﯾ ﺔ أوﺟ د . 12 22 ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن و
se={980,990,940,997,980,1054,1019,942}
w={939,838,1024,903,965,1027,1000} ٧٥
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ اﻟﺟﺎھزة :
Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ
Statistics`ConfidenceIntervals
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ConfidenceIntervals ;}se={980,990,940,997,980,1054,1019,942 ;}w={939,838,1024,903,965,1027,1000 ]MeanDifferenceCI[se,w,EqualVariances->True }{-29.7877,92.1448
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت seو ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت w ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ -29.7877واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ 92.1448ﻣن اﻻﻣر ]MeanDifferenceCI[se,w,EqualVariances->True
.واﻻﻣر اﻟﺳﺎﺑق ﯾوﺿﻊ ﺑﺻورة ﻋﺎﻣﺔ ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻰ ]MeanDifferenceCI[list1, list2, options
ﺣﯾث list1ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻻوﻟﻰ و list2ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ و optionsﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔ . واﻟﺧﯾﺎر اﻟﻣﻔﺗرض ھو 95%ﻓﺗرة ﺛﻘﺔ وﻟﻛن ﻻى ﻓﺗرة ﺛﻘﺔ اﺧرى ﯾﺳﺗﺧدم اﻟﺧﯾﺎر : >ConfidenceLevel-
12 22
ﺑﻣﺎ ان ﯾﻛﺗب اﻟﺧﯾﺎر:
EqualVariances->True
اﻟﺧﯾﺎر اﻟﻣﻔﺗرض ھﻧﺎ ھو KnownVariance None
وﻟذﻟك ﻻ ﯾﻛﺗب ھذا اﻟﺧﯾﺎر .
ﻣﺛﺎل )(١٧-٢
٧٦
أوﺟد 95%ﻓﺗرة ﺛﻘ ﺔ ﻟ ـ 1 2وذﻟ ك ﺗﺣ ت ﻓ رض أن اﻟﻣﻔ ردات ﻣ ﺄﺧوذة ﻣ ن ﻣﺟﺗﻣﻌ ﯾن طﺑﯾﻌﯾ ﯾن ﺣﯾث 12 22ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ConfidenceIntervals ;}se={980,990,940,997,980,1054,1019,942 ;}w={939,838,1024,903,965,1027,1000 ]MeanDifferenceCI[se,w
}{-35.1969,97.554
ﺑﻣﺎ ان 12 22 ﻻ ﯾﻛﺗب اى ﺧﯾﺎرات ﺣﯾث اﻟﺧﯾﺎر اﻟﻣﻔﺗرض ھو : EqualVariance False
وﻟذﻟك ﻻ ﯾﻛﺗب ھذا اﻟﺧﯾﺎر . اﯾﺿﺎ اﻟﺧﯾﺎر اﻟﻣﻔﺗرض ھﻧﺎ ھو KnownVariance None
وﻟذﻟك ﻻ ﯾﻛﺗب ھذا اﻟﺧﯾﺎر . ﻣن اﻻﻣر : ]MeanDifferenceCI[se,w
ﻧﺣﺻل ﻋﻠﻰ ﻓﺗرة ﺛﻘﺔ اﻟﻣطﻠوﺑﺔ ﻟـ 1 2وھﻰ }{-35.1969,97.554 وأﺧﯾرا ً ﺳوف ﻧﻧﺎﻗش ﻓﻲ ھذا اﻟﺑﻧد طرﯾﻘﺔ ﺗﻘدﯾر اﻟﻔرق ﺑﯾن ﻣﺗوﺳطﯾن ﻋﻧدﻣﺎ ﺗﻛون اﻟﻌﯾﻧﺗﯾن ﻏﯾر ﻣﺳﺗﻘﻠﯾن .ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﻋﻧدﻣﺎ ﺗﺄﺧذ ﻋﯾﻧﺔ واﺣدة وﻧﺣﺻل ﻋﻠﻰ ﻗراءات ﻟﻣﻔرداﺗﮭﺎ ﺛم ﻧﺿﻊ ھذه اﻟﻌﯾﻧﺔ ﺗﺣت ﻣؤﺛر وﻧﻌود وﻧﺄﺧذ ﻗراءات أﺧري ﻟﮭﺎ ،وﺑﻣﻘﺎرﻧﺔ ﻣﺟﻣوﻋﺗﻲ اﻟﻘراءﺗﯾن ﻟﻧﻔس اﻟﻣﻔردات ﯾﻣﻛﻧﻧﺎ اﺳﺗﻧﺗﺎج ﺗﺄﺛﯾر ھذا اﻟﻌﺎﻣل أو اﻟﻣؤﺛر .ﻟﻧﻔرض ﻣﺛﻼ أﻧﻧﺎ ﻧرﯾد ﻣﻌرﻓﺔ ﺗﺄﺛﯾر دواء ﻋﻠﻰ ﻗراءات ﺿﻐط اﻟدم اﻟﻣرﺗﻔﻊ وأﺧذﻧﺎ ﻟذﻟك ﻋﯾﻧﺔ ﻣن 10ﺷﺧﺻﺎ ً وﻗرأﻧﺎ ﺿﻐط اﻟدم ﻟﻛل ﻣﻧﮭﻣﺎ ﺛم أﻋطﯾﻧﺎ ﻛل ﺷﺧص دواء ﻟﮫ ﺗﺄﺛﯾر ﻋﻠﻰ ﺿﻐط اﻟدم اﻟﻣرﺗﻔﻊ وأﻋدﻧﺎ أﺧذ اﻟﻘراءات ﻣرة أﺧرى .ﻓﻲ ھذه اﻟﺣﺎﻟﺔ ﻧﻘول أﻧﻧﺎ أﻣﺎم ﻋﯾﻧﺗﯾن ﻏﯾر ﻣﺳﺗﻘﻠﯾن أو ﻋﯾﻧﺗﯾن ﻣزدوﺟﺗﯾن .paired samplesأزواج اﻟﻣﺷﺎھدات ﺳوف ﺗﻛون ) ( x 1 y1 ), ( x 2 y 2 ),..., ( x n y nاﻟﻔروق ﻷزواج اﻟﻣﺷﺎھدات ﺳوف ﺗﻛون ) d1 = ( x 1 y1 ), d 2 = ( x 2 y 2 ),..., d n = ( x n y nھذه اﻟﻔروق ﺗﻣﺛل ﻗﯾم ﻟﻠﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ .Dاﻟﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ μ D = μ 1 μ 2ﯾﻌطﻰ ﻣن dواﻟذي ﯾﺳﺎوى ﻣﺗوﺳط اﻟﻔروق ﻓﻲ اﻟﻌﯾﻧﺔ .وﺑﻣﺎ أن dﺗﻣﺛل ﻗﯾﻣﺔ ﻟﻺﺣﺻﺎء Dﻛﻣﺎ أن اﻟﺗﺑﺎﯾن ﻟﻠﻔروق ھو s 2dﺣﯾث :
٧٧
n ( di ) 2 n 1 2 i 1 s d2 di n 1 i 1 n ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (1 α)100 %ﻓﺗرة ﺛﻘﺔ ﻟـ Dﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : s s d t d D d t d n n 2 2
ﺣﯾث dو sdھﻣﺎ اﻟﻣﺗوﺳط واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻔروق ﻟﻌدد nﻣن ازواج اﻟﻣﺷﺎھدات و t α 2
ھﻲ ﻗﯾﻣﺔ ﻟﺗوزﯾﻊ tﺑدرﺟﺎت ﺣرﯾﺔ n 1واﻟﺗﻲ ﺗﻛون اﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾﻧﮭﺎ ﺗﺳﺎوى
α 2
واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊ tﻓﻰ ﻣﻠﺣق ). (٢
ﻣﺛﺎل ) (١٨-٢ أﺧذت ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 10ﺗﻼﻣﯾذ ﻣن إﺣدى اﻟﻣدارس ودوﻧت أوزاﻧﮭم ﺛم أﻋطﻲ ﻛل ﻣﻧﮭم ﻛوﺑﺎ ً ﻣن اﻟﻠﺑن ﺻﺑﺎﺣﺎ ً وآﺧر ظﮭرا ً وذﻟك ﻟﻣدة ﺛﻼﺛﺔ ﺷﮭور ﻣﺗﺗﺎﻟﯾﺔ .ﺛم دوﻧت أوزاﻧﮭم ﻓﻛﺎﻧت اﻟﻧﺗﺎﺋﺞ ﻛﺎﻵﺗﻰ : 129 124 126 139 133 136 139 135 137 140
اﻟوزن ﻗﺑل ﺗﻌﺎطﻰ اﻟﻠﺑن
130 126 129 140 136 134 141 140 138 141اﻟوزن ﺑﻌد ﺗﻌﺎطﻲ اﻟﻠﺑن اﻟﻣطﻠوب إﯾﺟﺎد 99%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق اﻟﺣﻘﯾﻘﻰ . D 1 2
اﻟﺣــل اﻟﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟـ μ Dھو . d = 1.7اﻟﺗﺑﺎﯾن s2dﻟﻔروق اﻟﻌﯾﻧﺔ ھو :
( Σd i ) 2 n = 3.344
2 i
∑d
1 = s n 1
1 ( 17 ) 2 = 59 9 10
٧٨
2 d
t.005 3.25 ﻓ ﺈنα = 0 .01 ﺑﺎﺳ ﺗﺧدام. sd 1.829 ﻓ ﺈنs2d وﺑﺄﺧ ذ اﻟﺟ ذر اﻟﺗرﺑﯾﻌ ﻲ ﻟﻠﻣﻘ دار
وﺑ ﺎﻟﺗﻌوﯾض ﻓ ﻲ. ν = n 1 = 9 ( ﻋﻧد درﺟﺎت ﺣرﯾ ﺔ٢) ﻓﻲ ﻣﻠﺣقt واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊ : اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ s s d t α d < μD < d + t α d . n n 2 2 : ﻓﺗرة ﺛﻘﺔ ﻛﺎﻟﺗﺎﻟﻲ99% ﻧﺣﺻل ﻋﻠﻰ (1.8797) (1.829) 1.7 (3.25) D 1.7 (3.25) . 10 10 : واﻟﺗﻲ ﺗﺧﺗزل اﻟﻰ - 3.58 < μ D < 0.18. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت x={129,124,126,139,133,136,139,135,137,140}; y={130,126,129,140,136,134,141,140,138,141}; =.01 0.01
d=x-y {-1,-2,-3,-1,-3,2,-2,-5,-1,-1}
plu[w_]:=Apply[Plus,w] n=Length[d] 10
db
plu d N n
-1.7
1 sd plu d db 2 N n 1 1.82878
<<Statistics`ContinuousDistributions`
t Quantile StudentTDistribution 3.24984
sd low db t n -3.57942
sd up db t n
٧٩
n 1, 1
2
0.179418
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت xوﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت y وﻣن اﻻﻣر =0.01
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
sd low db t n واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
sd up db t n
ﻣﺛﺎل )(١٩-٢ ﺷرﻛﺔ ﺗﻧﺗﺞ ﻣﻘﯾﺎﺳﯾن ﻟﻠﻣﻘﺎوﻣﺔ اﻟﻛﮭرﺑﺎﺋﯾﺔ ورﻏﺑت اﻟﺷرﻛﺔ ﻓﻲ ﻣﻌرﻓﺔ ﻛﻔﺎءة اﻟﺟﮭﺎزﯾن ﻓﻲ اﻟﻘﯾﺎس أﺧذت 10ﻧﻣﺎذج ﻣن اﻷﺳﻼك اﻟﻛﮭرﺑﺎﺋﯾﺔ وﺗم ﻗﯾﺎس ﻣﻘﺎوﻣﺗﮭم ﺑﺎﻻوم ﺑﺎﻟﻣﻘﯾﺎﺳﯾن وﺗم اﻟﺣﺻول ﻋﻠﻰ اﻟﻧﺗﺎﺋﺞ اﻟﺗﺎﻟﯾﺔs d 0.037 , d 0.018 : اﻟﻣطﻠوب إﯾﺟﺎد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق اﻟﺣﻘﯾﻘﻰ . D 1 2
اﻟﺣــل: اﻟﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟـ Dھو . d = 0.018واﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻔروق اﻟﻌﯾﻧﺔ ھو s d = 0.037 ﺑﺎﺳ ﺗﺧدام α = 0.05ﻓ ﺈن t0.025=2.262واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ tﻓ ﻲ ﻣﻠﺣ ق ) (٢ﻋﻧ د درﺟﺎت ﺣرﯾﺔ . n 1 9وﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : s s d tα d < μD < d + tα d . n n 2 2 ﻧﺣﺻل ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻛﺎﻟﺗﺎﻟﻲ : )(0.037 )(0.037 )0.018 ( 2.262 )< μ D < 0.018 + ( 2.262 . 10 10 واﻟﺗﻲ ﺗﺧﺗزل اﻟﻰ : -0.00847 < D < 0.04447.
٨٠
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . 95
=.05 0.05 n=10 10
db=.018 0.018
sd=.037 0.037
`<<Statistics`ContinuousDistributions 2.26216
2
sd low db t n
n 1, 1
t Quantile StudentTDistribution -0.00846821
sd up db t n 0.0444682
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻣن اﻻﻣر =0.05
وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=10 و dﻣن اﻻﻣر
db=.018 و sdﻣن اﻻﻣر sd=.037 ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
sd low db t n واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
٨١
sd up db t n
) ( ٤-٢ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ
Confidence Interval for Proportion
أن اﻟﺗﻘدﯾر xﻟﯾس داﺋﻣﺎ اﻟﻣطﻠوب ﻓﻲ ﻣﺟ ﺎل اﻹﺣﺻ ﺎء .ﻓﻔ ﻲ ﺑﻌ ض اﻷﺣﯾ ﺎن ﯾﻛ ون اﻻھﺗﻣ ﺎم ﺑﻣﻌرﻓ ﺔ ﻧﺳ ﺑﺔ وﺟ ود ﺻ ﻔﺔ ﻣﻌﯾﻧ ﺔ ﻓ ﻲ ﻣﺟﺗﻣ ﻊ ﻣ ﺎ ﻣﺛ ل ﻧﺳ ﺑﺔ اﻟﻣﺻ ﺎﺑﯾن ﺑﺗﺳ وس اﻷﺳ ﻧﺎن أو ﻧﺳ ﺑﺔ اﻟﻧﺑﺎﺗ ﺎت x اﻟﻣﺻﺎﺑﺔ وھﻛذا .وﻋﻠﻰ ذﻟك ،ﻓﺈن ﻧﺳﺑﺔ اﻟﻌﯾﻧﺔ pˆ ﺳ وف ﺗﺳ ﺗﺧدم ﻛﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ .pوﯾ ﺗم n اﻟﺣﺻول ﻋﻠﻰ (1 ) 100%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ pﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
ˆˆ ˆˆ pq pq p pˆ z n n 2
pˆ z 2
إذا اﺳ ﺗﺧدﻣت ˆ pﻛﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ pﻓﺈﻧ ﮫ ﯾﻛ ون ﻟ دﯾﻧﺎ (1 α)100 %ﺛﻘ ﺔ أن اﻟﺧط ﺄ ﺳوف ﯾﻛون أﻗل ﻣن ﻗﯾﻣﺔ ﻣﻌﯾﻧﺔ eﻋﻧدﻣﺎ ﯾﺣﺳب ﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : ˆz 2α pˆq 2
. e2 وﺣﯾث أن ˆ pﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺳﺎﺑﻘﺔ ﻻ ﺑد أن ﺗﻘ در ﻣ ن ﻋﯾﻧ ﺔ ،ﻟ ذﻟك ﻻﺑ د ﻣ ن اﺧﺗﯾ ﺎر ﻋﯾﻧ ﺔ ﻣﺑدﺋﯾ ﺔ ﻛﺑﯾ رة وﺣﺳﺎب ﻧﺳﺑﺔ اﻟﻌﯾﻧﺔ ˆ pﻣﻧﮭﺎ.
=n
ﻣﺛﺎل ) (٢٠-٢ ﻓﻲ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 500ﻣواطن ﻓﻲ ﻣﺟﺗﻣﻊ ﺳﻛﺎﻧﻲ ﻣ ﺎ ،وﺟ د ﻣ ﻧﮭم 270ﻣواطﻧ ﺎ ً ﯾﺣﺑ ون أن ﯾﺿﺎف اﻟﻰ ﻣﯾﺎھم ﻗﻠﯾل ﻣن اﻟﻔﻠور .اﻟﻣطﻠوب : )أ( إﯾﺟﺎد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻧﺳﺑﺔ اﻟﻣﺟﺗﻣﻊ اﻟذﯾن ﯾﺣﺑذون إﺿﺎﻓﺔ اﻟﻔﻠور. )ب( ﺗﻘدﯾر ﺣﺟم اﻟﻌﯾﻧﺔ اﻟﺗﻲ ﯾﻣﻛﻧﻧﺎ اﻟﺗﺄﻛد ﻣﻧﮭﺎ ﺑﺎﺣﺗﻣﺎل 95%ﻣن أن اﻟﺧطﺄ ﻻ ﯾﺗﺟﺎوز .0.05
اﻟﺣــل: x 270 = )أ( اﻟﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ pھ و = 0.54 n 500 اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻓﺈن z0.025 = 1.96وﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
= ˆ . pﺑﺎﺳ ﺗﺧدام ﺟ دول اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ
٨٢
ˆpˆq ˆpˆq < p < pˆ + z α . n n 2 2 ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻛﺎﻟﺗﺎﻟﻲ : )(0.54)(0.46 )(0.54)(0.46 0.54 1.96 < p < 0.54 + 1.96 500 500 واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ : 0.496 < p < 0.584. pˆ z α
)ب( ﺑﺎﻋﺗﺑﺎر اﻷﺷﺧﺎص اﻟذﯾن ﻋددھم 500ﯾﻣﺛﻠون ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣﺑدﺋﯾﺔ ﺣﯾث أن ˆ=0.54 p وﺑﺎﺳﺗﺧدام اﻟﻧظرﯾﺔ اﻟﺳﺎﺑﻘﺔ ﻓﺈن : 2 )(1.96) (0.54)(0.46 =n = 381.70 (0.05) 2
≈ 382 .
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;n=500;x=270 =.05
x N n
0.05
ph 0.54
qh=1-ph 0.46
ph qh s n 0.022289
2
`<<Statistics`ContinuousDistributions
0, 1, 1
z Quantile NormalDistribution 1.95996
low=ph-z* s 0.496314
ub=ph+z* s 0.583686
e=.05 0.05
٨٣
z2 ph qh e2
m Round 382
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=500 وﻋدد اﻟذﯾن ﯾﻣﻠﻛون اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻻﻣر x=270 وﻣن اﻻﻣر =0.05
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
low=ph-z* s واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
ub=ph+z* s وﺣﺟم اﻟﻌﯾﻧﺔ اﻟﻣﻔﺗرض ﻣن اﻻﻣر
z2 ph qh m Round e2 .
Confidence Interval for the ) ( ٥-٢ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق ﺑﯾن ﻧﺳﺑﺗﯾن Difference Between Two Proportions ﻟﻠﺣﺻول ﻋﻠﻰ ﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟـ p1 p 2ﺳوف ﺗﺧﺗﺎر ﻋﯾﻧﺗﯾن ﻋﺷ واﺋﯾﺗﯾن ﻣﺳ ﺗﻘﻠﺗﯾن ﻣ ن اﻟﺣﺟ م n 2 , n 1 x x وﺣﺳﺎب اﻟﻧﺳﺑﺔ ﻟﻠﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳ ﺔ ﻓ ﻲ ﻛ ل ﻋﯾﻧ ﺔ ، pˆ1 = 1 , pˆ 2 = 2 ،ﺣﯾ ث x2 , x1ﯾﻣ ﺛﻼن n1 n2 ﻋ دد اﻟﻣﻔ ردات اﻟ ذﯾن ﯾﻣﻠﻛ ون اﻟﺻ ﻔﺔ ﻣوﺿ ﻊ اﻻھﺗﻣﺎم ﻓ ﻲ اﻟﻌﯾﻧﺗ ﯾن ﻋﻠ ﻰ اﻟﺗ واﻟﻲ .ﯾ ﺗم ﺣﺳ ﺎب اﻟﻔ رق . . pˆ1 pˆ 2 وﺑﺎﻟﺗﺎﻟﻲ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (1 ) 100%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻔرق ﺑﯾن ﻧﺳﺑﺗﯾن ﻛﺎﻟﺗﺎﻟﻲ :
pˆ1qˆ1 pˆ 2 qˆ 2 + ) < (p 1 p 2 n1 n2
٨٤
( pˆ1 pˆ 2 ) z α 2
pˆ1qˆ1 pˆ 2 qˆ 2 + . n1 n2
< (pˆ1 pˆ 2 ) + z α 2
ﻣﺛﺎل )(٢١–٢ ﻓﻲ ﻋﯾﻧﺔ ﻣن 2000ﻣن اﻟرﺟﺎل و 5000ﻣن اﻟﻧﺳﺎء اﻟذﯾن ﯾﺷ ﺎھدن ﺑرﻧﺎﻣﺟ ﺎ ً ﺗﻠﯾﻔزﯾوﻧﯾ ﺎ ً ﯾوﻣﯾ ﺎ ً وﺟد أن 1100ﻣن اﻟرﺟ ﺎل و 2300ﻣ ن اﻟﻧﺳ ﺎء ﯾﻔﺿ ﻠون ھ ذا اﻟﺑرﻧ ﺎﻣﺞ .أوﺟ د 95%ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻔ رق ﺑ ﯾن ﻧﺳ ﺑﺔ ﻛ ل ﻣ ن اﻟرﺟ ﺎل وﻧﺳ ﺑﺔ ﻛ ل ﻣ ن اﻟﻧﺳ ﺎء اﻟ ذﯾن ﯾﺷ ﺎھدون ھ ذا اﻟﺑرﻧ ﺎﻣﺞ وﯾﻔﺿﻠوﻧﮫ.
اﻟﺣــل : ﺑﻔرض أن p1 p 2اﻟﻧﺳﺑﺗﯾن اﻟﺣﻘﯾﻘﺗﯾن وﻋﻠﻰ ذﻟك 2300 1100 = pˆ 2 = = 0.46 , pˆ1 = 0.55 . 5000 2000 وﻋﻠ ﻰ ذﻟ ك اﻟﺗﻘ دﯾر ﺑﻧﻘط ﺔ ﻟ ـ p1 p 2ھ و . pˆ1 pˆ 2 =0.55 – 0.46=.09ﺑﺎﺳ ﺗﺧدام ﺟ دول اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻓﺈن z0.025 = 1.96وﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
pˆ1qˆ1 pˆ 2 qˆ 2 + < p1 p 2 n1 n2 pˆ1qˆ1 pˆ 2 qˆ 2 + . n1 n2
(pˆ1 pˆ 2 ) z α 2
< (pˆ1 pˆ 2 ) + z α 2
ﻓﺈن :
)(0.55)(0.45) (0.46)(0.54 + < p1 p 2 2000 5000 )(0.55)(0.45) (0.46)(0.54 < 0.09 + 1.96 + , 2000 5000
0.09 1.96
واﻟﺗﻲ ﺗﺧﺗزل اﻟﻰ : 0.0642 < p1 p 2 < 0.1158. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;n1=2000;x1=1100;n2=5000;x2=2300 =.05 0.05
x1 N n1 ٨٥
p1
0.55
x2 N n2
p2 0.46
q1=1-p1 0.45
q2=1-p2 0.54
p=p1-p2 0.09
p1 q1 p2 q2 sp n1 n2 0.0131693
2
`<<Statistics`ContinuousDistributions
0, 1, 1
z Quantile NormalDistribution 1.95996
low=p-z *sp 0.0641887
up=p+z*sp 0.115811
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﺣﺟم اﻟﻌﯾﻧﺔ ﻟﻠﻣﺟﺗﻣﻊ اﻻول ﻣن اﻻﻣر n1=2000 وﻋدد اﻟذﯾن ﯾﻣﻠﻛون اﻟﺻﻔﺔ ﻓﻰ اﻟﻣﺟﺗﻣﻊ اﻻول ﻣن اﻻﻣر x1=1100 وﺣﺟم اﻟﻌﯾﻧﺔ ﻟﻠﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻰ ﻣن اﻻﻣر n2=5000 وﻋدد اﻟذﯾن ﯾﻣﻠﻛون اﻟﺻﻔﺔ ﻓﻰ اﻟﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻰ ﻣن اﻻﻣر x2=2300 وﻣن اﻻﻣر =0.05
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
low=p-z *sp واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر . up
up=p+z*sp
) ( ٦-٢ﻓﺗرة ﺛﻘﺔ ﻟﻠﺗﺑﺎﯾن Confidence Interval for the Variance ٨٦
ﻟﻌﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﺧﺎﺻﺔ ﻣن اﻟﺣﺟم ، nﻓﺈن ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ s2ﯾﺣﺳب وﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (1 α )100 %ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σ2ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
(n 1)s 2 (n 1)s2 2 2 2 2
1
2
2
ﺣﯾث 2و 2ھﻣﺎ ﻗﯾﻣﺗﺎن ﻟﺗوزﯾ ﻊ ﺑ درﺟﺎت ﺣرﯾ ﻰ n 1واﻟﺗ ﻰ اﻟﻣﺳ ﺎﺣﺔ ﻋﻠ ﻲ ﯾﻣ ﯾن 2
2
1
،واﻟﻣﺳﺎﺣﺔ ﻋﻠﻰ ﯾﻣﯾن ﺗﺳﺎوى 2
2 2
: 2 2
1
ﺗﺳﻠم أﺣد اﻟﺗﺟﺎر ﻛﻣﯾﺔ ﻛﺑﯾرة ﻣن ﺑطﺎرﯾﺎت اﻟﺳﯾﺎرات اﻟﻣﻧﺗﺟﺔ ﺑواﺳ طﺔ ﻣﺻ ﻧﻊ ﺟدﯾ د وﺗ م اﺧﺗﯾﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺑطﺎرﯾﺎت اﻟﺗﻲ ﺗﺳﻠﻣﮭﺎ اﻟﺗﺎﺟر وﺗﻣ ت ﺗﺟرﺑﺗﮭ ﺎ ﻓﻛﺎﻧ ت أﻋﻣﺎرھ ﺎ ﺑﺎﻟﺷﮭر ھﻲ : 26.9 28.5 33.6 28.0 23.9 28.7 29.3 29.1 35.9 35.2
أوﺟد 99%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σ2
ﻣﺛﺎل )(٢٢-٢ اﻟﺣــل 2
أوﻻ ﻧﺣﺻل ﻋﻠﻰ ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ sوھو : n
(∑x i ) 2 i =1
n
n
2 i
∑x i =1
1 = s2 n 1
1 (299.1) 2 = 9076.87 9 10
= 14.53.
ﺑﺎﺳﺗﺧدام ﺟدول ﺗوزﯾﻊ 2ﻓﻲ ﻣﻠﺣق ) (٣ﺑدرﺟﺎت ﺣرﯾﺔ ν = n 1 = 9ﻓﺈن : χ 2 = 1.735 , χ 2 = 23.587 ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : 2 2 (n 1)s ( n 1)s < < σ2 2 χα χ2 α 0.005
2
0.995
1
2
٨٧
ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ﻓﺗرة ﺛﻘﺔ ﻛﺎﻟﺗﺎﻟﻲ : )(9)(14.53 )(9)(14 .53 < < σ2 23.587 1.735 واﻟﺗﻲ ﯾﻣﻛن اﺧﺗزاﻟﮭﺎ اﻟﻰ 2 5.544 < σ < 75.372. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
}x={26.9,28.5,33.6,28,23.9,28.7,29.3,29.1,35.9,35.2 ; =.01 0.01
]n=Length[x 10
]plu[w_]:=Apply[Plus,w 1 1 ss plu x2 plu x2 n1 n 14.5321
`<<Statistics`ContinuousDistributions k1 Quantile ChiSquareDistribution n 1,
2
2
1
23.5894
n 1,
k2 Quantile ChiSquareDistribution ssn 1 k1
1.73493
low 5.54441
ss n 1 k2 75.3856
up
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اوﻻ :اﻟﻣدﺧﻼت ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =0.05
وﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت x ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت : اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
٨٨
ssn 1 k1
low
واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
ss n 1 k2
up
.
ﻣﺛﺎل )(٢٣-٢ 2 2 ﻟﻠﻣﺛﺎل ) (٢-٢أوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σو 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣ ﺔ 99%, σﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣﺔ σ2
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ
Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة :
Statistics`ConfidenceIntervals
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`ConfidenceIntervals grades={85,94.5,76.7,79.2,83,80.2,68.7,89.1,74.1,87.8,44.9,7 7.6,85.1,75.7,81.5,66.2,83.4,79.8,94,91.8,96.3,73.5,82.2,76. 1,78.5,69.1,75.4,71.7,78.2,77.7,88.7,79.9,86.1,63.8,78.7,82. ;}6,98.6,81.3,63.4,76.6,84.2,89.7,87.7,54.6 ]VarianceCI[grades,ConfidenceLevel->.90 }{80.0873,163.974
]VarianceCI[grades }{75.3998,177.315
]VarianceCI[grades,ConfidenceLevel->.99
}{67.2576,207.768 وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت grades ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت 2 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر ]VarianceCI[grades,ConfidenceLevel->.90
واﻟﻣﺧرج ھو }{80.0873,163.974 2 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
]VarianceCI[grades ٨٩
واﻟﻣﺧرج ھو }{75.3998,177.315 2 99%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ σﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
]VarianceCI[grades,ConfidenceLevel->.99
واﻟﻣﺧرج ھو }{67.2576,207.768
) ( ٧-٢ﻓﺗرة ﺛﻘﺔ ﻟﻧﺳﺑﺔ ﺗﺑﺎﯾﻧﯾن Confidence Interval for the Ratio of two variances اﻟﺗﻘدﯾر ﺑﻧﻘطﺔ ﻟﻧﺳﺑﺔ ﺗﺑﺎﯾﻧﻲ ﻣﺟﺗﻣﻌﯾن ، σ12 / σ 22 ،ﯾﻣﻛ ن اﻟﺣﺻ ول ﻋﻠﯾ ﮫ ﻣ ن اﻟﻧﺳ ﺑﺔ s12 / s 22 ، ،ﺣﯾث ) f (1, 2 ) , f (1, 2ھﻣﺎ ﻗﯾﻣﺗﺎن ﻟﺗوزﯾﻊ Fﺑ درﺟﺎت ﺣرﯾ ﺔ ν1 , ν 2ﻋﻠ ﻰ اﻟﺗ واﻟﻲ 2
1
2
1 f (1, 2 ) ﻣﻊ اﻟﻌﻠم أن 1 f ( , ) 1 2 2 2
ﻷي ﻋﯾﻧﺗﯾن ﻋﺷواﺋﯾﺗﯾن ﻣﺳﺗﻘﻠﺗﯾن ﻣن اﻟﺣﺟم n 2 , n 1ﻣ ﺄﺧوذﺗﯾن ﻣ ن ﻣﺟﺗﻣﻌ ﯾن طﺑﯾﻌﯾ ﯾن ،ﻓ ﺈن 12 اﻟﻧﺳﺑﺔ s12 / s 22ﺗﺣﺳب وﯾﺗم اﻟﺣﺻول ﻋﻠﻰ (1 α )100 %ﻓﺗرة ﺛﻘﺔ ﻟـ 2ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : 2
s12 1 12 s12 2 f ( 2 ,1 ) . s 22 f (1 , 2 ) 22 s2 2 2
ﻣﺛﺎل )(٢٤-٢ إذا ﻛﺎﻧت درﺟﺎت ﻛل ﻣ ن اﻟط ﻼب واﻟطﺎﻟﺑ ﺎت ﺑﺈﺣ دى اﻟﺟﺎﻣﻌﺎت ﻓ ﻲ ﻣ ﺎدة اﻹﺣﺻ ﺎء ﯾﺗﺑ ﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً .اﺧﺗﯾ ر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن ﺑ ﯾن اﻟط ﻼب وأﺧ رى ﻣ ن ﺑ ﯾن اﻟطﺎﻟﺑ ﺎت ﻓﻛﺎﻧ ت درﺟﺎﺗﮭم ﻛﻣﺎ ﯾﻠﻲ : : 59اﻟطﻼب 79 73 49 88 83 69 44 81 :اﻟطﺎﻟﺑﺎت 74 79 49 59 82 69 79 89 أوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ . 12 / 22
اﻟﺣــل: n 1 = 9 , s1 = 15.57 , n 2 = 8 , s 2 = 13.07 .
٩٠
( ﺑدرﺟﺎت٤) ﻓﻲ ﻣﻠﺣقF اﻟﻣﺳﺗﺧرﺟﺗﺎن ﻣن ﺟدول ﺗوزﯾﻊf.05(7,8)=3.5 , f.05(8,7) = 3.73 ﯾﻣﻛن. ﻟﻠﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔν1 = 7, ν 2 = 8 ﻟﻠﻌﯾﻧﺔ اﻷوﻟﻲ ودرﺟﺎت ﺣرﯾﺔν1 = 8, ν 2 = 7 ﺣرﯾﺔ . وذﻟك ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔσ12 / σ22 ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ90% اﻟﺣﺻول ﻋﻠﻰ
s12 1 12 s12 f ( , ) . s 22 f (1 , 2 ) 22 s 22 2 2 1 2
: أي أن 2
(15.57) (13.07) 2 (3.73)
12 22
0.3805
12 22
2
(15.57 )(3.5) . (13.07) 2
: واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ 4.967.
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت x1={59,79,73,49,88,83,69,44,81};x2={74,79,49,59,82, 69,79,89}; =.1 0.1
l[w_]:=Length[w] plu[w_]:=Apply[Plus,w] n1=l[x1] 9
n2=l[x2] 8
ss1
1 1 plu x1 2 plu x12 N n1 1 n1
242.528
ss2
1 1 plu x2 2 plu x22 N n2 1 n2
170.857
<<Statistics`ContinuousDistributions` f1 Quantile FRatioDistribution n1 1, n2 1,
1
2
3.72573
f2 Quantile FRatioDistribution 1 2 ٩١
n2 1, n1 1,
3.50046
ss1 1 ss2 f1
low
0.380993
ss1 f2 ss2
up
4.96883
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت x1وﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت . x2 ﻣن اﻻﻣر =0.01
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت : اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
ss1 1 ss2 f1
low
واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
ss1 f2 ss2
up
ﻣﺛﺎل )(٢٥-٢ أﺧ ذت ﻋﯾﻧ ﺔ ﺣﺟﻣﮭ ﺎ n1 6واﻧﺣراﻓﮭ ﺎ اﻟﻣﻌﯾ ﺎري s1 77.9ﻣ ن ﻣﺟﺗﻣ ﻊ طﺑﯾﻌ ﻲ وﻋﯾﻧ ﺔ اﺧرى ﻣﺳﺗﻘﻠﺔﻋن ﺣﺟﻣﮭﺎ n 2 10واﻧﺣراﻓﮭ ﺎ اﻟﻣﻌﯾ ﺎري s 2 194.2ﻣ ن ﻣﺟﺗﻣ ﻊ طﺑﯾﻌ ﻰ اﯾﺿﺎ .أوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟـ . 12 / 22
اﻟﺣــل : n 1 = 6 , s1 = 77.9 , n 2 = 10 , s 2 = 194.2 . f.05(9,5) = 4.77 , f.05(5,9) = 3.48اﻟﻣﺳﺗﺧرﺟﺗﺎن ﻣن ﺟدول ﺗوزﯾﻊ Fﻓﻲ ﻣﻠﺣق ) (٤ﺑدرﺟﺎت ﺣرﯾﺔ ν1 = 5, ν 2 = 9ﻟﻠﻌﯾﻧﺔ اﻷوﻟﻲ ودرﺟﺎت ﺣرﯾﺔ 1 9 , 2 5ﻟﻠﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﯾﻣﻛن
اﻟﺣﺻول ﻋﻠﻰ 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ σ12 / σ 22وذﻟك ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ: .
) ( ν 2 , ν1
α 2
s12 1 σ12 s12 < < f s 22 f ( ν , ν ) σ 22 s 22 2
أي أن : ٩٢
1
α 2
(77.9) 2
2 (77.9) 2 (4.77) . 1 (194.2) 2 (3.48) 22 (194.2) 2
: واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ 12 0.7675 . 22 وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت 0.046
=.1 0.1
n1=6 6
n2=10 10
ss1=77.9 77.9
ss2=194.2 194.2
<<Statistics`ContinuousDistributions` f1 Quantile FRatioDistribution n1 1, n2 1,
1
2
3.48166
f2 Quantile FRatioDistribution 1 2
n2 1, n1 1,
4.77247
low
ss1 2 1 ss2 f1
0.0462158
up
ss1 2 f2 ss2
0.767926
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ ﻣن اﻻﻣر =0.01
ﺣﺟم اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر n1=6 ٩٣
ﺣﺟم اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر n2=10 واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر ss1=77.9 واﻻﻧﺣراف ﻟﻠﻣﻌﯾﺎرى اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر ss2=194.2 ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت اﻟﺣد اﻻدﻧﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر ss1 2 1
f1
ss2
low
واﻟﺣد اﻻﻋﻠﻰ ﻟﻠﺛﻘﺔ ﻣن اﻻﻣر
ss1 2 up f2 ss2
ﻣﺛﺎل )(٢٦-٢ ﻟﻠﻣﺛﺎل ) (١٦-٢أوﺟد 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ . 12 / 22
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ
Mathematicaوذﻟك ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة
Statistics`ConfidenceIntervals
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت `<<Statistics`ConfidenceIntervals ;}se={980,990,940,997,980,1054,1019,942 ;}w={939,838,1024,903,965,1027,1000 ]VarianceRatioCI} [se,w,ConfidenceLevel->.90
}{0.0706333,1.1487 90%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻧﺳﺑﺔ 12 / 22ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر ]VarianceRatioCI} [se,w,ConfidenceLevel->.90
واﻟﻣﺧرج ھو }{0.0706333,1.1487
٩٤
اﻟﻔﺻل اﻟﺛﺎﻟث اﺧﺗﺑﺎرات اﻟﻔروض
٩٥
) (١-٣اﻟﻔروض اﻹﺣﺻﺎﺋﯾﺔ
Statistical Hypotheses
ﺗﻌﺗﺑر اﺧﺗﺑﺎرات اﻟﻔروض اﻹﺣﺻﺎﺋﯾﺔ أھم ﻓرع ﻓﻲ ﻧظرﯾﺔ اﻟﻘرارات ،أوﻻ ،دﻋﻧﺎ ﻧﻌ رف ﺑدﻗ ﺔ ﻣ ﺎذا ﻧﻌﻧﻲ ﺑﺎﻟﻔرض اﻹﺣﺻﺎﺋﻲ. ﺗﻌرﯾف :اﻟﻔرض اﻹﺣﺻﺎﺋﻲ ھو ﺟﻣﻠﺔ ﻣﺎ ﺗﺧص واﺣد أو أﻛﺛر ﻣن اﻟﻣﺟﺗﻣﻌﺎت ،ﻣن اﻟﻣﻣﻛن أن ﺗﻛون ﺻﺣﯾﺣﺔ أو ﻏﯾر ﺻﺣﯾﺣﺔ. ﻟﻠﺗﺄﻛد ﻣن ﺻﺣﺔ أو ﻋدم ﺻﺣﺔ اﻟﻔرض اﻹﺣﺻﺎﺋﻲ ﻻ ﺑد ﻣن دراﺳﺔ ﻛل ﻣﻔردات اﻟﻣﺟﺗﻣﻊ ﺗﺣت اﻟدراﺳﺔ وھذا ﺑﺎﻟطﺑﻊ ﻏﯾر ﻋﻣﻠﻲ ﻓﻲ ﻣﻌظم اﻟﺣﺎﻻت .ﺑدﻻ ﻣن ذﻟك ﻓﺈﻧﻧﺎ ﻧﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﻣﺟﺗﻣﻊ وﻧﺳﺗﺧدم اﻟﻣﻌﻠوﻣﺎت اﻟﻣوﺟودة ﻓﻲ اﻟﻌﯾﻧﺔ ﻟﻧﺗﺧذ ﻗرار ﺑﻘﺑول أو رﻓض اﻟﻔرض اﻹﺣﺻﺎﺋﻲ. اﻟﻘرار اﻟذي ﻧﺗﺧذه ﺳوف ﯾﻛون ﺳﻠﯾم إذا ﻛﺎن اﻟﻔرض ﺻﺣﯾﺢ وﺗم ﻗﺑوﻟﮫ أو ﺧطﺄ وﺗم رﻓﺿﮫ .ﺑﯾﻧﻣﺎ ﯾﻛون اﻟﻘرار ﻏﯾر ﺳﻠﯾم إذا ﻛﺎن اﻟﻔرض ﺻﺣﯾﺢ وﺗم رﻓﺿﮫ أو ﻏﯾر ﺻﺣﯾﺢ وﺗم ﻗﺑوﻟﮫ. اﻟﻔروض اﻟﺗﻲ ﻧﺿﻌﮭﺎ ﻋﻠﻰ أﻣل أن ﻧرﻓﺿﮭﺎ ﺗﺳﻣﻰ ﻓروض اﻟﻌدم .null hypothesesوﯾرﻣز ﻟﻔرض اﻟﻌدم ﺑﺎﻟرﻣز . 0رﻓض ﻓرض اﻟﻌدم ﯾؤدي إﻟﻰ ﻗﺑول ﻓرض ﺑدﯾل hypothesis alternativeوﯾرﻣز ﻟﻠﻔرض اﻟﺑدﯾل ﺑﺎﻟرﻣز . 1ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل إذا ﻛﺎن ﻓرض اﻟﻌدم 0أن ﻣﺗوﺳط اﻟطول ﻓﻲ ﻣﺟﺗﻣﻊ ﻣﺎ ) 160ﻣﻘﺎﺳﮫ ﺑﺎﻟﺳﻧﺗﯾﻣﺗر( ﻓﺈن اﻟﻔرض اﻟﺑدﯾل 1ﻗد ﯾﻛون 160أو 160أو . 160 ﺗﻌرﯾف :ﯾﺣدث اﻟﺧطﺄ ﻣن اﻟﻧوع اﻻول إذا رﻓض ﻓرض اﻟﻌدم وھو ﺻﺣﯾﺢ. ﺗﻌرﯾف :اﺣﺗﻣﺎل اﻟوﻗوع ﻓﻲ ﺧطﺄ ﻣن اﻟﻧوع اﻷول ﯾﺳﻣﻰ ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ significanceﻟﻼﺧﺗﺑﺎر وﯾرﻣز ﻟﮫ ﺑﺎﻟرﻣز . ﻣن اﻟﻘﯾم اﻟﺷﺎﺋﻌﺔ ﻟﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ 0 .05أو . 0 .01ﯾﻘﺎل ﻟﻼﺧﺗﺑﺎر أﻧﮫ ﻣﻌﻧوي significantﻋﻧد 0 .05إذا رﻓض ﻓرض اﻟﻌدم ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ 0 .05وﯾﻌﺗﺑر اﻻﺧﺗﺑﺎر ﻣﻌﻧوي ﺟدا إذا رﻓض ﻓرض اﻟﻌدم ﻋﻧد ﻣﺳﺗوي ﻣﻌﻧوﯾﺔ . 0 .01وھﻧﺎك ﻗﯾم ﺗﺳﺗﺧرج ﻣن اﻟﺑراﻣﺞ اﻟﺟﺎھزة ﻣﺛل ﺑرﻧﺎﻣﺞ SPSSاو ﺑرﻧﺎﻣﺞ Mathematicaﺗﺴﻤﻰ ﻗﯿﻢ pvalueﺣﯿﺚ ﺗﻘﺎرن ھﺬه اﻟﻘﯿﻢ ﻣﺒﺎﺷﺮة ﺑﻤﺴﺘﻮى اﻟﻤﻌﻨﻮﯾﺔ وﯾﺘﻢ رﻓﺾ او ﻗﺒﻮل 0ﻛﺎﻟﺘﺎﻟﻰ : )أ( ﻧﻘﺒﻞ 0إذا ﻛﺎﻧﺖ اﻟﻘﯿﻤﺔ pاﻛﺒﺮ ﻣﻦ ﻣﺴﺘﻮى اﻟﻤﻌﻨﻮﯾﺔ اﻟﻤﺴﺘﺨﺪم . )ب( ﻧﺮﻓﺾ 0إذا ﻛﺎﻧﺖ اﻟﻘﯿﻤﺔ pاﺻﻐﺮ ﻣﻦ ﻣﺴﺘﻮى اﻟﻤﻌﻨﻮﯾﺔ اﻟﻤﺴﺘﺨﺪم . level of
) (٢-٣اﺧﺗﺑﺎرات ﻣن ﺟﺎﻧب واﺣد أو ﻣن ﺟﺎﻧﺑﯾن: One – Tailed and Two – Tailed Tests ﯾﺳﻣﻰ اﻻﺧﺗﺑﺎر ،ﻷي ﻓرض إﺣﺻﺎﺋﻲ ،أﻧﮫ ﻣن ﺟﺎﻧب واﺣد إذا ﻛﺎن ﻋﻠﻰ اﻟﺻورة H 0 : 0 H 0 : 0
أو ﻋﻠﻰ اﻟﺷﻛل : ٩٦
H 0 : 0 H1 : 0
ﯾﺳﻣﻰ اﻻﺧﺗﺑﺎر ،ﻷي ﻓرض إﺣﺻﺎﺋﻲ ،أﻧﮫ ﻣن ﺟﺎﻧﺑﯾن إذا ﻛﺎن ﻋﻠﻰ اﻟﺻورة : H 0 : 0 H1 : 0
اﻟﻣﻔﺎﺿلة ﺑﯾن اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد أو ﻣن ﺟﺎﻧﺑﯾن ﺳوف ﯾﺗوﻗف ﻋﻠﻰ اﻻﺳﺗﻧﺗﺎج اﻟذي ﯾرﻏب اﻟﺑﺎﺣث ﻓﻲ اﻟوﺻول إﻟﯾﮫ ﻋﻧد رﻓض ﻓرض اﻟﻌدم : ﻓﻲ اﻟﺑﻧود اﻟﺗﺎﻟﯾﺔ ﻣن ھذا اﻟﻔﺻل ﺳوف ﻧﻧﺎﻗش ﺑﻌض اﺧﺗﺑﺎرات اﻟﻔروض اﻟﺷﺎﺋﻌﺔ اﻻﺳﺗﺧدام.
) (٣-٣اﺧﺗﺑﺎرات ﺣول ﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ : Tests About a Population Mean اﻟﺣﺎﻟﺔ اﻷوﻟﻰ :اﺧﺗﺑﺎر اﻟﻔرض أن اﻟﻣﺗوﺳط ﻟﻣﺟﺗﻣﻊ طﺑﯾﻌﻰ ﺑﺗﺑﺎﯾن ﻣﻌﻠوم ، 2ﯾﺳﺎوى ﻗﯾﻣﺔ ﻣﻌﯾﻧﺔ 0ﺿد اﻟﻔرض اﻟﺑدﯾل ذي ﺟﺎﻧﺑﯾن أن اﻟﻣﺗوﺳط ﻻ ﯾﺳﺎوى 0ﯾﻛون ﻋﻠﻰ اﻟﺷﻛل: H 0 : 0 H1 : 0 .
ﻹﺟراء اﻻﺧﺗﺑﺎر ﻧﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم nﻣن اﻟﻣﺟﺗﻣﻊ ﻣوﺿﻊ اﻟدراﺳﺔ وﻧﺣﺳب ﻣﻧﮭﺎ اﻟﻘﯾﻣﺔ : x 0 n
z
ﻓﺈذا وﻗﻌت zﻓﻲ اﻟﻣﻧطﻘﺔ z Z z ﻓﺎﻻﺳﺗﻧﺗﺎج ﺳوف ﯾﻛون 0وﻏﯾر ذﻟك ﻧرﻓض 2
H0
2
وﻧﻘﺑل اﻟﻔرض اﻟﺑدﯾل . 0 ﺑﻔرض اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد ﻋﻠﻰ اﻟﺷﻛل : H 0 : 0 , H1 : 0
ﻓ ﺈن Z z
ﻣﻧطﻘﺔ اﻟ رﻓض ﺳ وف ﺗﻛ ون ﻓ ﻲ اﻟ ذﯾل اﻷﯾﺳ ر ﻣ ن ﺗوزﯾ ﻊ . Zﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ
ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟرﻓض و Z z ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟﻘﺑول. ﺑﻔرض اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد ﻋﻠﻰ اﻟﺷﻛل : H 0 : 0 , H1 : 0
ﻣﻧطﻘ ﺔ اﻟ رﻓض ﺳ وف ﺗﻛ ون ﻓ ﻲ اﻟ ذﯾل اﻻﯾﻣ ن ﻣ ن ﺗوزﯾ ﻊ . Zﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ
ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟرﻓض و Z z ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟﻘﺑول. إذا ﻛﺎن ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﻣﺟﮭول ﻓﺈﻧﻧﺎ ﻧﺣﺳب ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ sوﻧﺳﺗﺧدﻣﮫ ﺑدﻻ ً ﻣن ﺣﺟم اﻟﻌﯾﻧﺔ أﻛﺑر ﻣن أو ﯾﺳﺎوى . n 30 30 2
٩٧
2
ﻓ ﺈن
Z z
ﺗﺣت ﺷرط أن
ﻣﺛﺎل)(١-٣ إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت ﻟﺗﺎﻟﯾﺔ:
464,450,450,456,452,433,446,446,450,447,442,438,452, 447,460,450,453,456,446,433,448,450 ,439,452,459,454,456,454,452,449,463,449,447,466,446,44 7,450,449,457,464,468,447,433,464,469,457,454,451,453,443
اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : 454ﺿد اﻟﻔرض اﻟﺑدﯾل 454ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05ﻣﻊ اﻟﻌﻠم أن اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ھو 7.9واﯾﺿﺎ اﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : 454ﺿد اﻟﻔرض اﻟﺑدﯾل 454ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة Statistics HypothesisTestsوذﻟك ﻣن ﺧﻼل اﻻﻣر اﻟﺗﺎﻟﻰ : `<<Statistics`HypothesisTests ﯾﺗم إدﺧﺎل اﻟﺑﯾﺎﻧﺎت ﻓﻰ ﻗﺎﺋﻣﺔ ﻟﮭﺎ اﺳم )ﻟﮭذا اﻟﻣﺛﺎل ﺗم اﺳﺗﺧدام اﻻﺳم .( weights
ﺑﻔرض اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد ﻋﻠﻰ اﻟﺷﻛل : H 0 : 0 , H1 : 0
ﺳوف ﯾﺳﺗﺧدام اﻻﻣر اﻟﺗﺎﻟﻰ : ]MeanTest[list,muo,options
ﺣﯾث listﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ و muoﺗﻌﻧﻰ ﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ )وھو 454ﻟﮭذا اﻟﻣﺛﺎل( ﺗﺣت ﻓرض اﻟﻌدم و optionsﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔ .ﻓﻌﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل ﯾﻣﻛن وﺿﻊ اﻟﺧﯾﺎر : > KnownStandardDeviation-ﺣﯾث اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﯾوﺿﻊ ﺑﻌد اﻟﺳﮭم )وھو 7.9ﻟﮭذا اﻟﻣﺛﺎل( ،وﻗد ﯾﺳﺗﺧدم اﻟﺧﯾﺎر > KnownVariance-ﺣﯾث ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﯾوﺿﻊ ﺑﻌد اﻟﺳﮭم .أﯾﺿﺎ ﻟﻠرﻏﺑﺔ ﻓﻰ اﻟﺣﺻول ﻋﻠﻰ ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ﻣﻌﯾن )ﻋﻠﻰ ﺳﺑﯾل اﻟﻣﺛﺎل 0.1أو ( 0 .01ﯾﺳﺗﺧدم اﻟﺧﯾﺎر > SignificanceLevel-ﺣﯾث ﯾوﺿﻊ 0.1أو 0 .01ﺑﻌد اﻟﺳﮭم وﻓﻰ ھذه اﻟﺣﺎﻟﺔ اﻟﻘرار ﺑﻘﺑول أو رﻓض ﻓرض اﻟﻌدم ﯾظﮭر ﺿﻣن اﻟﻣﺧرﺟﺎت وﺑدون ھذا اﻟﺧﯾﺎر ﺗظﮭر ﻗﯾﻣﺔ pﺿﻣن اﻟﻣﺧرﺟﺎت .وﻟﻠﺣﺻول ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﯾوﺿﻊ اﻟﺧﯾﺎر ، FullReport->Trueوﻟﻠﻌﻠم ھذا اﻻﻣر ﻻ ﯾوﺿﺢ ھل اﻻﺧﺗﺑﺎر ﻣن اﻟﯾﻣﯾن ام ﻣن
٩٨
وﺑدون ھذا اﻟﺧﯾﺎر ﯾﻛون اﻻﺧﺗﺑﺎرTwoSided->True ﻻﺧﺗﺑﺎر ذو ﺟﺎﻧﺑﯾن ﯾﺳﺗﺧدم اﻟﺧﯾﺎر.اﻟﯾﺳﺎر . وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت. ﻣن ﺟﺎﻧب واﺣد <<Statistics`HypothesisTests` weights={464,450,450,456,452,433,446,446,450,447,442,438,452 ,447,460,450,453,456,446,433,448,450,439,452,459,454,456,454 ,452,449,463,449,447,466,446,447,450,449,457,464,468,447,433 ,464,469,457,454,451,453,443}; MeanTest[weights,454,KnownStandardDeviation->7.9] OneSidedPValue0.00641777
MeanTest[weights,454,KnownStandardDeviation>7.9,FullReport->True] FullReport
Mean 451.22
TestStat 2.4883
Distribution , NormalDistribution
OneSidedPValue 0.00641777 MeanTest[weights,454,KnownStandardDeviation>7.9,FullReport->True ,SignificanceLevel->0.05] FullReport
Mean 451.22
TestStat 2.4883
Distribution , NormalDistribution
OneSidedPValue 0.00641777, Reject null hypothesis at significance level 0.05 MeanTest[weights,454,KnownStandardDeviation->7.9,TwoSided>True,FullReport->True] FullReport
Mean 451.22
TestStat 2.4883
Distribution , NormalDistribution
TwoSidedPValue 0.0128355
:ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر MeanTest[weights,454,KnownStandardDeviation->7.9]
واﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد واﻟﻣﺧرج ھو7.9 ﺣﯾث اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ھو p< 0.05 وﺑﻣﺎ أنp =.00641777 واﻟﺗﻰ ﺗﻌﻧﻰ ان ﻗﯾﻣﺔOneSidedPValue0.00641777 . ﻓﮭذا ﯾﻌﻧﻰ رﻓض ﻓرض اﻟﻌدم : وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر MeanTest[weights,454,KnownStandardDeviation->7.9,FullReport>True]
واﻟذى أﺿﯾف إﻟﯾﮫ اﻟﺧﯾﺎر ٩٩
FullReport->True ﻟذﻟك ﺗﻐﯾرت اﻟﻣﺧرﺟﺎت ﺣﯾث ﺗم اﻟﺣﺻول ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﯾﺣﺗوى ﻋﻠﻰ ﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﺗﺣت اﻟﻌﻧوان
Mean وﻗﯾﻣﺔ اﻻﺣﺻﺎء اﻟﻣﺳﺗﺧدم ﺗﺣت اﻟﻌﻧوان TestStatواﻻﺣﺻﺎء اﻟﻣﺳﺗﺧدم ﺗﺣت اﻟﻌﻧوان Distributionواﻟذى ﯾﻌﻧﻰ ان اﻻﺣﺻﺎء اﻟﻣﺳﺗﺧدم ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻰ اﻟﻘﯾﺎﺳﻰ وﻧﺳﺗﻧﺗﺞ ﻣن ھذا اﻻﻣر ﻗﺑول اﻟرﻓض اﻟﺑدﯾل H1 : 0
وذﻟك ﻻن ﻗﯾﻣﺔ اﻻﺣﺻﺎء ﺳﺎﻟﺑﺔ. وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼ ﻣر اﻟﺗﺎﻟﻰ )واﻟذى اﺿﯾف إﻟﯾﮫ اﻟﺧﯾﺎر ( SignificanceLevel->0.05 MeanTest[weights,454,KnownStandardDeviation->7.9,FullReport]>True,SignificanceLevel->0.05 ﻓﯾؤدى اﻟﻰ اﺗﺧﺎذ ﻗرار .ﻟﮭذا اﻟﻣﺛﺎل ا ﻟﻘرار رﻓض ﻓرض اﻟﻌدم ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0.05اى ان H1 : 0
وﺑﺎﻟﻧﺳﺑﺔ إﻟﻰ اﻻﻣر : MeanTest[weights,454,KnownStandardDeviation->7.9,TwoSided]>True,FullReport->True واﻟذى أﺿﯾف إﻟﯾﮫ اﻟﺧﯾﺎر TwoSided->Trueواﻟذى ﯾؤدى اﻟﻰ اﻟﺣﺻول ﻋﻠﻰ ﻗﯾﻣﺔ p ﻻﺧﺗﺑﺎر ذو ﺟﺎﻧﺑﯾن وذﻟك ﺿﻣن اﻟﻣﺧرﺟﺎت وﺣﯾث ان p .05ﻓﮭذا ﯾﻌﻧﻰ رﻓض ﻓرض اﻟﻌدم ان
. H 0 : 454
ﻣﺛﺎل)(٢-٣ ﻟﻠﻣﺛﺎل ) (١-٣وﺑﻔرض ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻏﯾر ﻣﻌروف اﺧﺗﺑر ﻓرض اﻟﻌدم ان ﺿد اﻟﻔرض اﻟﺑدﯾل ان H 0 : 454ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﻰ . .05
H 0 : 454
اﻟﺣــل: ﺑﻣﺎ ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻏﯾر ﻣﻌروف وﺣﺟم اﻟﻌﯾﻧﺔ n 30ﻓﺈن اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﯾﺣل ﻣﺣل اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى اﻟﻣﺟﺗﻣﻊ ﻓﻰ ﻋﻣﻠﯾﺔ اﻟﺣﺳﺎب .ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . weights={464.,450.,450,456,452,433,446,446,450,447,442,438,4 52,447,460,450,453,456,446,433,448,450,439,452,459,454,456,4 54,452,449,463,449,447,466,446,447,450,449,457,464,468,447,4 }33,464,469,457,454,451,453,443 {464.,450.,450,456,452,433,446,446,450,447,442,438,452,447,4 60,450,453,456,446,433,448,450,439,452,459,454,456,454,452,4
١٠٠
49,463,449,447,466,446,447,450,449,457,464,468,447,433,464,4 69,457,454,451,453,443} =0.05 0.05 =454 454 n=Length[weights] 50 aa=Apply[Plus,weights] 22561.
xb
aa N n
451.22
c ApplyPlus, weights2 1.01834 107
1 aa2 s c N n 1 n 8.39653
s v N n
1.18745
z
xb N v
-2.34116 <<Statistics`ContinuousDistributions`
a QuantileNormalDistribution0, 1, 1
2
1.95996 r If Absz a, Print"Reject Ho",
Print"Accept Ho" Reject Ho : وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ weights ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.05
ﻣن اﻻﻣرH 0 : 454 وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدم =454
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرz
١٠١
N
xb s n
z
و zاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر
2
a Quantile NormalDistribution0, 1, 1
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر . ]]"If[Abs[z]>a,Print["RjectH0"],Print["AccetH0
واﻟﻣﺧرج ھو RjectH0
اى رﻓض ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٣-٣ ﻟﻠﻣﺛﺎل ) (١-٣وﺑﻔرض ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻏﯾر ﻣﻌروف اﺧﺗﺑر ﻓرض اﻟﻌدم ان ﺿد اﻟﻔرض اﻟﺑدﯾل ان H 0 : 454ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . .05
H 0 : 454
اﻟﺣــل: ﺑﻣﺎ ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻏﯾر ﻣﻌروف وﺣﺟم اﻟﻌﯾﻧﺔ n 30ﻓﺈن اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﯾﺣل ﻣﺣل اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى اﻟﻣﺟﺗﻣﻊ ﻓﻰ ﻋﻣﻠﯾﺔ اﻟﺣﺳﺎ ب .ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . weights={464.,450.,450,456,452,433,446,446,450,447,442,438,4 52,447,460,450,453,456,446,433,448,450,439,452,459,454,456,4 54,452,449,463,449,447,466,446,447,450,449,457,464,468,447,4 }33,464,469,457,454,451,453,443 {464.,450.,450,456,452,433,446,446,450,447,442,438,452,447,4 60,450,453,456,446,433,448,450,439,452,459,454,456,454,452,4 49,463,449,447,466,446,447,450,449,457,464,468,447,433,464,4 }69,457,454,451,453,443 =0.05 0.05 =454 454 ]n=Length[weights 50 ]aa=Apply[Plus,weights 22561.
aa N n
xb
451.22 ١٠٢
c ApplyPlus, weights2 1.01834 107
1 aa2 s c N n 1 n 8.39653
s v N n
1.18745
xb N v
z
-2.34116 `<<Statistics`ContinuousDistributions ]a=Quantile[NormalDistribution[0,1],1- 1.64485
r Ifz a, Print"Reject Ho", Print"Accept Ho" Accept Ho
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن : zاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر ]a=Quantile[NormalDistribution[0,1],1-
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر . r Ifz a, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Accept Ho اى ﻗﺑول ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٤-٣ ﻟﻠﻣﺛﺎل ) (١-٣وﺑﻔرض ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻏﯾر ﻣﻌروف اﺧﺗﺑر ﻓرض اﻟﻌدم ان ﺿد اﻟﻔرض ﻟﺑدﯾل ان H 0 : 454ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . .05
H 0 : 454
اﻟﺣــل: ﺑﻣﺎ ان اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻏﯾر ﻣﻌروف وﺣﺟم اﻟﻌﯾﻧﺔ n 30ﻓﺈن اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﯾﺣل ﻣﺣل اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى اﻟﻣﺟﺗﻣﻊ ﻓﻰ ﻋﻣﻠﯾﺔ اﻟﺣﺳﺎ ب .ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ١٠٣
weights={464.,450.,450,456,452,433,446,446,450,447,442,438,4 52,447,460,450,453,456,446,433,448,450,439,452,459,454,456,4 54,452,449,463,449,447,466,446,447,450,449,457,464,468,447,4 33,464,469,457,454,451,453,443} {464.,450.,450,456,452,433,446,446,450,447,442,438,452,447,4 60,450,453,456,446,433,448,450,439,452,459,454,456,454,452,4 49,463,449,447,466,446,447,450,449,457,464,468,447,433,464,4 69,457,454,451,453,443} =0.05 0.05 =454 454 n=Length[weights] 50 aa=Apply[Plus,weights] 22561.
xb
aa N n
451.22
c ApplyPlus, weights2 1.01834 107
1 aa2 s c N n 1 n 8.39653
s v N n
1.18745
xb N v r Ifz a, Print"Reject Ho", Print"Accept Ho" -2.34116 z
<<Statistics`ContinuousDistributions` a=Quantile[NormalDistribution[0,1],] -1.64485
Reject Ho
: ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرz a=Quantile[NormalDistribution[0,1],]
. واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر r Ifz a, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو ١٠٤
Reject Ho اى رﻓض ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٥-٣ ﯾﻧﺗﺞ ﻣﺻﻧﻊ ﻟﻸﻏذﯾﺔ اﻟﻣﻌﻠﺑﺔ ﻧوﻋﺎ ﻣن اﻟﻣﻌﻠﺑﺎت .ﻗﺎم اﻟﻣﺳ ﺋوﻟﯾن ﺧ ﻼل ﻓﺗ رة طوﯾﻠ ﺔ ﺑﻣراﻗﺑ ﺔ أوزان ھ ذه اﻟﻣﻌﻠﺑ ﺎت ووﺟ د أﻧﮭ ﺎ ﺗﺧﺿ ﻊ ﻟﻠﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ ﺑ ﺎﻧﺣراف ﻣﻌﯾ ﺎري 2.6ﺟ رام .ﺟ رت اﻟﻌ ﺎدة ﻓ ﻲ اﻟﻣﺻﻧﻊ أن ﯾﻛﺗب ﻋﻠﻰ اﻟﻌﻠﺑﺔ اﻟوزن اﻟﺻﺎﻓﻲ وھو 300ﺟرام .اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 20ﻋﻠﺑ ﺔ وﻛ ﺎن ﻣﺗوﺳ ط اﻟ وزن ﻣ ن اﻟﻌﯾﻧ ﺔ . x 305أﺧﺗﺑ ر ﻓ رض اﻟﻌ دم = 300ﺿ د اﻟﻔ رض اﻟﺑ دﯾل 300وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . = 0.01
اﻟﺣــل: H 0 : 300, H1 : 300. 0 .01 .
z 0.005 2.575واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻣﻧطﻘﺔ اﻟرﻓض Z 2 .575أو Z 2 .575 x 0 305 300 8.6. 2.6 n 20
z
ﻧرﻓض ﻓرض اﻟﻌدم ﻷن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ ) Mathematicaﻣﻊ ﻣﻼﺣظﺔ ﻋدم وﺟود ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ( وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . xb=305 305 =300 300 sgm=2.6 2.6 n=20 20
2
=.01 0.01 `<<Statistics`ContinuousDistributions
a Quantile NormalDistribution0, 1, 1 2.57583 b=xb- ١٠٥
5
sgm c n
0.581378
b c
z
8.60026
r If Absz a, Print"Reject Ho", Print"Accept Ho" Reject Ho
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر xb=305
وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدم H 0 : 300ﻣن اﻻﻣر =300
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻣﺟﺗﻣﻊ ﻣن اﻻﻣر sgm=2.6
وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=20 ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.01
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت zاﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر b z c و zاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر a Quantile NormalDistribution0, 1, 1 2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r If Absz a, Print"Reject Ho", Print"Accept Ho" . واﻟﻣﺧرج ھو Reject Ho
اى رﻓض ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٦ -٣ ١٠٦
اﺗﻔق أﺣد ﻣﺻدري اﻟﺑﯾض ﻣﻊ أﺣد اﻟﺗﺟﺎر ﻋﻠﻰ أن ﯾورد اﻷﺧﯾر ﻟﻸول ﻋدد ﻣن اﻟﺑﯾض ﻣن اﻟﺣﺟم اﻟﻛﺑﯾر وﻟﻣﺎ أﺣﺿر اﻟﺗﺎﺟر اﻟﺑﯾض ﻗﺎم اﻟﻣﺻدر ﺑﺎﺧﺗﯾﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 100ﺑﯾﺿﺔ ﻓوﺟد أن ﻣﺗوﺳط وزن اﻟﺑﯾﺿﺔ 67ﺟراﻣﺎ ﺑﺎﻧﺣراف ﻣﻌﯾﺎري . 1 .6اﺧﺗﺑر ﻓرض اﻟﻌدم H 0 : 65ﺿد اﻟﻔرض اﻟﺑدﯾل ) H1 : 65ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ( 0 .05
اﻟﺣــل: H 0 : 65,
H1 : 65. 0 . 05 .
ﺑﻣﺎ أن n 30ﻓﺈﻧﮫ ﯾﻣﻛﻧﻧﺎ اﺳﺗﺧدام sﺑدﻻ ً ﻣن ﻓﻲ ﺻﯾﻐﺔ z 0.05 1.645 . Zواﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻣﻧطﻘﺔ اﻟرﻓض Z 1 .645 x 0 67 65 12.5. s 1.6 n 100
z
ﻧرﻓض H 0ﻷن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض .أي أن اﻟﻣورد ﺳوف ﯾﻘﺑل اﺳﺗﻼم اﻟﺑﯾض. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺎﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﺑﻠﻐﺔ ) .Mathematicaﻣﻊ ﻣﻼﺣظﺔ ﻋدم وﺟود ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ( وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
xb=67 67 =65 65 sgm=1.6 1.6 n=100 100 =.05 0.05 `<<Statistics`ContinuousDistributions ]a=Quantile[NormalDistribution[0,1],1- 1.64485 b=xb- 2
sgm c n
0.16
b c ١٠٧
z
12.5
r Ifz a, Print"Reject Ho", Print"Accept Ho" Reject Ho
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﻣن اﻻﻣر sgm=1.6
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r Ifz a, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Reject Ho
اى رﻓض ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٧-٣ ﻣن اﻟﻣﻌروف أن أﺣد أدوﯾﺔ إزاﻟﺔ اﻷﻟم اﻟﻣﺳﺗﺧدﻣﺔ ﯾﻣﻛﻧﮭﺎ إزاﻟﺔ اﻷﻟم ﻟﻠﻣرﯾض ﻓﻲ ﻓﺗرة زﻣﻧﯾﺔ ﻣﺗوﺳطﮭﺎ 3 .7دﻗﯾﻘﺔ .وﻟﻣﻘﺎرﻧﺔ ھذا اﻟدواء ﺑدواء ﺟدﯾد ﻹزاﻟﺔ اﻷﻟم اﺧﺗﯾرت ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 60 ﻣرﯾﺿﺎ وﺗم إﻋطﺎء اﻟدواء اﻟﺟدﯾد ﻟﮭم ﻓﻛﺎن اﻟﻣﺗوﺳط اﻟﺣﺳﺎﺑﻲ ﻟطول ﻓﺗرة إزاﻟﺔ اﻷﻟم ﻓﻲ ھذه اﻟﻌﯾﻧﺔ 2 .2دﻗﯾﻘﺔ ﺑﺎﻧﺣراف ﻣﻌﯾﺎري 1 .2دﻗﯾﻘﺔ .ﻓﮭل ﺗدل ھذه اﻟﻧﺗﺎﺋﺞ أن اﻟدواء اﻟﺟدﯾد أﻓﺿل ﻣن اﻟدواء اﻟﻘدﯾم ﻣن ﺣﯾث اﻟﻔﺗرة اﻟﻼزﻣﺔ ﻹزاﻟﺔ اﻟﻣرض ؟ وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: H 0 : 3 .7 ,
H1 : 3.7. 0 . 05 .
ﺑﻣﺎ أن n 30ﻓﺈﻧﮫ ﯾﻣﻛﻧﻧﺎ اﺳﺗﺧدام sﺑدﻻ ً ﻣن ﻓﻲ ﺻﯾﻐﺔ . Z z 0.05 1.645واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ) (١ﻣﻧطﻘﺔ اﻟرﻓض Z 1 . 645
x 0 2.2 3.7 9.682. s 1.2 n 60
z
ﻧرﻓض ﻓرض اﻟﻌدم ﻷن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض .أي أن اﻟدواء اﻟﺟدﯾد أﻓﺿل ﻣن اﻟدواء اﻟﻘدﯾم ﻣن ﺣﯾث اﻟﻔﺗرة اﻟﻼزﻣﺔ ﻹزاﻟﺔ اﻟﻣرض. ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺎﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﺑﻠﻐﺔ ) .Mathematicaﻣﻊ ﻣﻼﺣظﺔ ﻋدم وﺟود ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ( وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ١٠٨
xb=2.2 2.2 =3.7 3.7 sgm=1.2 1.2 n=60 60 =.05 0.05 `<<Statistics`ContinuousDistributions ]a=Quantile[NormalDistribution[0,1], -1.64485 b=xb- -1.5
sgm c n
0.154919
b c
z
-9.68246
r Ifz a, Print"Reject Ho", Print"Accept Ho" Reject Ho
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو رﻓض ﻓرض اﻟﻌدم . اﻟﺣﺎﻟﺔ اﻟﺛﺎﻧﯾﺔ :ﻓﻲ ﺑﻌض اﺧﺗﺑﺎرات اﻟﻔروض اﻟﺗﻲ ﺗﺧص ﻣﺗوﺳ ط ﻣﺟﺗﻣ ﻊ طﺑﯾﻌ ﻲ ﻋﻧ دﻣﺎ ﯾﻛ ون ﺗﺑ ﺎﯾن اﻟﻣﺟﺗﻣﻊ 2ﻣﺟﮭول وﺣﺟم اﻟﻌﯾﻧﺔ ﺻﻐﯾر . n 30اﺳﺗﻧﺗﺎﺟﻧﺎ ،ﻓﻲ ھذه اﻟﺣﺎﻟﺔ ،ﺳوف ﯾﻌﺗﻣ د ﻋﻠ ﻰ ﺗوزﯾ ﻊ . tﺑﻔرض اﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد ﻋﻠﻰ اﻟﺷﻛل : H 0 : 0 , H1 : 0
ﻧﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم n 30ﻣن اﻟﻣﺟﺗﻣ ﻊ وﻧﺣﺳ ب اﻟﻣﺗوﺳ ط xواﻻﻧﺣ راف اﻟﻣﻌﯾ ﺎري s
وﻋﻠﻰ ذﻟك : x 0 t s n
١٠٩
ھ ﻰ ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ Tﻟ ﮫ ﺗوزﯾ ﻊ tﺑ درﺟﺎت ﺣرﯾ ﺔ n 1ﻋﻧ دﻣﺎ H 0ﺻ ﺣﯾﺣﺎ ً .ﻣﻧطﻘ ﺔ اﻟرﻓض ﺳوف ﺗﻛون ﻓﻲ اﻟذﯾل اﻷﯾﺳر ﻣن ﺗوزﯾﻊ . tﻟﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ﯾﻣﻛ ن اﻟﺣﺻ ول ﻋﻠ ﻰ ﻗﯾﻣ ﺔ واﺣ دة t1 t ﺑﺣﯾ ث أن T t ﺗﻣﺛ ل ﻣﻧطﻘ ﺔ اﻟ رﻓض و T t ﺗﻣﺛ ل ﻣﻧطﻘ ﺔ اﻟﻘﺑ ول .ﺣﺟ م ﻣﻧطﻘﺔ اﻟرﻓض ﯾﺳﺎوى اﻟﻣﺳﺎﺣﺔ اﻟﻣظﻠﻠﺔ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ :
ﻣﻧطﻘ ﺔ اﻟ رﻓض ﻟﻠﻔ رض اﻟﺑ دﯾل H 0 : 0ﺑﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ھ ﻰ . T t ﻟﻠﻔ رض اﻟﺑ دﯾل H 0 : 0ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض اﻟﻣﻘﺎﺑﻠ ﺔ ﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ھ ﻰ T t / 2أو ٠ T t / 2 وﻋﻠﻰ ذﻟك ﻧﺣﺳب ﻗﯾﻣ ﺔ اﻹﺣﺻ ﺎء ،أي ﻗﯾﻣ ﺔ ، tوإذا وﻗﻌ ت ﻗﯾﻣ ﺔ tﻓ ﻲ ﻣﻧطﻘ ﺔ اﻟﻘﺑ ول ﻧﻘﺑ ل ﻓرض اﻟﻌدم وﻏﯾر ذﻟك ﻧرﻓض . H 0
ﻣﺛﺎل)(٨-٣ ﻟﻣﻌرﻓﺔ اﺛر ﻏذاء ﻣﻌﯾن ﻋﻠﻰ زﯾﺎدة اﻟوزن اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن ﺳ ﺗﺔ ﻓﺋ ران وﺗ م ﺗﻐ ذﯾﺗﮭﺎ ﺑﮭ ذا اﻟﻐذاء وﻛﺎﻧت اﻟزﯾﺎدة ﻓﻲ أوزاﻧﮭم ﺑﻌد اﻟﺗﻐذﯾﺔ ھﻰ : 2 .5
1 .7 ,
1.4,
1 .4 ,
2.5,
2 .3,
ﻓﮭل ﯾﻣﻛن اﻟﺣﻛم ﻋﻠﻰ أن ھذه اﻟﻌﯾﻧﺔ ﻣن ﻣﺟﺗﻣﻊ ﻣﺗوﺳط اﻟزﯾﺎدة ﻓﻲ اﻟوزن ﻓﯾﮫ 1 .2أم ﻻ ؟ وذﻟ ك ﻋﻧ د ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05وذﻟك ﺗﺣت ﻓرض أن اﻟﻌﯾﻧﺔ ﺗم اﺧﺗﯾﺎرھﺎ ﻣن ﻣﺟﺗﻣﻊ طﺑﯾﻌﻲ .
اﻟﺣــل: H 0 : 1.2,
H1 : 1.2. 0 .05 .
t .025 2.571واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 5
١١٠
T 2 .571
أو
T 2 . 571
ﻣﻧطﻘﺔ اﻟرﻓض
n
x x
i 1
n
i
11.8 1.967, 6
n ( x i )2 n 1 x i2 i 1 s n 1 i 1 n
t
1 (11.8) 2 24 . 6 0.528. 5 6 x 0 1.967 1.2 3.5582. s 0.528 n 6
. ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓضt ﻷنH 0 ﻧرﻓض . Mathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ : وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ x={2.3,2.5,1.4,1.4,1.7,2.5} {2.3,2.5,1.4,1.4,1.7,2.5} =1.2 1.2 =.05 0.05 n=Length[x] 6 a=Apply[Plus,x] 11.8
xb
a n
1.96667
c ApplyPlus, x2 24.6
1 a2 s c n 1 n 0.527889
s v N n
0.21551 ١١١
t
xb N v
3.55746 <<Statistics`ContinuousDistributions`
d QuantileStudentTDistributionn 1, 1
2
2.57058
r Ift d t d, Print"Reject Ho", Print"Accept Ho" Reject Ho
اﻟﻣدﺧﻼت:اوﻻ H 0 : 1.2 وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدمx ﻗﺎﺋﻣﺔ اﻟﻣﺷﺎھدات ﻣن اﻻﻣر =1.2 ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.05
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرt xb t N v اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرt و d QuantileStudentTDistributionn 1, 1 2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r Ift d t d, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Reject Ho
.اى رﻗض ﻓرض اﻟﻌدم
(٩-٣)ﻣﺛﺎل (٨-٣) ﻟﻠﻣﺛﺎل
١١٢
اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : 1.2ﺿد اﻟﻔرض اﻟﺑدﯾل 1.2ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05واﯾﺿﺎ اﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : 1.2ﺿد اﻟﻔرض اﻟﺑدﯾل 1.2ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ 0 .05وذﻟك ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة Statistics`HypothesisTests
اﻟﺣــل: ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل وذﻟك ﺑﺎﺗﺑﺎع ﻧﻔس اﻟﺧطوات اﻟﺗﻰ أﺗﺑﻌت ﻓﻰ ﻣﺛﺎل ) (١- ٣واﻻﺧﺗﻼف اﻟوﺣﯾد ھﻧﺎ ھو ﻓﻰ اﻟﺧﯾﺎرات اﻟﺧﺎﺻﺔ ﺑﺎﻻﻣر : ]MeanTest[list,muo,options
وذﻟك ﺑﻌدم وﺿﻊ اﻟﺧﯾﺎر > KnownStandardDeviation-أو اﻟﺧﯾﺎر: >KnownVariance-
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . `<<Statistics`HypothesisTests }weights={2.3,2.5,1.4,1.4,1.7,2.5 }{2.3,2.5,1.4,1.4,1.7,2.5
]MeanTest[weights,1.2,FullReport->True FullReport
Distribution , StudentTDistribution5
TestStat 3.55746
Mean 1.96667
OneSidedPValue 0.00812917 MeanTest[weights,1.2]//N OneSidedPValue0.00812917
]MeanTest[weights,1.2,TwoSided->True,FullReport->True FullReport
Distribution , StudentTDistribution5
TestStat 3.55746
Mean 1.96667
TwoSidedPValue 0.0162583 ﺑﺎﻟﻨﺴﺒﺔ إﻟﻰ اﻻﻣﺮ : ]MeanTest[weights,1.2,FullReport->True
واﻟذى وﺿﻊ ﻓﯾﮫ اﻟﺧﯾﺎر FullReport->Trueوﻧﺗﯾﺟﺔ ﻟذﻟك ﺗم اﻟﺣﺻول ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﯾﺣﺗوى ﻋﻠﻰ ﻣﺗوﺳط اﻟﻌﯾﻧﺔ وذﻟك ﺗﺣت اﻟﻌﻧوان Meanوﻗﯾﻣﺔ اﻻﺣﺻﺎء )ﺗﺣت اﻟﻌﻧوان (TestStat واﻟذى ﯾﺗﺑﻊ ﺗوزﯾﻊ Tﺑدرﺟﺎت ﺣرﯾﺔ 5و ھذا ﻣﺎ ﯾوﺿﺣﮫ اﻟﻣﻛﺗوب ﺗﺣت ﻋﻧوان .Distribution ھذا ﺑﺎﻻﺿﺎﻓﺔ إﻟﻰ ﻗﯾﻣﺔ pﻋﻠﻰ اﺳﻔل اﻟﺟدول .وھﻧﺎ اﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد وﺣﯾث ان p .05ﻓﺈﻧﻧﺎ ﻧرﻓض ﻓرض اﻟدم ان H 0 : 1.2وﻗﺑول اﻟﻔرض اﻟﺑدﯾل أن . H1 : 1.2وﻟﯾس H1 : 1.2 وذﻟك ﻻن ﻗﯾﻣﺔ اﻻﺣﺻﺎء ﻣوﺟﺑﺔ. ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر ]MeanTest[weights,1.2 اﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن H 0 : 1.2و ذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد واﻟﻣﺧرﺟﺎت ھﻰ : ١١٣
OneSidedPValue0.00812917
واﻟﺗﻰ ﺗﻌﻧﻰ أن ﻗﯾﻣﺔ p =0.00812917وﺑﻣﺎ وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر:
أن 0.05
< pﻓﮭذا ﯾﻌﻧﻰ رﻓض ﻓرض اﻟﻌدم .
]MeanTest[weights,1.2,TwoSided->True اﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن H 0 : 1.2و ذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧﺑﯾن اي ان
H1 : 1.2واﻟﻣﺧرﺟﺎت ھﻰ : TwoSidedPValue0.0162583
واﻟﺗﻰ ﺗﻌﻧﻰ أن ﻗﯾﻣﺔ p =0.0162583وﺑﻣﺎ
أن 0.05
< pﻓﮭذا ﯾﻌﻧﻰ رﻓض ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(١٠-٣ اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣﻛوﻧ ﺔ ﻣ ن درﺟ ﺎت 10ط ﻼب ﻓ ﻲ ﻣ ﺎدة اﻹﺣﺻ ﺎء وﻛ ﺎن . x 7 , s 3 أﺧﺗﺑر اﻟﻔرض اﻟﻘﺎﺋل أن ﻣﺗوﺳط درﺟﺔ اﻟطﺎﻟب ﻓﻲ اﻟﻣﺟﺗﻣﻊ اﻟطﺑﯾﻌﻲ اﻟﻣﺳﺣوب ﻣﻧﮫ اﻟﻌﯾﻧ ﺔ ﯾﺳ ﺎوى 7 .5 وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: H 0 : 7 .5,
H1 : 7.5. 0 . 05 .
t .025 2.262واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 9 ﻣﻧطﻘﺔ اﻟرﻓض T 2 . 262أو T 2 . 262 x 7, s3
x 0 7 7.5 t 0.527. s 3 n 10
ﻧﻘﺑل H 0ﻷن tﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول . ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺎﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﺑﻠﻐﺔ .Mathematica ) ﻣﻊ ﻣﻼﺣظﺔ ﻋدم وﺟود ﻣﺷﺎھدات اﻟﻌﯾﻧﺔ ( وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت .
xb=7 7 =7.5 7.5 sgm=3 n=10 3 ١١٤
10 =.05 0.05 <<Statistics`ContinuousDistributions`
a QuantileStudentTDistributionn 1, 1
2
2.26216 b=xb- -0.5
sgm c n 3
10
t
b c
-0.527046
r If Abst a, Print"Reject Ho", Print"Accept Ho" Accept Ho
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت: اوﻻ ﻣﺗوﺳط اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر xb=7
ﻣن اﻻﻣرH 0 : 7.8 وﻣﺗوﺳط اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدم =7.5
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ ﻣن اﻻﻣر sgm=3
وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=10 ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.05
a QuantileStudentTDistributionn 1, 1
2
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرt
اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرt b t c
١١٥
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r If Abst a, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Reject Ho اى ﻗﺑول ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(١١-٣ اﺧﺗﯾرت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣن 20ﻋﺑ وة ﻣ ن ﻣﺷ روب ﺑ ﺎرد اﺳ ﺗﺧدﻣت آﻟ ﺔ ﻟﺗﻌﺑﺋﺗ ﮫ .ﻓ ﺈذا ﻛ ﺎن ﻣﺗوﺳ ط اﻟﻌﺑوة x 7 .5أوﻗﯾﺔ ﺑﺎﻧﺣراف ﻣﻌﯾﺎري 0 .47أوﻗﯾﺔ .اﺧﺗﺑر ﻓ رض اﻟﻌ دم أن 7.8ﺿ د اﻟﻔ رض اﻟﺑ دﯾل 7.8ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ 0 .01ﺗﺣ ت ﻓ رض أن اﻟﻣﺟﺗﻣ ﻊ اﻟ ذي اﺧﺗﯾ رت ﻣﻧ ﮫ اﻟﻌﯾﻧ ﺔ ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً .
اﻟﺣــل: H 0 : 7 .8,
H1 : 7.8. 0 . 01 .
t .01 2.539واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 19 ﻣﻧطﻘﺔ اﻟرﻓض T 2 . 539 x 7 .5 , s 0 .47 x 0 7.5 7.8 t 2.85. s 0.47 n 20
ﻧرﻓض H 0ﻷن tﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض . ﺳ وف ﯾ ﺗم ﺣ ل اﻟﻣﺛ ﺎل اﻟﺗ ﺎﻟﻰ ﺑﺎﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﺑﻠﻐ ﺔ Mathematicaوﻓﯾﻣ ﺎ ﯾﻠ ﻰ ﺧط وات اﻟﺑرﻧ ﺎﻣﺞ واﻟﻣﺧرﺟﺎت . xb=7.5 =7.8 7.5 7.8 sgm=.47 n=20 0.47 20 =.01 0.01 `<<Statistics`ContinuousDistributions ١١٦
]a=Quantile[StudentTDistribution[n-1], -2.53948 b=xb- -0.3
sgm c n
0.105095
b c
t
-2.85455
r Ift a, Print"Reject Ho", Print"Accept Ho" Reject Ho
اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ھﻲ : tاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر ]a=Quantile[StudentTDistribution[n-1],
tواﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر
b c
t
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r Ift a, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Reject Ho
اى رﻓض ﻓرض اﻟﻌدم .
) (٤-٣اﺧﺗﺑﺎرات ﺣول ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ 2 Tests about the Population Variance 2 ﻋﻧد اﻟرﻏﺑﺔ ﻓﻲ اﺧﺗﺑﺎر اﻟﻔرض أن اﻟﺗﺑﺎﯾن ﻟﻣﺟﺗﻣﻊ طﺑﯾﻌﻲ ﯾﺳﺎوى ﻗﯾﻣﺔ ﻣﻌﯾﻧﺔ 20ﺿد اﻟﻔرض اﻟﺑدﯾل ذي ﺟﺎﻧﺑﯾﯾن أن اﻟﺗﺑﺎﯾن ﻻ ﯾﺳﺎوى . 02أي أﻧﻧﺎ ﺗﺧﺗﺑر اﻟﻔرض أن : H 0 : 2 20 , H1 : 2 20
ﻧﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم nﻣن اﻟﻣﺟﺗﻣﻊ ﻣوﺿﻊ اﻟدراﺳﺔ وﻧﺣﺳب ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ .s2وﻋﻠﻰ ذﻟك:
١١٧
(n 1)s 2 20
, 2
ﺣرﯾﺔ n 1
ﻗﯾﻣﺔ ﻟﻠﻣﺗﻐﯾر X 2واﻟذي ﻟﮫ ﺗوزﯾﻊ 2ﺑدرﺟﺎت اﻟﺣرﺟﺗﯾن اﻟﻘﯾﻣﺗﯾن ﻧوﺟد ﻣﻌﻧوﯾﺔ
ﻋﻧدﻣﺎ ﯾﻛون H 0ﺻﺣﯾﺣﺎ ً .ﻟﻣﺳﺗوى أن ﺑﺣﯾث 12 , 2 2
2
X 2 2 , X 2 ﯾﻣﺛﻼن ﻣﻧطﻘﺔ اﻟرﻓض .ﺣﺟم اﻟﻣﻧطﻘﺔ اﻟﺣرﺟﺔ ﯾﺳﺎوى اﻟﻣﺳﺎﺣﺔ اﻟﻣظﻠﻠﺔ ﻓﻲ 2
2
1
اﻟﺷﻛل اﻟﺗﺎﻟﻰ .ﻧرﻓض H 0إذا وﻗﻌت 2ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض .
ﻋﺎدة ﯾﻛون اﻻھﺗﻣﺎم ﺑﺎﺧﺗﺑﺎر اﻟﻔ رض 2 2ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ﻣ ن ﺟﺎﻧ ب واﺣ د ﻣ ن اﻟﺗوزﯾ ﻊ . ﻟﻠﺑ دﯾل 2 2وﻟﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ﻧﺣﺻ ل ﻋﻠ ﻰ ﻗﯾﻣ ﺔ ﺣرﺟ ﺔ 12ﺑﺣﯾ ث أن X 2 12ﺗﻣﺛ ل ﻣﻧطﻘﺔ اﻟرﻓض و X 2 12ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟﻘﺑ ول .ﺑ ﻧﻔس اﻟﺷ ﻛل ﻟﺑ دﯾل ﻣ ن ﺟﺎﻧ ب واﺣ د ، 2 2 ﻓﺈن 2ﺗﻣﺛل اﻟﻘﯾﻣﺔ اﻟﺣرﺟﺔ ﺑﺣﯾث X 2 2ﺗﻣﺛل ﻣﻧطﻘﺔ اﻟ رﻓض و X 2 2ﺗﻣﺛ ل ﻣﻧطﻘ ﺔ اﻟﻘﺑ ول. ﺣﺟم اﻟﻣﻧطﻘﺔ اﻟﺣرﺟﺔ ﻟﺑدﯾل ﻣن ﺟﺎﻧب واﺣد 2 2ﯾﺳﺎوى اﻟﻣﺳﺎﺣﺔ اﻟﻣظﻠﻠﺔ ﻓﻲ اﻟﺷﻛل اﻟﺗﺎﻟﻰ : 0
0
0
0
١١٨
ﻣﺛﺎل)(١٢-٣ أﺟرﯾت دراﺳﺔ ﻓﻲ إﺣدى ﻣراﻛز اﻟﻌﻼج اﻟطﺑﯾﻌﻲ ﻋﻠﻰ ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣ ن 10أﺷ ﺧﺎص ﻣﻣن ﯾﺗﺑﻌون ﻧظﺎم إﻧﻘﺎص اﻟوزن وﻗ د ﺗ م ﺗﺳ ﺟﯾل ﻣﻘ دار اﻟ ﻧﻘص ﻓ ﻲ اﻟ وزن ﻟﻛ ل ﺷ ﺧص ﻓﻲ اﻟﻌﯾﻧﺔ ﺧ ﻼل ﻓﺗ رة إﺗﺑ ﺎع اﻟﻧظ ﺎم اﻟﻣﺗﺑ ﻊ ﻹﻧﻘ ﺎص اﻟ وزن وﺗ م اﻟﺣﺻ ول ﻋﻠ ﻰ اﻟﺑﯾﺎﻧ ﺎت اﻟﺗﺎﻟﯾﺔ : 14, 5, 5, 11, 12, 17, 7, 3, 4, 9
اﺧﺗﺑر ﻓرض اﻟدم H 0 : 2 10ﺿد اﻟﻔرض اﻟﺑدﯾل H1 : 2 10ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ 0 .01وذﻟك ﺗﺣت ﻓرض أن اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﺑرت ﻣﻧﮫ اﻟﻌﯾﻧﺔ ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً . اﻟﺣــل: 2
H 0 : 10 , H1 : 2 10
0.01 .
.201 21.665واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ ﺑ درﺟﺎت ﺣرﯾ ﺔ . 9 . X 2 21.665 2
ﻣﻧطﻘ ﺔ اﻟ رﻓض
s 4 . 692
(n 1)s 2 (9)( 4.692) 2 19.813. 10 02
2
ﺑﻣﺎ أن 2ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل . H 0 ﺳ وف ﯾ ﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺎﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﺑﻠﻐ ﺔ Mathematicaوﻓﯾﻣ ﺎ ﯾﻠ ﻰ ﺧط وات اﻟﺑرﻧ ﺎﻣﺞ واﻟﻣﺧرﺟﺎت . }x={14.0,5.0,5.0,11.0,12.0,17.0,7.0,3.0,4.0,9.0 }{14.,5.,5.,11.,12.,17.,7.,3.,4.,9. var=10 10 ]n=Length[x 10 =0.01 0.01 =n-1//N 9. ]a=Apply[Plus,x 87. c ApplyPlus, x2 955.
1 a2 s c n 1 n ١١٩
4.6916 `<<Statistics`ContinuousDistributions ]=Quantile[ChiSquareDistribution[],1- 21.666
n 1s2
var
x
19.81
r Ifx , Print"Reject Ho", Print"Accept Ho" Accept Ho
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : ﻗﺎﺋﻣﺔ اﻟﻣﺷﺎھدات xوﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدم ﻣن اﻻﻣر var=10 وﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.01
وﻗﯾﻣﺔ ﻣرﺑﻊ ﻛﺎى اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر n 1s2 x var واﻟﻘﯾﻣﺔ اﻟﺟدوﻟﯾﺔ ﻟﻣرﺑﻊ ﻛﺎى ﻣن اﻻﻣر ]=Quantile[ChiSquareDistribution[],1-
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r Ifx , Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Accept Ho
اى ﻗﺑول ﻓرض اﻟﻌدم.
ﻣﺛﺎل)(١٣-٣ ﻟﻠﻣﺛﺎل ) (١٢-٣وﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ان H 0 : 2 10ﺿد اﻟﻔرض اﻟﺑدﯾل ان H1 : 2 10ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . .01ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematica وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . }x={14.0,5.0,5.0,11.0,12.0,17.0,7.0,3.0,4.0,9.0 }{14.,5.,5.,11.,12.,17.,7.,3.,4.,9. ١٢٠
var=10; n=Length[x] 10 =0.01; =n-1//N 9. a=Apply[Plus,x];
c ApplyPlus, x2; 1 a2 s c n 1 n 4.6916 <<Statistics`ContinuousDistributions`
1 QuantileChiSquareDistribution, 1 23.5894
2 QuantileChiSquareDistribution,
2
2
1.73493
x
n 1s2
var
19.81
r Ifx 1 x 2, Print"Reject Ho", Print"Accept Ho" Accept Ho
: ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ . اﻟﻘرار ھو ﻗﺑول ﻓرض اﻟﻌدم
(١٤-٣)ﻣﺛﺎل Mathematica
( ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ١٣-٣) ( و اﻟﻣﺛﺎل١٢- ٣) ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل Statistics HypothesisTests وذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة :ﺣﯾث ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ
VarianceTest[list, varo, options] ﻟﮭذا اﻟﻣﺛﺎل( ﺗﺣت ﻓرض10 ﺗﻌﻧﻰ ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ )وھوvaro ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ وlist ﺣﯾث ﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔoptionsاﻟﻌدم و
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`HypothesisTests` grades={14,5,5,11,12,17,7,3,4,9}; VarianceTest[grades,10,TwoSided->True,FullReport->True] ١٢١
FullReport
Variance 22.0111
TestStat 19.81
Distribution ,TwoSidedPValue 0.0382437 ChiSquareDistribution9
VarianceTest[grades,10] OneSidedPValue0.0191219
VarianceTest[grades,10,TwoSided->True,SignificanceLevel>0.01,FullReport->True]
FullReport
Variance 22.0111
TestStat 19.81
Distribution , ChiSquareDistribution9
TwoSidedPValue 0.0382437, Fail to reject null hypothesis at significance level 0.01 VarianceTest[grades,10,TwoSided->True] TwoSidedPValue0.0382437
VarianceTest[grades,10,FullReport->True]
FullReport
Variance 22.0111
TestStat 19.81
Distribution ,OneSidedPValue 0.0191219 ChiSquareDistribution9
ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر VarianceTest[grades,10,TwoSided->True,FullReport->True]
وﻧﺗﯾﺟﺔ ﻟذﻟكTwoSided -> True واﻟﺧﯾﺎرFullReport->True واﻟذى وﺿﻊ ﻓﯾﮫ اﻟﺧﯾﺎر واﻟذىTestStat وﻗﯾﻣﺔ اﻻﺣﺻﺎء ﺗﺣت اﻟﻌﻧوانVariance ﻧﺣﺻل ﻋﻠﻰ ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ ﺗﺣت اﻟﻌﻧوان .Distribution و ھذا ﻣﺎ ﯾوﺿﺣﮫ اﻟﻣﻛﺗوب ﺗﺣت ﻋﻧوان9 ﯾﺗﺑﻊ ﺗوزﯾﻊ ﻣرﺑﻊ ﻛﺎى ﺑدرﺟﺎت ﺣرﯾﺔ . ﻋﻠﻲ ﯾﻣﯾن اﻟﺟدول وذﻟك ﻻﺧﺗﺑﺎر ذو ﺟﺎﻧﺑﯾنp ھذا ﺑﺎﻻﺿﺎﻓﺔ إﻟﻰ ﻗﯾﻣﺔ . ﻓﮭذا ﯾﻌﻧﻰ ﻗﺑول ﻓرض اﻟﻌدمp > 0 .0 1 وﺑﻣﺎ أنp =.0382437 واﻟﺗﻰ ﺗﻌﻧﻰ أن ﻗﯾﻣﺔ :ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر VarianceTest[grades, 10]
و ذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣدH 0 : 2 10 اﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن : واﻟﻣﺧرﺟﺎت ھﻰ OneSidedPValue0.0191219
. ﻓﮭذا ﯾﻌﻧﻰ رﻓض ﻓرض اﻟﻌدمp <
0.01 أن
وﺑﻣﺎp =0. 0.0191219 واﻟﺗﻰ ﺗﻌﻧﻰ أن ﻗﯾﻣﺔ :وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر
VarianceTest[grades,10,TwoSided->True,SignificanceLevel>0.01,FullReport->True]
١٢٢
اﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن H 0 : 2 10و ذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧﺑﯾن واﻟﺣﺻول ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل .واﻟﺨﯿﺎر : ]SignificanceLevel ->.01 ادى إﻟﻰ اﻟﺤﺼﻮل ﻋﻠﻰ ﻗﺮار ﺑﻘﺒﻮل ﻓﺮض اﻟﻌﺪم ﻋﻨﺪ ﻣﺴﺘﻮي ﻣﻌﻨﻮﯾﺔ واﻟﻘرار ﻗﺑول ﻓرض اﻟﻌدم وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر:
0 .01
]VarianceTest[grades,10,TwoSided->True اﻟذى ﯾﻌﻧﻰ أن اﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن H 0 : 2 10و ذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧﺑﯾن
واﻟﻣﺧرﺟﺎت ھﻰ : TwoSidedPValue0.0382437
وﺑﻣﺎ أن p >.01ﻓﮭذا ﯾﻌﻧﻰ ﻗﺑول ﻓرض اﻟﻌدم . وﺑﺎﻟﻧﺳﺑﺔ إﻟﻰ اﻻﻣر ]VarianceTest[grades,10,FullReport->True
ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد.
ﻣﺛﺎل)(١٥-٣ اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م n 10ﻣ ن ﻣﺟﺗﻣ ﻊ طﺑﯾﻌ ﻲ وﻛ ﺎن ﺗﺑ ﺎﯾن اﻟﻌﯾﻧ ﺔ s 2 24اﺧﺗﺑ ر ﻓ رض اﻟﻌ دم H 0 : 2 23ﺣﯾ ث اﻟﻔ رض اﻟﺑ دﯾل H 1 : 2 23وذﻟ ك ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ . 0 .01
اﻟﺣــل: 2
H 0 : 23 , H 1 : 2 23
. .2005 23.587واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ ﺑ درﺟﺎت ﺣرﯾ ﺔ X 2 23.587أو . X 2 1.735 0 .01
2
)( n 1)s 2 (9)( 24 9.39. 23 20
. 9ﻣﻧطﻘ ﺔ اﻟ رﻓض
2
ﺑﻣﺎ أن 2ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل . H 0 ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ ﺑﺎﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﺑﻠﻐﺔ Mathematica ;var=23 n=10 10 ;=0.01 =n-1//N 9. sd2=24 ١٢٣
24 <<Statistics`ContinuousDistributions`
1 QuantileChiSquareDistribution, 1 23.5894
2 QuantileChiSquareDistribution,
2
2
1.73493
x N
n 1sd2
var
9.3913
r Ifx 1 x 2, Print"Reject Ho", Print"Accept Ho" Accept Ho
:وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ اﻟﻣدﺧﻼت 2 ﻣن اﻻﻣرH 0 : 23 ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻊ ﺗﺣت ﻓرض اﻟﻌدم var=23
وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=10 ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =0.01 وﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر sd2=24
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ 2 ﻣن اﻻﻣر.005 1 QuantileChiSquareDistribution, 1
2 QuantileChiSquareDistribution,
2
2
2 ﻣن اﻻﻣر.995 و
وﻗﯾﻣﺔ ﻣرﺑﻊ ﻛﺎى اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر
x N
n 1sd2
var
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
١٢٤
r Ifx 1 x 2, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Accept Ho اى ﻗﺑول ﻓرض اﻟﻌدم.
) (٥-٣اﺧﺗﺑﺎرات ﺗﺧص ﺗﺑﺎﯾﻧﻲ ﻣﺟﺗﻣﻌﯾن Tests Concerning Two Populations Variances ﺑﻔرض أن ﻟدﯾﻧﺎ ﻣﺟﺗﻣﻌ ﯾن :اﻷول ﯾﺗﺑ ﻊ ﺗوزﯾﻌ ﺎ ً طﺑﯾﻌﯾ ﺎ ً ﻣﺗوﺳ طﺔ 1وﺗﺑﺎﯾﻧ ﮫ 12واﻟﺛ ﺎﻧﻲ :ﯾﺗﺑ ﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً ﻣﺗوﺳطﺔ 2وﺗﺑﺎﯾﻧﮫ 22واﻟﻣطﻠوب اﺧﺗﺑﺎر ھل اﻟﻣﺟﺗﻣﻌﯾن ﻟﮭﻣﺎ ﻧﻔس اﻟﺗﺑ ﺎﯾن ؟ أي ھ ل 12 22أم ﻻ ؟ ﻓﺈذا ﻛﺎﻧت 12 22ﻓﺈﻧﻧ ﺎ ﻧﻘ ول أن ھﻧ ﺎك ﺗﺟ ﺎﻧس ﺑ ﯾن اﻟﻣﺟﺗﻣﻌ ﯾن .إن اﻟﺗﺄﻛ د ﻣ ن ﺻ ﺣﺔ اﻟﻔ رض 12 22ﺿ روري ﻻﺧﺗﺑ ﺎر اﻟﻔ رق ﺑ ﯾن ﻣﺗوﺳ طﻲ ﻣﺟﺗﻣﻌ ﯾن ) اﺧﺗﺑ ﺎر ( tواﻟ ذي ﺳوف ﻧﺗﻧﺎوﻟﮫ ﻓﻲ اﻟﺑﻧد اﻟﺗﺎﻟﻲ .أﯾﺿﺎ ھﻧﺎك اﻟﻌدﯾد ﻣن اﻷﺑﺣﺎث اﻟﺗﻲ ﯾﻛون ھدﻓﮭﺎ اﻟرﺋﯾﺳ ﻲ ھ و ﻣﻘﺎرﻧ ﺔ 12ﻣﻊ 22ﻣﺛل دراﺳﺎت ﺟودة اﻟﺑﺿﺎﺋﻊ اﻟﻣﺳﺗﮭﻠﻛﺔ ﺣﯾث ﯾﻌﺗﺑر اﻟﺗﺑﺎﯾن أھم ﻣﻘﺎﯾﯾس اﻟﺟودة. ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم : H 0 : 12 22
ﺿد اﻟﻔرض اﻟﺑدﯾل : 2 2
2 1
H1 : وﺗﺑﺎﯾﻧﮭ ﺎ s
ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﺣﺟﻣﮭ ﺎ n1ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻷول وﻟ ﯾﻛن ﻣﺗوﺳ طﮭﺎ اﻟﺣﺳ ﺎﺑﻲ x1 وﺗﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ أﺧرى ﺣﺟﻣﮭﺎ n2ﻣن اﻟﻣﺟﺗﻣﻊ اﻟﺛﺎﻧﻲ وﻟﯾﻛن ﻣﺗوﺳطﮭﺎ x2وﺗﺑﺎﯾﻧﮭﺎ
2 1
2 2
٠s
) اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣﺳﺗﻘﻠﺔ ﻋن اﻟﻌﯾﻧﺔ اﻷوﻟﻰ ( .ﺑﺎﻓﺗراض ﺻﺣﺔ ﻓرض اﻟﻌدم ﻓﺈن : s12 , s 22
f
ﺗﻣﺛ ل ﻗﯾﻣ ﺔ ﻟﻠﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ Fواﻟ ذي ﻟ ﮫ ﺗوزﯾ ﻊ Fﺑ درﺟﺎت ﺣرﯾ ﺔ ٠ 1 n1 1, 2 n 2 1ﻟﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ، ﺳ وف ﻧﺣﺻ ل ﻋﻠ ﻰ ﻗﯾﻣﺗ ﯾن ﺣ رﺟﺗﯾن ) f (1 , 2و 2
) (1 , 2
2
. fوﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن ) F f (1 , 2أو ) (1 , 2
1
2
2
F fﺗﻣ ﺛﻼن ﻣﻧطﻘ ﺔ اﻟ رﻓض .ﺣﺟ م
1
ﻣﻧطﻘ ﺔ اﻟ رﻓض ﯾﺳ ﺎوى اﻟﻣﺳ ﺎﺣﺔ اﻟﻣظﻠﻠ ﺔ ﻓ ﻲ اﻟﺷ ﻛل اﻟﺗ ﺎﻟﻰ .اﻟﻘﯾﻣ ﺔ اﻟﺣرﺟ ﺔ ﻟﻠﻣﺗﻐﯾ ر Fﻓ ﻲ اﻟط رف اﻷﯾﺳر ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ : 1 ) f ( 2 , 1
(1 , 2 )
2
١٢٥
2
f
1
.
ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم 2 2
2 1
H0 :
ﺿد اﻟﻔرض اﻟﺑدﯾل 2 2
2 1
H1 :
ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض ،ﺑﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ﺳ وف ﺗﻛ ون ﻓ ﻲ اﻟﺟﺎﻧ ب اﻷﯾﺳ ر ﻣ ن اﻟﺗوزﯾ ﻊ )اﻟ ذﯾل اﻷﯾﺳ ر ( .ﻣﻧطﻘ ﺔ اﻟ رﻓض ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﺗﻣﺛ ل ﻛ ل ﻗ ﯾم Fﺑﺣﯾ ث ) . F f1 (1 , 2وأﺧﯾ را ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم : H 0 : 12 22
ﺿد اﻟﻔرض اﻟﺑدﯾل : 2 2
2 1
H1 :
ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض ،ﺑﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ﺳ وف ﺗﻛ ون ﻓ ﻲ اﻟﺟﺎﻧ ب اﻷﯾﻣ ن ﻣ ن اﻟﺗوزﯾ ﻊ )اﻟ ذﯾل اﻷﯾﻣن( .ﻣﻧطﻘﺔ اﻟرﻓض ﻓﻲ ھذه اﻟﺣﺎﻟﺔ ﺗﻣﺛل ﻛل ﻗﯾم Fﺑﺣﯾث ) . F f (1 , 2
ﻣﺛﺎل)(١٦-٣ اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ اﺧﺗﺑر اﻟﺗﺟﺎﻧس ﺑﯾن اﻟﻣﺟﺗﻣﻌﯾن وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ اﻟﻌﯾﻧﺔ اﻷوﻟﻲ
اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ
40 .5
50 .7
si2
31
41
ni
اﻟﺣــل: 2 2
2 1
H0 : ,
١٢٦
0 .1
H1 : 12 22
.
0 .1 .
( ﻋﻧ د درﺟ ﺎت٤) ﻓ ﻲ ﻣﻠﺣ قF واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊf.05 40, 30 1.79 : ﻓﺗﺣﺳب ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔf 0.95 40, 30 أﻣﺎ. 1 40, 2 30 ﺣرﯾﺔ f 0.95 ( 40,30)
1 1 0.575. f 0.05 (30,40) 1.74 F 0 . 575
أو
F 1 . 79 اﻟرﻓض
ﻣﻧطﻘﺔ
اﻟﺗﺑﺎﯾن اﻷﻛﺑر f
2 2 2 1
s s
=
50.7 1.252. 40.5
اﻟﺗﺑﺎﯾن اﻷﺻﻐر . ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑولf ﻷنH 0 ﻧﻘﺑل وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت =.1 0.1 s1=40.5 40.5 s2=50.7 50.7 n1=31 31 n2=41 41
f
Maxs1, s2 Mins1, s2
1.25185 <<Statistics`ContinuousDistributions`
ff1 QuantileFRatioDistributionn1 1, n2 1, 1 1.74443
ff2 QuantileFRatioDistributionn1 1, n2 1,
2
f11 QuantileFRatioDistributionn2 1, n1 1, 1 f22 QuantileFRatioDistributionn2 1, n1 1, 0.573253 a1=If[s1>s2,ff1,f11] ١٢٧
2
2
0.558101
1.79179
2
1.79179 a2=If[s1>s2,ff2,f22] 0.573253
c1 Iff a2 f a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
:وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ اﻟﻣدﺧﻼت ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.1
ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر s1=40.5
ﺗﺑﺎﯾن اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر s2=50.7 ﺣﺟم اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر n1=31 ﺣﺟم اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر n2=41
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ ﻣن اﻻﻣرf.05 30, 40
ff1 QuantileFRatioDistributionn1 1, n2 1, 1
2
ﻣن اﻻﻣرf0.95 30, 40 و
ff2 QuantileFRatioDistributionn1 1, n2 1,
2
ﻣن اﻻﻣرf.05 40,30 و
f11 QuantileFRatioDistributionn2 1, n1 1, 1
2 ﻣن اﻻﻣرf0.95 40,30 و
f22 QuantileFRatioDistributionn2 1, n1 1,
2 اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرF وﻗﯾﻣﺔ
Maxs1, s2 Mins1, s2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر f
c1 Iff a2 f a1, Print"Reject H0 ", Print"Accept H0 " ١٢٨
واﻟﻣﺧرج ھو Accept H0 . وھو ﻗﺑول ﻓرض اﻟﻌدم
(١٧-٣)ﻣﺛﺎل
: ( وﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم١٦-٣) ﻟﻠﻣﺛﺎل 2 1
2 2
2 1
2 2
H0 :
: ﺿد اﻟﻔرض اﻟﺑدﯾل H1 :
: ﺳوف ﺗﻛون ﻛﺎﻟﺗﺎﻟﻰMathematica ﻓﺈن ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت اﻟﻣﻛﺗوب ﺑﻠﻐﺔ =.1 0.1 s1=40.5 40.5 s2=50.7 50.7 n1=31 31 n2=41 41
f
Maxs1, s2 Mins1, s2
1.25185 <<Statistics`ContinuousDistributions` ff1=Quantile[FRatioDistribution[n1-1,n2-1],1-] 1.54108 f11=Quantile[FRatioDistribution[n2-1,n1-1],1-] 1.57323 a1=If[s1>s2,ff1,f11] 1.57323
c1 Iff a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
: ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن ١٢٩
: اﻟﻣﺧرﺟﺎت ﻛﺎﻟﺗﺎﻟﻰ ﻣن اﻻﻣرf.1 30, 40 ff1=Quantile[FRatioDistribution[n1-1,n2-1],1-]
ﻣن اﻻﻣرf0.1 40,30 و f11=Quantile[FRatioDistribution[n2-1,n1-1],1-] 1.57323
اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرF وﻗﯾﻣﺔ
Maxs1, s2 Mins1, s2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر f
c1 Iff a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
اﻟﻣﺧرج ھو Accept Ho .وھو ﻗﺑول ﻓرض اﻟﻌدم
(١٨-٣)ﻣﺛﺎل : ( ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم١٦-٣) ﻟﻠﻣﺛﺎل 2 1
2 2
2 1
2 2
H0 :
: ﺿد اﻟﻔرض اﻟﺑدﯾل H1 :
: ﺳوف ﺗﻛون ﻛﺎﻟﺗﺎﻟﻰMathematica ﻓﺈن ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت اﻟﻣﻛﺗوب ﺑﻠﻐﺔ =.1 0.1 s1=40.5 40.5 s2=50.7 50.7 n1=31 31 n2=41 41
f
Maxs1, s2 Mins1, s2
1.25185 <<Statistics`ContinuousDistributions` ١٣٠
ff1=Quantile[FRatioDistribution[n1-1,n2-1],] 0.635636 f11=Quantile[FRatioDistribution[n2-1,n1-1],] 0.648897 a1=If[s1>s2,ff1,f11] 0.648897
c1 Iff a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
: ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن : اﻟﻣﺧرﺟﺎت ﻛﺎﻟﺗﺎﻟﻰ ﻣن اﻻﻣرf.9 30, 40 ff1=Quantile[FRatioDistribution[n1-1,n2-1],]
ﻣن اﻻﻣرf0.9 40,30 و f11=Quantile[FRatioDistribution[n2-1,n1-1],]
اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرF وﻗﯾﻣﺔ
Maxs1, s2 Mins1, s2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر c1 Iff a1, Print"Reject H0 ", Print"Accept H0 " واﻟﻣﺧرج ھو f
Accept H0
. وھو ﻗﺑول ﻓرض اﻟﻌدم
(١٩-٣)ﻣﺛﺎل :إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ
اﻟﻣﺟﻣوﻋﺔ اﻻوﻟﻰ 825,990,1054,921,816,818,1071,1121,926,956,867,935
اﻟﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ
١٣١
840,600,890,780,915,915,1230,1302,922,845,923,1030,879,757,9 21,848, 870,826,831,1005,1002,915,813,842,774
ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔH 0 : 12 22 ﺿ د اﻟﻔ رض اﻟﺑ دﯾلH 0 : 12 22 اﺧﺗﺑر ﻓرض اﻟدم . ً وذﻟك ﺗﺣت ﻓرض أن اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﺑرت ﻣﻧﮫ اﻟﻌﯾﻧﺔ ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ 0.01 وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ. . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت x1={825,990,1054,921,816,818,1071,1121,926,956,867,935}; x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 57,921,848,870,826,831,1005,1002,915,813,842,774}; n1=Length[x1] 12 n2=Length[x2] 25 =0.01 0.01 a1=Apply[Plus,x1] 11300 c1=Apply[Plus,x1^2] 10755870
s1 N
1 a1^2 c1 n1 1 n1
10457.9 a2=Apply[Plus,x2] 22475 c2=Apply[Plus,x2^2] 20688627
s2 N
1 a2^2 c2 n2 1 n2
20150.1
f
Maxs1, s2 Mins1, s2
1.92678
ff1 QuantileFRatioDistributionn1 1, n2 1, 1 3.49668
ff2 QuantileFRatioDistributionn1 1, n2 1,
2
f11 QuantileFRatioDistributionn2 1, n1 1, 1
١٣٢
2
0.210272
4.75575
2
2
f22 QuantileFRatioDistributionn2 1, n1 1, 0.285986 ]a1=If[s1>s2,ff1,f11 4.75575 ]a2=If[s1>s2,ff2,f22 0.285986
c1 Iff a2 f a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ ﻓﺈن اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو ﻗﺑول ﻓرض اﻟﻌدم.
ﻣﺛﺎل)(٢٠-٣ ﻟﻠﻣﺛ ﺎل) (١٩-٣اﺧﺗﺑ ر ﻓ رض اﻟ دم H 0 : 12 22ﺿ د اﻟﻔ رض اﻟﺑ دﯾل H 0 : 12 22ﻋﻧ د ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ 0 .01وذﻟك ﺗﺣت ﻓرض أن اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﺑرت ﻣﻧﮫ اﻟﻌﯾﻧ ﺔ ﯾﺗﺑ ﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ ً . ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;}x1={825,990,1054,921,816,818,1071,1121,926,956,867,935 x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 ;}57,921,848,870,826,831,1005,1002,915,813,842,774 ]n1=Length[x1 12 ]n2=Length[x2 25 =0.01 0.01 ]a1=Apply[Plus,x1 11300 ]c1=Apply[Plus,x1^2 10755870
1 a1^2 c1 n1 1 n1
s1 N
10457.9 ]a2=Apply[Plus,x2 22475 ١٣٣
c2=Apply[Plus,x2^2] 20688627
s2 N
1 a2^2 c2 n2 1 n2
20150.1
f
Maxs1, s2 Mins1, s2
1.92678 <<Statistics`ContinuousDistributions` ff1=Quantile[FRatioDistribution[n1-1,n2-1],1-] 3.09437 f11=Quantile[FRatioDistribution[n2-1,n1-1],1-] 4.02091 a1=If[s1>s2,ff1,f11] 4.02091
c1 Iff f11, Print"Reject H0 ", Print"Accept H0 " Accept H0
. ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو ﻗﺑول ﻓرض اﻟﻌدم
(٢١-٣)ﻣﺛﺎل ﻋﻧ دH 0 : 12 22 ﺿ د اﻟﻔ رض اﻟﺑ دﯾلH 0 : 12 22 ﻟﻠﻣﺛ ﺎل اﻟﺳ ﺎﺑق اﺧﺗﺑ ر ﻓ رض اﻟ دم وذﻟك ﺗﺣت ﻓرض أن اﻟﻣﺟﺗﻣﻊ اﻟذي اﺧﺗﺑرت ﻣﻧﮫ اﻟﻌﯾﻧ ﺔ ﯾﺗﺑ ﻊ 0 .01 ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . ً ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت x1={825,990,1054,921,816,818,1071,1121,926,956,867,935}; x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 57,921,848,870,826,831,1005,1002,915,813,842,774}; n1=Length[x1] 12 n2=Length[x2] 25 =0.01 0.01 a1=Apply[Plus,x1] 11300 ١٣٤
c1=Apply[Plus,x1^2] 10755870
s1 N
1 a1^2 c1 n1 1 n1
10457.9 a2=Apply[Plus,x2] 22475 c2=Apply[Plus,x2^2] 20688627
s2 N
1 a2^2 c2 n2 1 n2
20150.1
f
Maxs1, s2 Mins1, s2
1.92678 <<Statistics`ContinuousDistributions` ff1=Quantile[FRatioDistribution[n1-1,n2-1],] 0.2487 f11=Quantile[FRatioDistribution[n2-1,n1-1],] 0.323168 a1=If[s1>s2,ff1,f11] 0.323168
c1 Iff a1, Print"Reject H0 ", Print"Accept H0 " Accept H0
. ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو ﻗﺑول ﻓرض اﻟﻌدم
(٢٢-٣)ﻣﺛﺎل ﻋﻧد ﻣﺳﺗوىH 0 : 12 22 ﺿد اﻟﻔرض اﻟﺑدﯾلH 0 : 12 22 ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق اﺧﺗﺑر ﻓرض اﻟﻌدم : HypotheseTest وذﻟك ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة. 0 .01 ﻣﻌﻧوﯾﺔ وﺳوف ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ Variance[list1, list2, 1, options] ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔlist2 ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻻوﻟﻰ وlist1 ﺣﯾث 2 ﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔoptions و12 1` و 2
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`HypothesisTests`
x1={825,990,1054,921,816,818,1071,1121,926,956,867,935};
١٣٥
x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 ;}57,921,848,870,826,831,1005,1002,915,813,842,774 ]VarianceRatioTest[x1, x2, 1,FullReport->True
Distribution ,OneSidedPValue0.128506 FRatioDistribution11,24 وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر
TestStat 0.518999
Ratio 0.518999
FullReport
]VarianceRatioTest[x1, x2, 1,FullReport->True ﻧﺣﺻل ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﯾﺣﺗوى ﻋﻠﻰ ﻗﯾﻣﺔ اﻻﺣﺻﺎء ﺗﺣت اﻟﻌﻧوان TestStatواﻻﺣﺻﺎء اﻟﻣﺳﺗﺧدم ھو ﺗوزﯾﻊ Fﺑد رﺟﺎت ﺣرﯾﺔ 11,24وذﻟك ﻻﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد .وﺑﻣﺎ ان p .01ﻓﮭذا ﯾﻌﻧﻰ ﻗﺑول ﻓرض
اﻟﻌدم .
) (٦-٣اﺧﺗﺑﺎرات ﺗﺧص اﻟﻣﺗوﺳطﺎت
Tests Concerning Means
ﻓﻲ ﺑﻌض اﻷﺣﯾﺎن ﯾﻛون اﻻھﺗﻣﺎم ﺑﺎﺧﺗﺑﺎرات اﻟﻔروض اﻟﺗﻲ ﺗﺧص ﻣﺟﺗﻣﻌﯾن ﻣﺧﺗﻠﻔﯾن .أي أﻧﻧﺎ ﻧرﻏب ﻓﻲ اﺧﺗﺑﺎر ﻓرض اﻟﻌدم أن اﻟﻔرق ﺑﯾن ﻣﺗوﺳطﻲ ﻣﺟﺗﻣﻌﯾن ، 1 2 ،ﯾﺳﺎوى ﺻﻔر أي 1 2ﺿد اﻟﻔرض اﻟﺑدﯾل 1 2 0أي 1 2أو اﻟﻔرض اﻟﺑدﯾل 1 2 0أي 1 2أو اﻟﻔرض اﻟﺑدﯾل 1 2 0أي . 1 2ﺗﻌﺗﻣد اﻟطرﯾﻘﺔ اﻟﻣﺳﺗﺧدﻣﺔ ﻓﻲ اﺧﺗﯾﺎر اﻟﻔرق ﺑﯾن ﻣﺗوﺳطﻲ ﻣﺟﺗﻣﻌﯾن ﻋﻠﻰ ﺗوزﯾﻊ ﻛل ﻣﺟﺗﻣﻊ وﺣﺟم اﻟﻌﯾﻧﺔ اﻟﻣﺧﺗﺎرة ﻣن ﻛل ﻣﺟﺗﻣﻊ .ﻓﻲ اﻟﺟزء اﻟﺗﺎﻟﻲ ﺳوف ﻧﺗﻧﺎول ﺛﻼﺛﺔ ﺣﺎﻻت. اﻟﺣﺎﻟﺔ اﻷوﻟﻰ :ﻋﻧد اﺧﺗﺑﺎر ﻓرض اﻟﻌ دم H 0أن اﻟﻔ رق ﺑ ﯾن ﻣﺗوﺳ طﻲ ﻣﺟﺗﻣﻌ ﯾن ، 1 2 ،ﯾﺳ ﺎوى ﺻﻔر وذﻟك ﻋﻧ دﻣﺎ ﻛ ل ﻣ ن 12 , 22ﻣﻌﻠوﻣﺗ ﺎن وﺗﺣت ﻓ رض أن ﻛ ل ﻣﺟﺗﻣ ﻊ ﻟ ﮫ ﺗوزﯾﻌ ﺎ ً طﺑﯾﻌﯾ ﺎ ً أو ﺗﻘرﯾﺑﺎ طﺑﯾﻌﯾﺎ ً .أﻣﺎ ﻓﻲ ﺣﺎﻟﺔ اﻟﻌﯾﻧﺎت اﻟﻛﺑﯾرة وإذا ﻛﺎﻧت 22 , 12ﻣﺟﮭوﻟﺗ ﺎن ﻓﺈﻧ ﮫ ﯾﻣﻛ ن ﺗﻘ دﯾرھﻣﺎ ﻣ ن اﻟﻌﯾﻧ ﺎت ﺑﺣﺳ ﺎب . s12 , s22ﯾﻌﺗﻣ د ﻗرارﻧ ﺎ ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﻋﻠ ﻰ اﻟﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ ) اﻹﺣﺻ ﺎء ( . X1 X 2أوﻻ ﻧﺧﺗﺎر ﻋﯾﻧﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م n1ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻷول وﻧﺣﺳ ب ﻣﻧﮭ ﺎ x1وﻧﺧﺗ ﺎر ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ أﺧرى ﻣن اﻟﺣﺟ م n2ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ )ﻣﺳ ﺗﻘﻠﺔ ﻋ ن اﻟﻌﯾﻧ ﺔ اﻷوﻟ ﻰ ( وﻧﺣﺳ ب ﻣﻧﮭﺎ x2ﺛم ﻧﺣﺳب اﻟﻔرق ، x1 x 2 ،ﻟﻣﺗوﺳطﻲ اﻟﻌﯾﻧﺗﯾن ٠وﺑﻣﺎ ان : .
( x1 x 2 ) 0 12 22 n1 n 2
١٣٦
z
ﻗﯾﻣﺔ ﻟﻠﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ Zﻋﻧدﻣﺎ ﯾﻛون H 0ﺻﺣﯾﺣﺎ .وﻋﻠﻰ ذﻟك ﻓﻲ اﺧﺗﺑﺎر ﻣن ﺟﺎﻧﺑﯾﯾن وﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺗﺣدد ﻋﻠﻰ اﻟﺷﻛل Z z أو . Z z أﻣﺎ ﻓﻲ اﺧﺗﺑﺎر 2
2
ﻣن ﺟﺎﻧب واﺣد ﺣﯾث اﻟﻔرض اﻟﺑدﯾل 1 2ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ،ﻟﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ، ﺳوف ﺗﻛون . Z z وأﺧﯾرا ﻓﻲ ﺣﺎﻟﺔ اﻟﻔرض اﻟﺑدﯾل ﻣن ﺟﺎﻧب واﺣد 1 2ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﻟﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ، ﺳوف ﺗﻛون . Z z
ﻣﺛﺎل)(٢٣-٣ أﺟ رى اﺧﺗﺑ ﺎر ﻋﻠ ﻰ اﻟﻣﻘﺎوﻣ ﺔ ﻟﻠﺷ د tensile strengthﻟﻧ وﻋﯾن ﻣ ن اﻟﺳﻠك .اﻟﻧﺗ ﺎﺋﺞ ﻣﻌط ﺎة ﻓ ﻲ اﻟﺟدول اﻟﺗﺎﻟﻲ : اﻻﻧﺣراف اﻟﻣﻌﯾﺎري ﻟﻠﻌﯾﻧﺔ
s1 1.3
s 2 2.0
ﺣﺟم اﻟﻌﯾﻧﺔ
ﻣﺗوﺳط اﻟﻌﯾﻧﺔ
اﻟﻧوع
x1 107.6
n1 129
A
x 2 123.6
n 2 129
B
اﻟﻣطﻠوب اﺧﺗﺑﺎر ھل ھﻧﺎك ﻓرﻗﺎ ﻣﻌﻧوﯾﺎ ﺑﯾن ﻣﺗوﺳطﻲ اﻟﻣﺟﺗﻣﻌﯾن اﻟﻣﺳﺣوﺑﺗﯾن ﻣﻧﮭﻣﺎ اﻟﻌﯾﻧﺗﯾن ؟ ) ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ .( 0.1
اﻟﺣــل: ﺣﯾث أن n1 30و n 2 30ﻧﺗﺑﻊ اﻵﺗﻲ : H 0 : 1 2 , H 1 : 1 2 . 0.1 .
z 0.05 1.64485واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ). (١ ﻣﻧطﻘﺔ اﻟرﻓض Z 1.1.64485أو Z 1.64485 ( x1 x 2 ) 0
z
. s12 s 22 n1 n 2 107.6 123.6 76.183. 1 .3 2 2 2 129 129
وﺑﻣﺎ أن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻓﺈﻧﻧﺎ ﻧرﻓض . H 0 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ١٣٧
=.1 0.1 n1=129 129 n2=129 129 xb1=107.6 107.6 xb2=123.6 123.6 s1=1.3 1.3 s2=2 2 d=xb1-xb2 -16.
d
z N
s12 s22 n2
2
n1
-76.1831 `<<Statistics`ContinuousDistributions
z1 QuantileNormalDistribution0, 1, 1 1.64485
r If Absz z1, Print"Reject Ho", Print"Accept Ho" Reject Ho
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ اﻟﻣدﺧﻼت : ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر=.01 n1 129ﺣﺟم اﻟﻌﯾﻧﺔ اﻻوﻟﻰ و n 2 129ﺣﺟم اﻟﻌﯾﻧﺔ ااﻟﺛﺎﻧﯾﺔ و ﻣﺗوﺳط اﻟﻌﯾﻧﺔ اﻻوﻟﻰ x 107.6
ﻣﺗوﺳط اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻟﻠﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ . s 2 2 ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت zاﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر d
x 123.6
واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى ﻟﻠﻌﯾﻧﺔ اﻻوﻟﻰ s1 1.3واﻻﻧﺣراف اﻟﻣﻌﯾﺎرى
z N
s12 s22 n2
n1
و zاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر ١٣٨
2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
z1 QuantileNormalDistribution0, 1, 1
r If Absz z1, Print"Reject Ho", Print"Accept Ho" واﻟﻣﺧرج ھو Reject Ho وھو رﻓض ﻓرض اﻟﻌدم
ﻣﺛﺎل)(٢٤-٣ إذا ﻛﺎﻧت 1ﺗﻣﺛ ل اﻟﻌﻣ ر اﻟﺣﻘﯾﻘ ﻲ ﻹط ﺎرات اﻟﺳ ﯾﺎرات ﻣ ن اﻟﻧ وع Aﻣﻘﺎﺳ ﺔ ﺑﺎﻷﻣﯾ ﺎل )ﻋ دد اﻷﻣﯾ ﺎل اﻟﺗ ﻲ ﺗﻘطﻌﮭ ﺎ اﻟﺳ ﯾﺎرة ﺣﺗ ﻰ ﯾﺳ ﺗﮭﻠك اﻹط ﺎر ( و 2ﺗﻣﺛ ل اﻟﻌﻣ ر اﻟﺣﻘﯾﻘ ﻲ ﻹط ﺎرات اﻟﺳ ﯾﺎرات ﻣ ن اﻟﻧ وع . Bاﺧﺗﺑ ر ﻓ رض اﻟﻌ دم H 0 : 1 2ﺿ د اﻟﻔ رض اﻟﺑ دﯾل H1 : 1 2ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾﺔ 0 .01إذا ﻛﺎﻧت : n1 40 , x1 36500 , s1 220, n 2 40 , x 2 33400 , s1 190.
اﻟﺣــل: ﺣﯾث أن n1 30و n 2 30ﻧﺗﺑﻊ اﻵﺗﻲ : H0 : 1 2 , H1 : 1 2 . 0 .01 .
z 0.005 2.575واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ). (١ ﻣﻧطﻘﺔ اﻟرﻓض Z 2 . 575أو Z 2 . 575 .
(x1 x 2 ) 0 s12 s 22 n1 n 2
67.447.
z
36500 33400 2202 190 2 40 40
وﺑﻣﺎ أن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻓﺈﻧﻧﺎ ﻧرﻓض . H 0
١٣٩
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت =.01 0.01 n1=40 40 n2=40 40 xb1=36500 36500 xb2=33400 33400 s1=220 220 s2=190 190 d=xb1-xb2 3100
d
z N
s12 s22 n1
n2
67.4471 <<Statistics`ContinuousDistributions`
z1 QuantileNormalDistribution0, 1, 1
2
2.57583
r If Absz z1, Print"Reject Ho", Print"Accept Ho" Reject Ho
. ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو رﻓض ﻓرض اﻟﻌدم
(٢٥-٣)ﻣﺛﺎل إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ اﻟﻤﺠﻤﻮﻋﺔ اﻻوﻟﻰ34, 37, 44, 31, 41, 42, 38, 45 42, 38 اﻟﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ39, 40, 34, 45, 44, 38, 42, 39 47, 41 ١٤٠
ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔH1 : 1 2 ﺿد اﻟﻔرض اﻟﺑدﯾلH 0 : 1 2 اﺧﺗﺑر ﻓرض اﻟﻌدم 12 22 8 ﺗﺣت ﻓرض أن. 0.05
.Mathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ : ﺳوف ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ MeanDifferenceTest[list1, list2, diff0, options] ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔlist2 ﺗﻌﻧﻰ اﺳم اﻟﻘﺎﺋﻣﺔ ﻟﻠﻣﺟﻣوﻋﺔ اﻻوﻟﻰ وlist1 ﺣﯾث ﺗﻌﻧﻰ اﻟﺧﯾﺎرات اﻟﻣطﻠوﺑﺔoptions و1 2 0 ﺗﻌﻧﻰ أنdiff0 =0 و
. وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت <<Statistics`HypothesisTests` x1={34,37,44,31,41,42,38,45,42,38} {34,37,44,31,41,42,38,45,42,38}
x2={39,40,34,45,44,38,42,39,47,41} {39,40,34,45,44,38,42,39,47,41}
MeanDifferenceTest[x1,x2,0,KnownVariance{8,8}] OneSidedPValue0.0894794
MeanDifferenceTest[x1,x2,0,KnownVariance{8,8},FullReport>True ,SignificanceLevel->.05] FullReport
MeanDiff 1.7
TestStat 1.34397
Distribution , NormalDistribution
OneSidedPValue 0.0894794, Fail to reject null hypothesis at significance level 0.05 : ﺑﺎﻟﻨﺴﺒﺔ ﻟﻼﻣﺮ MeanDifferenceTest[x1,x2, 0, KnownVariance -> {8, 8}] OneSidedPValue0.0894794
ﻓﺈﻧﻧﺎ ﻧﻘﺑل ﻓرض اﻟﻌدم.05 اﻛﺑر ﻣنp وﺑﻣﺎ أنp ﻧﺤﺼﻞ ﻋﻠﻰ اﺧﺘﺒﺎر ﻣﻦ ﺟﺎﻧﺐ واﺣﺪ ﻣﻊ ﻗﯿﻤﺔ
: وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر MeanDifferenceTest[x1,x2, 0, KnownVariance -> {8, 8}, SignificanceLevel -> .05, FullReport -> True]
. .05 ﻧﺣﺻل ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل ﻣﻊ اﺗﺧﺎذ ﻗرار ﺑﻘﺑول ﻓرض اﻟﻌدم وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ
(٢٦-٣)ﻣﺛﺎل إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ اﻟﻤﺠﻤﻮﻋﺔ اﻻوﻟﻰ825,990,1054,921,816,818,1071,1121,926,956,867,935 ١٤١
اﻟﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ 840,600,890,780,915,915,1230,1302,922,845,923,1030,879,757,9 ;}21,848,870,826,831,1005,1002,915,813,842,774 اﺧﺗﺑر ﻓرض اﻟﻌدم H 0 : 1 2ﺿد اﻟﻔرض اﻟﺑدﯾل H1 : 1 2ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0.05ﺗﺣت ﻓرض أن . 12 22 130.5وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ;}x1={825,990,1054,921,816,818,1071,1121,926,956,867,935 x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 ;}57,921,848,870,826,831,1005,1002,915,813,842,774 ]}MeanDifferenceTest[x1,x2,0,KnownVariance{130.5,130.5 OneSidedPValue 1.0226 1026 MeanDifferenceTest[x1,x2,0,KnownVariance{130.5,130.5},Full ]Report->True ,SignificanceLevel->.05 FullReport
Distribution , NormalDistribution
TestStat 10.6351
MeanDiff 42.6667
OneSidedPValue 1.0226 1026, Reject null hypothesis at significance level 0.05
ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر : MeanDifferenceTest[x1,x2,0,KnownVariance{130.5,130.5},Full ]Report->True ,SignificanceLevel->.05
ﻧﺣﺻل ﻋﻠﻰ ﺗﻘرﯾر ﻣﻔﺻل واﺧﺗﺑﺎر ﻣن ﺟﺎﻧب واﺣد واﻟﻘرار ﻧرﻓض ﻓرض اﻟﻌدم .
اﻟﺣﺎﻟﺔ اﻟﺛﺎﻧﯾﺔ :ﺑﻔرض أن 12 , 22ﻣﺟﮭوﻟﺗ ﺎن وﺣﺟ م ﻛ ﻼ ﻣ ن اﻟﻌﯾﻧﺗ ﯾن ﺻ ﻐﯾر .ﯾﻌﺗﻣ د اﻟﻘ رار اﻟ ذي ﻧﺗﺧذه ﻓﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﻓ ﻲ اﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم ﻋﻠ ﻰ ﺗوزﯾ ﻊ tوذﻟ ك ﺗﺣ ت ﻓ رض ) 12 22 2 ھﻧ ﺎك ﺗﺟ ﺎﻧس ( وأن ﻛ ل ﻣﺟﺗﻣ ﻊ ﻟ ﮫ ﺗوزﯾﻌ ﺎ ً طﺑﯾﻌﯾ ﺎ ً .أوﻻ ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م n1ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻷول وﺗﺣﺳ ب ﻣﻧﮭ ﺎ s12 , x 1وﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ أﺧ رى ﻣ ن اﻟﺣﺟ م n2ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ ) ﻣﺳ ﺗﻘﻠﺔ ﻋ ن اﻟﻌﯾﻧ ﺔ اﻷوﻟ ﻲ ( وﻧﺣﺳ ب ﻣﻧﮭ ﺎ . s12 , x 2اﻟﺗﺑ ﺎﯾن اﻟﺗﺟﻣﯾﻌ ﻲ pooled varianceﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : (n 1 1)s12 (n 2 1)s 22 n1 n 2 2
وﺗﺣت ﻓرض أن H 0ﺻﺣﯾﺣﺎ ً ﻓﺈن (x1 x 2 ) 0 . 1 1 sp n1 n 2
١٤٢
t
s 2p
ﻗﯾﻣ ﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ Tﯾﺗﺑ ﻊ ﺗوزﯾ ﻊ tﺑ درﺟﺎت ﺣرﯾ ﺔ ٠ n1 n 2 2ﻓ ﻲ ﺣﺎﻟ ﺔ اﺧﺗﺑ ﺎر ذي ﺟﺎﻧﺑﯾن وﻋﻧد ﻣﺳﺗوي ﻣﻌﻧوﯾﺔ ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺳ وف ﺗﻛ ون T t أو . T t ﻟﻠﺑ دﯾل ﻣ ن 2
2
ﺟﺎﻧ ب واﺣ د 1 2ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض ﺳ وف ﺗﻛ ون . T t وأﺧﯾ را ﻟﻠﺑ دﯾل 1 2ﻓ ﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺳوف ﺗﻛون . T t
ﻣﺛﺎل)(٢٧-٣ اﺧﺗﯾرت ﻣﺟﻣوﻋﺗﺎن ﻣن اﻟطﻠﺑ ﺔ وأﻋطﯾ ت اﻟﻣﺟﻣوﻋ ﺔ اﻷوﻟ ﻲ اﻟوﺟﺑ ﺔ Aﯾوﻣﯾ ﺎ أﻋطﯾ ت اﻟﻣﺟﻣوﻋ ﺔ اﻟﺛﺎﻧﯾ ﺔ اﻟوﺟﺑ ﺔ Bﯾوﻣﯾ ﺎ .وﻗ د اﺳ ﺗﻣرت اﻟﺗﺟرﺑ ﺔ ﻟﻣ دة ﺷ ﮭر وﻛﺎﻧ ت اﻟزﯾ ﺎدة ﻓ ﻲ وزن ﻣﻔ ردات ﻛ ل ﻣﺟﻣوﻋﺔ ) ﺑﺎﻟرطل ( ھﻰ : اﻟﻣﺟﻣوﻋﺔ اﻷوﻟﻲ 2.6, 2.7 , 3.9, 3 .4, 1.0, 1.6, 4.0, 3.6, 2.4, 3 .0 اﻟﻣﺟﻣوﻋﺔ اﻟﺛﺎﻧﯾﺔ 2.9, 1 .4, 2 .6, 1.9, 1.9, 2.4, 2.9, 3.6, 1.6 ﻓﮭ ل ﺗﻌﺗﻘ د أن ھﻧ ﺎك ﻓرﻗ ﺎ ﻣﻌﻧوﯾ ﺔ ﺑ ﯾن ﺗ ﺄﺛﯾر اﻟوﺟﺑ ﺔ Aواﻟوﺟﺑ ﺔ Bﻋﻠ ﻰ زﯾ ﺎدة اﻟ وزن ؟ ) ﻋﻧ د ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ ،( 0 .1وذﻟك ﺗﺣت ﻓرض أن اﻟﻌﯾﻧﺗﯾن ﺗم اﺧﺗﺑﺎرھﻣﺎ ﻣن ﻣﺟﺗﻣﻌﯾن طﺑﯾﻌﯾﯾن .
اﻟﺣــل: n 1 10, x 1 2.820,
s1 0.976
n 2 9, x 2 2.356,
s 2 0.716
أوﻻ ﯾﺟب اﻟﺗﺄﻛد ﻣن أن 22أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم : 2 1
H 0 : 12 22
ﺿد اﻟﻔرض اﻟﺑدﯾل : 2 1
2 2
H1 : .
.
0 .1
اﻟﺗﺑﺎﯾن اﻷﻛﺑر (0.976) 2 1.858. (0.716) 2
2 2 2 1
s s
=
f
اﻟﺗﺑﺎﯾن اﻷﺻﻐر
f.05 9, 8 3.39واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ Fﻓ ﻲ ﻣﻠﺣ ق ) ( ٤ﻋﻧ د درﺟ ﺎت ﺣرﯾ ﺔ 1 9, 2 8أﻣﺎ f.95 9, 8 ﻓﺗﺣﺳب ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ : ١٤٣
1 1 0.3096. f 0.05 (8,9) 3.23
f 0.95 (9,8)
ﻣﻧطﻘﺔ اﻟرﻓض F 3.39أو وﺑﻣﺎ أن fﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻓﺈﻧﻧﺎ ﻧﻘﺑل ﻓرض اﻟﻌدم أن اﻵن ﻧﺧﺗﺑـر :
.
F 0 .3096
2 2
2 1
H 0 : 1 2 ,
H1 : 1 2 . 0 .1 . 2 1
)s ( n1 1) s 22 (n 2 1 n1 n 2 2
sp
)(.976) 2 (9) (0.716) 2 (8 10 9 2 0.7455548 0.86346 .
( x1 x 2 ) 0 1 1 sp n1 n 2 2.820 2.356 1.16955. 1 1 0.86346 10 9 t 0.05 1.74واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) ( ٢ﻋﻧد درﺟﺎت ﺣرﯾﺔ . 17 t
ﻣﻧطﻘﺔ اﻟرﻓض T 1 .74أو . T 1 .74وﺑﻣﺎ أن tﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻓﺈﻧﻧﺎ ﻧﻘﺑل H 0وھذا ﯾدل ﻋﻠﻰ ﻋدم وﺟود ﻓرق ﻣﻌﻧوي ﺑﯾن ﺗﺄﺛﯾر اﻟوﺟﺑﺔ Aواﻟوﺟﺑﺔ Bﻋﻠﻰ زﯾﺎدة اﻟوزن . ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . =.1 0.1 }x1={2.6,2.7,3.9,3.4,1,1.6,4,3.6,2.4,3 }{2.6,2.7,3.9,3.4,1,1.6,4,3.6,2.4,3 }x2={2.9,1.4,2.6,1.9,1.9,2.4,2.9,3.6,1.6 }{2.9,1.4,2.6,1.9,1.9,2.4,2.9,3.6,1.6 ]y[x_]:=Apply[Plus,x ]a[x_]:=Length[x ]n1=a[x1 10 ]n2=a[x2 9 v=n1+n2-2 17 ١٤٤
bx_ :
yx ax
a1=b[x1]//N 2.82 a2=b[x2]//N 2.35556 d=a1-a2//N 0.464444
yx2 2 ax 1 cx_ : yx a x s1=c[x1]//N 0.952889 s2=c[x2]//N 0.512778
f
Maxs1, s2 Mins1, s2
1.85829 <<Statistics`ContinuousDistributions`
ff1 QuantileFRatioDistributionn1 1, n2 1, 1 3.38813
ff2 QuantileFRatioDistributionn1 1, n2 1,
2
f11 QuantileFRatioDistributionn2 1, n1 1, 1
f22 QuantileFRatioDistributionn2 1, n1 1, 0.295148 a1=If[s1>s2,ff1,f11] 3.38813 a2=If[s1>s2,ff2,f22] 0.309638
c1 Iff a2 f a1, Print"Reject H0 ", Print"Accept H0 " Accept H0 n1 1 s1 n2 1 s2 sp N v 0.863584
١٤٥
2
2
0.309638
3.22958
2
d
N
t
1 1 sp n2
2
n1
1.17051 `<<Statistics`ContinuousDistributions
t1 QuantileStudentTDistributionv, 1 1.73961
r If Abst t1, Print"Reject Ho", Print"Accept Ho" Accept Ho
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو ﻗﺑول ﻓرض اﻟﻌدم .
ﻣﺛﺎل)(٢٨-٧ إذا ﻛﺎن ﻟدﯾك اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ اﻟﻤﺠﻤﻮﻋﺔ اﻻوﻟﻰ }825,990,1054,921,816,818,1071,1121,926,956,867,935 اﻟﻤﺠﻤﻮﻋﺔ اﻟﺜﺎﻧﯿﺔ 840,600,890,780,915,915,1230,1302,922,845,923,1030,879,757,9 21,848,870,826,831,1005,1002,915,813,842,774 اﺧﺗﺑر ﻓرض اﻟﻌدم H 0 : 1 2ﺿد اﻟﻔرض اﻟﺑدﯾل H1 : 1 2ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ 0 .05واﺧﺗﺑر ﻓرض اﻟﻌدم : H 0 : 12 22
ﺿد اﻟﻔرض اﻟﺑدﯾل : 2 2
2 1
H1 : .
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة HypotheseTest وذﻟك ﺑﺎﺗﺑﺎع ﻧﻔس اﻟﺧطوات اﻟﺗﻰ أﺗﺑﻌت ﻓﻰ ﻣﺛﺎل ) (٢٥- ٣واﻻﺧﺗﻼف اﻟوﺣﯾد ھﻧﺎ ھو ﻓﻰ أﺧﺗﻼف ﺑﻌض اﻟﺧﯾﺎرات اﻟﺧﺎﺻﺔ ﺑﺎﻻﻣر اﻟﺘﺎﻟﻰ: ]MeanDifferenceTest[list1, list2, diff0, options ﺣﯾث ﻻ ﯾوﺿﻊ اﻟﺧﯾﺎر } .KnownVariance -> {,وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت
: ١٤٦
<<Statistics`HypothesisTests` x1={825,990,1054,921,816,818,1071,1121,926,956,867,935}; x2={840,600,890,780,915,915,1230,1302,922,845,923,1030,879,7 57,921,848,870,826,831,1005,1002,915,813,842,774}; VarianceRatioTest[x1,x2, 1,FullReport->True,TwoSided>True,SignificanceLevel->0.05]
FullReport
Ratio 0.518999
TestStat 0.518999
Distribution , FRatioDistribution11, 24
TwoSidedPValue 0.257013, Fail to reject null hypothesis at significance level 0.05 MeanDifferenceTest[x1,x2,0,FullReport->True,EqualVariances>True,TwoSided->True,SignificanceLevel->0.05]
FullReport
MeanDiff 42.6667
TestStat 0.928967
Distribution , StudentTDistribution35
TwoSidedPValue 0.359269, Fail to reject null hypothesis at significance level 0.05
: ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر VarianceRatioTest[x1,x2, 1,FullReport->True,TwoSided>True,SignificanceLevel->0.05]
واﻟﻧ ﺎﺗﺞ ﻣ ن ﻗﺳ ﻣﺔ.518999 وھ وf ﯾ ﺗم اﻟﺣﺻ ول ﻋﻠ ﻰ ﺗﻘرﯾ ر ﻣﻔﺻ ل ﯾﺣﺗ وى ﻋﻠ ﻰ ﻗﯾﻣ ﺔ اﻻﺣﺻ ﺎء p=.257013 ﻛﻣ ﺎ أن اﻻﺧﺗﺑ ﺎر ﻣ ن ﺟ ﺎﻧﺑﯾن وﻗﯾﻣ ﺔ.ﺗﺑ ﺎﯾن اﻟﻌﯾﻧ ﺔ اﻻﺻ ﻐر ﻋﻠ ﻰ ﺗﺑ ﺎﯾن اﻟﻌﯾﻧ ﺔ اﻻﻛﺑ ر وﻛﻣﺎ ﯾﺗﺿﺢ ﻣن اﻟﺗﻘرﯾر ﻗﺑول ﻓرض اﻟﻌدم.05 واﻟﺗﻰ اﻛﺑر ﻣن : وﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر. 12 22 أن MeanDifferenceTest[x1,x2,0,EqualVariances->True,FullReport>True,TwoSided->True,SignificanceLevel->0.05]
ﺑ درﺟﺎت ﺣرﯾ ﺔT واﻟ ذى ﯾﺗﺑ ﻊ ﺗوزﯾ ﻊTestStat ﻓﺈﻧﮫ ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ ﻗﯾﻣﺔ اﻻﺣﺻﺎء ﺗﺣت اﻟﻌﻧوان واﻻﺧﺗﺑ ﺎر ﺳ وف ﯾﻛ ون ﻣ ن ﺟ ﺎﻧﺑﯾن وﻗﯾﻣ ﺔDistribution ﻛﻣ ﺎ ﯾﺗﺿ ﺢ ﺗﺣ ت اﻟﻌﻧ وان35 ﻛﻣ ﺎ ﯾﺗﺿ ﺢ ﻣ نH 0 : 1 2 وﺑﺎﻟﺗ ﺎﻟﻰ ﯾ ﺗم ﻗﺑ ول ﻓ رض اﻟﻌ دم.05 وھ ﻰ أﻛﺑ ر ﻣ نp=.359269 . اﻟﺗﻘرﯾر اﻟﻣﻔﺻل ﺗﺣ تH1 : 1 2 ﺿ د اﻟﻔ رض اﻟﺑ دﯾلH 0 : 1 2 ﻋﻧ د اﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم: اﻟﺣﺎﻟ ﺔ اﻟﺛﺎﻟﺛ ﺔ : اﻟﺷروط اﻟﺗﺎﻟﯾﺔ . ً )أ( ﻛل ﻣﺟﺗﻣﻊ ) ﻣن اﻟﻣﺟﺗﻣﻌﯾن ﺗﺣت اﻟدراﺳﺔ (ﯾﺗﺑﻊ ﺗوزﯾﻌﺎ ً طﺑﯾﻌﯾﺎ . ﻣﺧﺗﻠﻔﯾن ﻛﺛﯾرا، 12 22 ، )ب( ﺗﺑﺎﯾن اﻟﻣﺟﺗﻣﻌﯾن . )ج( اﻟﻌﯾﻧﺗﺎن ﺻﻐﯾرﺗﺎن وإﺣﺟﺎﻣﮭﻣﺎ ﻣﺧﺗﻠﻔﺎن ﺑدرﺟﺎت ﺣرﯾﺔ ﺗﺣﺳب ﻣنt واﻟذي ﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ ﺗوزﯾﻊT اﻟﻘرار اﻟذي ﻧﺗﺧذه ﯾﻌﺗﻣد ﻋﻠﻰ اﻹﺣﺻﺎء : اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ١٤٧
2
.
s12 s 22 n n 2 1
s 2 2 s 2 2 1 n1 n2 n 1 n 1 2 1 ﻹﺟ راء اﻻﺧﺗﺑ ﺎر ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﺣﺟﻣﮭ ﺎ n1ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻷول ﻛﻣ ﺎ ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ
أﺧ رى ﺣﺟﻣﮭ ﺎ n2ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ ) اﻟﻌﯾﻧ ﺔ اﻟﺛﺎﻧﯾ ﺔ ﻣﺳ ﺗﻘﻠﺔ ﻋ ن اﻟﻌﯾﻧ ﺔ اﻷوﻟ ﻲ ( .ﻧﺣﺳ ب x 1 , x 2 , s12 , s 22وﻋﻠﻰ ذﻟك ﯾﻛون : .
( x1 x 2 ) 0 s12 s 22 n1 n 2
t
ﻗﯾﻣ ﺔ ﻟﻠﻣﺗﻐﯾ ر Tﻋﻧ دﻣﺎ ﯾﻛ ون H 0ﺻ ﺣﯾﺣﺎ ً .ﻻﺧﺗﺑ ﺎر ذي ﺟ ﺎﻧﺑﯾن ،ﺑﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ﻣﻧطﻘ ﺔ اﻟ رﻓض ﺗﻘرﯾﺑﺎ ً ﺗﻌط ﻰ ﺣﯾ ث tأو tھﻣﺎ اﻟﻘﯾﻣﺗ ﯾن اﻟﺣ رﺟﺗﯾن ﻟﺗوزﯾ ﻊ tﺑ درﺟﺎت ﺣرﯾ ﺔ و 2
ﻣﻧطﻘﺔ اﻟرﻓض ﺳوف ﺗﻛون
2
2
T' tأو . T' tﻟﺑدﯾل ﻣ ن ﺟﺎﻧ ب واﺣ د ، 1 2ﻓﺈن ﻣﻧطﻘ ﺔ 2
اﻟرﻓض ﺳوف ﺗﻛون T ' t وﻟﻠﺑدﯾل 1 2ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺳوف ﺗﻛون . T ' t
ﻣﺛﺎل)(٢٩-٣ أوﺿﺣت اﻟدراﺳﺔ أن زﯾﺎدة اﻟﻧﺗرات nitrateﻓﻲ اﻻﺳﺗﮭﻼك اﻵدﻣﻲ ﻟﮫ ﺗﺄﺛﯾرات ﺿﺎرة ﻣﻧﮭﺎ ﻗﻠ ﺔ إﻧﺗ ﺎج اﻟﺛﯾروﻛﺳﯾن وﻗﻠﺔ إدرار اﻟﻠﺑن ﻋﻧد اﻟﺑﻘر .اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ﻧﺗﯾﺟ ﺔ ﺗﺟرﺑ ﺔ ﻟﻘﯾ ﺎس اﻟﻧﺳ ﺑﺔ اﻟﻣﺋوﯾ ﺔ ﻟﻠزﯾ ﺎدة ﻓﻲ وزن ﻓﺋران ﺗﺟﺎرب ﺻﻐﯾرة اﻟﻌﻣر ﺗﻧﺎوﻟ ت وﺟﺑ ﺔ ﻗﯾﺎﺳ ﯾﺔ وﻓﺋ ران ﺗﻧﺎوﻟ ت ppm 2000ﻧﺗ رات ﻣ ن ﻣﯾﺎه اﻟﺷرب. اﻟﻧﺗرات 12 .7, 19 .3, 20 .5, 10 .5, 14 .0, 10 .8, 16 .6, 14.0, 17 .2 18.2, 32.9, 10.0, 14.3, 16.2, 27.6, 15.7اﻟﻣراﻗﺑﺔ ) اﻟﻘﯾﺎﺳﯾﺔ( ﺗﺣﻘق ﻣ ن ﺻ ﺣﺔ اﻟﻔ رض اﻟﻘﺎﺋ ل :ﻻ ﯾوﺟ د ﻓ رق ﻣﻌﻧ وي ﺑ ﯾن ﻣﺟﻣوﻋ ﺔ اﻟﻧﺗ رات وﻣﺟﻣوﻋ ﺔ اﻟﻣراﻗﺑ ﺔ وذﻟ ك ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ) . 0 .1ﺗﺣ ت ﻓ رض أن اﻟﻌﯾﻧﺗ ﯾن ﺛ م اﺧﺗﯾﺎرھﻣ ﺎ ﻣ ن ﻣﺟﺗﻣﻌ ﯾن طﺑﯾﻌﯾﯾن (.
اﻟﺣــل: ﯾﺟب ﻋﻠﯾﻧﺎ أوﻻ اﻟﺗﺣﻘق ﻣن . s1 3.558,وﻋﻠﻰ ذﻟك ﻓﺈن ﻗﯾﻣﺔ fھﻰ : s 2 8.053 2 2
2 1
(8.053) 2 5.1228. (3.558) 2
١٤٨
s 22 s12
f
f.05 6, 8 3.58واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ Fﻓ ﻲ ﻣﻠﺣ ق ) ( ٦ﻋﻧ د درﺟ ﺎت ﺣرﯾ ﺔ . 1 6, 2 8أﻣﺎ f.95 6, 8 ﻓﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ : 1 1 0.241. f.05 (8,6) 4.15
f.95 (6,8)
ﻣﻧطﻘﺔ اﻟرﻓض F 3.58أو وﺣﯾث أن fﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻓﺈﻧﻧﺎ ﻧرﻓض H 0وﻧﺳﺗﻧﺗﺞ أن اﻵن ﻧﺧﺗﺑـر : F 0 . 241
2 2
2 1
H 0 : 1 2 ,
H1 : 1 2 . 0 .1 .
x 2 19.271 , x 1 15.067 (x x 2 ) 0 t' 1 . s12 s 22 n1 n 2 1.2869 .
وﻋﻠﯾﻧﺎ أن ﻧﻘﺎرن ﻗﯾﻣﺔ
t
15.067 19.271 3.558 2 8.053 2 9 7
اﻟﻣﺣﺳوﺑﺔ ﺑﻘﯾﻣﺔ tاﻟﺟدوﻟﯾﺔ ﻋﻧد درﺟﺎت ﺣرﯾﺔ : 2
2 1
2 2
s s n n 2 1
s 2 2 s 2 2 1 n 1 n2 n 1 n 1 2 1 2
3.5582 8.0532 9 7
113.87 7.8 8. 14.55 3.5582 2 8.0532 2 9 7 8 6
t 0.05 1.86واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊ tﻓﻲ ﻣﻠﺣق ) (٢ﻋﻧد درﺟ ﺎت ﺣرﯾ ﺔ 8وﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض T 1 .86أو . T 1 . 86ﺑﻣ ﺎ أن tﺗﻘ ﻊ ﻓ ﻲ ﻣﻧطﻘ ﺔ اﻟﻘﺑ ول ﻧﻘﺑ ل H 0 ١٤٩
وھذا ﯾﻌﻧﻰ ﻋدم وﺟ ود ﻓ رق ﻣﻌﻧ وي ﺑ ﯾن ﻣﺟﻣوﻋ ﺔ اﻟﻧﺗ رات وﻣﺟﻣوﻋ ﺔ اﻟﻣراﻗﺑ ﺔ ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ . 0 .1 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة HypotheseTest وذﻟك ﺑﺎﺗﺑﺎع ﻧﻔس اﻟﺧطوات اﻟﺗﻰ أﺗﺑﻌت ﻓﻰ ﻣﺛﺎل ) (٢٨- ٣واﻻﺧﺗﻼف اﻟوﺣﯾد ھﻧﺎ ھو ﻓﻰ أﺧﺗﻼف ﺑﻌض اﻟﺧﯾﺎرات اﻟﺧﺎﺻﺔ ﺑﺎﻻﻣر اﻟﺘﺎﻟﻰ: ]MeanDifferenceTest[list1, list2, diff0, options ﺣﯾث ﻻ ﯾوﺿﻊ اﻟﺧﯾﺎر . EqualVariances->Trueوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت : `<<Statistics`HypothesisTests }X1={12.7,19.3,20.5,10.5,14,10.8,16.6,14,17.2 }{12.7,19.3,20.5,10.5,14,10.8,16.6,14,17.2
}X2={18.2,32.9,10,14.3,16.2,27.6,15.7 }{18.2,32.9,10,14.3,16.2,27.6,15.7
VarianceRatioTest[public, private, 1,FullReport]>True,TwoSided->True
TestStat 0.195213
Distribution ,TwoSidedPValue 0.0380965 FRatioDistribution8,6
Ratio 0.195213
FullReport
]MeanDifferenceTest[x1,x2,0 OneSidedPValue0.117402
]MeanDifferenceTest[x1,x2,0,FullReport->True,TwoSided->True
Distribution ,TwoSidedPValue0.234804 StudentTDistribution7.82501
TestStat 1.28716
MeanDiff 4.20476
FullReport
ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر : ]VarianceRatioTest[x1,x2, 1,TwoSided->True,FullReport->True
ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ ﺗﻘرﯾ ر ﻣﻔﺻ ل ﯾﺣﺗ وى ﻋﻠ ﻰ ﻗﯾﻣ ﺔ اﻻﺣﺻ ﺎء fوھ و .195213وھ و ﻣﻘﻠ وب ﻗﯾﻣ ﺔ f=5.1128واﻟﺗ ﻰ ﺗ م اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ ﻋﻧ د ﺣ ل اﻟﻣﺛ ﺎل ﯾ دوﯾﺎ وﯾرﺟ ﻊ ذﻟ ك إﻟ ﻰ ﻗﺳ ﻣﺔ ﺗﺑ ﺎﯾن اﻟﻌﯾﻧ ﺔ اﻻﺻﻐر ﻋﻠﻰ ﺗﺑﺎﯾن اﻟﻌﯾﻧ ﺔ اﻻﻛﺑ ر.ﻛﻣ ﺎ أن اﻻﺧﺗﺑ ﺎر ﻣ ن ﺟ ﺎﻧﺑﯾن وﻗﯾﻣ ﺔ p=.0380965واﻟﺗ ﻰ اﻗ ل ﻣ ن .05 2 2 وھ ذا ﯾﻌﻧ ﻰ رﻓ ض ﻓ رض اﻟﻌ دم أن . 1 2وﻋﻧ د ﻋ دم وﺿ ﻊ اﻟﺧﯾ ﺎر TwoSided->Trueﻓ ﺈن اﻻﺧﺗﺑﺎر ﯾﻛون ﻣن طرف واﺣد ﻛﻣﺎ ھو واﺿﺢ ﻣن اﻻﻣر ]MeanDifferenceTest[x1,x2,0 OneSidedPValue0.117402
ﺑﺎﻟﻧﺳﺑﺔ ﻟﻼﻣر: ]MeanDifferenceTest[x1,x2,0,FullReport->True,TwoSided->True
ﻓﺈﻧ ﮫ ﯾ ﺗم اﻟﺣﺻ ول ﺗﻘرﯾ ر ﻣﻔﺻ ل ﺣﯾ ث اﻟﻘﯾﻣ ﺔ 7 .8 8 .ﺗﺣ ت اﻟﻌﻧ وان Distributionوﻗﯾﻣ ﺔ اﻻﺣﺻ ﺎء ﺗﺣ ت اﻟﻌﻧ وان TestStatواﻻﺧﺗﺑ ﺎر ﺳ وف ﯾﻛ ون ﻣ ن ﺟ ﺎﻧﺑﯾن وﻗﯾﻣ ﺔ p=.234804وھ ﻰ
١٥٠
وھ ذا ﯾﻌﻧ ﻰ ﻋ دم وﺟ ود ﻓ رق ﻣﻌﻧ وي ﺑ ﯾن ﻣﺟﻣوﻋ ﺔH 0 وﺑﺎﻟﺗﺎﻟﻰ ﯾﺗم ﻗﺑول ﻓرض اﻟﻌدم0.1أﻛﺑر ﻣن . 0 .1 اﻟﻧﺗرات وﻣﺟﻣوﻋﺔ اﻟﻣراﻗﺑﺔ ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ
(٣٠-٣)ﻣﺛﺎل وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت =.1 0.1 x1={12.7,19.3,20.5,10.5,14,10.8,16.6,14,17.2} {12.7,19.3,20.5,10.5,14,10.8,16.6,14,17.2} x2={18.2,32.9,10,14.3,16.2,27.6,15.7} {18.2,32.9,10,14.3,16.2,27.6,15.7} y[x_]:=Apply[Plus,x] z[x_]:=Length[x] n1=z[x1] 9 n2=z[x2] 7
fx_ :
yx zx
a1=f[x1] 15.0667 a2=f[x2] 19.2714 b=a1-a2 -4.20476
lx_ : yx^2
yx ^2 zx 1 zx
s1=l[x1] 12.66 s2=l[x2] 64.8524
f
Maxs1, s2 Mins1, s2
5.12262 <<Statistics`ConfidenceIntervals`
ff1 QuantileFRatioDistributionn1 1, n2 1, 1 4.1468
ff2 QuantileFRatioDistributionn1 1, n2 1, 0.279284
١٥١
2
2
f11 QuantileFRatioDistributionn2 1, n1 1, 1 3.58058
f22 QuantileFRatioDistributionn2 1, n1 1,
2
2
0.24115 d1=If[s1>s2,ff1,f11] 3.58058 d2=If[s1>s2,ff2,f22] 0.24115 c1 Iff d2 f d1, Print"Reject H0 ",
Print"Accept H0" Reject H0 s1 u n1 1.40667
w
s2 n2
9.26463 u w ^2
v
2 2 u w n11
n21
7.82501 Round[v] 8
Statistics`ContinuousDistributions`
t QuantileStudentTDistribution v, 1
2
1.86495
b t1 u w -1.28716
a1 IfAbst1 t, Print"Reject H0", Print"Accept H0" Accept H0
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ . اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔx2 اﻟﻌﯾﻧﺔ اﻻوﻟﻰ و ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎتx1 ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﻣﺣﺳوﺑﺔ ھﻰt -1.28716
واﻟﻘرار اﻟذى ﯾﺗﺧذ ھو ﻗﺑول ﻓرض اﻟﻌدم ﻣن اﻻﻣر ١٥٢
1.86495
اﻟﺟدوﻟﯾﺔ ھﻰt و
a1 IfAbst1 t, Print"Reject H0", Print"Accept H0"
) ( ٨-٣اﺧﺗﺑﺎرات tﻟﻸزواج
The Paired t Tests
ﻓ ﻲ اﻟﺑﻧ د اﻟﺳ ﺎﺑق ﻛ ﺎن اھﺗﻣﺎﻣﻧ ﺎ ﺑﺎﻟﻌﯾﻧ ﺎت اﻟﻣﺳ ﺗﻘﻠﺔ .اﻵن ﺳ وف ﯾﻛ ون اھﺗﻣﺎﻣﻧ ﺎ ﺑﺎﻟﻌﯾﻧ ﺎت اﻟﻣزدوﺟ ﺔ ، paired samplesﺣﯾث d1, d 2 ,..., d nﺗﻣﺛل اﻟﻔروق ﻷزواج اﻟﻣﺷﺎھدات اﻟﻣرﺗﺑطﺔ اﻟﺗ ﻲ ﻋ ددھﺎ . nﻣﺛ ل ھ ذه اﻟﻣﺷ ﺎھدات ﺗﺣ دث ﻋﻧ دﻣﺎ ﻧﺄﺧ ذ اﻟﻣﺷ ﺎھدات ) اﻟﻘ راءات ( ﻋﻠ ﻰ اﻟﻣﻔ ردات ﻗﺑ ل وﺑﻌ د ﻣﻌﺎﻟﺟﺔ .ﺑﺎﻟﻧظر إﻟﻰ اﻟﻔروق ﻟﻛل أزواج اﻟﻣﺷﺎھدات ﻓﺈﻧﻧﺎ ﻧﺄﻣل ﻓ ﻲ اﻟوﺻ ول إﻟ ﻰ اﺳ ﺗﻧﺗﺎج ﯾﺧ ص ﺗ ﺄﺛﯾر اﻟﻣﻌﺎﻟﺟﺔ .ﻣﺗوﺳط ﻓروق اﻟﻣﺟﺗﻣﻊ ، D ،ﺳوف ﯾﺳﺎوى اﻟﻔ رق ﺑ ﯾن ﻣﺗوﺳ طﻲ اﻟﻣﺟﺗﻣﻌ ﯾن 1 2 ، ،وﻋﻠﻰ ذﻟك ﻓﺈن ﻣﺷﻛﻠﺔ اﺧﺗﺑﺎر ﻓرض اﻟﻌ دم H0أن 1 2 0ﺗﻛ ﺎﻓﺊ اﺧﺗﺑ ﺎر . D 0ﺑﻔ رض أن ﻛ ل ﻣﺟﺗﻣ ﻊ ﻣ ن اﻟﻣﺟﺗﻣﻌ ﯾن ﯾﺗﺑ ﻊ ﺗوزﯾﻌ ﺎ ً طﺑﯾﻌﯾ ﺎ ً .أوﻻ ً ﻧﺧﺗ ﺎر nﻣ ن أزواج اﻟﻣﺷ ﺎھدات ﻋﺷواﺋﯾﺎ وﻧﺣﺳب اﻟﻔروق وﻧﻘدر dو . s dوﻋﻠﻰ ذﻟك ﻋﻧدﻣﺎ ﯾﻛون H 0ﺻﺣﯾﺣﺎ ﻓﺈن : d0 , sd n
t
ھ ﻰ ﻗﯾﻣ ﺔ ﻟﻠﻣﺗﻐﯾ ر اﻟﻌﺷ واﺋﻲ Tاﻟ ذي ﯾﺗﺑ ﻊ ﺗوزﯾ ﻊ tﺑ درﺟﺎت ﺣرﯾ ﺔ . n 1ﻗرارﻧ ﺎ ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﯾﻌﺗﻣ د ﻋﻠ ﻰ ﺗوزﯾ ﻊ tوﻣﻧ ﺎطق اﻟ رﻓض اﻟﻣﻘﺎﺑﻠ ﺔ ﻟﻠﻔ روض اﻟﺑدﯾﻠ ﺔ اﻟﻣﺧﺗﻠﻔ ﺔ وﺳ وف ﻧﺗﺑ ﻊ اﻟﺧطوات اﻟﺗﻲ أﺗﺑﻌت ﻣن ﻗﺑل .
ﻣﺛﺎل)(٣١-٣ إذا ﻛﺎﻧت أوزان ﯾﻠﻲ :
10
10
أﺷﺧﺎص ﻗﺑل اﻟﺗوﻗف ﻋ ن اﻟﺗ دﺧﯾن وﺑﻌ د 9
8
7
5
6
166 147 150 175 151 146
8
4
أﺳ ﺎﺑﯾﻊ ﻣ ن اﻟﺗوﻗ ف ﻋ ن اﻟﺗ دﺧﯾن ﻛﻣ ﺎ 3
2
1
148 176 152 115
اﻷﺷﺧﺎص ﻗﺑل
155 170 169 117 170 150 154 180 160 151ﺑﻌـد ﻓﮭل ﺗدل ھذه اﻟﺑﯾﺎﻧﺎت ﻋﻠﻰ أن اﻻﻣﺗﻧﺎع ﻋن اﻟﺗدﺧﯾن ﯾ ؤدى إﻟ ﻰ زﯾ ﺎدة وزن اﻷﺷ ﺧﺎص اﻟ ذﯾن ﯾﻣﺗﻧﻌ ون ﻋن اﻟﺗدﺧﯾن ؟ وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: H 0 : D 0, H1 : D 0 . 0 .05 .
١٥٣
. 9 ( ﻋﻧد درﺟﺎت ﺣرﯾﺔ٢) ﻓﻲ ﻣﻠﺣقt واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول ﺗوزﯾﻊt 0.025 2.262 T 2 . 262 أوT 2 .262 ﻣﻧطﻘﺔ اﻟرﻓض n
x d
i 1
n
i
50 5 , 10
n ( di )2 n 1 d i2 i 1 sd n 1 i 1 n
1 (50) 2 550 5.7735, 9 10
t
d 0 sd n
5 2.7386. 5.7735 / 10
. H 0 ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻧرﻓضt وﺑﻣﺎ أن وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطواتMathematica ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت x1={148.,176,152,115,166,147,150,175,151,146} {148.,176,152,115,166,147,150,175,151,146} x2={155.,170,169,117,170,150,154,180,160,151} {155.,170,169,117,170,150,154,180,160,151} d=x1-x2 {-7.,6,-17,-2,-4,-3,-4,-5,-9,-5} y[x_]:=Apply[Plus,x] z[x_]:=Length[x]
fx_ :
yx zx
d1=f[d] -5.
sd ld
lx_ : yx^2
yx ^2 zx 1 zx
5.7735 ١٥٤
]n=z[d 10 v=n-1 9
d1 sd n
t1
-2.73861 `<<Statistics`ContinuousDistributions ]t=Quantile[StudentTDistribution[v],0.975 2.26216
a1 If Abst1 t, Print"Reject H0 ", Print"Accept H0 " Reject H0
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت x1ﻟﻠﻌﯾﻧﺔ اﻻوﻟﻰ و ﻗﺎﺋﻣﺔ اﻟﺑﯾﺎﻧﺎت x2ﻟﻠﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ. ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت tاﻟﻣﺣﺳوﺑﺔ ھﻰ -2.73861
و tاﻟﺟدوﻟﯾﺔ ھﻰ 2.26216
واﻟﻘرار اﻟذى ﯾﺗﺧذ ھو رﻓض ﻓرض اﻟﻌدم ﻣن اﻻﻣر a1 IfAbst1 t, Print"Reject H0", Print"Accept H0"
) (٩-٣اﺧﺗﺑﺎرات ﺗﺧص ﻧﺳﺑﺔ ﻣﺟﺗﻣﻊ Tests Concerning a Population Proportion ﺳ وف ﻧﮭ ﺗم ﻓ ﻲ ھ ذا اﻟﺑﻧ د ﺑﻣﺷ ﻛﻠﺔ اﺧﺗﺑ ﺎرات اﻟﻔ روض اﻟﺗ ﻲ ﻓﯾﮭ ﺎ ﻧﺳ ﺑﺔ ﺻ ﻔﺔ ﻣ ﺎ ﺗﺳ ﺎوى ﻗﯾﻣ ﺔ ﻣﻌﻧﯾﺔ .أي أﻧﻧﺎ ﻧﮭ ﺗم ﺑﺎﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم H 0 : p p 0ﺿ د اﻟﻔ رض اﻟﺑ دﯾل p p 0أو p p0 أو p p 0 .ﺳ وف ﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ﻓ ﻲ ھ ذا اﻟﺑﻧ د ﻋﻠ ﻰ ﺣﺎﻟ ﺔ اﻟﻌﯾﻧ ﺎت اﻟﻛﺑﯾ رة ،وﻋﻠ ﻰ ذﻟ ك ﻓ ﺈن اﻹﺣﺻﺎء اﻟﻣﻧﺎﺳب اﻟ ذي ﯾﻌﺗﻣ د ﻋﻠﯾ ﮫ ﻗرارﻧ ﺎ ھ و ˆ Pاﻟ ذي ﺗﻘرﯾﺑ ﺎ ً ﯾﺗﺑ ﻊ ﺗوزﯾﻌ ﺎ ً طﺑﯾﻌﯾ ﺎ ً .أي أن ﻗرارﻧ ﺎ ﺳوف ﯾﻌﺗﻣد ﻋﻠﻰ : pˆ p 0 p0 q 0 n
١٥٥
z
واﻟذي ﯾﻣﺛل ﻗﯾﻣﺔ ﻟﻠﻣﺗﻐﯾر Zاﻟذي ﯾﺗﺑﻊ اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ . q 0 1 p 0وﻋﻠ ﻰ ذﻟ ك ﻟﻼﺧﺗﺑ ﺎر ﻣ ن ﺟ ﺎﻧﺑﯾن ﻓ ﺈن ﻣﻧطﻘ ﺔ اﻟ رﻓض ،ﺑﻣﺳ ﺗوى ﻣﻌﻧوﯾ ﺔ ، ﺳ وف ﺗﻛ ون Z z أو . Z z 2
2
ﻟﻠﺑدﯾل ﻣن ﺟﺎﻧب واﺣد p p 0ﻓﺈن ﻣﻧطﻘﺔ اﻟ رﻓض ﺳ وف ﺗﻛ ون . Z z وأﺧﯾ را ﻟﻠﺑ دﯾل ﻓﺈن ﻣﻧطﻘﺔ اﻟرﻓض ﺳوف ﺗﻛون . Z z
p p0
ﻣﺛﺎل)(٣٢-٣ اﺧﺗﯾرت ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 200ﺷﺧص ﻣن ﻣﺟﺗﻣﻊ ﻣﺎ ووﺟد أن 40ﺷﺧص ﻣن اﻟﻌﯾﻧﺔ ﻣﺻﺎﺑون ﺑﻣرض ﻣﺎ .اﻟﻣطﻠوب اﺧﺗﺑﺎر اﻟﻔرض أن ﻧﺳﺑﺔ اﻹﺻﺎﺑﺔ ﺑﺎﻟﻣرض ﻓﻲ ھذا اﻟﻣﺟﺗﻣﻊ أﻗل ﻣن 0 .5 وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .01
اﻟﺣــل: H 0 : p 0 .5 , H 1 : p 0 .5 . 0 .01 .
z .01 2.325واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳ ﻲ ﻓ ﻲ ﻣﻠﺣ ق ) .(١ﻣﻧطﻘ ﺔ اﻟ رﻓض Z 2 . 325
n 200.
,
x 40
x 40 0.2 , q 0 1 q0 1 0.5 0.5. . n 200 0 .2 0 .5 8.4852. )(0.5)(0.5 200
pˆ p0 p0 q 0
pˆ
z
n
وﺑﻣﺎ أن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻧرﻓض . H 0 ﺳ وف ﯾ ﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻛﺗ وب ﺑﻠﻐ ﺔ Mathematicaوﻓﯾﻣ ﺎ ﯾﻠ ﻰ ﺧط وات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت. =.01 0.01 n=200 x=40 200 40 po=0.5 0.5
x N n ١٥٦
p
0.2 qo=1-po 0.5
z
p po
poqo n
-8.48528 <<Statistics`ContinuousDistributions` z1=Quantile[NormalDistribution[0,1],] -2.32635
r Ifz z1, Print"Reject Ho", Print"Accept Ho" Reject Ho
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت:اوﻻ ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.01
وﺣﺟم اﻟﻌﯾﻧﺔ ﻣن اﻻﻣر n=200
وﻋدد اﻟذﯾن ﻟدﯾﮭم اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻻﻣر x=40 ﻣن اﻻﻣرp0 po=0.5
اﻟﻣﺧرﺟﺎت: ﺛﺎﻧﯾﺎ اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرz p po z poqo n
اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرz و z1=Quantile[NormalDistribution[0,1],]
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر
r Ifz z1, Print"Reject Ho", Print"Accept Ho" . واﻟﻣﺧرج ھو Reject Ho
. اى رﻓض ﻓرض اﻟﻌدم
(٣٣-٣)ﻣﺛﺎل ١٥٧
ﯾﻌﺗﻘ د ﻣ دﯾر اﻹﻧﺗ ﺎج ﻓ ﻲ ﻣﺻ ﻧﻊ ﻹﻧﺗ ﺎج اﻟﺗﻠﻔزﯾوﻧ ﺎت ﻓ ﻲ ﺑﻠ د ﻣ ﺎ أن 80 %ﻣ ن اﻷﺳ ر ﺗﻣﺗﻠ ك ﺗﻠﻔزﯾ ون ﻣﻠ ون ٠ﻟﻠﺗﺣﻘ ق ﻣ ن ھ ذا اﻟﻔ رض اﺧﺗﯾ رت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 1000أﺳ رة ووﺟ د أن 318ﻣ ﻧﮭم ﯾﻣﺗﻠﻛون ﺗﻠﯾﻔزﯾوﻧﺎ ﻣﻠوﻧﺎ اﺧﺗﺑر ﺻﺣﺔ ھذا اﻟﻔرض p 0.8ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: H 0 : p 0 .8 , H 1 : p 0 .8 . 0 .05 .
z .025 1.96واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ ﻓ ﻲ ﻣﻠﺣ ق ) .(٣ﻣﻧطﻘ ﺔ اﻟ رﻓض Z 1 .96أو Z 1 . 96 x 318 , n 1000. x 318 pˆ 0.318 , q 0 1 q0 1 0.8 0.2 . n 1000 pˆ p 0 0.318 0.8 z 38.105. p0 q 0 )(0.8)(0.2 1000 n
وﺑﻣﺎ أن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻧرﻓض . H 0 ﺳ وف ﯾ ﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻛﺗ وب ﺑﻠﻐ ﺔ Mathematicaوﻓﯾﻣ ﺎ ﯾﻠ ﻰ ﺧط وات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت. =.05 0.05 ;n=1000 ;x=318 ;po=0.8
x N n
p
0.318 qo=1-po 0.2
p po
poqo
z1
n
-38.1054
` Statistics`ContinuousDistributions
2
z Quantile NormalDistribution0, 1, 1 1.95996 a1 IfAbsz1 z, Print"Reject H0",
Print"Accept H0" ١٥٨
Reject H0
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻘرار اﻟذى ﯾﺗﺧذ ھو رﻓض ﻓرض اﻟﻌدم .
) (١٠-١٠اﺧﺗﺑﺎرات ﺗﺧص اﻟﻔرق ﺑﯾن ﻧﺳﺑﺗﻲ ﻣﺟﺗﻣﻌﯾن Tests Concerning a Difference Between Two Population Proportions ﺑﻔرض أن p1ھﻲ ﻧﺳﺑﺔ ﺗوﻓر ﺻﻔﺔ ﻣﺎ ﻓﻲ إﺣدى اﻟﻣﺟﺗﻣﻌ ﺎت وﻛﺎﻧ ت p2ھ ﻲ ﻧﺳ ﺑﺔ ﺗ وﻓر اﻟﺻ ﻔﺔ ﻧﻔﺳﮭﺎ ﻓﻲ ﻣﺟﺗﻣﻊ آﺧر وإذا ﻛﺎن اھﺗﻣﺎﻣﻧﺎ ﺑﺎﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : p1 p 2ﻓ ﺈن اﻹﺣﺻ ﺎء اﻟﻣﻧﺎﺳ ب واﻟذي ﯾﻌﺗﻣد ﻋﻠﯾﮫ ﻗرارﻧﺎ ﺳوف ﯾﻛون اﻟﻣﺗﻐﯾر اﻟﻌﺷواﺋﻲ . Pˆ1 Pˆ2ﻧﺧﺗﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻛﺑﯾ رة ﻣ ن اﻟﺣﺟ م n1ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻷول وﻧﺣﺳ ب ﻧﺳ ﺑﺔ ﺗ وﻓر اﻟﺻ ﻔﺔ ﻣﺣ ل اﻟدراﺳ ﺔ ﻓﯾﮭ ﺎ وﻟ ﺗﻛن
x1 n1
pˆ1
ﺣﯾث أن x1ھﻲ ﻋدد اﻟذﯾن ﯾﻣﺛﻠ ون اﻟﺻ ﻔﺔ ﻓ ﻲ اﻟﻣﺟﺗﻣ ﻊ اﻷول .ﻧﺧﺗ ﺎر ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ أﺧ رى ﻛﺑﯾ رة x2 ﻣ ن اﻟﺣﺟ م n2ﻣ ن اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ وﻧﺣﺳ ب ﻧﺳ ﺑﺔ ﺗ وﻓر اﻟﺻ ﻔﺔ اﻟﻣطﻠوﺑ ﺔ ﻣﻧﮭ ﺎ وﻟ ﺗﻛن n2
pˆ 2
ﺣﯾ ث x2ھ ﻲ ﻋ دد اﻟ ذﯾن ﯾﻣﺗﻠﻛ ون اﻟﺻ ﻔﺔ ﻓ ﻲ اﻟﻣﺟﺗﻣ ﻊ اﻟﺛ ﺎﻧﻲ ،وﯾﺟ ب أن ﺗﻛ ون اﻟﻌﯾﻧﺗ ﯾن ﻣﺳ ﺗﻘﻠﯾن ﺗﺣت ﻓرض اﻟﻌدم وﻣن ﻧظرﯾﺔ ) ( ٨-٧ﻓﺈن : pˆ1 pˆ 2 p1 q1 p 2 q 2 n1 n2 pˆ1 pˆ 2
.
1 1 ] pq[ n1 n 2
z
ھو ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾ ر ﻋﺷ واﺋﻲ Zﯾﺗﺑ ﻊ اﻟﺗوزﯾ ﻊ اﻟطﺑﯾﻌ ﻲ اﻟﻘﯾﺎﺳ ﻲ ﻋﻧ دﻣﺎ H 0ﯾﻛ ون ﺻ ﺣﯾﺣﺎ و , n1 n2 ﻛﺑﯾرﺗﺎن .وﺑﻣﺎ أن pﻣﺟﮭوﻟﺔ ﻓﻲ ﺻﯾﻐﺔ zﻓﺈﻧﻧﺎ ﻧﺣﺳﺑﮭﺎ ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : ~p x 1 x 2 . n1 n 2
وﻋﻠﻰ ذﻟك ﺗﺻﺑﺢ zﻛﺎﻟﺗﺎﻟﻲ : pˆ1 pˆ 2 . 1 1 ~ ~ ] p q[ n1 n 2
z
~ ~ q 1 ﺣﯾث أن p
ﻣﻧطﻘﺔ اﻟرﻓض ﻟﻠﻔروض اﻟﺑدﯾﻠﺔ اﻟﻣﺧﺗﻠﻔﺔ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﯾﮭﺎ ،ﻛﻣﺎ ﺳﺑق أن ذﻛرﻧ ﺎ ،ﺑﺎﺳ ﺗﺧدام اﻟﻘ ﯾم اﻟﺣرﺟﺔ ﻟﻣﻧﺣﻧﻰ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ .
ﻣﺛﺎل)(٣٤-٣
١٥٩
اﺧﺗﺑرت ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن 300ﻣدﺧﻧﺎ ﻓﻲ ﻣدﯾﻧﺔ ﻣﺎ ووﺟ د أن ﻣ ن ﺑﯾ ﻧﮭم 60ﯾﻔﺿ ﻠون ﺗ دﺧﯾن اﻟﻧ وع Aﻣن اﻟﺳﺟﺎﺋر ﺛم اﺧﺗﯾرت ﻋﯾﻧ ﺔ ﻋﺷ واﺋﯾﺔ ﻣ ن 200ﻣ دﺧﻧﺎ ﻓ ﻲ ﻣدﯾﻧ ﺔ أﺧ رى ووﺟ د أن ﻣ ن ﺑﯾ ﻧﮭم 30ﯾﻔﺿ ﻠون ﺗ دﺧﯾن اﻟﻧ وع Aﻣ ن اﻟﺳ ﺟﺎﺋر .اﺧﺗﺑ ر ﻓ رض اﻟﻌ دم H 0 : p1 p 2ﺿ د اﻟﻔ رض اﻟﺑدﯾل H1 : p1 p 2وذﻟك ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ . 0 .05
اﻟﺣــل: H 0 : p1 p 2 ,
H1 : p1 p2 . 0 . 05 .
x 1 60 x 30 0 .2 , pˆ 2 2 0.15 , n 1 300 n 2 200 ~ ~p x 1 x 2 60 30 90 0.18 , q 1 ~p 1 0.18 0.82 . n 1 n 2 300 200 500 pˆ1
z .025 1.96واﻟﻣﺳﺗﺧرﺟﺔ ﻣن ﺟدول اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻲ ﻓﻲ ﻣﻠﺣق ).(١ ﻣﻧطﻘﺔ اﻟرﻓض Z 1.96أو Z 1 .96 (0.2 0.15) 0 1.4257. 1 1 ([)(0.18)(0.82 () ]) 300 200
z
ﺑﻣﺎ أن zﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻓﺈﻧﻧﺎ ﻧﻘﺑل . H 0 ﺳوف ﯾﺗم ﺣل اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . =.05 0.05 n1=300.0 300. x1=60.0 60.
x1 n1
p1
0.2 q1=1-p1 0.8 n2=200.0 200. x2=30.0 30.
x2 n2 ١٦٠
p2
0.15 q2=1-p2 0.85 d=p1-p2 0.05
x1 x2 n1 n2
p3
0.18 q3=1-p3 0.82
d
z1
p3 q3 1 1 n2
n1
1.42566
` Statistics`ContinuousDistributions
2
z Quantile NormalDistribution0, 1, 1 1.95996
a1 IfAbsz1 z, Print"Reject H0", Print"Accept H0" Accept H0
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.05
وﺣﺟم اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر n1=300.0
وﺣﺟم اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر n=200
ﻋدد اﻟذﯾن ﻟدﯾﮭم اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻟﻌﯾﻧﺔ اﻻوﻟﻰ ﻣن اﻻﻣر x1=60.0
ﻋدد اﻟذﯾن ﻟدﯾﮭم اﻟﺻﻔﺔ ﻣوﺿﻊ اﻟدراﺳﺔ ﻣن اﻟﻌﯾﻧﺔ اﻟﺛﺎﻧﯾﺔ ﻣن اﻻﻣر x2=30.0
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت zاﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر d
z1
p3 q3 1 1 n2
n1
و zاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر
١٦١
z1 QuantileNormalDistribution0, 1, 1
2 واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن ﻣن اﻻﻣر
a1 IfAbsz1 z, Print"Reject H0", Print"Accept H0" واﻟﻣﺧرج ھو Accept H0 . اى ﻗﺑول ﻓرض اﻟﻌدم
١٦٢
اﻟﻔﺻل اﻟراﺑﻊ اﻻﻧﺣدار اﻟﺧطﻰ اﻟﺑﺳﯾط واﻻرﺗﺑﺎط
١٦٣
) (١-٤ﻣﻔﺎھﯾم أﺳﺎﺳﯾﺔ ﯾﮭﺗم ﺗﺣﻠﯾل اﻻﻧﺣدار ﺑﺎﻟﻌﻼﻗﺔ ﺑ ﯾن ﻣﺗﻐﯾ ر ﻛﻣ ﻲ ﻣوﺿ ﻊ اﻟدراﺳ ﺔ ،ﯾﺳ ﻣﻰ اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ أو ﻣﺗﻐﯾ ر اﺳ ﺗﺟﺎﺑﺔ response variableوواﺣ د أو أﻛﺛ ر ﻣ ن ﻣﺗﻐﯾ رات أﺧ رى ﺗﺳ ﻣﻰ ﻣﺗﻐﯾ رات ﻣﺳ ﺗﻘﻠﺔ independent variablesأو ﻣﺗﻐﯾ رات ﻣﻔﺳ ره explanatory variablesأو ﻣﺗﻐﯾ رات ﺗﻧﺑ ؤ . predictor variables ﻏﺎﻟﺑﺎ ﻣﺎ ﯾﺳﺗﺧدم ﺗﺣﻠﯾل اﻻﻧﺣدار ﻓﻲ اﻟﺗﻧﺑؤ ﺑﺎﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻣن اﻟﻣﻌﻠوﻣﺎت ﻋن واﺣ د أو أﻛﺛ ر ﻣ ن اﻟﻣﺗﻐﯾرات اﻟﻣﺳ ﺗﻘﻠﺔ .ﻓ ﻲ ھ ذا اﻟﻔﺻ ل ﺳ وف ﻧﻘ دم ﺑﻌ ض اﻟﻣﻔ ﺎھﯾم اﻷﺳﺎﺳ ﯾﺔ وط رق اﻻﺳ ﺗدﻻل ﻟﺗﺣﻠﯾ ل اﻻﻧﺣدار اﻟﺑﺳﯾط ﺣﯾث ﯾﻌﺗﻣد اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻋﻠﻰ ﻣﺗﻐﯾر ﻣﺳﺗﻘل واﺣد.
) (٢-٤ﻣﻘدﻣﺔ ﻓﻲ اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ﺑﻔرض ﻋﯾﻧﺔ ﻋﺷواﺋﯾﺔ ﻣن اﻟﺣﺟم nﻣﻣﺛﻠﺔ ﺑﺄزواج اﻟﻣﺷﺎھدات }{(x i , y i );i 1, 2,..., n ﻟﻌﯾﻧﺎت ﻣﺗﻛررة ﻓﺈﻧﻧﺎ ﺳوف ﻧﺄﺧذ ﺑﺎﻟﺿﺑط ﻗﯾم xوﻧﺗوﻗﻊ ﺗﻐﯾر ﻓﻲ ﻗﯾم . yوﻋﻠﻰ ذﻟك ﻗﯾﻣﺔ yiﻓﻲ اﻟزوج اﻟﻣرﺗب ) (x i , y iﺗﻣﺛل ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ . 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ˆ b0 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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506 ]dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct ]} {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{0.2 5,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.274,0.5 ١٦٧
12},{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 ﯾﻣﻛن ﻣﻼﺣظﺗﮭﺎ ،أﻣﺎ e*iﻓﻼ ﯾﻣﻛن ﻣﻼﺣظﺗﮭﺎ ﻷن اﻟﺧط Y|xﻣﻔﺗرض وﻏﯾر ﻣﻌروف.
ﺷﻛل )(٣- ٤
١٦٩
) (٥-٤ﻓروض ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ﻟﺗﻘدﯾر ﻣﻌﺎﻟم ﻧﻣوذج اﻻﻧﺣدار ) (١– ٤ﺗوﺿﻊ اﻟﻔروض اﻟﺗﺎﻟﯾﺔ ﻟﺣ د اﻟﺧط ﺄ iواﻟﻣﺳ ﻣﺎة ﻓ روض ﺟﺎوس ـ ﻣﺎرﻛوف .Gauss-Markov , E(i ) 0
E(i j ) 0 , E ( i2 ) 2 ﺣﯾث i jﻟﻛل i, j 1,..., nأي أن j , iﻏﯾر ﻣرﺗﺑطﺗﯾن. وﻋﻠﻰ ذﻟك: E (Yi ) 0 1x i , Var ( Yi ) 2 .
ھﻧﺎك ﻓروض أﺧرى ﻧﺣﺗﺎج ﻟﮭﺎ ﻋﻧد إﺟ راء ﻓﺗ رات ﺛﻘ ﺔ واﺧﺗﺑ ﺎرات ﻓ روض ﺗﺧ ص اﻟﻣﻌﻠﻣﺗ ﯾن 0 ,1وھﻲ أن iﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺑﻣﺗوﺳط ﺻﻔر وﺗﺑﺎﯾن ، 2أي أن: i ~ N ( 0, 2 ) .
ﺗوزﯾﻊ iﻣوﺿﺢ ﻓﻲ ﺷﻛل ). ( ٤– ٤
ﺷﻛل )( ٤– ٤
) (٦-٤طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى
The Method of Least Squares
ﺑ ﺎﻟرﻏم ﻣ ن وﺟ ود اﻟﻌدﯾ د ﻣ ن اﻟط رق ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﺗﻘ دﯾرات ﻟﻠﻣﻌﻠﻣﺗ ﯾن 0 , 1إﻻ أن أﻓﺿ ل ھذه اﻟطرق ھﻲ طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى. ﺗﺗطﻠب طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻ ﻐرى اﻟﺣﺻ ول ﻋﻠ ﻰ اﻟﺗﻘ دﯾرﯾن b 0 , b1وذﻟ ك ﻟﻠﻣﻌﻠﻣﺗ ﯾن 0 ,1ﻋﻠ ﻰ اﻟﺗ واﻟﻲ اﻟﻠ ذﯾن ﯾﺟﻌ ﻼن ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻷﺧط ﺎء )اﻟﺑ واﻗﻲ( SSEاﻗ ل ﻣ ﺎ ﯾﻣﻛ ن ،أي اﻟﻠ ذﯾن ﯾﺣﻘﻘ ﺎن اﻟﻧﮭﺎﯾﺔ اﻟﺻﻐرى ﻟﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ،ﺣﯾث ﯾﻌرف ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﻛﺎﻵﺗﻲ: 2
n
2
n
n
i 1
i 1
SSE e i2 y i yˆ i y i b 0 b1x i . i 1
ﯾﻣﻛن ﺣﺳﺎب b1ﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ واﻟﻣﻧﺎﺳﺑﺔ ﻻﺳﺗﺧدام اﻵﻟﺔ اﻟﺣﺎﺳﺑﺔ :
١٧٠
SXY SXX
b1
ﺣﯾث : 2
xi
SXX x i2
, 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 yi 240.
x i 10.8 ,
x 1.35
n 8
y 30, x i yi x y i i SXY n b1 SXX (x i ) 2 x i2 n ١٧١
,
x i yi 385.5
(10.8)(240) 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. 385.5
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات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]
wx_ :
kx ax
lx_, y_ : kx y
kx k y ax
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
3.5
4
Graphics w2=Plot[b0+b1*x,{x,0,4}] 70 60 50 40 30 20 10 1
2
3
4
Graphics Show[w,w2] 60 50 40 30 20 10
0.5
1
1.5
2
2.5
3
3.5
Graphics ١٧٣
4
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ y .اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔxاﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت xﻣن اﻻﻣر ]xb=w[x و yﻣن اﻻﻣر ]yb=w[y اﻟﺗﻘدﯾر b1ﻣن اﻻﻣر
sxy sxx واﻟﺗﻘدﯾر b0ﻣن اﻻﻣر 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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506 ]dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct ]} {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{0.2 5,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.274,0.5 12},{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] {BestFit1.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.25
0.26
0.27
0.28
0.29
Graphics : ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : ﯾﺳﺗﺧدام اﻻﻣر Regress[dpoints,{1,x},x,RegressionReport->BestFit] : ﻟﻠﺣﺻول ﻋﻠﻰ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة واﻟﻣﺧرج ھو .{BestFit1.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 n2
١٧٦
ﻣ ن اﻟﻧﺗ ﺎﺋﺞ اﻟﺳ ﺎﺑﻘﺔ ﯾﻣﻛ ن اﺷ ﺗﻘﺎق ﺟ دول ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾن ، ANALYSIS OF VARIANCE ﻟﻼﺧﺗﺻﺎر ﺟدول ، ANOVAواﻟﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ : ﻣﺗوﺳط ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت
SSR 1 SSE MSE n2 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
اﻟﺣــل: n 12 x i 55 x i y i 14060 yi 2613 , x 4.58333 , y 217.75, x i2 299 , yi2 661865 ، ١٧٧
4 197
x y
x i y i n (55)(2613) 14060 2083.75, 12 2 2 (x i ) SXX x i n SXY x i y i
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.
: ﻧﺣﺻل ﻋﻠﻰSSTO ﻣنSSR وﺑطرح ١٧٨
SSE = SSTO – SSR = 92884.25 – 92547.362 = 336.888, SSR 92547.362 MSR 92547.362. 1 1 SSE 336.888 MSE 33.6888. n2 10 ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ.
ﻣﺗوﺳط ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت 92547.362 92547.362 336.888 33.6888 92884.25
درﺟﺎت اﻟﺣرﯾﺔ 1 10 11
ﻣﺻدر اﻻﺧﺗﻼف اﻻﻧﺣدار اﻟﺧطﺄ اﻟﻛﻠﻲ
MSR 92547.362 MSE 33.6888 = 2747.126. f 0.05 (1,10) 4.96واﻟﻣﺳ ﺗﺧرﺟﺔ ﻣ ن ﺟ دول ﺗوزﯾ ﻊ Fﻓ ﻲ ﻣﻠﺣ ق ) (٤ﺑ درﺟﺎت ﺣرﯾ ﺔ . 1 1, 2 10ﻣﻧطﻘﺔ اﻟرﻓض . F 4.96وﺑﻣﺎ ن fﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟرﻓض ﻧرﻓض .H0 f
) (٨-٤ﺗﻘدﯾر
2
Estimating
2
اﻟﺗﻘ دﯾر ﻟﻠﻣﻌﻠﻣ ﺔ ﯾﻌﺗﻣ د ﻋﻠ ﻰ اﻟﻧﻣ وذج ،أي ﯾﻛ ون داﻟ ﺔ ﻓ ﻲ ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻷﺧط ﺎء ، SSE وﯾﺣﺳب ﻣن اﻟﻣﻌﺎدﻟﺔ اﻵﺗﯾﺔ : SSE s2 MSE, n2 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
5
Graphics Show[g,d] 400 350 300 250 200 150 100 50 2
4
6
8
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 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,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]
source regression residual total
anova df 1 10 11
SS 92547.4 336.881 92884.3
MS 92547.4 33.6881
<<Statistics`ContinuousDistributions` f=Quantile[FRatioDistribution[1,10],1-] 4.9646 If[f1f,Print["reject H0"],Print["Accept H0"]] reject H0
s
mse
5.80415
r
ssr ssto
0.996373 ١٨٢
F 2747.18
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻋدد اﻟﻣﺗﻐﯾرات ﻣن اﻻﻣر p=1 ﻣﺳﺗوى اﻟﻣﻌﻧوﯾﺔ ﻣن اﻻﻣر =.05 ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ y1 .اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔx1اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﺟدول ﺗﺣﻠﯾل اﻻﻧﺣدار ﻣن اﻻﻣر ]tf=TableForm[{rt1,rt2,rt3,rt4},th
fاﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣر f1=msr/mse
fاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر ]f=Quantile[FRatioDistribution[1,10],1-
واﻟﻘرار اﻟذى ﯾﺗﺧذ ﻣن اﻻﻣر ]]"If[f1f,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
1 Confidence interval for
(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 n 2
xy
x n
2
SXY = SXX
x
58.3 57 11 2
b1
299.1
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
yˆ -y
ˆy
- 3.03896 - 2.61039 - 1.32468
9.23528 6.81413 1.75476 21.8587 5.40412 8.76775 1.75476 2.80671 2.80671 1.55439 2.59335
4.67532 - 2.32468 2.96104 - 1.32468 1.67532 1.67532 1.24675 - 1.61039
65.3506
2.66454× 10-15
y
3 3 4 10 2 9 3 7 6 6 4
6.03896 5.61039 5.32468 5.32468 4.32468 6.03896 4.32468 5.32468 4.32468 4.75325 5.61039
57
57
اﻵن : 2
yi yˆ i 65.3506 s 7.26118 . n2 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 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 . 1.42857 2.262
)(٢-١٠-٤اﺧﺗﺑﺎرات ﻓروض ﺗﺧص اﻟﻣﯾل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 وﺑﻣﺎ أن ﻗﯾﻣﺔ tاﻟﻣﺣﺳوﺑﺔ ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل . H 0
0 . 768259
اﻟﻔ رض اﻟﺳ ﺎﺑق ﯾ رﺗﺑط ﺑﻣﻌﻧوﯾ ﺔ اﻻﻧﺣ دار ﻓﻌﻧ د ﻗﺑ ول ﻓ رض اﻟﻌ دم H 0 : 1 0ﻓﮭ ذا ﯾﻌﻧ ﻲ ﻋ دم وﺟ ود ﻋﻼﻗ ﺔ ﺧطﯾ ﺔ ﺑ ﯾن . x , Yوﯾﺟ ب أن ﻧﻌﻠ م أن ھ ذا ﯾﻌﻧ ﻲ إﻣ ﺎ أن xﻟﮭ ﺎ ﻗﯾﻣ ﺔ ﺻ ﻐﯾرة ﻓ ﻲ ﺗﻔﺳﯾر اﻻﺧﺗﻼف ﻓ ﻲ yوأن أﻓﺿ ل ﺗﻘ دﯾر ﻟ ـ yﻋﻧ د أي ﻗﯾﻣ ﺔ ﻟ ـ xھ و yˆ yﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓﻲ ﺷﻛل ) a (٨-٤أو أن اﻟﻌﻼﻗﺔ اﻟﺣﻘﯾﻘﯾﺔ ﺑﯾن x , Yﻟﯾﺳت ﺧطﯾ ﺔ ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )– ٤ . b (٨أو ﻛﺑ دﯾل وﻋﻧ دﻣﺎ ﻧ رﻓض ﻓ رض اﻟﻌ دم ، H0 : 1 0ﻓ ﺈن ھ ذا ﯾﻌﻧ ﻲ أن xﻟﮭ ﺎ ﻗﯾﻣ ﺔ ﻓ ﻲ ﺗﻔﺳ ﯾر اﻻﺧ ﺗﻼف ﻓ ﻲ . yإن رﻓ ض H 0 : 1 0ﻗ د ﯾﻌﻧ ﻲ أﻣ ﺎ أن ﻧﻣ وذج اﻟﺧ ط اﻟﻣﺳ ﺗﻘﯾم ھ و اﻷﻧﺳ ب ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل ) a (٩-٤أو أن ﻧﺗ ﺎﺋﺞ أﻓﺿ ل ﯾﻣﻛ ن اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ ﺑﺈﺿ ﺎﻓﺔ ﺣدود ﻣن رﺗﺑﺔ ﻋﻠﯾﺎ ﻣن ﻛﺛﯾرات اﻟﺣدود ﻓﻲ xﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ ﺷﻛل ). b (٩ -٤
ﺷﻛل )(٨-٤
ﺷﻛل )(٩- ٤
١٨٨
Confidence interval for 0
0
) (٣-١٠-٤ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ
(1 )100%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ 0ﺗﺄﺧذ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ : 1 1 x2 x2 0 b0 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 b 0 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
1 5.32 0 12.7532 2.262 7.26118 11 2.1
أي أن : 12.7532 2.2629.88873 0 12.7532 2.2629.88873 .
واﻟﺗﻲ ﺗﺧﺗزل إﻟﻰ : ) (٤-١٠-٤اﺧﺗﺑﺎرات ﻓروض
9 .61663 0 35 .1231 . ﺗﺧص 0 testing for
Hypothesis
0
ﻻﺧﺗﺑ ﺎر ﻓ رض اﻟﻌ دم * 0 : 0 0ﺿ د أي ﻓ رض ﺑ دﯾل ﻣﻧﺎﺳ ب ﻓﺈﻧﻧ ﺎ ﻣ رة أﺧ ري ﺳ وف ﻧﺳﺗﺧدم ﺗوزﯾﻊ tﺑ درﺟﺎت ﺣرﯾ ﺔ n 2ﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﻣﻧطﻘ ﺔ اﻟ رﻓض وﺑﺎﻟﺗ ﺎﻟﻲ ﻓ ﺈن ﻗرارﻧ ﺎ ﺳ وف ﯾﻌﺗﻣد ﻋﻠﻰ اﻟﻘﯾﻣﺔ : * b00 t . 2 1 x s2 n SXX اﻟطرﯾﻘﺔ اﻟﻣﺗﺑﻌﺔ ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ﻣوﺿﺣﺔ ﺑﺎﺳﺗﺧدام ﺑﯾﺎﻧﺎت اﻟﻣﺛ ﺎل ) (٧ – ٤ﻋﻧ د ﻣﺳ ﺗوى ﻣﻌﻧ وي 0.05ﺣﯾث ﻓرض اﻟﻌدم: 0 : 0 0 ﺿد اﻟﻔرض اﻟﺑدﯾل 1 : 0 0 . ١٨٩
b0 0.0
t
1 x2 s2 n SXX 12.7532 12.7532 1.28967016 . 1 5.32 9.88873 11 2.1
t .025 (9) 2.262وﻣﻧطﻘﺔ اﻟ رﻓض T 2.262أو . T 2.262وﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ tاﻟﻣﺣﺳ وﺑﺔ ﺗﻘﻊ ﻓﻲ ﻣﻧطﻘﺔ اﻟﻘﺑول ﻧﻘﺑل . H 0
ﻣﺛﺎل )(٨-٤ اﻟﻣطﻠ وب ﻋﻣ ل ﺑرﻧ ﺎﻣﺞ ﻻﯾﺟ ﺎد 95%ﻓﺗ رة ﺛﻘ ﺔ ﻟﻠﻣﻌﻠﻣ ﺔ 1 , 0ﻓ ﻲ ﻣﻌﺎدﻟ ﺔ اﻻﻧﺣ دار y|x 0 1xﺑﺎﻻﻋﺗﻣﺎد ﻋﻠﻰ اﻟﺑﯾﺎﻧﺎت ﻓﻲ ﻣﺛﺎل ) (٥-٤وأﺧﺗﺑر ﻓ رض اﻟﻌ دم 0 : 1 0ﺿ د اﻟﻔرض اﻟﺑدﯾل . 1 : 1 0 ﺛم أﺧﺗﺑر ﻓرض اﻟﻌدم 0 : 0 0ﺿد اﻟﻔرض اﻟﺑدﯾل
. 1 : 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 QuantileStudentTDistributionn 2, 1 2.26216
mse z sxx 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 Abstt1 t1, Print"Reject H0", Print"Accept H0 " Accept H0 tt0=b0/z1 1.28967
a2 If Abstt0 t1, Print"Reject H0", Print"Accept H0 " ١٩١
2
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 Abstt1 t1, Print"Reject H0", Print"Accept H0 " واﻟﻣﺧرج Accept H0 اى ﻗﺒﻮل ﻓﺮض اﻟﻌﺪم .
ﺣﯾث ﻗﯾﻣﺔ tﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر t1 QuantileStudentTDistributionn 2, 1 2
ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم 0 : 0 0 : ﺿد اﻟﻔرض اﻟﺑدﯾل : 1 : 0 0 . ﯾﺳﺗﺧدم اﻻﻣر اﻟﺗﺎﻟﻰ
a2 If Abstt0 t1, Print"Reject H0", Print"Accept H0 " واﻟﻣﺧرج ١٩٢
Accept H0 اى ﻗﺒﻮل ﻓﺮض اﻟﻌﺪم .
) (١١ -٤اﻟﺗﻧﺑـؤ
Prediction
ﯾﻣﻛن اﺳﺗﺧدام اﻟﻣﻌﺎدﻟﺔ yˆ x b0 b1xﻟﻠﺗﻧﺑﺄ ﺑﻘﯾﻣﺔ ' ، Y|xﺣﯾ ث xﻟ ﯾس ﻣ ن اﻟﺿ رورى أن ﺗﻛ ون واﺣ دة ﻣ ن x1, x 2 ,..., x nﻓ ﻲ اﻟﻌﯾﻧ ﺔ اﻟﻌﺷ واﺋﯾﺔ ﻣ ن اﻟﺣﺟ م nﻟﻠﻣﺷ ﺎھدات ) . (x1 , y1 ),(x 2 , y 2 ),...,(x n , y nأﯾﺿﺎ ﯾﻣﻛن اﺳﺗﺧدام اﻟﻣﻌﺎدﻟﺔ yˆ x b0 b1xﻟﻠﺗﻧﺑ ﺄ ﺑﻘﯾﻣ ﺔ واﺣدة y x ﻟﻠﻣﺗﻐﯾ ر . Y | x ﺳ وف ﻧﺗوﻗ ﻊ أن ﺧط ﺄ اﻟﺗﻧﺑ ﺄ ﺳ وف ﯾﻛ ون أﻋﻠ ﻰ ﻓ ﻲ ﺣﺎﻟ ﺔ ﻗﯾﻣ ﺔ واﺣ دة ﻣﺗﻧﺑ ﺄ ﺑﮭ ﺎ ﻋﻧ ﮫ ﻓ ﻲ ﺣﺎﻟ ﺔ اﻟﺗﻧﺑ ﺄ ﺑﺎﻟﻣﺗوﺳ ط وھ ذا ﺳ وف ﯾ ؤﺛر ﻋﻠ ﻰ ط ول ﻓﺗ رة اﻟﺛﻘ ﺔ ﻟﻠﻣﻌ ﺎﻟم اﻟﻣ راد ﺗﻘدﯾرھﺎ. ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (1 )100%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ' Y|xﻣن اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ :
1 (x ' x) 2 1 (x ' x)2 yˆ t / 2 s 2 ( ) Y|x ' yˆ t / 2 s 2 ( ). n SXX n SXX اﯾﺿﺎ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ (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 46.91667 12
1 (4 4.58333) 2 191.84 2.228 33.6888 1 46.91667 12 أي أن : )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 QuantileStudentTDistributionn 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 mse1 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
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ
Y|4ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرج ﻟﻛل اﻣر ll=yy-e1 187.95 u=yy+e1 195.734
95%ﻓﺗرة ﺛﻘﺔ ﻟﻘﯾﻣﺔ y 4ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرﯾﯾن اﻟﺗﺎﻟﯾﯾن ﻣﻊ اﻟﻣﺧرج ﻟﻛل اﻣر l2=yy-e2 178.336 u2=yy+e2 205.347
ﻣﺛﺎل )(١٢-٤ ﺑﺎﻻﻋﺗﻣ ﺎد ﻋﻠ ﻰ اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ ﻣﺛ ﺎل ) (٢-٤أﺧﺗﺑ ر ﻓ رض اﻟﻌ دم 0 : 1 0ﺿ د اﻟﻔ رض اﻟﺑ دﯾل 1 : 1 0 ﺛم أﺧﺗﺑر ﻓرض اﻟﻌدم 0 : 0 0ﺿد اﻟﻔرض اﻟﺑدﯾل . 1 : 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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct] }] {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{0.2 5,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.274,0.5 12},{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]
ParameterTable 1
x
Estimate 1.07813 2.2171
SE 0.25596 0.979963
TStat 4.21211 2.26243
PValue 0.00120568,RSquared0.299008, 0.0430218
AdjustedRSquared0.240592, EstimatedVariance0.00236213,ANOVATable
Model Error Total
١٩٧
DF 1 12 13
SumOfSq 0.0120908 0.0283456 0.0404364
MeanSq 0.0120908 0.00236213
FRatio 5.11859
PValue 0.0430218
Regressdpoints, 1, x, x, RegressionReport ParameterTable, BasisNames b0, b1 PValue 0.00120568 0.0430218
TStat 4.21211 2.26243
SE 0.25596 0.979963
Estimate 1.07813 2.2171
ParameterTable b0
b1
ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : وﺑﺈﺳﺗﺧدام اﻻﻣر
]Regress[dpoints,{1,x},x
ﯾﺗم اﻟﺣﺻول ﻋﻠﻰ ﺟدوﻟﯾن :اﻟﺟدول اﻻول ﯾﺣﺗوى ﻋﻠ ﻰ اﻟﺗﻘ دﯾرﯾن b 0 1.07813, b1 2.2171 ﺗﺣت اﻟﻌﻧوان Estimateوﺗﺣت اﻟﻌﻧوان SEاﻟﺧطﺎ اﻟﻣﻌﯾﺎرى ﻟـ 0
s2 ( ) SXX
1 x2 وﯾﺳﺎوى . 0.25596اﻟﺧطﺎ اﻟﻣﻌﯾﺎرى ﻟـ ) 1 n SXX وﯾﺳﺎوى .0.979963اﯾﺿﺎ ﻗﯾم tاﻟﻣﺣﺳوﺑﺔ ﺗﺣت اﻟﻌﻧوان . TStatﻗﯾم pﺗﺣت اﻟﻌﻧوان .PVlue ﻛﻣﺎ ﯾوﺟد ﻓﻰ اﻟﺟدول ﻣﻌﺎﻣل اﻟﺗﺣدﯾد و اﯾﺿﺎ ﯾوﺟد ﻣﺎ ﯾﺳﻣﻰ ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﻌدل أﻣﺎ اﻟﺟدول اﻟﺛﺎﻧﻰ ﻓﯾﺣﺗوى ﻋﻠﻰ ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن . وﻣن اﻻﻣر Regressdpoints, 1, x, x, RegressionReport ParameterTable, BasisNames b0, b1 ﻧﺣﺻل ﻋﻠﻰ ﻣﻛوﻧﺎت اﻟﺟدول اﻻول وﻟﻛن ﺑﺷﻛل اﺧر ( s2
ﻣﺛﺎل )(١٣-٤ ﻟﻠﻤﺜﺎل ) (٢-٤أوﺟد 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ 1 , 0ﻓﻲ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار Y|x 0 1x ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ Mathematicaوذﻟك ﺑﺗﺣﻣﯾل اﻟﺣزﻣﺔ اﻟﺟﺎھزة `Statistics`LinearRegression
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ١٩٨
<<Statistics`LinearRegression` oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct] }] {{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{0.2 5,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.274,0.5 12},{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]
: ﺣﯾث أﺿﯾف اﻟﺧﯾﺎر ﻓﺗرة ﺛﻘ ﺔ ﻟﻛ ل ﻣ ن99% وذﻟك ﻟﻠﺣﺻول ﻋﻠﻰ ﺟدول ﯾﺣﺗوىConfidenceLevel->0.90] .CI ﺗﺣت اﻟﻌﻧوان1 , 0 . ﻛﻣﺎ ﯾﺗﺿﺢ ﻣن ﻣﺧرﺟﺎت اﻻﻣر
(١٤-٤)ﻣﺛﺎل ( وذﻟ ك ﻓ ﻲ ﻟﻌﺑ ﺔ ﻛ رةy) ( وﻧﺳ ﺑﺔ اﻟﻔ وز ﻟﻔرﯾ ق ﻣ ﺎx) ﯾﻌطﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻣﺗوﺳ ط ﺿ رﺑﺎت اﻟﺧﺻ م :اﻟﺳﻠﺔ واﻟﻣطﻠوب
. )أ( رﺳم ﺷﻛل اﻻﻧﺗﺷﺎر ﻣﻊ ﺧط اﻻﻧﺣدار اﻟﻣﻘدر ١٩٩
)ب( إﯾﺟﺎد 95%ﻓﺗرة ﺛﻘﺔ ل Y xﻟﻌدة ﻗﯾم ﻣن xووﺿﺣﮭﺎ ﺑﯾﺎﻧﯾﺎ . xy
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 1.81976
x2
y
x
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
.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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct ]}]
{{0.24,0.625},{0.254,0.512},{0.249,0.488},{0.245,0.524},{0.2 5,0.588},{0.252,0.475},{0.254,0.513},{0.27,0.463},{0.274,0.5 12},{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.40 5,0.45,0.48,0.456,0.506},{0.546028,0.514989,0.526074,0.53494 3,0.523857,0.519423,0.514989,0.479515,0.470647,0.492818,0.45 ٢٠٣
7344,0.488383,0.483949,0.444042},{0.0242175,0.0146246,0.0174 281,0.0202533,0.0167906,0.0156224,0.0146246,0.0157797,0.0182 922,0.0133495,0.0228174,0.0139328,0.0147553,0.0278533},{{0.4 93263,0.598793},{0.483124,0.546853},{0.488102,0.564047},{0.4 90814,0.579071},{0.487273,0.560441},{0.485385,0.553461},{0.4 83124,0.546853},{0.445134,0.513896},{0.430791,0.510502},{0.4 63732,0.521904},{0.407629,0.507059},{0.458027,0.51874},{0.45 18,0.516098},{0.383354,0.504729}}} 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.514989},{0 .27,0.479515},{0.274,0.470647},{0.264,0.492818},{0.28,0.4573 44},{0.266,0.488383},{0.268,0.483949},{0.286,0.444042}} 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.483124},{0 .27,0.445134},{0.274,0.430791},{0.264,0.463732},{0.28,0.4076 29},{0.266,0.458027},{0.268,0.4518},{0.286,0.383354}} 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.546853},{0 .27,0.513896},{0.274,0.510502},{0.264,0.521904},{0.28,0.5070 59},{0.266,0.51874},{0.268,0.516098},{0.286,0.504729}} <<Graphics`MultipleListPlot` MultipleListPlot[dpoints,predpts,lowerCI,upperCI,SymbolShap
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,SymbolShap 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
n2
MSE
ھﻧﺎك ﺻﯾﻐﺔ اﺧرى ﻟﻠﺑواﻗﻲ وھﻲ ﺑواﻗﻲ ﺳﺗﯾودﻧت واﻟﺗﻲ ﺗﻌرف ﻛﺎﻟﺗﺎﻟﻲ :
٢٠٦
.
ei
ri
1 (x i x ) 2 MSE 1 ( ) n SXX i 1,2, , n .
وﺗﻌﺗﺑ ر ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت ﻣﻔﯾ دة ﻓ ﻲ ﺗﺷ ﺧﯾص اﻻﻧﺣراﻓ ﺎت ﻋ ن ﻧﻣ وذج اﻻﻧﺣ دار ٠ﻏﺎﻟﺑ ﺎ ، ﻓﻲ اﻟﺑﯾﺎﻧﺎت ذات اﻟﺣﺟم اﻟﺻﻐﯾر ﻓﺎن ﺑواﻗﻲ ﺳﺗﯾودﻧت ﺗﻛون اﻛﺛر ﻛﻔﺎءة ﻣن اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ٠ﻋﻧدﻣﺎ ﺗﻛون nﻛﺑﯾرة ﺳوف ﯾﻛون ھﻧﺎك اﺧﺗﻼف ﺻﻐﯾر ﺑﯾن اﻟطرﯾﻘﺗﯾن٠ ﻣﺛﺎل )(١٥-٤
ﻓ ﻲ ﻋﻣﻠﯾ ﺔ ﺻ ﻧﺎﻋﯾﺔ اﺟرﯾ ت ﺗﺟرﺑ ﺔ ﻟدراﺳ ﺔ اﻟﻌﻼﻗ ﺔ ﺑ ﯾن ﻣﺗﻐﯾ رﯾن x,Yواﻟﺑﯾﺎﻧ ﺎت ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ : xy
15000. 17500 22500 31500 28500 64000 56000 100000 107500 132000 117000 210000 244000 268000
x2 10000. 15625 15625 22500 22500 40000 40000 62500 62500 90000 90000 122500 160000 160000 ٢٠٧
y
x
150. 140 180 210 190 320 280 400 430 440 390 600 610 670
100. 125 125 150 150 200 200 250 250 300 300 350 400 400
و اﻟﻣطﻠوب : ﺣﺳﺎب اﻟﺑواﻗﻲ و اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻲ ﺳﺗﯾودﻧت . اﻟﺣــل: x 3300 n 14 ,x 235.714 , 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
500
400
300 ٢٠٨
200
100
ﺷﻜﻞ )(١٢-٤ ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﺑواﻗﻲ eiواﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ d iوﺑواﻗﻲ ﺳﺗﯾودﻧت . ri ri
di
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
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
ei 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
yˆ i
yi
xi
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
100. 125 125 150 150 200 200 250 250 300 300 350 400 400
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ 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,32 0},{200,280},{250,400},{250,430},{300,440},{300,390},{350,60 0},{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
400
500
600
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) {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 mse1 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.,168. ٢١١
377,-28.3771,-0.772198,0.843355},{125,180,168.377,11.6229,0.316281,0.345426},{150,2 10,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},{200,2 80,296.735,-16.7346,-0.45538,0.474977},{250,400,382.306,17.6938,0.481484,0.500064},{250,4 30,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,610, 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
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
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
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 ٢١٢
100 125. 125 150 150 200 200 250 250 300 300 350 400 400
اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
mse
di e
واﻟﻣﺧرج ھو
{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 mse1 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
ﺳ وف ﻧﺗﻧ ﺎول ﻓ ﻲ اﻷﺟ زاء اﻟﺗﺎﻟﯾ ﮫ ﺑﻌ ض اﻟط رق اﻟﺑﯾﺎﻧﯾ ﮫ واﻟﺗﺣﻠﯾﻠﯾ ﮫ ﻻﻛﺗﺷ ﺎف وﺗﺻ ﺣﯾﺢ اﻻﻧﺣراﻓﺎت ﻋن ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ ) (١-٤وذﻟك ﺑﺈﺳﺗﺧدام اﻟﺑواﻗﻲ. ) (١-١٢-٤رﺳوم اﻟﺑواﻗﻰ ﺳ وف ﻧﺗﻧ ﺎول ﻓ ﻲ ھ ذا اﻟﺟ زء ﺑﻌ ض اﻻﻧ واع ﻣ ن رﺳ وم اﻟﺑ واﻗﻲ )أو رﺳ وم اﻟﺑ واﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ أو رﺳوم ﺳ ﺗﯾودﻧت( واﻟﺗ ﻲ ﺗﺳ ﺗﺧدم ﻓ ﻲ اﻟﻛﺷ ف ﻋ ن اﻻﻧﺣراﻓ ﺎت ﻋ ن ﻧﻣ وذج اﻻﻧﺣدار ) .(١-٤ﻛﺛﯾر ﻣ ن ﺑ راﻣﺞ اﻟﺣﺎﺳ ب اﻵﻟ ﻲ اﻟﺟ ﺎھزه واﻟﺗ ﻰ ﺗﺧص اﻻﻧﺣ دار ﺗﻧ ﺗﺞ ﺗﻠك اﻟرﺳوم ﺣﺳب اﻟطﻠب وﻓﻲ ھذه اﻟﺣﺎﻟﺔ ﻧﺣﺗﺎج إﻟﻰ ﺟﮭد ﻗﻠﯾ ل ﻓ ﻲ ﺗﺷ ﺧﯾص اﻻﻧﺣ راف ﻋن اﻟﻧﻣوذج. ا -رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل اﻟﻘﯾم اﻟﺗﻘدﯾرﯾﮫ: ٢١٣
ان رﺳم اﻟﺑواﻗﻲ ) eiأو اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﮫ أو ﺑ واﻗﻰ ﺳ ﯾﺗودﻧت( ﻣﻘﺎﺑ ل اﻟﻘ ﯾم اﻟﻣﻘ دره yˆ iﯾﻔﺳ ر ﻟﻧ ﺎ ﺑﺻ ورة ﻋﺎﻣ ﺔ ﻣ ﺎ إذا ﻛﺎﻧ ت ﻓ روض اﻟﺗﺣﻠﯾ ل ﻣﺗ وﻓرة أو ﻻ .إذا ﻛ ﺎن اﻟﻧﻣوذج اﻟﻣﻘدر ﻣﻼﺋﻣﺎ ﻓﺈن ﺷﻛل إﻧﺗﺷﺎر اﻟﺑواﻗﻲ ﯾﺄﺧذ اﻟﺷﻛل اﻟﻣوﺿﺢ ﻓ ﻲ ﺷ ﻛل )(١٣-٤ واﻟﺧ ﺎص ﺑﺎﻟﻣﺛ ﺎل ) (١٥-٤ﺣﯾ ث اﻟﻧﻘ ﺎط ﺗﻧﺗﺷ ر ﻋﺷ واﺋﯾﺎ ً ﺣ ول اﻟﺻ ﻔر داﺧ ل ﺣ زام اﻓﻘ ﻰ وﻻ ﺗوﺟ د ﻧﺗ وءات أو اﺗﺟ ﺎه ﻣﻌ ﯾن ﻛ ﺎن ﺗﺻ ﺎﻋدﯾﺎ أو ﺗﻧﺎزﻟﯾ ﺎ .ﻧﻔ س اﻟﺷ ﺊ ﻋﻧ د اﺳ ﺗﺧدام اﻟﺑ واﻗﻰ اﻟﻣﻌﯾﺎرﯾ ﺔ أو ﺑ واﻗﻰ ﺳ ﺗﯾودﻧت ﻛﻣ ﺎ ھ و ﻣوﺿ ﺢ ﻓ ﻲ ﺷ ﻛل )(١٥-٤) ، (١٤-٤ )واﻟﺧﺎص ﺑﺎﻟﻣﺛﺎل ) ((١٥-٤ﻋﻠﻲ اﻟﺗواﻟﻰ.
ﺷﻛل )(١٣-٤
ﺷﻛل )(١٤-٤
٢١٤
ﺷﻛل )(١٥-٤ إذا ﻛﺎﻧ ت اﻟﻧﻘ ﺎط ﻓ ﻲ رﺳ م اﻟﺑ واﻗﻰ ﺗﺗ وزع ﻋﻠ ﻲ ﺷ ﻛل ﻣﻧﺣﻧ ﻰ ﻛﻣ ﺎ ﯾﺗﺿ ﺢ ﻣ ن ﺷ ﻛل ) (١٦-٤ﻓﮭ ذا ﯾ دل ﻋﻠ ﻲ ﻋ دم اﻟﺧطﯾ ﮫ .وھ ذا ﯾﻌﻧ ﻰ اﻟﺣﺎﺟ ﮫ اﻟ ﻰ إﺿ ﺎﻓﺔ ﻣﺗﻐﯾ رات ﻣﺳ ﺗﻘﻠﮫ أﺧرى ﻓﻲ اﻟﻧﻣوذج .ﻋﻠ ﻲ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ﺣ د اﻟﺗرﺑﯾ ﻊ ﻗ د ﯾﻛ ون ﺿ رورﯾﺎ ً .اﻟﺗﺣ وﯾﻼت ﻋﻠ ﻲ اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل و )أو( اﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﻗد ﺗﻛون ﻣطﻠوﺑﮫ. e 60 40 20
300
250
200
150
100
50 -20 -40 -60
ﺷﻛل ) ( ١٦ – ٤ اﻟﺣﺎﻟ ﮫ اﻟﺗ ﻰ ﯾﻛ ون ﻓﯾﮭ ﺎ ﻓ رض اﻟﺗﺑ ﺎﯾن ﻏﯾ ر ﻣﺗﺣﻘ ق ﻣوﺿ ﺣﮫ ﻓ ﻲ ﺷ ﻛل )(١٧-٤ ﺣﯾ ث ﯾ زداد اﻻﻧﺗﺷ ﺎر اﻟرأﺳ ﻰ ﻟﻠﺑ واﻗﻰ ﻣ ﻊ زﯾ ﺎدة yˆ iوﺗﺳ ﻣﻰ ھ ذه اﻟﺣﺎﻟ ﺔ اﻟﺷ ﻛل اﻟﻘﻣﻌ ﻲ اﻟﻣﻔﺗوح ﻣن اﻷﻣﺎم .وھذا ﯾﻌﻧﻰ أن ﺗوزﯾﻌﺎت Yiﻟﮭﺎ ﺗﺑ ﺎﯾن ﯾ زداد ﻣ ﻊ زﯾ ﺎدة . Y xiأﻣ ﺎ ﻓﻲ ﺷﻛل ) (١٨-٤ﻓﻧﺟد اﻻﻧﺗﺷ ﺎر اﻟرأﺳ ﻲ ﻟﻠﺑ واﻗﻰ ﯾﻘ ل ﻣ ﻊ زﯾ ﺎدة yˆ iوﺗﺳ ﻣﻰ ھ ذه اﻟﺣﺎﻟ ﮫ اﻟﺷﻛل اﻟﻘﻣﻌﻲ اﻟﻣﻔﺗوح ﻣن اﻟﺧﻠف .وھذا ﯾﻌﻧﻰ أن ﺗوزﯾﻌ ﺎت Yiﻟﮭ ﺎ ﺗﺑ ﺎﯾن ﯾﻘ ل ﻣ ﻊ زﯾ ﺎدة . Y xiواﺧﯾ را ﺷ ﻛل ) (١٩-٤واﻟ ذى ﯾوﺿ ﺢ ﻛ ﻼ اﻟﺷ ﻛﻠﯾن اﻟﺳ ﺎﺑﻘﯾن اى ﺷ ﻛل اﻟﻘ وس اﻟﻣ زدوج وھ ذا ﯾﺣ دث ﻋﻧ دﻣﺎ ﺗﻛ ون ﻗ ﯾم y iﻧﺳ ب ﺗﻘ ﻊ ﺑ ﯾن 1 , 0ﺣﯾ ث ﺗﺑ ﺎﯾن ﻧﺳ ﺑﺔ ذى
٢١٥
اﻟﺣ دﯾن اﻟﻘرﯾﺑ ﮫ ﻣ ن 0.5ﯾﻛ ون اﻛﺑ ر ﻣ ن اﺧ رى ﻗرﯾﺑ ﮫ ﻣ ن اﻟﺻ ﻔر او اﻟواﺣ د اﻟﺻﺣﯾﺢ.ﻋﻣوﻣﺎ َ ﺑﻔﺿل اﺳﺗﺧدام اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ أو ﺑواﻗﻰ ﺳﯾﺗودﻧت ﻓﻲ رﺳم اﻟﺑواﻗﻰ. e 20 15 10 5 100
95
90
80
85
75 -5 -10 -15
ﺷﻛل )(١٧-٤ e
ﺷﻛل )(١٨-٤
٢١٦
ﺷﻛل )( ١٩-٤ اﯾﺿﺎ رﺳم اﻟﺑواﻗﻰ eiﻣﻘﺎﺑل yˆ iﻗد ﯾﻛﺷف ﻟﻧ ﺎ ﻋ ن اﻟﻣﺷ ﺎھدات اﻟﺷ ﺎذه )اﻟﺧ وارج( واﻟﺗ ﻰ ﺗﻣﺛل ﻣﺟﻣوﻋﺔ ﻗﻠﯾﻠﮫ ﻣن اﻟﻣﺷﺎھدات ﻓﻲ اﻟﻌﯾﻧﮫ .أن وﺟود ﺑﯾﺎﻧﺎت ﺷﺎذه ﻓ ﻲ اﻟﻌﯾﻧ ﺔ ﻗ د ﯾ ؤدى اﻟﻰ اﻟﺗوﺻل اﻟﻰ ﻧﺗﺎﺋﺞ ﺧﺎطﺋﺔ .إذا ﺑدأ ﻟﻧﺎ ﻣن ﺷﻛل اﻻﻧﺗﺷﺎر أن ھﻧ ﺎك ﻧﻘط ﺔ أو ﻋ دة ﻧﻘ ﺎط ﺗﺑﻌد ﺑﺻورة واﺿﺣﺔ ﻋن ﺑﻘﯾﺔ اﻟﻘﯾم ﻓﺈن ھذه اﻟﻧﻘطﺔ أو اﻟﻧﻘﺎط ﺗﻣﺛ ل ﺑﯾﺎﻧ ﺎت ﺷ ﺎذة ﯾﺳ ﺗدﻋﻰ دراﺳﺗﮭﺎ. أﯾﺿ ﺎ رﺳ وم اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ أو ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت ﺗﻛ ون ﻣﻔﯾ ده ﻓ ﻲ اﻛﺗﺷ ﺎف اﻻﻧﺣ راف ﻋ ن اﻻﻋﺗ دال .ﻋﻧ دﻣﺎ ﯾﻛ ون ﺗوزﯾ ﻊ اﻷﺧط ﺎء طﺑﯾﻌ ﻲ ﻓ ﺈن ﺗﻘرﯾﺑ ﺎ 68%ﻣ ن اﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ ﺳوف ﺗﻘﻊ ﺑﯾن -1, +1وﺗﻘرﯾﺑﺎ 95%ﻣﻧﮭم ﯾﻘﻊ ﺑ ﯾن -2,+2وﻣ ﺎ ﯾزﯾ د أو ﯾﻘل ﻋن ذﻟك ﯾﻌﺗﺑر أﺧطﺎء ﺷﺎذه )اﻟﺧوارج .(outliers ب -رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل ﻣﺗﻐﯾر ﻣﺳﺗﻘل: ﻋﻧ د رﺳ م اﻟﺑ واﻗﻰ eiﻣﻘﺎﺑ ل x iوﻋﻧ دﻣﺎ ﯾﻛ ون اﻟﻧﻣ وذج ﻣﻧﺎﺳ ﺑﺎ ﻓ ﺈن اﻟﻧﻘ ﺎط ﻋﻠ ﻲ اﻟرﺳ م ﺗﺗﺑﻌﺛ ر ﻋﺷ واﺋﯾﺎ داﺧ ل ﺣ زام اﻓﻘ ﻲ ﺣ ول اﻟﺻ ﻔر دون ان ﺗظﮭ ر اﺗﺟﺎھ ﺎت ﻣﻧﺗظﻣ ﮫ ﻷن ﺗﻛون ﻣوﺟﺑﮫ او ﺳ ﺎﻟﺑﮫ .ان رﺳ م اﻟﺑ واﻗﻰ eiﻣﻘﺎﺑ ل ﻗ ﯾم x iﯾﻛ ﺎﻓﺊ رﺳ م اﻟﺑ واﻗﻰ ei ﻣﻘﺎﺑ ل اﻟﻘ ﯾم اﻟﺗﻘدﯾرﯾ ﺔ yˆ iوذﻟ ك ﻻن اﻟﻘ ﯾم اﻟﺗﻘدﯾرﯾ ﮫ yˆ iﺗﻣﺛ ل دوال ﺧطﯾ ﮫ ﻓ ﻲ اﻟﻘ ﯾم x i ﻟﻠﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل واﻟ ذى ﯾﺗ ﺄﺛر ﻓﻘ ط ھ و ﺗ درﯾﺞ ﻣﺣ ور xوﻟ ﯾس اﻟﻧﺳ ق اﻷﺳﺎﺳ ﻰ ﻟﻠﻧﻘ ﺎط اﻟﻣرﺳوﻣﺔ. ج -رﺳم اﻟﺑواﻗﻰ ﻣﻘﺎﺑل زﻣن: ﺑﻌض اﻟﺗطﺑﯾﻘﺎت ﻓﻲ اﻻﻧﺣدار ﺗﺷﺗﻣل ﻋﻠﻲ ﻣﺗﻐﯾر ﺗﺎﺑﻊ وﻣﺗﻐﯾرات ﻣﺳ ﺗﻘﻠﮫ ﻟﮭ ﺎ طﺑﯾﻌ ﺔ ان ﺗﻛ ون ﻣﺗﺗﺎﺑﻌ ﮫ ﻣ ﻊ اﻟ زﻣن .اﻟﺑﯾﺎﻧ ﺎت ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﮫ ﺗﺳ ﻣﻰ اﻟﺳﻼﺳ ل اﻟزﻣﻧﯾ ﮫ .ﻧﻣ ﺎذج اﻻﻧﺣ دار اﻟﺗ ﻰ ﺗﺳ ﺗﺧدم اﻟﺳﻼﺳ ل اﻟزﻣﻧﯾ ﮫ ﺗﻧﺗﺷ ر ﻓ ﻲ ﻣﺟ ﺎل اﻻﻗﺗﺻ ﺎد .إن ﻓ رض ﻋ دم اﻻرﺗﺑﺎط أو اﻻﺳﺗﻘﻼل ﻟﻼﺧطﺎء ﻟﺑﯾﺎﻧﺎت اﻟﺳﻼﺳل اﻟزﻣﻧﯾ ﮫ ﯾﻛ ون ﻏﺎﻟﺑ ﺎ ﻏﯾ ر ﻣﺗﺣﻘ ق .ﻋ ﺎدة اﻻﺧط ﺎء ﻓ ﻲ اﻟﺳﻼﺳ ل اﻟزﻣﻧﯾ ﮫ ﺗﻛ ون ﻣرﺗﺑط ﺔ ،أي أن E i j 0و . i jﯾﻘ ﺎل ﻟﺣ دود اﻟﺧط ﺄ ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ اﻧﮭ ﺎ ﻣرﺗﺑط ﮫ ذاﺗﯾ ﺎ .ﻓ ﻲ ھ ذه اﻟﺣﺎﻟ ﺔ ﻓ ﺈن رﺳ م اﻟﺑ واﻗﻰ ei ٢١٧
ﻣﻘﺎﺑل اﻟزﻣن ﯾﻛﺷف ﻋن وﺟود اﻻرﺗﺑﺎط اﻟذاﺗﻲ ﻟﻠﺑواﻗﻰ .ﯾﺗﺿﺢ ﻣن ﺷ ﻛل ) (٢٠-٤وﺟ ود ارﺗﺑﺎط ذاﺗﻲ ﻣوﺟب ﺣﯾث ﺗﻛون ھﻧﺎك ﻋدة ﻧﻘﺎط ﻣوﺟﺑﮫ ﺗﻠﯾﮭﺎ ﻋدة ﻧﻘﺎط ﺳﺎﻟﺑﮫ. 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 ,
x i 967
٢١٩
n 16
y i 1379.
,
y 86.1875 ,
x 60.4375
x i y i 81331
,
x i yi SXY n b1 SXX (x i ) 2 x i2 n )(967)(1379 81331 16 (967) 2 60409 16 2012.3125 1.02359 , 1965.9375 b 0 y b1x 86.1875 (1.02359)(60.4375) 148.051 . x i yi
ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل : yˆ 148.051 1.02359 x.
واﻟﻣوﺿﺣﺔ ﺑﯾﺎﻧﯾﺎ ً ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل ). (٢٣ – ٤ y 120 100 80 60 40 20 x 100
80
40
60
20
ﺷﻛل ) (٢٣ -٤ )ب( اﻟﺑواﻗﻲ واﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻲ ﺳﺗﯾودﻧت ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ : ( y i yˆ i ) 2 yˆ i y i yˆ i di ri
٢٢٠
yi
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
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
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
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
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
رﺳم اﻟﺑواﻗﻲ 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,90.7 297,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,78}, {56,80},{76,65},{65,84},{45,116},{58,76},{45,97},{53,100},{4 9,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 mse1 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.78929 }} 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
-5 -10 -15
Graphics pp2=Transpose[{yy,di}]
٢٢٥
110
120
{{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.0 534}} 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.1 9227}} 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.541,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,116, 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.78929,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
100
110
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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct] }]; 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.5 23857,0.519423,0.514989,0.479515,0.470647,0.492818,0.457344, 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.514 989,0.479515,0.470647,0.492818,0.457344,0.488383,0.483949,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.514 989,0.479515,0.470647,0.492818,0.457344,0.488383,0.483949,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.5 23857,0.519423,0.514989,0.479515,0.470647,0.492818,0.457344, 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
رﺳم اﻟﺑواﻗﻲ eiﻣﻘﺎﺑل
xi
ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
;]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,ma x,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]],stepsize}, {i,1,bars}]; p1=GeneralizedBarChart[tograph,PlotRange>All,DisplayFunction->Identity]; p2=Plot[PDF[NormalDistribution[mean,sd],x],{x,min,max}, 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.0225, -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.185295,0.4 ٢٣٦
4635,1.52742,0.423731,2.41548,0.524364,0.394676,6.45974,10.1 795,0.721821,0.155046,0.291119,0.356386,1.963,0.0363703,1.79 359,1.51655,0.166446,1.14102,7.69427,0.558897,2.40877,0.8278 52,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ﺑﻔ رض أن اﻟﻣﻘ دار ) p (i n
ﻣﻌرف ﻣن اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ اﻟﻘﯾﺎﺳﻰ ﻣن اﻟﻌﻼﻗﺔ اﻟﺗﺎﻟﯾﺔ :
٢٣٧
z 2 2 dz p (i).
) (i
1 ( (i) ) P( Z (i) ) e 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
) e (i
) p (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,369.4 97,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.5 0266} era=Table[(i-.5)/n,{i,1,n}] {0.0416667,0.125,0.208333,0.291667,0.375,0.458333,0.541667,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.73166 } ٢٤٠
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.91 652,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.5 48522},{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
-7.5
-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.5 }0266
اﻻﺣﺗﻣﺎﻻت اﻟﺗﺟرﯾﺑﯾﺔ اﻟﺗﺟﻣﯾﻌﯾﺔ ) : 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.541667,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.73166 }
اﻟﺟ دول اﻟ ذى ﯾﺣﺗ وى ﻋﻠ ﻰ اﻟﻘ ﯾم اﻟﻣرﺗﺑ ﺔ ) 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},DisplayFu nction->Identity]; plot3=Plot[PDF[ChiSquareDistribution[4],x],{x,0,15},DisplayF unction->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
1.5
0.2
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.180001 ,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'sCorrelationCoefficient0.99369 uniform=RandomArray[UniformDistribution[0,1],50]; Short[uniform] {0.425167,48,0.924985} n2=normalProbability[uniform,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.97522 chi=RandomArray[ChiSquareDistribution[4],50]; Short[chi] {3.46277,48,7.38896} n3=normalProbability[chi,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.944491 student=RandomArray[StudentTDistribution[1],50]; Short[student] {0.742873,48,0.0998677} n4=normalProbability[student,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.691211 Show[GraphicsArray[{{n1,n2},{n3,n4}}]] Normal Probability 2
Plot
1 -2
Probability
Plot
1
-1
Normal 3
Normal 2
1
0.2
-1
-1
-2
-2
Probability
Plot
Normal
0.4
0.6
0.8
Probability
Plot 2 1
2 1 -30 -1
2
4
6
8
10
12
-2
-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},DisplayFu nction->Identity]; واﻻﻣر.ﯾﺆدى إﻟﻰ اﻟﺤﺼﻮل ﻋﻠﻰ رﺳﻢ ﺗوزﯾﻊ ﻣﻧﺗظم plot3=Plot[PDF[ChiSquareDistribution[4],x],{x,0,15},DisplayF unction->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'sCorrelationCoefficient0.99369 n2=normalProbability[uniform,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.97522 n3=normalProbability[chi,DisplayFunction->Identity]; Pearson'sCorrelationCoefficient0.944491 n4=normalProbability[student,DisplayFunction->Identity]; ٢٤٧
Pearson'sCorrelationCoefficient0.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
0.0510204 0.132653 0.214286 0.295918 0.377551 0.459184 0.540816 0.622449 0.704082 0.785714 0.867347 0.94898
-1.4937 -1.42239 -0.935205 -0.51932 -0.287661 0.0985392 0.300514 0.330198 0.472805 0.888689 1.27489 1.29264
واﻟﻣطﻠوب اﺧﺗﺑﺎر ﻓرض اﻟﻌدم: : H0
ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ طﺑﯾﻌﯾﮫ ﺿد اﻟﻔرض اﻟﺑدﯾل: ﺗوزﯾﻊ ﺣدود اﻟﺧطﺄ ﻏﯾر طﺑﯾﻌﯾﮫ
: H1
ﻣن اﻟﺑﯾﺎﻧﺎت ﻓﻰ اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﻰ ﺻﯾﻐﺔ rاﻟﺗﺎﻟﯾﮫ :
) d (i) z (i n
z ( i ) 2
n
) z (2i
d (i) z (i)
2
r
) d (i d 2( i ) 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,369.4 }97,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.274 89,1.29264} nndd=Table[(i-.75)/(n+.25),{i,1,n}] {0.0204082,0.102041,0.183673,0.265306,0.346939,0.428571,0.51 0204,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.394 17} 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.394 17} 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ﻗﯾﻣ ﺔ ﻣﺷ ﺎھدة ﻣ ن اﻟﻣﺗﻐﯾ ر k
اﻟﻌﺷ واﺋﻲ Ymاﻟﻣﻘﺎﺑ ل ﻟ ـ . x mﻣ ن اﻟﺿ روري أن . n n iﺳ وف ﻧﻌ رف y ij i 1
ﻟﯾﻣﺛ
ل اﻟﻘﯾﻣ
ﺔ رﻗ
م jﻣ
i 1,2,..., kو j 1,2,..., n iو
ن اﻟﻣﺗﻐﯾ ni y ij j1
ر اﻟﻌﺷ
واﺋﻲ Yiﻋﻧ
د x iﺣﯾ
ث
y i و . y i y i / 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
y ij nj
ni ( y ij2 j1
m i 1
y ij y i
2
٢٥٢
m ni i1 j1
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
اﻟﺣﺳ ﺎﺑﺎت اﻟﻣطﻠوﺑ ﺔ ﻻﺧﺗﺑ ﺎر اﻟﻔ رض ﻓ ﻲ ﻣﺷ ﻛﻠﺔ اﻻﻧﺣ دار ﺑﻘﯾﺎﺳ ﺎت ﻣﺗﻛ ررة ﻋﻠ ﻰ اﻻﺳﺗﺟﺎﺑﺔ ﯾﻣﻛن ﺗﻠﺧﯾﺻﮭﺎ ﻛﻣﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ: F
SSR MSE
MSLF MSPE
SS
Ms SSR )MSE SSE /( n 2
SSE SSPE m2 SSPE MSPE nm
MSLF
SSR SSE SSE SSPE SSPE
df 1 n2
m2
S.O.V
اﻻﻧﺣدار اﻟﺧطﺄ ﻧﻘص اﻟﺗوﻓﯾق
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ˆ b0 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
اﻟﻣﺷﺎھدات
3.5 2.8 2.1 3.4 3.2 3.0 3.0 5.9
5.3 5.3 5.3 5.7 6.0 6.0 6.3 6.7
17 18 19 20 21 22 23 24
y
x
1.7 2.8 2.8 2.2 5.4 3.2 1.9 1.8
3.7 4.0 4.0 4.0 4.7 4.7 4.7 5.0
اﻟﻣﺷﺎھدات 9 10 11 12 13 14 15 16
x
y 2.3 1.8 2.8 1.5 2.2 3.8 1.8 3.7
اﻟﻣﺷﺎھدات 1.3 1.3 2.0 2.0 2.7 3.3 3.3 3.7
اﻟﺣــل : : H 0اﻟﻧﻣوذج اﻟﺧطﻰ : : H1اﻟﻧﻣوذج ﻏﯾر ﺧطﻰ : . 0.05 ﺳوف ﻧوﺟد ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﺧﺎﻟص ﺛم ﻣﺟﻣوع ﻣرﺑﻌﺎت ﻗﺻور اﻟﺗوﻓﯾق ﻛﺎﻟﺗﺎﻟﻲ : ٢٥٦
1 2 3 4 5 6 7 8
ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ﻋﻧد x 1.3ھو : (2.3)2 (1.8)2 (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
(y iu yi )2 0.125 0.845 2.000 2.000 0.240 6.260 0.980 0.020 12.470
ﻣﺳﺗوى x 1.3 2.0 3.3 3.7 4.0 4.7 5.3 6.0 اﻟﻣﺟﻣوع
ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ : S.O.V df SS MS F 1 6.326 6.326 اﻻﻧﺣدار 6.326 f 0.963 22 21.192 اﻟﺧطﺄ = 6.569 0.963=s2 ﻋﻧد ﻣﺳﺗوى ﻣﻌﻧوﯾﺔ =0.05 11 8.722 0.793=MSL ﻗﺻور اﻟﺗوﻓﯾق 0.793 f 2 11 12.470 اﻟﺧطﺄ اﻟﺧﺎﻟص 1.134= s e 1.134 =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]
cx_ : zx^2
zx2 ax
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
s2e
ssp ne
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.6 8657,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.5 6508,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},{anov a}} 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
<<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 ٢٦١
f 6.56529
0.699572
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ y .اﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔxاﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﯾﺗم اﻟﺣﺻول ﻋﻠﯾﮫ ﻣن اﻻﻣر ]TableForm[{tr1,tr2,tr3,tr4,tr5},th
و f 0.699ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
msl s2e fاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر ff
]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
570 384
y
n
18530
12 570 2 27950 12
290 0 .331429 , 875
b 0 y b1 x 32 0.33142947.5 16.2571 .
ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺳوف ﺗﻛون ﻋﻠﻰ اﻟﺷﻛل : yˆ 16.2571 0.331429 x .
واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻓﻲ ﺷﻛل )(٣٦-٤
ﺷﻛل )(٣٦-٤ ٢٦٤
y
ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ :
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
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
yˆi
yi 27.8571 27.8571 29.5143 29.5143 31.1714 31.1714 32.8286 32.8286 34.4857 34.4857 36.1429 36.1429
xi 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
40
45
50
40
45
50
55
60
65
Graphics Show[g,dd] y 45 40 35 30 25 20 15 x 35
55
60
Graphics n=l[x1] 12 ssto=c[y1,y1] ٢٦٩
65
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 mse1 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.8285 7},{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.0 6143},{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.1 1297},{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
25
30
35
40
-1 -2 -3
Graphics ٢٧١
45
]}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,37., 31.1714,5.82857,0.905987,0.949981},{45,38,31.1714,6.82857,1. 06143,1.11297},{50,41,32.8286,8.17143,1.27016,1.33184},{50,3 9,32.8286,6.17143,0.95928,1.00586},{55,34,34.4857,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
ﻧﺣﺻ ل
b0=yb-b1*xb
و b1 0.331429
ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
(b1=sxy/sxx واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻣن اﻻﻣر ]Show[g,dd ٢٧٢
35 35 40. 40 45 45 50 50 55 55 60 60
اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر
]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 202 / 2 2 ﺑدرﺟﺎت ﺣرﯾﺔ n1 2 1 1
ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺎ اﻟﺧﺎﻟص ﻋﻧد x=40ھو :
}282 312 {28 312 / 2 4. 5 ٢٧٣
ﺑدرﺟﺎت ﺣرﯾﺔ 2 1 1
n 2
ﺑﻧﻔس اﻟطرﯾﻘﺔ ﯾﻣﻛن ﺣﺳﺎب ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺎ اﻟﺧ ﺎﻟص ﻟﻠﻘ ﯾم اﻟﺑﺎﻗﯾ ﺔ ﻣ ن xﻛﻣ ﺎ ھو ﻣوﺿﺢ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ : x ni درﺟﺎت 2 اﻟﺣرﯾﺔ 1 1 1 1 1 1
yij yi
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]
zx2 cx_ : zx^2 ax 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},{ano va}} TableHeadings{{soruse,redession,residual,ftt,pure},{anova} } 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 s2e اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣرf ff
ff1=Quantile[FRatioDistribution[nl,ne],1-]
ﺣﯾث اﻟﻣﺧرج 4.53368
اﻟﻘرار اﻟﻣﺗﺧذ ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر If[ff>ff1,Print["RjectHo"],Print["AccpetHo"]]
واﻟﻣﺧرج ﻓﻰ ھذه اﻟﺣﺎﻟﺔ ھو RjectHo
.وھذا ﯾﻌﻧﻰ ان اﻟﻧﻣوزج ﻏﯾر ﺧطﻰ ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرf 2.3224 اﯾﺿﺎ ٢٧٧
msr mse fاﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر 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 1 x ﺣﯾ ث 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 b 1x 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
4 457
5 548
2 341
3 393
اﻟﺣــل : ﺑوﺿﻊ yi ln yi ﻓﺈن yi 43.243148 :
و
x i2 140
,
x i 28
yi 6.1775926 n
n7
,
,
x 4,
x i yi 177.85134
)( 28)(43.243148 7 2 )(28 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
واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻲ ﻟﮭﺎ ﻣوﺿﺢ ﻓﻲ ﺷﻛل ). (٤٠-٤ ٢٨٠
1 304
x y
(٤٠-٤) ﺷﻜﻞ
وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات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,88 2.}} 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
6
8
10
Graphics d=Plot[c*d^x,{x,0,10}]
1200 1000 800 600
2
4
Graphics Show[g,d]
٢٨٢
1000 800 600 400
10
6
8
4
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 do . ﺑﺄﺧذ ﻟوﻏﺎرﯾﺗﻣﺎت اﻟطرﻓﯾن ) ﻟﻸﺳﺎس ( 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 , bo ln coوﻋﻠ ﻰ ذﻟ ك ﯾﻣﻛ ن إﯾﺟ ﺎد b0 , b1ﺑﺎﻟﺻ ﯾﻎ اﻟﻣﺳ ﺗﺧدﻣﺔ ﻟﻧﻣ وذج اﻻﻧﺣدار اﻟﺧط ﻰ ،اﻟﺗ ﻲ ﺳ ﺑق أن ﺗﻧﺎوﻟﺗﺎھ ﺎ ،ﺑﺎﺳ ﺗﺧدام اﻟﻧﻘ ﺎط ) (ln x i ,ln yiﺛ م إﯾﺟ ﺎد co , do ﺣﯾث . b1 d o ,ln co bo
ﻣﺛﺎل)(٢٦-٤ ﻻزواج اﻟﻘﯾﺎﺳﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ أوﺟد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﺗﺣت ﻓرض ﻧﻣوذج اﻟﻘوى . 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 yi ) 160.84601 , ٢٨٤
600 2.35
x y
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 b 0 35.6684 أي أن : 15
c0 exp(b0 ) 3.094491530.10 d 0 b1 5.3996 واﻟﻣﻌﺎدﻟﺔ اﻷﺳﺎﺳﯾﺔ اﻟﻣﻘدرة ھﻲ : 15
yˆ x c0 x d0 (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.,400. } x1=Log[xx3] {6.39693,6.39693,6.39693,6.39693,6.21461,6.21461,6.21461,6.2 1461,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.8 0336,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},{50 0.,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
700
Graphics Show[g,d] 40 35 30 25 20 15 10 5 350
400
450
500
550
600
Graphics
٢٨٧
650
700
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﺑﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ yy3 .اﻟﻤﺴﻤﻰ ﺑﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ واﻟﻘﺎﺋﻤﺔxx3اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﻰ ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ : yˆ x 35.6684 5.3996x. ﺣﯾث b 0 35.6684ﺗم اﻟﺣﺻول ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر b0=yb-b1*xb
وﺑﻣﺎ ان : ln co b 0 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 d0 (3.094491530 10) x 5.3996 . واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻰ ﻟﻠﻣﻌﺎدﻟﺔ ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر ]Show[g,d
) (٣-١٤-٤ﻧﻣوذج ﯾﻌطﻲ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻋﻠﻰ اﻟﺷﻛل ٢٨٨
yˆ b 0 b1 x
ﻣﺛﺎل)٢٧-٤ ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻋدد اﻟﺳﺎﻋﺎت اﻟﺗﻲ ﯾﻘﺿﯾﮭﺎ 30طﺎﻟب ﻓﻲ اﻟدراﺳﺔ ﺧﺎرج اﻟﻣدرج ﻓﻲ اﻷﺳﺑوع ) ( xواﻟدرﺟﺎت اﻟﺗﻲ ﺣﺻﻠوا ﻋﻠﯾﮭﺎ ﻓﻲ ﻣﺎدة اﻹﺣﺻﺎء ) ( yﺣﯾث اﻟدرﺟﺔ اﻟﻧﮭﺎﺋﯾﺔ . 200ھل ﯾﻣﻛن ﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﺎت ﺑﻣﻌﺎدﻟﺔ ﺧط ﻣﺳﺗﻘﯾم ؟
xy 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 19643.5
x2
x
y
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
٢٨٩
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
اﻟﺣــل : ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺢ ﻓﻲ ﺷﻛل)(٤٢-٤
ﺷﻛل)(٤٢-٤ ﺑﻔرض أن ﻧﻣوذج اﻻﻧﺣدار اﻟﺧطﻲ اﻟﺑﺳﯾط ) (١-٤ﯾﻣﺛل اﻟﺑﯾﺎﻧﺎت ﻓﯾﺎ ﻟﺟدول اﻟﺳﺎﺑق ﻓﺈن : x 127 y 3918 n 30 , x 4.23333 , y 130.6 n 30 n 30 )(127 )(3918 30 (127 ) 2 729 30
19643 .5
x y
xy
n 2 ) 2 ( x x n 3057.3 15.9761, 191.367
SXY SXX
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
- 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
yˆ i 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واﻟﻧﺗﺎﺋﺞ ﻣﻌطﺎة ﻓﻲ ﺷﻛل)(٤٣-٤
٢٩١
yi 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
xi 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,13 3,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,133,1 46.,152,147,157,164,167,162,164,173,179,186,193,190,180} 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.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} 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.1516 3,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,100} ,{2,90},{2.5,114},{2.5,103},{2.5,101},{3,116},{3,120},{3.5,1 23},{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.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 x1 xb ^2 ri e mse1 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.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} 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.11583} ٢٩٥
,{126.872,11.1278},{126.872,6.12777},{134.86,11.1397},{142.8 48,9.15163},{142.848,4.15163},{150.836,6.16356},{150.836,13. 1636},{158.825,8.17549},{158.825,3.17549},{166.813,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 ListPlotpp1, 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.908,0.169278},{110.896,0.452812},{110.896,0.807686},{118.884,0.3 65151},{126.872,0.987241},{126.872,0.543647},{134.86,0.9883} ,{142.848,0.811921},{142.848,0.368327},{150.836,0.546823},{1 50.836,1.16785},{158.825,0.725319},{158.825,0.281726},{166.8 13,-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.3 71935},{126.872,1.00427},{126.872,0.553023},{134.86,1.00539} ,{142.848,0.827116},{142.848,0.37522},{150.836,0.558599},{15 0.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
-1 -2 -3
Graphics def=Transpose[{x1,y1,yy,e,di,ri}] ٢٩٧
250
{{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.908,1.90803,-0.169278,0.173587},{3,116,110.896,5.1039,0.452812,0.462458},{3,120,11 0.896,9.1039,0.807686,0.824893},{3.5,123,118.884,4.11583,0.3 65151,0.371935},{4,138,126.872,11.1278,0.987241,1.00427},{4, 133,126.872,6.12777,0.543647,0.553023},{4.5,146.,134.86,11.1 397,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.725319,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,186,1 90.777,-4.77678,-0.42379,0.44858},{8,193,190.777,2.22322,0.197241,0.208779},{9,190,20 6.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
٢٩٩
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 62.9677 15.9761x
ﺣﯾث
b 0 62.9677
ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
b0=yb-b1*xb
و x b1 15.9761ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر ]b1=c[x1,y1]/c[x1,x1 اﻟﺟدول اﻟﺳﺎﺑق ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر
]TableForm[def
رﺳم eiﻣﻘﺎﺑل yˆ iﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر
g ListPlotpp1, 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ﻓﺈﻧﮫ ﯾﻣﻛن ﻋﻣل اﺧﺗﺑﺎر ﻟﻧﻘص اﻟﺗوﻓﯾق ﻛﻣﺎ ﯾﻠﻲ :ﯾﺗم ﺣﺳﺎب ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺧطﺄ اﻟﺧﺎﻟص ﻣن اﻟﺟدول اﻟﺗﺎﻟﻰ .
٣٠٠
درﺟﺎت اﻟﺤﺮﯾﺔ
ﻣﺠﻤﻮع ﻣﺮﺑﻌﺎت اﻟﺨﻄﺄ اﻟﺨﺎﻟﺺ
1 1 1 1 2 1 0 1 0 1 1 1 0 1 1 1 14
50 12.5 112.5 50 98 8 0 12.5 0 12.5 24.5 12.5 0 18 24.5 50 485.5
x 0.5 1 1.5 2 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,138,1 }33,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,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,12 }0},{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,133},{146},{152,147},{157,164},{167,162},{164},{1 }}73,179},{186,193},{190,180 ]a[x_]:=Length[x ]z[x_]:=Apply[Plus,x
zx2 ax
cx_ : zx^2 ]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.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} 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.1516 3,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,10 0},{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}} 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},{an ova}}
TableHeadings{{soruse,redession,residual,ftt,total},{anova }} 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
<<Statistics`ContinuousDistributions` =0.05; ff1=Quantile[FRatioDistribution[nl,ne],1-] 2.48373 ٣٠٥
f 384.45
6.3272
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 b0 b1x
: وﻣن اﻟﺟدول اﻟﺗﺎﻟﻰ ﯾﺗم ﺣﺳﺎب ﻛل ﻣن
x , y, x 2 , x y
٣٠٦
x y
x 2
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.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 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
ﻻزواج اﻟﻘﯾم ) ( x , yﻓﺈن ﺷﻛل اﻻﻧﺗﺷﺎر ﻣوﺿﺢ ﻓﻲ ﺷﻛل ).(٤٦-٤
٣٠٧
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
x 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
ﺷﻛل )(٤٦-٤ اﻵن ﯾﺗم ﺣﺳﺎب اﻟﻘﯾم اﻟﺗﺎﻟﯾﺔ واﻟﻼزﻣﺔ ﻹﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة: SXY 820 .011 , SXX 13 .1153 ,
SXY 820.011 62.5235 , SXX 13.1153 .
b1
b 0 y b1 x 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. 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.
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 أﻛﺑر ﻣن R 2
52401 .2
48843.8 ﻟﻠﻧﻣوذج اﻷول 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,13 }3,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,133,1 }46.,152,147,157,164,167,162,164,173,179,186,193,190,180 x1 N xx N {0.707107,0.707107,1.,1.,1.22474,1.22474,1.41421,1.41421,1.5 8114,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.645 }75,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,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 } 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.5811 4,103},{1.58114,101},{1.73205,116},{1.73205,120},{1.87083,12 3},{2.,138},{2.,133},{2.12132,146.},{2.23607,152},{2.23607,1 47},{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.8 2843,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 mse1 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.0684 6},{161.932,0.0684572},{168.185,-4.18514},{174.202,1.2025},{174.202,4.7975},{185.624,0.37598},{185.624,7.37598} ,{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 ListPlotpp1, 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.797 399},{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.81 9184},{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.,80,7 1.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.41 421,100,97.2025,2.79751,0.44012,0.452768},{1.41421,90,97.202 5,-7.20249,-1.13314,1.1657},{1.58114,114,107.639,6.36076,1.00071,1.02328},{1.581 14,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.23607,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,167,161. 932,5.06846,0.797399,0.819184},{2.44949,162,161.932,0.068457 2,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.82843,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 واﺟ راء اﻧﺣ دار واﻟﺣﺻ ول ﻋﻠ ﻰ ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺧط ﺄ . SSE 2ﯾﺳ ﺗﺧدم 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 265
df 1 2 3
Source Regression Residual 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 F 1.6845 . 140.307 / 2 وﺑﻣﺎ أن ﻗﯾﻣﺔ 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},{anova }} 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 ٣٢٢
MS 28.6409 118.18
F 0.242351
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] 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},{anova }} 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
MS 174.443 70.1535
F 2.48659
Maxmse, mse1 ff Minmse, mse1 1.68458 <<Statistics`ContinuousDistributions` ffee=Quantile[FRatioDistribution[n-2,n-2],1-] 19. If[ff>=ffee,Print["Reject Ho"],Print["Accept Ho"]] Accept Ho
: ﻟﮭذا اﻟﻣﺛﺎل وx1, y1 ﻣ ن اﻟﻘﺎﺋﻣﺗ ﺎنx اﻻرﺑﻌ ﺔ أزواج اﻻوﻟ ﻰ ﻣ ن اﻟﻣﺷ ﺎھدات اﻟﻣرﺗﺑ ﮫ وﻓﻘ ﺎ ً اﻟﻣﺗﻐﯾ ر ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر tf=TableForm[{rt1,rt2,rt3,rt4},th]
ﻻزواج اﻟﻣﺷ ﺎھداتSSE 2 وﺑ ﻧﻔس اﻟطرﯾﻘ ﺔ ﻧﺣﺻ ل ﻋﻠ ﻰSSE1 وذﻟ ك ﻟﻠﺣﺻ ول ﻋﻠ ﻰ و ﺟ دول ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾنx11, y11 ﻣ ن اﻟﻘﺎﺋﻣﺗ ﺎنx اﻻرﺑﻌﺔ اﻻﺧﯾ رة اﻟﻣرﺗﺑ ﮫ وﻓﻘ ﺎ ً اﻟﻣﺗﻐﯾ ر ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر tf1=TableForm[{rt1,rt2,rt3,rt4},th]
اﻟﻣﺣﺳوﺑﺔ ﻣن اﻻﻣرf ff
Maxmse, mse1 Minmse, mse1
اﻟﺟدوﻟﯾﺔ ﻣن اﻻﻣر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ﻟﺗﺻ ﺣﯾﺢ ﻋ دم اﻻﻋﺗ دال أو ﻋ دم ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن أو ﻋ دم ﺧطﯾ ﮫ داﻟ ﺔ اﻻﻧﺣ دار .اﻟﻌﺎﺋﻠ ﺔ اﻟﻣﻔﯾ دة ﻣ ن اﻟﺗﺣ وﯾﻼت ھ ﻲ ﺗﺣوﯾﻠ ﺔ اﻟﻘ وى power y transformationﺣﯾث ﻣﻌﻠﻣ ﮫ ﻣطﻠ وب إﯾﺟ ﺎد ﺗﻘ دﯾر ﻟﮭ ﺎ ،ﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل 1 ﺗﻌﻧﻲ اﺳﺗﺧدام ﺗﺣوﯾﻠﺔ اﻟﺟذر اﻟﺗرﺑﯾﻌﻲ ﺣﯾث y yو 0ﺗﻌﻧ ﻲ اﺳ ﺗﺧدام 2 اﻟﺗﺣوﯾﻠﺔ اﻟﻠوﻏﺎرﯾﺗﻣﯾﺔ ﺣﯾ ث ) . y ln( yاﻟﻣﻌﯾ ﺎر ﻓ ﻰ ﺗﺣدﯾ د ﻗﯾﻣ ﺔ اﻟﻣﻧﺎﺳ ﺑﺔ ﻟﺗﺣوﯾ ل ﻗ ﯾم yھ ﻰ اﯾﺟ ﺎد ﻗﯾﻣ ﺔ و اﻟﺗ ﻰ ﺗﺟﻌ ل ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻰ SSEﻻﻧﺣ دار ﺧط ﻰ ﯾﺳﺗﻧد إﻟﻰ ذﻟك اﻟﺗﺣوﯾل اﺻﻐر ﻣﺎ ﯾﻣﻛن وﺳوف ﻧﺳﺗﺧدم طرﯾﻘﺔ ﺑوﻛس – ﻛ وﻛس Box and Coxﻟﮭذا اﻟﻐرض وﺑدون اﻟدﺧول ﻓﻰ اﻟﺗﻔﺎﺻﯾل ﺳوف ﻧﺳﺗﺧدم ﺑرﻧﺎﻣﺞ ﺟﺎھز ﻟﮭ ذا اﻟﻐرض وذﻟك ﻣن ﺧﻼل اﻟﻣﺛﺎل اﻟﺗﺎﻟﻰ : ﻣﺛﺎل)(٣١-٤ ﻻزواج ﻗ ﯾم x, yاﻟﻣﻌط ﺎه ﻓ ﻰ اﻟﻘﺎﺋﻣ ﺔ اﻟﻣﺳ ﻣﺎه gradedata
ﻓ ﻰ اﻟﺑرﻧ ﺎﻣﺞ اﻟﺗ ﺎﻟﻰ اﻟﺟ ﺎھز
اﻟﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaﺳوف ﻧﺳﺗﺧدم طرﯾﻘﺔ ﺑ وﻛس – ﻛ وﻛس Box and Cox ﻟﺣﺳﺎب ﻗﯾﻣﺔ اﻟﻣﻧﺎﺳﺑﺔ ﻟﺗﺣوﯾل ﻗﯾم yﻣﻊ ﻓﺗرة ﺛﻘﺔ ل وﻓﯾﻣﺎ ﯾﻠﻰ ﺧطوات اﻟﺑرﻧﺎﻣﺞ واﻟﻣﺧرﺟﺎت . ]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,Regressi onReport->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[{la mbdaminmax,grid,lambdavals,n,p,depvars,ytwiddle,table2,minva l,lambdaposition,lambdahat,nu,ci,dist,chi2,var,table3,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,lambdaval s[[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,147},{5.5,1 57},{5.5,164},{6,167},{6,162},{6.5,164},{7,173},{7,179},{8,1 ;}}86},{8,193},{9,190},{9,180 ]boxCoxRegression[gradedata,{1,x},x Box-Cox Transformation {BoxCox2.,Confidence95. }}%,ConfidenceInterval{1.78947,2.
ﻗﯾﻣﺔ اﻟﻣﻧﺎﺳﺑﺔ ﻟﺗﺣوﯾل ﻗﯾم yھﻰ
2
ﻣﻊ ﻓﺗرة ﺛﻘﺔ ل ﻣن اﻻﻣر
]boxCoxRegression[gradedata,{1,x},x
و اﻟﻣﺧرج {BoxCox2.,Confidence95. }}%,ConfidenceInterval{1.78947,2.
ب -طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى اﻟﻣرﺟﺣﺔ Weighted least squares:
ﺑﻔرض أن Var ( i ) i 2 2 w iﺣﯾث w iأوزان ﻣﻌروﻓﺔ وﻟﻠﺣﺻ ول ﻋﻠ ﻰ ﺗﻘدﯾرات ﻟﻠﻣﻌﺎﻟم 0 ,1ﯾﻣﻛن اﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻ ﻐرى اﻟﻣرﺟﺣ ﺔ Weight ) Least Squares (WLSﺣﯾث : x i w i yi w i
,
wi
x i yi w i
b1
( x i w i )2 2 xi wi wi yi w i xw b0 b1 wi i . i wi
ﻓ ﻲ ﻛﺛﯾ ر ﻣ ن اﻟﻣﺷ ﺎﻛل ﻓ ﺈن اﻷوزان ﯾﻣﻛ ن ﺗﻘ دﯾرھﺎ ﺑﺳ ﮭوﻟﺔ .ﻋﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل إذا ﻛﺎﻧت 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 ٣٢٧
ﻛ وزن .أﯾﺿ ﺎ ً ﻗ د ﯾﻛ ون VarYi 2 x i 2وﻋﻠ ﻰ ذﻟ ك
1
w i واﻟﺗ ﻰ ﺗظﮭ ر
xi2 ﻛﺛﯾ را ً ﻓ ﻲ اﻟدراﺳ ﺎت اﻷﺑﺣ ﺎث اﻟﺗ ﻲ ﺗﻌﺗﻣ د ﻋﻠ ﻰ ﺑﯾﺎﻧ ﺎت إﺣﺻ ﺎﺋﯾﺔ ﺗﺄﺧ ذ ﺷ ﻛل اﻟﺑﯾﺎﻧ ﺎت اﻟﻣﻘطﻌﯾ ﺔ cross-section dataﺣﯾ ث ﺗﺷ ﺗت ﻣﺷ ﺎھدات اﻟﺑﯾﺎﻧ ﺎت اﻟﻣﻘطﻌﯾ ﺔ اﻟﺧﺎﺻ ﺔ ﺑﺎﻟﻣﺗﻐﯾر اﻟﺗ ﺎﺑﻊ ﻗ د ﺗﺧﺗﻠ ف اﺧﺗﻼﻓ ﺎ ً ﻛﺑﯾ را ﻣ ن ﻣﺳ ﺗوى اﻟ ﻰ أﺧ ر ﻣ ن ﻣﺳ ﺗوﯾﺎت اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل .ﻓﻌﻠ ﻰ ﺳ ﺑﯾل اﻟﻣﺛ ﺎل ﻓ ﻲ دراﺳ ﺔ اﻟﻌﻼﻗ ﺔ ﺑ ﯾن دﺧ ل وأﻧﻔ ﺎق اﻷﺳ ر ﻋﻠ ﻰ ﻣﺧﺗﻠ ف اﻟﺳﻠﻊ واﻟﺧدﻣﺎت ﻧﺟد أن اﻷﺳر ذات اﻟدﺧول اﻟﻣرﺗﻔﻌﺔ ﺗﺗﻣﺗﻊ ﺑﻣروﻧﺔ ﻛﺑﯾ رة ﻓ ﻲ اﻷﻧﻔ ﺎق ، ﻓﻲ ﺣ ﯾن أن أﻧﻔ ﺎق اﻷﺳ ر ذات اﻟ دﺧول اﻟﻣﻧﺧﻔﺿ ﺔ ﯾﻘ ﻊ ﻋ ﺎدة ﺿ ﻣن ﺣ دود ﺿ ﯾﻘﺔ وﻋﻠﯾ ﮫ ﻓﺈن اﻟﺗﺑﺎﯾن ﻋﻧد اﻟدﺧول اﻟﻛﺑﯾر ،ﯾﻛون أﻛﺑر ﻣن اﻟﺗﺑﺎﯾن ﻋﻧد ﻗﯾم اﻟدﺧول اﻟﺻ ﻐﯾرة وھﻛ ذا ﻧﺟ د أن ﻓرﺿ ﯾﺔ ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ﺗﺻ ﺑﺢ ﻋدﯾﻣ ﺔ اﻟﺟ دوى ﻓ ﻲ ﻣﺛ ل ھ ذة اﻟﺣ ﺎﻻت وﺑﺎﻟﺗ ﺎﻟﻲ ﯾواﺟﮫ اﻟﺑﺎﺣث ﻣﺷﻛﻠﺔ ﻋدم ﺛﺑﺎت اﻟﺗﺑﺎﯾن واﻟﺗﻰ ﺳوف ﻧﺻﺣﺣﮭﺎ ﻓﻲ اﻟﻣﺛﺎل اﻟﺗﺎﻟﻲ
ﻣﺛﺎل)(٣٢-٤ ﯾﻌط ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﺑﯾﺎﻧ ﺎت ﻋ ن اﻟ دﺧل واﻹﻧﻔ ﺎق اﻟﺷ ﮭري ﻟﻌﯾﻧ ﺔ ﻣﻛوﻧ ﺔ ﻣ ن 20
ﻣﺷﺎھدة ﻣﻘﺳﻣﺔ إﻟﻰ أرﺑﻌ ﺔ ﻣﺟ ﺎﻣﯾﻊ وﻛ ل ﻣﺟﻣوﻋ ﺔ ﺑﮭ ﺎ ﺧﻣس ﻣﺷ ﺎھدات .اﻟﻌﯾﻧ ﺔ ﻓ ﻲ ﻛ ل ﻣﺟﻣوﻋ ﺔ ﺗ م اﻟﺣﺻ ول ﻋﻠﯾﮭ ﺎ ﺑﺗﻘ دﯾر اﻹﻧﻔ ﺎق اﻟﺷ ﮭري $1000ﻟﺧﻣ س أﺳ ر ﻋﻧ د ﻧﻔ س اﻟ دﺧل .أوﺟ د ﺗﻘ دﯾرات ﻣﻌ ﺎﻟم ﻧﻣ وذج اﻻﻧﺣ دار اﻟﺧط ﻲ ﺗﺣ ت ﻓ رض أن . Vari 2 x i 2 اﻟﺪﺧﻞ $1000 5.0 10.0 15.0 20.0
اﻻﻧﻔﺎق اﻟﺸﮭﺮي $ 1000 2.1 3.6 5.0 6.2
2.0 3.5 4.8 6.0
2.0 3.5 4.5 5.7
2.0 3.2 4.2 5.0
اﻟﻤﺠﻤﻮﻋﺔ 1.8 3.0 4.2 4.8
ﯾوﺿﺢ ﺷﻛل ) (٥١-٤أن اﻟﻌﻼﻗﺔ ﺑﯾن اﻹﻧﻔﺎق واﻟدﺧل اﻟﺷﮭري ﻋﻼﻗﺔ ﺧطﯾﺔ.
٣٢٨
1 2 3 4
10 8 6 4 2
20
17.5
15
12.5
7.5
10
5
2.5
ﺷﻛل )(٥١-٤
اﻟﺑﯾﺎﻧﺎت اﻟﻼزﻣﺔ ﻟﺣﺳﺎب ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ:
٣٢٩
x 5 5 5 5 5 10 10 10 10 10 15 15 15 15 15 20 20 20 20 20
250
x2
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
25 25 25 25 25 100 100 100 100 100 225 225 225 225 225 400 400 400 400 400
77.1
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 x 250 3.855 ، x 12.5 20 n 20 x i yi SXY x i y i n 25077.1 1112 20
148 .25, 2
SXX x
xi
٣٣٠
n
2
2502 3750
625, 20 SXY 148.25 b1 0.2372, SXX 625 b 0 y b1x 3.855 0.237212.5 0.89
وﻋﻠﻰ ذﻟك ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ:
yˆ 0.89 0.2372x
واﻟﻣﻣﺛﻠﺔ ﺑﯾﺎﻧﯾﺎ ً ﻓﻲ ﺷﻛل ) (٥٢-٤ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر 10 8 6 4 2
20
17.5
15
12.5
10
7.5
5
2.5
ﺷﻛل )(٥٢-٤ ﯾﻌطﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﺑواﻗﻲ eiواﻟﺑواﻗﻲ اﻟﻘﯾﺎﺳﯾﺔ d iواﻟﺑواﻗﻲ اﻟﻣﻌﯾﺎرﯾﺔ . ri ٣٣١
di
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
yˆi
ei -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
-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
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,20,2 0} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,20} {5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,20} {5.,5,5,5,5,10,10.,10,10,10.,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] 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
15
20
Graphics Show[g,dd]
٣٣٥
y 10 8 6 4 2 x 2.5
5
7.5
10
12.5
15
17.5
20
Graphics 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 mse1 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
7
8
-0.25 -0.5 -0.75 -1
Graphics pp2=Transpose[{yy,di}]; 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
10
8
6
4
2 -0.5 -1 -1.5 -2
Graphics ;]}def=Transpose[{x1,y1,yy,e,di,ri ;]TableForm[def
ﻣﺛﺎل)(٣٣-٤ ﻟﻠﻣﺛﺎل اﻟﺳﺎﺑق وﻟﻠﺗﺣﻘق أﻛﺛر ﻣن وﺟود ﻋ دم ﺛﺑ ﺎت اﻟﺗﺑ ﺎﯾن ﻧﻘ وم ﺑ ﺈﺟراء اﺧﺗﺑ ﺎر ﺟوﻟ د ﻓﯾﻠ د – ﻛواﻧ دت .وﻹﺟ راء ھ ذا اﻻﺧﺗﺑ ﺎر ﻧﻘ وم ﺑﺗﻘﺳ ﯾم اﻟﻣﺷ ﺎھدات إﻟ ﻰ ﻗﺳ ﻣﯾن .اﻟﻘﺳ م اﻷول ﯾﺷﻣل اﻟدﺧول ﻓﻲ $5.000إﻟﻲ $10.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},{anova }} 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] 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 ٣٤٠
F 126.96
dse=n-2 8 mse1=sse/(n-2) 0.253 f1=msr/mse1 9.88142 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,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 Maxmse, mse1 ff Minmse, 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 ﻟﺣﺳﺎب ﺗﻘدﯾرات اﻟﻣﻌﺎﻟم ٣٤١
x
y
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
w
1 x2
xw
xyw
yw
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 w i yi wi
w i x i 2 wi
w i x i yi
b1
2
wixi
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
- 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
ﻣﺟﻣوع اﻟﻣرﺑﻌﺎت اﻟﻛﻠﻲ ﺳوف ﯾﻛون: ٣٤٤
w 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
2 w i yi wi
2
SSTO y i w i
0.307804
ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ.
ﻣ ن اﻟﺟ دول اﻟﺳ ﺎﺑق وﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ 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.35
0.3
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,20,2 }0 }{5.,5,5,5,5,10,10.,10,10,10.,15,15,15,15,15,20,20,20,20,20 ]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.0044444 4,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,20,2 ;}0 ]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 ffx1 y1 w ffx1 w ffy1 w ffw
ffw x1 ^2 ffx1^2 w ffw 0.249487
b0
ff y1 w ffx1 w b1 ffw ffw
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.25
0.3
0.35
0.4
0.45
0.5
-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ﻋﻼﻗﮫ ﺧطﯾﮫ. ٣٤٩
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
y 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
٣٥٠
x2 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
xy 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
20
30
10
ﺷﻛل )(٥٨-٤ اﻵن ﻧﺣﺳب ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ﻛﺎﻟﺗﺎﻟﻲ:
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ﻷﯾﺟﺎد ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘ درة وذﻟ ك ﻣ ن اﻟﺑﯾﺎﻧ ﺎت اﻟﻣﻌط ﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ:
٣٥٤
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
x2
e 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
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
٣٥٥
xe 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
339.822
91629
2137
x 2137 , e 339.822 x 2 91629 , x e 14847
ﺣﯾث: 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ھ و ﻣﻌﻛ وس ﻣرﺑ ﻊ اﻷﻧﺣ راف اﻟﻣﻌﯾ ﺎري واﻟﻣﺣﺳ وب ﻣ ن اﻟﻣﻌﺎدﻟﮫ اﻟﻣﻘدره اﻟﺳﺎﺑﻘﮫ واﻟﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ .
٣٥٦
s
1 s2 w
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
0.14657 0.126617 0.0972512 0.110485 0.171608 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 ٣٥٧
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.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
2 xiwi wi
x i yi w i
b1 wi
2
xi
0.596342 , xi w i
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.
df
Source
F
MS
56.64
83.3408 83.3408
1
Regression
-
76.5135 1.47141
52
Residual
-
159.854
53
Total
-
SS
ﺑﻣ ﺎ أن ﻗﯾﻣ ﺔ Fاﻟﻣﺣﺳ وﺑﺔ ) (56.64ﺗزﯾ د ﻋ ن ﻗﯾﻣ ﺔ Fاﻟﺟدوﻟﯾ ﮫ F0.05 [1,52] 4.08ﻓﺈﻧﻧﺎ ﻧرﻓض ﻓرض اﻟﻌدم .H0 ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل وذﻟك ﺑﺎﺳﺗﺧدام اﻟﺤﺰﻣﺔ اﻟﺠﺎھﺰة: 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},{32,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,101},{46,83},{46 },80},{47,96},{45,92},{49,80},{48,70},{54,71},{52,86},{53,79 ,{52,85},{50,71},{50,91},{52,100},{55,76},{57,99},{56,92},{5 ;}}9,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] {BestFit56.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.342301 },{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.54199} ,{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.4216} ,{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.3 9769,0.11717,36.2666,7.06337,29.1362,60.2528,1.64374,39.6641 ,34.3644,8.28275,0.49288,0.3112,66.2252,77.4734,0.145871,163 .889,6.46173,92.5072,14.2743,87.5752,72.5601,1.20616,37.1887 ,114.026,113.249,20.0863,37.966,269.668,0.026132,8.05621,158 .297,94.9004,20.9621,195.955,271.544,0.101462,62.3873,1.7385 2,200.462,34.1235,187.183,145.41,95.6741,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[ages] }]; absregress=Regress[absrespoints,{1,x},x,RegressionReport>BestFit] {BestFit-1.54948+0.198172 x} pred=absregress=Regress[absrespoints,{1,x},x,RegressionRepor t->PredictedResponse] {PredictedResponse{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.6 03,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.37741,6.77376 ,6.97193,6.97193,7.1701,6.37741,6.77376,7.56645,8.16097,7.56 645,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.09 ٣٦١
72512,0.0692093,0.0862599,0.0567564,0.0862599,0.0625204,0.07 7032,0.0435472,0.0401571,0.0473853,0.0371481,0.0401571,0.051 7542,0.0473853,0.0279539,0.0299026,0.0279539,0.034465,0.0299 026,0.0261896,0.0245873,0.0217942,0.0205728,0.0205728,0.0194 513,0.0245873,0.0217942,0.0174669,0.0150147,0.0174669,0.0174 669,0.0165867,0.0184191,0.0150147,0.0157714,0.0119395,0.0130 449,0.0124738,0.0130449,0.0143112,0.0143112,0.0130449,0.0114 387,0.0105273,0.0109688,0.00972062,0.0101119,0.0105273} rg1=Regress[bpdata,{1,x},x,Weights>wghts1,RegressionReport->{BestFit,ANOVATable}]
BestFit55.56580.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.186811010
: وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ اﻟﻣدﺧﻼت: اوﻻ اﻟﻘﺎﺋﻤﺔ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]]
ﻣن اﻻﻣرx i ﻣﻘﺎﺑلei ﯾوﺿﺢ رﺳم اﻟﺑواﻗﻲ [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,RegressionRepor ]t->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 r 2 (x i )2 2 (yi ) 2 x i yi n n x i y i
SXY SXX.SYY
ﺣﯾث 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.162 13.8 0.111 9.2
0.050 6.3 0.074 16.6
0.120 9.5 0.154 20.6
0.088 11.6 0.055 7.0
أوﺟد ﻣﻌﺎﻣل اﻻرﺗﺑﺎط اﻟﺑﺳﯾط .
اﻟﺣــل : n 16 , x i 1.656 , yi 170.6 , ٣٦٤
0.066 4.6 0.112 8.0
x y x y
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 n2
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 n2 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 v ln 2 1 r
1 1 0 ln ھﻲ ﻗﯾﻣﺔ ﻟﻣﺗﻐﯾر ﻋﺷواﺋﻲ Vﺗﻘرﯾﺑﺎ ً ﯾﺗﺑﻊ اﻟﺗوزﯾﻊ اﻟطﺑﯾﻌﻲ ﺑﻣﺗوﺳط 2 1 0
٣٦٦
V
1 وﺗﺑﺎﯾن n 3
، 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 2c 2 1 e 2 c2 1
z / 2 ﺣﯾث أن n 3 ﻟﻠﺑﯾﺎﻧﺎت ﻓﻲ اﻟﻣﺛﺎل اﻟﺳﺎﺑق ﻓﺈن : n 20,
,
c1 v ,
e 2 c1 1 e2 c1 1
z / 2 n 3 v 0.935
c2 v ,
r 0.733
c1 .935 1.96 / 17 .460, c 2 .935 1.96 / 17 1.410 ﺑﺎﻟﺗﻌوﯾض ﻓﻲ اﻟﺻﯾﻐﺔ اﻟﺗﺎﻟﯾﺔ ﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ 95%ﻓﺗرة ﺛﻘﺔ ﻟﻠﻣﻌﻠﻣﺔ ﻛﺎﻟﺗﺎﻟﻲ :
e2(1.410) 1 e2(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,alpha, 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[",n2,"],"]; 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,p0,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,tai l]]]; oppbavg={0.240,0.254,0.249,0.245,0.250,0.252,0.254,0.270,0.2 74,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.51 2,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.2 74,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.51 2,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إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﻟﺗوﻓﯾق ﻣﻌﺎدﻟﺔ إﻧﺣدار ﺧطﻲ ﻣﺗﻌدد ﺑﺈﺳﺗﺧدام ﻛﻣﯾﺔ اﻷﻣطﺎر وﻛﻣﯾﺔ اﻟﺳﻣﺎد ﻛﻣﺗﻐﯾرات ﻣﺳﺗﻘﻠﺔ. y
1000 450 1200 700 800 1100 1050 1150 1000 950 1300.
x2
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 : ﺳﺗﻛون ﻋﻠﻰ اﻟﺷﻛل اﻟﺗﺎﻟﻲXX اﻟﻣﺻﻔوﻓﺔ 1 16 510 10700 1 1 1 1 22 450 , X 'y 213250 XX 16 22 22 6 510 450525 5.26525 10 1 22 525 :ﺗﻘدﯾرات اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ﺳوف ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻛﺎﻟﺗﺎﻟﻲ 1 b XX Xy . :أي 1
10700 216 5350 b0 11 b 216 4362 105410 213250 1 b 2 5350 105410 2.6124 106 5.26525 106 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 . ﯾﻌطﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ اﻟﻣﺷﺎھدات yواﻟﻘﯾم اﻟﻣﻘدرة ˆ yواﻟﺑواﻗﻰ :e ˆy 69.5826 342.664
118.897 133.259 55.3967 139.086 66.6896 97.7338 6.1131 148.419 89.0963
ˆe y y
1069.58 792.664 1081.1 566.741 744.603 960.914 1116.69 1052.27 1006.11 1098.42 1210.9
y
1000 450 1200 700 800 1100 1050 1150 1000 950 1300.
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ 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},{17,4 50,800},{25,475,1100},{18,515,1050},{20,500,1150},{21,490,10 }}00},{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,2 5,475},{1,18,515},{1,20,500},{1,21,490},{1,19,510},{1,22.,52 5}} 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 6
11., 216., 5350., 216., 4362., 105410., 5350., 105410., 2.6124 10 v=Inverse[w] {{23.0157,-0.0271387,-0.0460394},{-0.0271387,0.00922992,0.000316848},{-0.0460394,-0.000316848,0.000107453}} xpy=xpr.y 6 10700., 213250., 5.26525 10 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,1052 .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,74 4.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] ٣٧٨
69.5826 342.664
118.897 133.259 55.3967 139.086 66.6896 97.7338 6.1131 148.419 89.0963
1069.58 792.664 1081.1 566.741 744.603 960.914 1116.69 1052.27 1006.11 1098.42 1210.9
1000 450 1200 700 800 1100 1050 1150 1000 950 1300.
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻋﺪد اﻟﻤﺘﻐﯿﺮات ﻣﻦ اﻻﻣﺮ p=2 yاﻟﻤﺴﻤﻰ ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻧﻰ واﻟﻘﺎﺋﻤﺔ x2ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه x1واﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ .
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﻣﻌﺎدﻟﺔ اﻹﻧﺣدار اﻟﻣﺗﻌدد اﻟﻣﻘدرة: 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 yy
n (10700)2 11000000 11 591818 , ( y j )2 n
SSR bX'y
10779427.8 10408181.8
371246 , SSE yy bX ' y SYY SSR 591818 371246 220572 . ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ :
F 6.73243 -
MS 185623 27571.5 -
SS 371246 220572 591818
SSR 371246 .627. SYY 591818
df 2 8 10
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},{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.,5 25}} 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 6 10700., 213250., 5.26525 10 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,1052 .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,74 4.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
R 2 اﯾﺿ ﺎ.v ﻧﺣﺻ ل ﻋﻠﯾﮭ ﺎ ﻣ ن اﻻﻣ ر XX
1
واﻟﻣﺻ ﻔوﻓﺔ .05 ﻣﺳ ﺗوى اﻟﻣﻌﻧوﯾ ﺔ ﻣ ن اﻻﻣ ر ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر R2=ssr/ssto
واﻟﻣﺧرج ھو 0.627298 ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرs 2 XX
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.48,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.2 70,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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w inpct[[i]]},{i,1,Length[winpct]}] {{3.33,0.276,0.24,0.625},{3.51,0.249,0.254,0.512},{3.55,0.24 9,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.2 64,0.27,0.463},{4.31,0.27,0.274,0.512},{4.48,0.24,0.264,0.40 5},{4.53,0.259,0.28,0.45},{4.55,0.252,0.266,0.48},{4.62,0.25 8,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
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
Batting
Average
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] {BestFit0.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, Model EstimatedVariance 0.00046457, ANOVATable Error Total
DF 3 10 13
SumOfSq 0.0357907 0.0046457 0.0404364
MeanSq 0.0119302 0.00046457
FRatio 25.6801
Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3}]
٣٨٨
PValue 0.000051525
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, DF 6 7 13
Model EstimatedVariance 0.000611483, ANOVATable Error Total
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] 2.73914 44.9816 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
836.777 4.13907 58.082 0.0360002 49.0586 2961.71 7.89514 81.6642 4420.59 23.2543 5.8585 283.878 1.88114 283.878 16036.7 58.7984 1.88114 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.772577 1. 0.84623 0.976785 0.84623 1. 0.992006 0.806985 0.961426 0.911457 0.806625 0.855696 0.867621 0.987375 0.985224 0.436877 0.0482087 0.235956
0.992006 0.911457 0.806985 0.806625
0.961426 1. 0.955271 0.988351 0.466086
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
٣٨٩
وﻓﯾﻣﺎ ﯾﻠﻰ اﻟﻣدﺧﻼت و اﻟﻣﺧرﺟﺎت ﻟﮭذا اﻟﺑرﻧﺎﻣﺞ : اوﻻ :اﻟﻣدﺧﻼت ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻧﻰ و ownbavgﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻻول و اﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه teameraاﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ winpct .اﻟﻤﺴﻤﺎه ﻟﻘﯿﻢ اﻟﻤﺘﻐﯿﺮ اﻟﻤﺴﺘﻘﻞ اﻟﺜﺎﻟﺚ واﻟﻘﺎﺋﻤﺔoppbavgاﻟﻘﺎﺋﻤﺔ اﻟﻤﺴﻤﺎه
ﺛﺎﻧﯾﺎ :اﻟﻣﺧرﺟﺎت ﺷﻛل اﻻﻧﺗﺷﺎر ﺑﯾن اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل اﻻول واﻟﻣﺗﻐﯾر اﻟﺗﺎﺑﻊ ﺗﻌطﻰ ﻣن اﻻﻣر 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 واﻟﻤﺨﺮج ھﻮ }{BestFit0.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
DF 3 10 13
SumOfSq 0.0357907 0.0046457 0.0404364
Model Error Total
EstimatedVariance 0.00046457, ANOVATable
ﻻﺧﺗﺑﺎر ﻣﻌﻧوﯾﺔ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار أي اﺧﺗﺑﺎر ﻓرض اﻟﻌدم H 0 : 1 2 3 0 ﺿ د اﻟﻔ رض اﻟﺑ دﯾل ان واﺣ د ﻋﻠ ﻰ اﻻﻗ ل ﻣ ن i 0,i 1, 2,3ﻧﺣﺻ ل ﻋﻠ ﻰ ﺟ دول ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾن اﻟﺳ ﺎﺑق ﺣﯾ ث ﻗﯾﻣ ﺔ fاﻟﻣﺣﺳ وﺑﺔ ھ ﻰ 25.6801وﺑﻣ ﺎ ا ن ﻗﯾﻣ ﺔ pاﻗ ل ﻣ ن .01ﻓﺈﻧﻧ ﺎ ﻧرﻓض ﻓرض اﻟﻌدم .ﻗﯾﻣﺔ ﻣﻌﺎﻣل اﻟﺗﺣدﯾد اﻟﻣﻌ دل ) (.850644واﻟﺗ ﻰ ﺗﻌﻧ ﻰ ان 85%ﻣ ﻦ اﻟﺘﻐﯿ ﺮ ﻓ ﻰ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ﯾﻌود اﻟﻰ اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ.اﯾﺿ ﺎ ﻣ ن ﺟ دول اﻟﻣﻌﻠﻣ ﺔ ﻧﺟ د ان ﻗﯾﻣ ﺔ 0000313646 = pﻟﻠﻣﺗﻐﯾر x2واﻟﺗﻰ ﺗﻌﻧﻰ ﻣﻌﻧوﯾﺔ ھذا اﻟﻣﺗﻐﯾر . ﺗﺣت ﻓرض ﻣﺗﻐﯾرات ﺟدﯾدة ﻣﺛل x1x 2 , x1x 3 , x 2 x 3وﺑﺎﺳﺗﺧدام اﻻﻣر ]}Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 x3},{x1,x2,x3 ﻧﺣﺻل ﻋﻠﻰ اﻟﺟدول اﻟﺗﺎﻟﻰ : PValue 0.538264 0.789741 0.731713 , RSquared 0.894145, 0.515049 0.517525 0.593538 0.518942
TStat 0.646997 0.277055 0.356858 0.685554 0.68139 0.559074 0.679013
SE 6.70683 0.528633 23.6866 35.3193 2.42043 126.636 1.41262
Estimate 4.3393 0.146461 8.45276 24.2133 1.64926 70.7988 0.959189
1 x1 x2 ParameterTable x3 x1x2 x2x3 x1x3
AdjustedRSquared 0.803413, PValue 0.00402332
FRatio 9.85473
MeanSq 0.006026 0.000611483
SumOfSq 0.036156 0.00428038 0.0404364
DF 6 7 13
Model EstimatedVariance 0.000611483,ANOVATable Error Total
ﻻﺧﺗﺑﺎر ﻓرض اﻟﻌدم ﺿد اﻟﻔرض اﻟﺑدﯾل ان واﺣ د ﻋﻠ ﻰ اﻻﻗل ﻣ ن i 0,i 1, 2,...7ﻧﺣﺻ ل ﻋﻠﻰ ﺟ دول ﺗﺣﻠﯾ ل اﻟﺗﺑ ﺎﯾن اﻟﺳ ﺎﺑق ﺣﯾ ث ﻗﯾﻣ ﺔ fاﻟﺟدوﻟﯾ ﺔ ھ ﻰ .9.85473وﺑﻣ ﺎ ان ﻗﯾﻣ ﺔ pاﻗ ل ﻣ ن .01ﻓﺈﻧﻧ ﺎ ﻧ رﻓض ﻓ رض اﻟﻌ دم .ﻗﯾﻣ ﺔ ﻣﻌﺎﻣ ل اﻟﺗﺣدﯾ د اﻟﻣﻌ دل ) (.803413واﻟﺗ ﻰ ﺗﻌﻧ ﻰ ان 80.3%ﻣﻦ اﻟﺘﻐﯿﺮ ﻓﻰ اﻟﻤﺘﻐﯿﺮ اﻟﺘﺎﺑﻊ ﯾﻌود اﻟ ﻰ اﻟﻣﺗﻐﯾ رات اﻟﻣﺳ ﺗﻘﻠﺔ.اﯾﺿ ﺎ ﻣ ن ﺟ دول اﻟﻣﻌ ﺎﻟم ﻧﺟ د ان ﻗﯾﻣﺔ pﻏﯾر ﻣﻌﻧوﯾﺔ ﻟﺟﻣﯾﻊ اﻟﻣﺗﻐﯾرات . ﻣﺻﻔوﻓﺔ اﻟﺗﻐﺎﯾر واﻟﺗﺑﺎﯾن ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر cov=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 ]x3},{x1,x2,x3},RegressionReport->CovarianceMatrix
واﻟﻣﺧرج ھو :
٣٩١
155.174 234.987 14.7961 10.5961 15.0672 1.03209
836.777 4.13907 58.082 0.0360002 49.0586 2961.71 7.89514 81.6642 4420.59 23.2543 5.8585 283.878 1.88114 283.878 16036.7 58.7984 1.88114 58.7984 1.9955
804.323 1247.45 81.6642 4420.59 23.2543
561.055 804.323 49.0586 2961.71 7.89514
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
ﻣﺻﻔوﻓﺔ اﻻرﺗﺑﺎط ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر corr=Regress[dpoints,{1,x1,x2,x3,x1 x2,x2 x3,x1 ;]x3},{x1,x2,x3},RegressionReport->CorrelationMatrix ]]corr[[1,2 واﻟﻣﺧرج ھو 0.985224 0.436877 0.867621 0.0482087 0.987375 0.235956 0.988351 0.466086 0.926149 0.550177 1. 0.328687 0.328687 1.
0.992006 0.911457 0.806985 0.806625
0.855696 0.955271 1. 0.926149 0.550177
0.961426 1. 0.955271 0.988351 0.466086
1. 0.772577 0.976785 0.772577 1. 0.84623 0.976785 0.84623 1. 0.992006 0.806985 0.961426 0.911457 0.806625 0.855696 0.867621 0.987375 0.985224 0.436877 0.0482087 0.235956
ﻣﺻﻔوﻓﺔ اﻻرﺗﺑﺎط ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻋﻠﻰ ﺷﻛل ﻗﺎﺋﻣﺔ ﻣن اﻻﻣر ]]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ﻓﻲ اﻟﻣﻌﺎدﻟﺔ اﻟﺳﺎﺑﻘﺔ .
ﻣﺛﺎل)(٤-٥ ﻷزواج اﻟﻘﯾﺎﺳﺎت اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗ ﺎﻟﻰ أوﺟ د اﻻﻧﺣ دار اﻟﻣﻘ درة ﻟﻧﻣ وذج اﻧﺣ دار ﻣ ن اﻟدرﺟ ﺔ اﻟﺛﺎﻧﯾﺔ. 9 10 53.80 62.00
2 3 4 5 6 7 8 10.20 15.35 20.50 25.95 32.20 38.50 46.00
1 5.0
x y
اﻟﺣــل : ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدرة ھﻲ :
yˆ x 1.48083 3.792313x 0.223674x2 . واﻟﺗﻣﺛﯾل اﻟﺑﯾﺎﻧﻲ ﻟﮭﺎ ﻣوﺿﺢ ﻓﻲ ﺷﻛل ).(١-٥ ﺷﻛل )(١- ٥
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ . 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.95}, {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,4 9},{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.13 45,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,3 8.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
4
6
8
10
12
14
Graphics 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
4
6
8
10
12
14
4
6
8
10
12
14
Graphics Show[g,dd] y 70 60 50 40 30 20 10 x 2
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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; dpoints=Table[{oppbavg[[i]],winpct[[i]]},{i,1,Length[winpct] }]; 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, EstimatedVariance 0.00148225, ANOVATable
Model Error Total
DF 2 11 13
Regress[dpoints,{1,x,x^2,x^3},x]
٣٩٦
SumOfSq 0.0241316 0.0163048 0.0404364
MeanSq 0.0120658 0.00148225
FRatio 8.14018
PValue 0.00676837
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, EstimatedVariance 0.00160171, ANOVATable
DF 3 10 13
Model Error Total
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] اﻟﻤﺨﺮج ﻟﮭﺬا.ﻧﺤﺼﻞ ﻋﻠﻰ اﻟﺠﺪول اﻟﺘﺎﻟﻰ واﻟﺬى ﻧﺘﻌﺎﻣﻞ ﻣﻌﮫ ﻛﻤﺎ ﻓﻰ اﻟﺠﺪاول اﻟﻤﺨﺮﺟﺔ ﻓﻰ ﺣﺎﻟﺔ اﻻﻧﺤﺪار اﻟﻤﺘﻌﺪد : اﻻﻣﺮ ھﻮ
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, 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]
:ﺣﯿﺚ ﻧﺤﺼﻞ ﻋﻠﻰ اﻟﺠﺪول اﻟﺘﺎﻟﻰ
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, EstimatedVariance 0.00160171, ANOVATable
Model Error Total
DF 3 10 13
SumOfSq 0.0244192 0.0160171 0.0404364
MeanSq 0.00813974 0.00160171
FRatio 5.08189
PValue 0.0215877
.واﻟﺬى ﻧﺘﻌﺎﻣﻞ ﻣﻌﮫ ﻛﻤﺎ ﻓﻰ اﻟﺠﺪاول اﻟﻤﺨﺮﺟﺔ ﻓﻰ ﺣﺎﻟﺔ اﻻﻧﺤﺪار اﻟﻤﺘﻌﺪد ٣٩٧
ﻣﺛﺎل)(٦-٥ ﻷزواج اﻟﻣﺷﺎھدات اﻟﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ ﺣﯾث 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 5358x2. واﻟﻣوﺿﺢ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل ) (٣- ٥ﻣﻊ ﺷﻛل اﻻﻧﺗﺷﺎر. ﺷﻛل )(٣- ٥ ٣٩٨
ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻰ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ. SS MS F 2084779.4 1042389.691 25.077
df 2
S.O.V
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,3708, }3333,3517,3241,3103,2776 {2508.,2518,3304,3423,3057,3190,3500,3883,3823,3646,3708,333 }3,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,1600,1 }764,1936,2116
]}ss=Transpose[{x1,x2,y {{16,256,2508.},{18,324,2518},{20.,400.,3304},{22,484,3423}, {24,576,3057},{26,676,3190},{28,784,3500},{30,900,3883},{32,
٣٩٩
1024,3823},{34,1156,3646},{36,1296,3708},{38,1444,3333},{40, 1600,3517},{42,1764,3241},{44,1936,3103},{46,2116,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,1936},{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,784,900, 1024,1156,1296,1444,1600,1764,1936,2116}} w=xpr.xx 7
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 6 7 52530., 1.64511 10 , 5.55659 10 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,3651. ٤٠٠
87,3676.4,3664.64,3616.59,3532.26,3411.64,3254.73,3061.54,28 32.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},{3057, 3360.57,-303.571},{3190,3493.96,-303.957},{3500,3591.06,91.0562},{3883,3651.87,231.131},{3823,3676.4,146.604},{3646, 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] 6 6 2, 2.08478 10 , 1.04239 10 , 25.0765 {13,540388.,41568.3,--} 6 15, 2.62517 10 , ,
source regression residual Total
anova df 2 13 15
SS 2.08478 106 540388. 2.62517 106
MS 1.04239 106 41568.3
F 25.0765
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 ٤٠٢
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 1 x 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
٤٠٧
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
x2 2 3 3 2 2 2 3 3 3 2 3 2 3 2 2 2 2 2 3 2
y 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
2 8.9 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.63964x 1 0.438x 2 : ﺗﺣﺳ ب ﻣ ن اﻟﻌﻼﻗ ﺔ اﻟﺗﺎﻟﯾ ﺔe j ﻣﻌط ﺎة ﻓ ﻲ اﻟﺟ دول اﻟﺗ ﺎﻟﻰ ﺣﯾ ثe j اﻟﺑ واﻗﻲ
. e j y j yˆ j yj 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
yˆ j
ej
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.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
)أ( رﺳم x 2ﻣﻘﺎﺑل x1ﻣوﺿﺢ ﻓﻲ ﺷﻛل ): (٤-٥ x2 50 40 30 20 10
x1
17.5
20
15
12.5
10
7.5
2.5
5
ﺷﻛل )(٤-٥ ﯾﺗﺿﺢ ﻣن ﺷﻛل ) (٤-٥وﺟود ﺑﻌض اﻟﻣﺷﺎھدات اﻟﻘﺎﺻﯾﺔ. )ب( رﺳم اﻟﺑواﻗﻲ eiﻣﻘﺎﺑل yˆ iﻣوﺿﺢ ﻓﻲ ﺷﻛل ): (٥-٥ ei e 3 2 1 y 50
40
20
30
10 -1 -2 -3
ﺷﻛل )(٥-٥
)ج( رﺳم اﻟﺑواﻗﻲ eiﻣﻘﺎﺑل x1ﻣوﺿﺢ ﻓﻲ ﺷﻛل ): (٦-٥
٤١١
e 3 2 1
x1
17.5
20
15
12.5
10
7.5
2.5
5
-1 -2 -3
ﺷﻛل )(٦-٥ رﺳم اﻟﺑواﻗﻲ eiﻣﻘﺎﺑل x 2ﻣوﺿﺢ ﻓﻲ ﺷﻛل ): (٧-٥
e 3 2 1 x2 40
35
30
25
20
15
10
5 -1 -2 -3
ﺷﻛل )(٧-٥ ٤١٢
) (٢-٤-٥اﻟﺑواﻗﻰ اﻟﻣﻌﯾﺎرﯾﺔ وﺑواﻗﻰ ﺳﺗﯾودﻧت ﻓ ﻲ اﻟﻔﺻ ل اﻟﺳ ﺎﺑق ﺗﻧﺎوﻟﻧ ﺎ ﻧ وﻋﯾن ﻣ ن اﻟﺑ واﻗﻲ ھﻣ ﺎ اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ وﺑ واﻗﻲ ﺳ ﺗﯾودﻧت وذﻟ ك ﻟﻠﻛﺷ ف ﻋ ن ﻣﺷ ﺎھدات ﻗﺎﺻ ﯾﺔ ﻓ ﻲ ٠ Yﺗﻌ رف اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ ﻛﺎﻟﺗﺎﻟﻲ. , j 1,2, , n
ej
dj
MSE ﻟﻠﻣﺛ ﺎل ) (٧-٥ﻓ ﺎن رﺳ م اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ 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ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ٠
٤١٤
h jj
rj - 1.37185 - 0.582809
e - 1.95628 - 0.850131
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.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
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 jﻣﻘﺎﺑل yˆ jﻣﻌطﺎة ﻓﻲ ﺷﻛل ).(٩-٥ ﺷﻛل )(٩-٥ r 3 2 1 y
50
47.5
45
42.5
40
37.5
35
32.5 -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ھ ذا وﻗ د ﺑﻠﻐ ت
2
20
ﻗ ﯾم اﻟراﻓﻌ ﺎت اﻟﻣﻧ ﺎظرة ﻟﮭ ذه اﻟﺣ ﺎﻻت ﻋﻠ ﻲ اﻟﺗ واﻟﻲ .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 np2
s(2j)
ﻓﺈﻧ ﮫ ﺗﺣ ت اﻟﻔ روض اﻟﻘﯾﺎﺳ ﯾﮫ ﻓ ﺎن t jﯾﺗﺑ ﻊ ﺗوزﯾ ﻊ tﺑ درﺟﺎت ﺣرﯾ ﮫ ٠ n p 2ﺗﻌﺗﺑ ر ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت اﻟﻣﺣذوﻓ ﺔ طرﯾﻘ ﺔ ﻣﻧﺎﺳ ﺑﺔ ﻷﻛﺗﺷ ﺎف اﻟﻘ ﯾم اﻟﻘﺎﺻ ﯾﮫ ٠ﺑ واﻗﻲ ﺳ ﺗﯾودﻧت اﻟﻣﺣذوﻓﮫ ﻣﻌطﺎة ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ٠
وﯾ ﺗم ﻣﻘﺎرﻧ ﺔ ﻗ ﯾم t jﺑﺎﻟﻘﯾﻣ ﺔ اﻟﺟدوﻟﯾ ﺔ
)(n p 2
2
1
t
ﻋﻧ د درﺟ ﺎت
ﺣرﯾ ﺔ n p 2
و
ذﻟ ك ﻟﺗﺣدﯾ د ﻣﺷ ﺎھدات اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ اﻟﻘﺎﺻ ﯾﮫ ﻟﻠﻣﺛ ﺎل ) .(٧-٥وﺑﻣ ﺎ ان ﺣﯾث .1وﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ھذه اﻟﻘﯾﻣﺔ ﻣن ﺑرﻧﺎﻣﺞ Mathematica وﺑﻣ ﺎ أن اﻟﻣﺷ ﺎھدة y9 44ﻟﮭ ﺎ ﺑ ﺎﻗﻲ ﺳ ﺗودﻧت اﻟﻣﺣ ذوف t9 2.56256وﺑﻣ ﺎ أن t 9 2.56256 1.746ﻓﺈﻧﻧﺎ ﻧﻌﺗﺑر أن اﻟﻣﺷﺎھدة y9ﻣﺷﺎھدة ﻗﺎﺻﯾﮫ. t 0.05 (16) 1.746
٤١٧
h jj
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
1.95628 0.850131
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
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
50
47.5
45
42.5
40
37.5
35
32.5 -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
50
-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]} 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
٤٢١
35
40
n=l[x1] 20 k[x_]:=Apply[Plus,x] 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 ListPlotpp3, aa, a2, AxesLabel "y ", "d" d 2
1.5 1 0.5 y
32.5
35
37.5
40
42.5
45
-0.5 -1 -1.5 -2
Graphics
hjj=xx.v.xpr;
٤٢٢
47.5
50
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]],hjj[[15,15] ],hjj[[16,16]],hjj[[17,17]],hjj[[18,18]],hjj[[19,19]],hjj[[2 0,20]]} {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.0 699287,0.0849159,0.0795539,0.0590002,0.0849517,0.0908409,0.0 8503,0.0940101}
e ri N mse1 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 ListPlotpp5, 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.86455 ,2.98048,2.80886,2.94905,3.01579,2.75381} ٤٢٣
e tj N s2j1 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 ListPlotpp9, 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.63964x 1 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
رﺳ م اﻟﺑ واﻗﻲ اﻟﻣﻌﯾﺎرﯾ ﺔ اﻻﻣر
d
ﻣﻘﺎﺑ ل ˆ yاﻟﻣﻌط ﺎة ﻓ ﻲ ﺷ ﻛل ) ( ٨-٥ﻧﺣﺻ ل ﻋﻠﯾﮭ ﺎ ﻣ ن
g ListPlotpp3, aa, a2, AxesLabel "y ", "d"
ﺟدول
h j , e j , rj
واﻟﺑواﻗﻲ rﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
]TableForm[pp4
٤٢٥
رﺳم اﻟﺑواﻗﻲ
ri
ﻣﻘﺎﺑل ˆ yاﻟﻣﻌطﺎة ﻓﻲ ﺷﻛل ) ( ٩-٥ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر g ListPlotpp5, aa, a2, AxesLabel "y ", "r"
ﺟدول ﻗﯾم ﻛل ﻣن
h, e
واﻟﺑواﻗﻲ
tj
ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر ]TableForm[pp7
رﺳم اﻟﺑواﻗﻲ
tj
ﻣﻘﺎﺑل ˆ yاﻟﻣﻌطﺎة ﻓﻲ ﺷﻛل ) ( ١٠-٥ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر
g33 ListPlotpp9, 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.48,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.2 ;}70,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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506 ]Clear[dpoints dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w ;]}]inpct[[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
1
t
ﻋﻧ د درﺟ ﺎت
ﺣرﯾ ﺔ n p 2
و
ذﻟ ك ﻟﺗﺣدﯾ د ﻣﺷ ﺎھدات اﻟﻣﺗﻐﯾ ر اﻟﺗ ﺎﺑﻊ اﻟﻘﺎﺻ ﯾﮫ ﻟﻠﻣﺛ ﺎل ) (٩-٥وﺑﻣ ﺎ ان ﺣﯾث .05وﯾﻣﻛن اﻟﺣﺻول ﻋﻠﻰ ھذه اﻟﻘﯾﻣﺔ ﻣن اﻟﺑرﻧﺎﻣﺞ اﻟﺗﺎﻟﻰ وﺑﺎﺳﺗﺧدام اﻻﻣر
t 0.05 (9) 2.26216
])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 jj 2 h jj 2 DFFITS j t 1 h 1 h j jj jj
ﺣﯾ ث t jﺗﻣﺛ ل ﺑ ﺎﻗﻲ ﺳ ﺗﯾودﻧت اﻟﻣﺣ ذوف .ﻋﻣوﻣ ﺎ ً ﻓ ﻰ اﻟﻌﯾﻧ ﺎت اﻟﻛﺑﯾ رة أى ﻣﺷ ﺎھدة ﺗﻛون ﻟﮭﺎ
p 1 n
DFFITS j 2
أى ﻣﺷﺎھدة ﺗﻛون ﻟﮭﺎ
ﺗﻌﺗﺑر ﻣؤﺛرة .اﻣﺎ ﻓ ﻰ اﻟﻌﯾﻧ ﺎت اﻟﺻ ﻐﯾرة واﻟﻣﺗوﺳ طﺔ ﻓ ﺈن
DFFITSj 1
ﺗﻌﺗﺑر ﻣؤﺛرة .
)ب( اﻟﺗﺎﺛﯾر ﻋﻠﻰ ﻣﻌﺎﻣﻼت اﻻﻧﺣدار ﻣﻘﯾﺎس اﻻﺛر ﻋﻠﻲ ﻛل ﻣﻌﺎﻣﻼت اﻻﻧﺣدار)ﻣﻘﯾﺎس ﻛوك(
٤٢٨
ﻟﻘد اﻗﺗرح ) (cook 1979ﻣﻘﯾﺎس )ﻣﺳﺎﻓﺔ ﻛوك( ﻟﻣرﺑﻊ اﻟﻣﺳ ﺎﻓﺔ ﺑ ﯾن ﺗﻘ دﯾر اﻟﻣرﺑﻌ ﺎت اﻟﺻﻐرى اﻟﻣﺑﻧﻰ ﻋﻠﻰ ﻛل اﻟﻣﺷﺎھدات اﻟﺗﻰ ﻋددھﺎ nواﻟﺗﻘدﯾر ) b ( jاﻟذى ﻧﺣﺻ ل ﻋﻠﯾ ﮫ ﺑﻌ د ﺣذف اﻟﻣﺷﺎھدة رﻗم .j وﯾﻣﻛن ﺣﺳ ﺎب ﻣﻘﯾ ﺎس ﻣﺳ ﺎﻓﺔ ﻛ وك D jﺑ دون ﺗﻘ دﯾر ﻧﻣ وذج اﻧﺣ دار ﺟدﯾ د ﻓ ﻲ ﻛ ل ﻣرة ﺗﺣذف ﻓﯾﮭﺎ ﻣﺷﺎھدة ﻣﺧﺗﻠﻔﺔ واﻟﺻﯾﻐﺔ اﻟﻣﻛﺎﻓﺋﮫ ﺟﺑرﯾﺎ ھﻲ: e 2j
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.48,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.2 ;}70,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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506
٤٣٢
Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w inpct[[i]]},{i,1,Length[winpct]}]; hd=Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>HatDiagonal] {HatDiagonal{0.446993,0.231595,0.169291,0.182651,0.192002, 0.3769,0.174635,0.179229,0.315062,0.318829,0.371122,0.153562 ,0.119834,0.768295}} hdlist=hd[[1,2]] {0.446993,0.231595,0.169291,0.182651,0.192002,0.3769,0.17463 5,0.179229,0.315062,0.318829,0.371122,0.153562,0.119834,0.76 8295} 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.00283181,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ﻓ ﻲ ﻓﺗ رة زﻣﻧﯾ ﺔ أﺧ رى )j (i وھذا ﯾﺧﺎﻟف إﺣدى ﻓروض ﻧﻣوذج اﻹﻧﺣدار اﻟﺧط ﻲ وھ و ﻋ دم إرﺗﺑ ﺎط ﻗﯾﻣ ﺔ ﻓ ﻲ ﻓﺗرة زﻣﻧﯾﺔ ﻣﺎ ﻋن ﻗﯾﻣﺗﮭﺎ ﻓﻲ ﻓﺗرة زﻣﻧﯾﺔ ﺳ ﺎﺑﻘﺔ ،إي أن اﻹرﺗﺑ ﺎط ﺑ ﯾن i , jﻻ ﯾﺳ ﺎوي ٤٣٥
اﻟﺻ ﻔر ) . (E ( i j ) 0وﻣﻌﻧ ﻰ ذﻟ ك وﺟ ود اﻹرﺗﺑ ﺎط اﻟ ذاﺗﻲ أو اﻹرﺗﺑ ﺎط اﻟﺗﺳﻠﺳ ﻠﻲ . واﻹرﺗﺑﺎط اﻟذاﺗﻲ ﺣﺎﻟﺔ ﺧﺎﺻﺔ ﻣن اﻹرﺗﺑﺎط إذ ﯾﻘﯾس ﻟﻧﺎ درﺟﺔ اﻹرﺗﺑ ﺎط ﺑ ﯾن اﻟﻘ ﯾم اﻟﻣﺗﺗﺎﻟﯾ ﺔ ﻟﻧﻔس اﻟﻣﺗﻐﯾر ﺧﻼل ﻓﺗرة زﻣﻧﯾﺔ ﻣﺣددة وﻟﯾس ﺑﯾن ﻣﺗﻐﯾ رﯾن أو أﻛﺛ ر .وﺳﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ھﻧﺎ ﻓﻘط ﻋﻠﻰ اﻟﺣﺎﻟﺔ اﻟﺑﺳﯾطﺔ وھﻲ ﺣﺎﻟﺔ اﻟﻌﻼﻗ ﺔ اﻟﺧطﯾ ﺔ ﺑ ﯾن إي ﻗﯾﻣﺗ ﯾن ﻣﺗﺗ ﺎﻟﯾﺗﯾن ﻣ ن ﻗ ﯾم
وﺗﺗﺣدد إﺷﺎرة ﻣﻌﺎﻣل اﻹرﺗﺑﺎط اﻟذاﺗﻲ ﺣﺳب ﺗﻐﯾر إﺷﺎرة ﻗﯾم اﻟﺑ واﻗﻲ ،ﻓ ﺈذا ﺗﻐﯾ رت إﺷ ﺎرة اﻟﻘ ﯾم اﻟﻣﺗﺗﺎﻟﯾ ﺔ ﺑﺈﺳ ﺗﻣرار ﻓﯾﺄﺧ ذ اﻟﻣﻧﺣﻧ ﻰ اﻟﺗ ﺎرﯾﺧﻲ ﺷ ﻛل اﻷﺳ ﻧﺎن ﻛ ﺎن اﻹرﺗﺑ ﺎط ﺳ ﺎﻟﺑﺎ ، واﻟﻌﻛس إذا ﺣدث اﻟﺗﻐﯾر ﺑﺄن ﯾﺗﻠو ﻋددا ﻣن اﻟﻘﯾم اﻟﻣوﺟﺑﺔ ﻋددا أﺧر ﻣ ن اﻟﻘ ﯾم اﻟﺳ ﺎﻟﺑﺔ ﻛ ﺎن اﻹرﺗﺑﺎط ﻣوﺟﺑﺎ . إذا ﻛﺎﻧ ت ﺣ دود اﻟﺧط ﺄ ﻓ ﻲ ﻧﻣ وذج اﻹﻧﺣ دار ﻣرﺗﺑط ﺔ إرﺗﺑ ﺎط ذاﺗ ﻲ ﻣوﺟ ب ،ﻓ ﺈن إﺳﺗﺧدام طرﯾﻘﺔ اﻟﻣرﺑﻌﺎت اﻟﺻﻐرى ﯾﺗرﺗب ﻋﻠﯾﮫ ﻋدد ﻣن اﻟﻌواﻗب اﻟﻣﮭﻣﺔ وھﻲ : -١ﻻ ﺗزال ﻣﻌﺎﻣﻼت اﻹﻧﺣدار اﻟﻣﻘدرة ﻏﯾر ﻣﺗﺣﯾزة إﻻ أﻧﮭﺎ ﻻ ﺗﻣﺗﻠك ﺧﺎﺻﯾﺔ أﻗل ﺗﺑﺎﯾن . -٢ﻣﺗوﺳط ﻣرﺑﻌﺎت اﻟﺧطﺄ ﯾﻣﻛن أن ﯾﺷﻛل ﺗﻘدﯾرا ﺑﺎﻟﻧﻘﺻﺎن ﻟﺗﺑﺎﯾن ﺣدود اﻟﺧطﺄ . -٣ﺗﻌطﻰ اﻟﺗﻘدﯾرات ﻟﻸﺧطﺎء اﻟﻣﻌﯾﺎرﯾﺔ ﻟﻣﻘدرات ﻣﻌﺎﻣﻼت اﻹﻧﺣدار، ، s e (Bi ) , i 0,1,2,...,kواﻟﻣﺣﺳ وﺑﺔ ﺑطرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻ ﻐرى ﺗﻘ دﯾرا . ﺑﺎﻟﻧﻘﺻﺎن ﻟﻺﻧﺣراف اﻟﻣﻌﯾﺎري اﻟﺣﻘﯾﻘﻲ ﻟﻠﻣﻘدر B i -٤ﻟم ﺗﻌد ﻓﺗرات اﻟﺛﻘﺔ واﻹﺧﺗﺑﺎرات اﻟﺗﻲ ﺗﺳﺗﺧدم ﺗوزﯾﻌﺎت tأو Fﻗﺎﺑﻠﺔ ﻟﻠﺗطﺑﯾق . ﺗوﺟد طرق ﻛﺛﯾرة ﻻﻛﺗﺷﺎف ﻋدم اﺳﺗﻘﻼل اﻷﺧطﺎء وﺳ وف ﺗﻘﺗﺻ ر دراﺳ ﺗﻧﺎ ﻋﻠ ﻰ اﺧﺗﺑ ﺎر درﺑن -واﺗﺳون. اﺧﺗﺑﺎر درﺑن -واﺗﺳون إن اﻟﻧﻣوذج اﻟﺧطﻰ ) (١-٤ﻓﻲ وﺟود ارﺗﺑﺎط ذاﺗﻲ ﻣن اﻟرﺗﺑﮫ اﻷوﻟﻰ ھو: Yi 0 1x 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 2 ei i 1
ﻣﻊ ﻣﻼﺣظﺔ أن:
٤٣٧
n i 2
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 x i yi )(171)(150 x i yi 2255 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 i1 ) 2
٤٣٩
n 2 ei i 1
n i 2
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
3.2950
11.4840
13.8152 -1.8252 1.5736
12
12
ei
ﻣﺛﺎل )(١٢-٥ ٤٤٠
yˆ i
xi
yi
19.0376 0.9624
18
20
15.556
14
11 14
( ٣-٥ واﺗﺴﻮن ﻟﻼرﺗﺒﺎط اﻟﺬاﺗﻰ ﻟﻠﺒﻮاﻗﻰ )ﻣﺜﺎل- إﺳﺗﺧدم اﻟﺑﯾﺎﻧﺎت اﻟﺗﺎﻟﯾﺔ ﻻﺧﺘﺒﺎر درﺑﻦ 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.48,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.2 70,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.2 74,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.51 2,0.405,0.450,0.480,0.456,0.506}; Clear[dpoints] dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w inpct[[i]]},{i,1,Length[winpct]}]; Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>DurbinWatsonD] {DurbinWatsonD2.09999}
ﻣن ھذا اﻟﻣﺛﺎل ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣر
واﺗﺳون-ﻗﯾﻣﺔ دارﺑن
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] واﻟﻤﺨﺮج ھو {DurbinWatsonD2.09999} ٤٤١
واﻟﻣطﻠوب اﺳﺗﺧدام ﻟﺟداول دارﺑن -واﺗﺳون ﻛﻣﺎ ذﻛرﻧﺎ ﺳﺎﺑﻘﺎ ﻻﺧﺗﺑﺎر :ﻹﺧﺗﺑﺎرﻓرض اﻟﻌدم H 0 : 0ﺿد اﻟﻔرض اﻟﺑدﯾل H1 : 0 : ) (٧-٤-٥ﻣﺷﻛﻠﺔ ﻋدم اﻟﺧطﯾﺔ رﺳم اﻟﺑواﻗﻲ ﻣﻘﺎﺑل ﻛل ﻣﺗﻐﯾر ﻣﺳﺗﻘل x iﺣﯾث j 1, 2, , kواﻟ ذي ﯾﻣﻛ ن ان ﯾﻘ دم ﻣﻌﻠوﻣﺎت اﺿﺎﻓﯾﺔ ﺣول ﺻﻼﺣﯾﺔ ﻧﻣوذج اﻻﻧﺣدار ﺑﺎﻟﻧﺳﺑﺔ ﻟذﻟك اﻟﻣﺗﻐﯾ ر اﻟﻣﺳ ﺗﻘل ) ﻣﺛﻼ ﻗد ﻧﺣﺗﺎج اﻟﻰ ﺗﻣﺛﯾل ﻣﻧﺣﻧﻰ ﻟﺗ ﺄﺛﯾر ذﻟ ك اﻟﻣﺗﻐﯾ ر ( وﺣ ول ﺗﻐﯾ رات ﻣﻣﻛﻧ ﺔ ﻓ ﻲ ﻣﻘدار ﺗﺑﺎﯾن اﻟﺧطﺄ ﻓﯾﻣﺎ ﯾﺗﻌﻠق ﺑذﻟك اﻟﻣﺗﻐﯾر اﻟﻣﺳﺗﻘل٠ ﻣﺛﺎل)(١٣-٥ ﻟﮭذا اﻻﺧﺗﺑﺎر ﺳوف ﻧﺳﺗﺧدم اﻟﻣﺛﺎل )(١٢-٥ ﺳوف ﯾﺗم ﺣ ل ھ ذا اﻟﻣﺛ ﺎل ﺑﺈﺳ ﺗﺧدام ﺑرﻧ ﺎﻣﺞ ﻣﻛﺗ وب ﺑﻠﻐ ﺔ 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.48,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.2 ;}70,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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506 ]Clear[dpoints dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w ;]}]inpct[[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[teameraMin[teamera])/Length[teamera];ListPlot[Transpose[{teamera,mu ltiSTerr}],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,mu ltiSTerr} ],Prolog->{PointSize[0.02]},AxesOrigin->{Min[teamera]eps,0},PlotRange->{{Min[teamera]eps,Max[teamera]+eps},{Min[multiSTerr]eps,Max[multiSTerr]+eps}}]
ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر
r 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}}]
ﻣﻘﺎﺑلx2 رﺳم
ﻧﺣﺻل ﻋﻠﯾﮫ ﻣن اﻻﻣر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واﻟذى ﯾﺗم ﺣﺳﺎﺑﮫ ﻛﻣﺎﯾﻠﻰ: max i
w *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.48,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.2 ;}70,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.2 ;}74,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.51 ;}2,0.405,0.450,0.480,0.456,0.506 ]Clear[dpoints dpoints=Table[{teamera[[i]],ownbavg[[i]],oppbavg[[i]],w ;]}]inpct[[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]
EigenV 2.05464 EigenstructureTable 0.813183 0.132175
Index 1. 1.58955 3.9427
x1 0.0505137 0.0147281 0.934758
x2 0.0649444 0.899539 0.035517
x3 0.0508254 0.0338397 0.915335
ﻧﺣﺻل ﻋﻠﯾﮭﺎ ﻣن اﻻﻣرVIF ﻗﯾم Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>VarianceInflation]
ﻓﮭذا ﯾﻌﻧ ﻰ ﻋ دم وﺟ ود ﻣﺷ ﻛﻠﺔ ارﺗﺑ ﺎط ﺧط ﻰ ﺑ ﯾن10 ﻻ ﺗزﯾد ﻋنVIF وﺑﻣﺎ ان ﻛل ﻗﯾم .اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ
اﻻﻣر Regress[dpoints,{1,x1,x2,x3},{x1,x2,x3},RegressionReport>EigenstructureTable]
1, 2 , 3
ﯾؤدى إﻟﻰ اﻟﺣﺻول ﻋﻠﻰ ﺟدول ﯾﺣﺗوى اﻟﻌﻣود اﻻول ﻟﮫ ﻋﻠﻰ اﻟﻘﯾم اﻟﻣﻣﯾزة max i
و ﻗﯾم
ﻓﮭذا ﯾﻌﻧ ﻰ30 30 ﻻ ﺗزﯾد ﻋن
max i
اﻟﻣﻘﺎﺑﻠ ﺔ ﻟﮭ ﺎ ﻓ ﻰ اﻟﻌﻣ ود
1 2.05464, 2 .813183, 3 .132175
ﺣﯾث
وﺑﻣﺎ ان اﻛﺑر ﻗﯾﻣﺔ ل1,1.58955, 3.9427 اﻟﺛﺎﻧﻰ
.ﻋدم وﺟود ﻣﺷﻛﻠﺔ ارﺗﺑﺎط ﺧطﻰ ﺑﯾن اﻟﻣﺗﻐﯾرات اﻟﻣﺳﺗﻘﻠﺔ
٤٤٧
) (٥-٥ﻧﻣﺎزج اﻻﻧﺣدار اﻟﻐﯾر ﺧطﯾﺔ ﯾﺗﻧﺎول ھ ذا اﻟﻔﺻ ل ﻣﻘدﻣ ﮫ ﻣﺧﺗﺻ ره ﻋ ن ﻣﺷﺎﻛل اﻟﺗﻘ دﯾر ﻟﻠﻧﻣ ﺎذج اﻟﻐﯾ ر ﺧطﯾ ﮫ .ﻓ ﻲ اﻟﻔﺻ ل اﻟﺳ ﺎﺑق ﻛ ﺎن اھﺗﻣﺎﻣﻧ ﺎ ﺑﺗوﻓﯾ ق ﻧﻣ ﺎذج اﻻﻧﺣ دار ،ﺑﺈﺳ ﺗﺧدام طرﯾﻘ ﺔ اﻟﻣرﺑﻌ ﺎت اﻟﺻﻐري ،واﻟﺗﻰ ﺗﻛون ﺧطﯾﮫ ﻓﻲ اﻟﻣﻌﺎﻟم وﻋﻠﻲ اﻟﺷﻛل: 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
واﻟﻣطﻠوب ﺗوﻓﯾق اﻟﻧﻣوذج: x
y j 1e 3 j 2 j
اﻟﺣــل : ﺷ ﻛل اﻻﻧﺗﺷ ﺎر ﻟﻠﺑﯾﺎﻧ ﺎت ﻣﻌط ﺎه ﻓ ﻲ اﻟﺟ دول اﻟﺳ ﺎﺑق ﻣﻌط ﺎه ﻓ ﻲ ﺷ ﻛل ).(١١-٥ ﻣﻌﺎدﻟﺔ اﻻﻧﺣدار اﻟﻣﻘدره ھﻲ: yˆ 21.978 47.0884 e 0.033242
واﻟﻣﻣﺛﻠﮫ ﺑﯾﺎﻧﯾﺎ ﻓﻲ ﺷﻛل ) .(١٢-٥ﺷﻛل اﻻﻧﺗﺷ ﺎر ﻟﻠﺑﯾﺎﻧ ﺎت ﻣ ﻊ ﻣﻌﺎدﻟ ﮫ اﻻﻧﺣ دار اﻟﻣﻘ دره ﻣﻌطﻲ ﻓﻲ ﺷﻛل ).(١٣-٥ 70 60 50 40 30 20 10 100
80
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},PlotStylePointSize[0.015]] 70 60 50 40 30 20 10 20
40
60
80
100
Graphics 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 1023 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 1026 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 E0.0332431t
Tt_ : 21.9779835282673641` 47.0883658406797778`E0.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},PlotStylePointSize[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 E0.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 9 5 0. 0 6 88 7 1 4 0. 0 8 19 3 5 1 0. 0 7 37 0 3 4 0. 0 7 38 7 5 3 0. 0 7 12 3 9 6 0. 0 6 50 4 2 0. 0 5 47 6 6 7 0. 0 4 97 1 2 8 0. 0 6 42 7 2 7 0. 0 6 13 0 0 5 0. 0 6 43 5 7 6 0. 0 3 93 8 9 2
ﺷﻛل اﻻﻧﺗﺷﺎر ﻟﻠﺑﯾﺎﻧﺎت اﻟﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺳﺎﺑق ﻣﻌطﺎه ﻓﻲ ﺷﻛل ).(١٤-٥ 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
6
5
4
2
3
1
ﺷﻛل )(١٦-٥ ﻣﺟﻣوع ﻣرﺑﻌﺎت اﻟﺑواﻗﻲ ﻛﺎﻧت .000910677واﻟﺗﻰ أﻗل ﻣ ن ﻣﺟﻣ وع ﻣرﺑﻌ ﺎت اﻟﺑ واﻗﻲ ﻓ ﻲ ﺣﺎﻟ ﺔ ﻋ دم ﻣﻌرﻓ ﺔ اﻟﻘ ﯾم اﻟﻣﺑدﺋﯾ ﮫ .وھ ذا ﯾﻌﻧ ﻲ أن اﻟﺣ ل ﺑﺎﺳ ﺗﺧدام اﻟﻘ ﯾم اﻟﻣﺑدﺋﯾ ﮫ 1 0.5, 2 17ﻛﺎﻧ ت أﻛﺛ ر دﻗ ﮫ .ﻋ دد اﻟﺗﻛ رارات ﻟﻠوﺻ ول اﻟ ﻰ اﻟﺣ ل اﻟﻧﮭ ﺎﺋﻲ ﻣﻌطﺎه ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ. ˆ 2
ˆ 1
اﻟﺧطوه
17 7.1388 8.25897 9.47141 10.3259 10.6872 10.8141 10.8354
0.5 0.997294 0.924735 0.9117 0.90256 0.885534 0.877484 0.876086
1 2
٤٥٨
0.875935 0.87592 0.785918
10.8377 108379 10.838
وﺑﻣﺎ أن 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
ﺟدول ﺗﺣﻠﯾل اﻟﺗﺑﺎﯾن ﻣﻌطﻲ ﻓﻲ اﻟﺟدول اﻟﺗﺎﻟﻰ. F
MS
SS
df
S.O.V
336.9
0.02789
0.0557833
2
اﻻﻧﺣدار
0.0009107 0.00008279
11
اﻟﺧطﺄ
0.056694
13
اﻟﻛﻠﻲ
ﺳوف ﯾﺗم ﺣل ھذا اﻟﻣﺛﺎل ﺑﺈﺳﺗﺧدام ﺑرﻧﺎﻣﺞ ﻣﻛﺗوب ﺑﻠﻐﺔ Mathematicaوذﻟك ﺑﺎﺳﺗﺧدام اﻟﺣزﻣﺔ اﻟﺟﺎھزة `Statistics`NonlinearFit وﻓﯿﻤﺎ ﯾﻠﻰ ﺧﻄﻮات اﻟﺒﺮﻧﺎﻣﺞ و اﻟﻤﺨﺮﺟﺎت. `<<Statistics`NonlinearFit ecology={{0.417,0.0773895},{0.417,0.0688714},{0.417,0.081935 1},{0.833,0.0737034},{0.833,0.0738753},{0.833,0.0712396},{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.039389 2}}; 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];
appx_ :
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
app2x_ :
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
Graphics
٤٦٠
6
7
nrg1=NonlinearRegress[ecology,v/(k+x),x,{v,k},RegressionRepo rt->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},RegressionRepo rt->StartingParameters] {StartingParameters{v1,k1}} nrg2=NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Reg ressionReport->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}},ShowProg ress->True] Iteration:1 Iteration:2 Iteration:3 Iteration:4 Iteration:5 Iteration:6 Iteration:7 Iteration:8 Iteration:9 Iteration:10
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}
٤٦١
Iteration:11
ChiSquared:0.000910677
Parameters:{0.875918,10.838}
NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}}] BestFitParametersv0.875918,k10.838,
ParameterCITablev k
Estimate 0.875918 10.838
AsymptoticSE 0.251463 3.55508
CI 0.322452,1.42938, 3.01329,18.6627
Model EstimatedVariance0.000082789,ANOVATableError 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 MaxParameterEffects 95.%ConfidenceRegion
Curvature 0.0771249 0.734794 0.50111
NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regressi onReport->AsymptoticCovarianceMatrix] AsymptoticCovarianceMatrix
0.0632335 0.886452 0.886452 12.6386
NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regressi onReport->HatDiagonal] {HatDiagonal{0.172201,0.172201,0.172201,0.120973,0.120973, 0.120973,0.0817874,0.0817874,0.133218,0.133218,0.230156,0.23 0156,0.230156}} p=2; n=Length[ecology]; 2 p/n//N 0.307692 NonlinearRegress[ecology,v/(k+x),x,{{v,0.5},{k,17}},Regressi onReport->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}},ShowProg ress->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}},Regressi onReport->AsymptoticCovarianceMatrix]
٤٦٤