3.1. Statistics in Python — Scipy lecture notes | Python statistics

R has more statistical analysis features than Python, and specialized syntaxes. However, when it comes to building complex analysis pipelines that mix statistics​ ...Navigationnextprevious|Scipylecturenotes»3.Packagesandapplications»CollapsedocumenttocompactviewEditImprovethispage:EdititonGithub.3.1.StatisticsinPython¶Author:GaëlVaroquauxRequirementsStandardscientificPythonenvironment(numpy,scipy,matplotlib)PandasStatsmodelsSeabornToinstallPythonandthesedependencies,werecommendthatyoudownloadAnacondaPythonorEnthoughtCanopy,orpreferablyusethepackagemanagerifyouareunderUbuntuorotherlinux.SeealsoBayesianstatisticsinPython:ThischapterdoesnotcovertoolsforBayesianstatistics.OfparticularinterestforBayesianmodellingisPyMC,whichimplementsaprobabilisticprogramminglanguageinPython.Readastatisticsbook:TheThinkstatsbookisavailableasfreePDForinprintandisagreatintroductiontostatistics.TipWhyPythonforstatistics?Risalanguagededicatedtostatistics.Pythonisageneral-purposelanguagewithstatisticsmodules.RhasmorestatisticalanalysisfeaturesthanPython,andspecializedsyntaxes.However,whenitcomestobuildingcomplexanalysispipelinesthatmixstatisticswithe.g.imageanalysis,textmining,orcontrolofaphysicalexperiment,therichnessofPythonisaninvaluableasset.ContentsDatarepresentationandinteractionDataasatableThepandasdata-frameHypothesistesting:comparingtwogroupsStudent’st-test:thesimpleststatisticaltestPairedtests:repeatedmeasurementsonthesameindividualsLinearmodels,multiplefactors,andanalysisofvariance“formulas”tospecifystatisticalmodelsinPythonMultipleRegression:includingmultiplefactorsPost-hochypothesistesting:analysisofvariance(ANOVA)Morevisualization:seabornforstatisticalexplorationPairplot:scattermatriceslmplot:plottingaunivariateregressionTestingforinteractionsFullcodeforthefiguresSolutionstothischapter’sexercisesTipInthisdocument,thePythoninputsarerepresentedwiththesign“>>>”.Disclaimer:GenderquestionsSomeoftheexamplesofthistutorialarechosenaroundgenderquestions.Thereasonisthatonsuchquestionscont


常見投資理財問答


延伸文章資訊