diff --git a/exam/data.csv b/exam/data.csv new file mode 100644 index 0000000..890d1d8 --- /dev/null +++ b/exam/data.csv @@ -0,0 +1,500 @@ +11.083405291463345 +6.692964444648614 +2.6039392614709937 +1.7077782564255832 +5.137439630916308 +-0.13627832025397257 +3.291070226768734 +5.015740403645195 +3.605704662394249 +1.8519070212956579 +1.5528506189001001 +1.0206899241006817 +6.100504237109908 +-0.25665689201966924 +-1.4332903305391316 +2.443992191807032 +-0.07033875336354445 +2.569368931810742 +3.38565212178479 +5.42424049430076 +-2.8751716729753607 +2.1134759536899335 +7.6399054745942765 +3.751390222916743 +1.7046489721490392 +3.463146997583174 +1.2885528779943232 +8.589848978319633 +9.20986102897035 +1.7660480688553757 +-0.30629900078815986 +5.653843398492889 +2.0743763531606083 +3.8120493820140586 +-2.4854971098110026 +5.685729309928278 +0.918809226360322 +1.1506583539148074 +1.1863828507265954 +-0.594216878168174 +3.1335651419658315 +2.4492265518172935 +5.274556785756001 +0.46975918316022724 +-1.9887963055936915 +8.260648658745257 +2.1180611490621337 +6.943128583193893 +5.65375777327416 +6.516587920573989 +10.740516492785366 +6.1204940755074135 +5.822127814000087 +6.4456103260433455 +2.2235032098597203 +3.592294190910386 +4.920490423149348 +0.38949350889223044 +-1.890113617580731 +-0.22732427067705885 +7.716227559612763 +-2.275780021236195 +4.771078520833991 +4.151133964798078 +2.855204145250574 +4.520216816979435 +-1.8130567764585166 +0.6162892697653626 +4.856310071230488 +3.448112176026952 +7.087654221427473 +-0.7993235565528569 +4.591701394064074 +3.5510600331257756 +2.602164543734205 +5.58200263737913 +3.523196939591443 +4.099233016191189 +0.6559846984941622 +1.295508956235535 +6.1275609251621805 +4.5107471151841745 +3.7044989304306895 +5.277548779097093 +1.474654281667961 +0.64424319714586 +0.2075105828103574 +3.6344430856118377 +0.33758986599867047 +-2.4942975555981644 +6.113804929815405 +7.7641584396066925 +3.2799971707558084 +9.37961727293327 +0.5411544572665639 +3.8471499043612445 +7.616343496177534 +5.591701215387792 +7.020319888996172 +3.6488788476445344 +-0.42404379013157634 +4.634159560132991 +0.9801762349280354 +6.552629367810921 +1.7324397036485815 +5.7987454850237174 +0.17928259735233576 +4.076505685140949 +4.069407911330518 +0.38012465954306274 +1.3942276502327773 +3.8716873372259046 +-2.381360679483918 +7.88133105164381 +3.1621557374279736 +-0.3585307556412012 +1.401996493791915 +3.9885619065646987 +4.432230700765143 +3.1300400281209257 +4.3393455854174725 +-1.6135166375405667 +-2.68795747643202 +5.441404699368986 +3.3549649370726455 +-0.0490456017881673 +5.471443254686541 +3.404603848735361 +2.7566066895290757 +10.030267257025805 +1.72783043235581 +-0.5979566770140616 +7.914908637517386 +4.572141196421244 +0.42365734123257015 +8.26380232381433 +5.304061842567558 +4.655456551562805 +2.601837893048076 +1.7411682093574878 +4.905214472704673 +-0.5785920866957781 +2.248725702753716 +1.0690883577883583 +6.0147700555572845 +4.446867932337 +5.0634449249375315 +0.9462405243401162 +4.629420582694484 +1.5615743300612728 +-7.403671816328046 +0.06537065389059915 +3.7309026712829194 +6.888219645489318 +4.135480729030955 +6.393024242238784 +6.701825481097066 +1.3591428319862966 +8.110430181152921 +5.089338487861726 +7.484485215198189 +1.0739172843140188 +-1.693642657138878 +3.945211604656767 +0.24517683900177678 +1.0738214153384036 +5.556730866122608 +2.1010184919578925 +0.5601850818050917 +4.260497882936182 +1.5321356203804248 +1.5871968136367314 +5.979079327821529 +-1.431784681394472 +0.9683913444853403 +4.19578889779043 +6.724369838233146 +3.4571665252305066 +5.676822559592905 +-3.03380189022956 +10.930839650262472 +5.619785707867337 +2.167303411103786 +4.500795515907485 +2.985165701755171 +3.000035023709977 +2.7458050920491854 +2.369032672915623 +1.8522103801097245 +3.224332168519146 +7.053475507616858 +1.3387110220640057 +5.597999484189259 +5.733376541165999 +-0.4035091438617533 +3.7755869202030006 +0.29575789071029845 +7.102688837998508 +0.8945815428909274 +4.1540801234659215 +-1.182829474459533 +-1.9024495207331604 +11.801206609736921 +1.7739186422030704 +1.4943576374549052 +9.433582779113111 +2.103997919387389 +0.9475078751432524 +6.83813338618738 +4.174213980418212 +0.49788644957056416 +6.601475139818888 +3.823105185996323 +-0.47853840249551105 +5.725141764925368 +-1.3910529889490384 +3.6456540000705786 +1.154697188426418 +0.8104511005032187 +1.6200612529390779 +2.2866808915070655 +0.26420854181458653 +3.941444847365201 +6.798174065699635 +2.900406305194035 +5.303768746780565 +2.2227863528921805 +0.6313823503844302 +-1.4911889024708085 +1.4958887880006206 +3.713987310314616 +0.623611667680581 +1.4420402132235242 +1.6062532803276917 +1.893877209793747 +1.430641180388855 +3.862357814224518 +-0.5533047876941417 +7.432167165305154 +4.5121793073296095 +1.694397631935465 +4.737873401601349 +0.31690824574792575 +7.079617257655702 +-2.7715033945221776 +2.9208115096993437 +2.106372586822915 +1.3877739824841768 +0.2503921280563892 +0.04305835364992916 +2.6966159175422857 +2.1939963773924918 +3.3856905667724493 +-2.9019913847341483 +3.3470329335734403 +8.604805128685747 +1.3864301986689433 +-0.6906814549858429 +5.871849087300034 +8.246237898070998 +3.3740033926368347 +7.164252808398417 +0.8610234682840421 +2.3248172490877836 +1.367796433796857 +7.612206321812998 +2.3382766284115224 +6.024801302935892 +4.609106959065311 +8.020601407746359 +-0.730891874764354 +3.3094521969630777 +1.1641457337510568 +4.211925772984174 +1.3618430948415245 +-3.5530675704814048 +4.053960674459532 +5.13344753538191 +-1.2324650393620074 +0.5814055154210789 +2.756963279728768 +3.38300984017446 +1.2569013787439025 +4.104330328603132 +1.3163122922016517 +-0.628973451657691 +3.9219395698234827 +5.351690958115606 +-2.7271355973381803 +4.63746158670241 +-2.7836384337798377 +4.243955031931877 +7.111085965361851 +1.851549630613384 +4.591698300747034 +7.379809630841928 +4.309121208559743 +1.0343754432022214 +5.704015439913034 +-0.6328980597528027 +8.24053644200038 +1.8568492381369262 +-0.2569867359824922 +6.11598453148985 +-3.02173183362729 +0.8113982947773888 +-0.2935010324287983 +0.9977374052976176 +2.1604249496317953 +-2.033898649567263 +0.9444398066164696 +8.867562788128865 +10.16754904082992 +2.3332525978741434 +5.343461635787881 +0.6777973409948421 +2.1376118291656416 +2.7303463858013277 +4.176684236441645 +0.8540159970773118 +-2.8612642705694986 +-2.9700092126938076 +4.446456190103531 +5.707734013313077 +2.288693078094366 +2.6475029111228126 +6.138963026186151 +0.13464486627032368 +8.665592225573203 +5.538037733218701 +2.3786906029634456 +6.796980403051629 +7.831757555540179 +0.9279506198714373 +6.023420787769593 +1.692397160830732 +-0.9907008912603699 +-2.4336971747883203 +5.362388151290942 +4.927410892781448 +2.1577894533670077 +0.698749184322804 +2.7327752156924188 +3.644530002142245 +7.0685572958015275 +3.4084362635660015 +2.438290902510247 +3.9176579090715182 +-1.023292578696835 +0.38799264376792486 +1.6054925065882895 +6.512249106374373 +4.050642764811762 +1.1654553842600794 +0.6666860964125076 +3.6664141322629007 +1.096142426171797 +7.795322770297876 +1.6850416923546372 +0.37684508045722387 +2.4497516818462097 +7.003188844098315 +4.4762490278105025 +6.305663623996415 +-0.19018266926209915 +5.393647660422253 +2.058774241033907 +8.034459002686745 +2.231532171127099 +-0.42070058433573454 +-1.7814321883784432 +6.100219114363941 +-1.1685306198974006 +6.4781770381872406 +3.4804180465989587 +3.3460682883468342 +5.795514315325204 +2.2810146649402103 +0.8123013251431881 +0.08824480000900703 +4.935472303347543 +1.513381188232053 +-0.5765793370967716 +3.3911985330037053 +0.45643419581559685 +1.9373702583214287 +-1.8366817298859637 +-0.11620074949071757 +6.984005184411542 +3.101055477527721 +3.830156336482469 +4.70718520665036 +7.011551066089993 +2.7182187573468104 +1.8399592803948186 +11.04241254533354 +2.131167943756657 +4.623895249818237 +6.1685802430977095 +2.823073752773595 +3.984935822475523 +-0.6081032346236173 +3.914429638599305 +1.3610646204129246 +7.342656206270533 +-2.157342995200656 +2.558171464828855 +0.23758796454677045 +1.9496400629499517 +2.9757772024891134 +2.6803120664419984 +4.484759494908664 +5.085188500270345 +0.271717602819729 +6.914247827720393 +0.9770382781037488 +3.597802692729112 +2.305362737137867 +4.363863078754594 +2.8825347743647196 +-0.4169727153430687 +2.639893957885631 +1.783095974475843 +3.333801374957151 +2.0125990799268347 +2.832246446627754 +0.004248954657955384 +3.4080191182096065 +7.647479803647306 +5.106849222845834 +5.753618818447458 +1.5672958637638519 +-2.464971192149264 +3.724099133502045 +3.0408543117287596 +5.79271801656601 +3.412182630328026 +3.5130819131206756 +7.312792723925989 +1.6654637063558049 +0.30955265273633437 +1.298325661688807 +-0.24839154701889576 +3.549767507866984 +11.712914864186619 +3.1616874013075824 +2.5097694671041975 +1.4793913051684748 +8.057695214800454 +5.5795232262584324 +3.749674544800956 +3.9267363392418657 +5.256739432388967 +7.2426853008637595 +2.219154657491512 +4.949541948066221 +3.567032840247233 +3.0073598359066214 +-4.71225971931137 +3.0774301764735457 +3.7551830539307973 +6.211950695158018 +3.2506785258834223 +-0.9042310515471188 +-0.5402943260215265 +3.2051174028620646 +-0.031209914503810054 +5.3853282466906585 +0.7946492599878687 +0.3045393480989609 +6.923714888992635 +2.948428328129258 +1.5473997178981085 +-3.3624643564287204 +2.431213292047234 +7.074653955646426 +2.013942901624269 +1.7247013109148255 +-0.9291835727851421 +2.6826256502400856 +1.2908235101138468 +2.1995744682326235 +4.752349850056422 +3.3448902526365276 +1.9751547259198126 +1.7484514955284904 +0.675229703655519 +-0.8044938306632679 +5.689507381408721 +1.1267029109337179 +4.712682460546482 +5.049208049035844 +-0.16221205675274852 +-0.989999208908479 +6.7816460164090575 +-0.8723180534609507 +3.686939536162075 +2.1621360865120556 +3.293656515338249 +1.7023521712041774 diff --git a/exam/main.py b/exam/main.py new file mode 100644 index 0000000..7831a63 --- /dev/null +++ b/exam/main.py @@ -0,0 +1,31 @@ +import numpy as np +import matplotlib.pyplot as plt +from scipy.stats import norm + +def main() -> None: + + data = np.array([float(v) for v in open("data.csv", 'r')]) + + n = len(data) + x_m = data.mean() + s_0 = data.var(ddof=1) + + plt.figure() + plt.hist(data, bins = 10, density=True, edgecolor='black') + + a, b = np.histogram(data, bins=10) + print(a) + + plt.show() + + tau = norm.ppf(0.975) + + theta_minus = x_m - tau * np.sqrt(s_0 / n) + print(theta_minus) + theta_plus = x_m + tau * np.sqrt(s_0 / n) + print(theta_plus) + + + +if __name__ == "__main__": + main()