+
+
+def_dataframe_specify(self,*,response=None,explanatory=None,formula=None,success=None):
+"""Start an inference pipeline from this DataFrame (see :func:`specify`)."""
+ returnspecify(
+ self,response=response,explanatory=explanatory,formula=formula,success=success
+ )
+
+
+defregister_dataframe_accessor()->None:
+"""Attach a ``.specify()`` method to polars and pandas DataFrames.
+
+ Lets you write ``df.specify(response="y")`` — mirroring the R
+ ``df %>% specify(...)`` flow — instead of ``specify(df, response="y")``.
+ Called once on import; skips a frame library that is not installed and never
+ overwrites an existing ``specify`` attribute.
+ """
+ importpolarsaspl
+
+ ifnothasattr(pl.DataFrame,"specify"):
+ pl.DataFrame.specify=_dataframe_specify
+ try:
+ importpandasaspd
+ exceptImportError:# pragma: no cover - pandas is a dependency, always present
+ return
+ ifnothasattr(pd.DataFrame,"specify"):
+ pd.DataFrame.specify=_dataframe_specify
If you know the R moderndive and infer packages, this page maps the API to
+Python. The grammar is the same; the main differences are Python method-chaining
+(.hypothesize() instead of the |>/%>% pipe) and polars DataFrames.
The overwhelming majority of functions keep the same name (including the
+British-spelling and short-form aliases). They’re called just as in R — as
+methods on the pipeline where applicable:
moderndive bundles 58 datasets (the R moderndive + infer data, plus a few
+derived tables). Each loads with load_<name>() and returns a polars DataFrame.
+
+
+
importmoderndiveasmd
+
+md.available_datasets()# sorted list of every dataset name
+md.load_dataset("pennies")# load by name (string)
+md.load_pennies()# or via the generated loader
+
Hypothesis tests follow the same grammar as confidence intervals, with an added
+hypothesize() step that defines the null world, and generate() that simulates
+from it.
Are tracks more likely to be popular in metal than in deep house? Compare the
+two genres’ “popular” rates, then permute the genre labels to build the null.
+
+
+
importmoderndiveasmd
+frommoderndiveimportspecify,observe,get_p_value,visualize,shade_p_value
+
+spotify=md.load_spotify_metal_deephouse()
+
+# Observed difference in "popular" proportions, metal − deep-house
+obs=observe(
+ spotify,formula="popular_or_not ~ track_genre",success="popular",
+ stat="diff in props",order=("metal","deep-house"),
+)
+
+# Null: genre is independent of popularity → permute the labels
+null=(
+ spotify.specify(formula="popular_or_not ~ track_genre",success="popular")
+ .hypothesize(null="independence")
+ .generate(reps=1000,type="permute",seed=76)
+ .calculate(stat="diff in props",order=("metal","deep-house"))
+)
+
+get_p_value(null,obs_stat=obs,direction="right")
+
Beyond those strings, stat= accepts any function that takes the response
+(and explanatory) arrays and returns a single number — so you can infer about a
+statistic that isn’t built in. Here we bootstrap the interquartile range of
+almond weights and read off a 95% interval:
The composition syntax is identical across engines, so you can switch a whole
+analysis by changing one argument.
+
+
Note
+
The figures on this page are static images so they render in the docs. In a
+notebook or script, the default engine="plotly" produces interactive
+figures (hover, zoom, pan).
visualize() returns a small InferPlot wrapper that you compose with shading via
++ in both engines. The underlying figure is on .figure (and, for plotnine,
+the raw ggplot on .gg).
+
+
+
visualize(boot)+shade_confidence_interval(ci)
+
+
+
+
+
+
+
+
+
+
# the same plot via the plotnine engine
+visualize(boot,engine="plotnine")+shade_confidence_interval(ci)
+
The regression helpers turn a fitted statsmodels
+model into tidy polars tables — the analog of R moderndive’s
+get_regression_table() / get_regression_points() / get_regression_summaries().
+
Fit models with statsmodels’ formula API, then tidy them:
Two ports of R moderndive’s ggplot helpers, both dual-engine:
+
+
+
frommoderndiveimportgg_parallel_slopes,gg_categorical_model
+
+evals=md.load_evals()
+
+# Parallel-slopes model: one common slope, a separate intercept per group
+gg_parallel_slopes(evals,response="score",explanatory="age",by="gender")# plotly
+gg_parallel_slopes(evals,response="score",explanatory="age",by="gender",
+ engine="plotnine")
+
+# Regression with a single categorical predictor
+gg_categorical_model(evals,response="score",explanatory="rank")
+
+
+
+
+
+
+
+
For the plotnine engine you can also drop the parallel-slopes lines onto your own
+ggplot with geom_parallel_slopes().
fit() runs the regression on every bootstrap/permutation replicate, giving a
+distribution per coefficient. Pair it with visualize_fit and per-facet
+shading:
+
+
+
frommoderndiveimportspecify
+frommoderndive.infer.vizimportvisualize_fit
+frommoderndiveimportshade_confidence_interval,shade_p_value
+
+f="price ~ living_area + bedrooms"
+obs_fit=houses.specify(formula=f).fit()
+
+# Bootstrap distribution of each coefficient → per-term CIs
+boot_fit=houses.specify(formula=f).generate(reps=1000,type="bootstrap",seed=1).fit()
+boot_fit.get_confidence_interval(level=0.95)# one row per term
+visualize_fit(boot_fit)+shade_confidence_interval(boot_fit.get_confidence_interval())
+
+# Null distribution → per-term p-values, each facet shaded at its own estimate
+null_fit=(
+ houses.specify(formula=f).hypothesize(null="independence")
+ .generate(reps=1000,type="permute",seed=1).fit()
+)
+null_fit.get_p_value(obs_stat=obs_fit,direction="two-sided")
+visualize_fit(null_fit)+shade_p_value(obs_stat=obs_fit,direction="two-sided")
+
+
+
+
+
+
+
+
Per-facet shading works in both engines: shade_p_value / shade_confidence_interval
+accept the observed FitResult or a term-keyed table, and each facet is shaded
+from its own value.
Sampling activities (the “bowl” of balls, tactile samples) are how ModernDive
+builds intuition for sampling variation. rep_slice_sample takes repeated samples
+and stacks them with a replicate column — the analog of R
+moderndive::rep_slice_sample() / infer::rep_sample_n().
frommoderndiveimportrep_slice_sample
+
+sample=rep_slice_sample(bowl,n=50,seed=1)
+# proportion red in this sample
+sample.select((pl.col("color")=="red").mean().alias("prop_red"))
+
That prop_red column is a sampling distribution. Visualize its spread the
+same way you would any distribution (see Bootstrapping & confidence intervals for building
+one with the inference pipeline instead).
Alongside the simulation grammar, moderndive ships tidy wrappers for the
+classical (formula-based) tests and a way to draw the theoretical distributions —
+mirroring R infer’s t_test, prop_test, chisq_test, and assume().
The Python companion package for ModernDive: Statistical Inference via Data
-Science — a faithful port of the R moderndive and infer packages to a
-modern Python data-science stack (polars, plotnine, statsmodels).
If you teach or learn statistical inference the tidy way — specify →
+hypothesize → generate → calculate → visualize — this package gives you
+the same grammar in Python, plus regression helpers and the book’s datasets.
A tidy inference grammar. Bootstrap confidence intervals and
+permutation/simulation hypothesis tests read like sentences, mirroring R infer.
+
Regression helpers that return tidy tables: get_regression_table,
+get_regression_points, get_regression_summaries, get_correlation.
+
Dual-engine plots. Every plot takes engine="plotly" (default, interactive)
+or engine="plotnine" (grammar-of-graphics) — same code, your choice of output.
+
58 bundled datasets via load_*() loaders returning polars DataFrames.
Are tracks more likely to be popular in metal than in deep house? Compute the
+observed difference in “popular” rates, then shuffle the genre labels 1000 times
+to build a null distribution and read off a p-value.
# Visualize it (interactive plotly by default; engine="plotnine" also works)
+visualize(null)+shade_p_value(obs_stat=obs,direction="right")
+
+
+
+
+
+
+
+
+
Note
+
Plots throughout this documentation are rendered as static images. When you
+run the code yourself, the default engine="plotly" produces interactive
+figures (hover, zoom, pan); engine="plotnine" gives static grammar-of-graphics
+plots.
diff --git a/doc/_build/html/searchindex.js b/doc/_build/html/searchindex.js
index 3ba6519..ff980dc 100644
--- a/doc/_build/html/searchindex.js
+++ b/doc/_build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"API reference":[[0,null]],"Contents":[[1,null]],"Datasets":[[0,"datasets"]],"Getters and visualization":[[0,"getters-and-visualization"]],"Inference grammar":[[0,"inference-grammar"]],"Installation":[[1,"installation"]],"Quick start":[[1,"quick-start"]],"Regression helpers":[[0,"regression-helpers"]],"Sampling and plots":[[0,"sampling-and-plots"]],"Theory-based tests":[[0,"theory-based-tests"]],"moderndive (Python)":[[1,null]]},"docnames":["api","index"],"envversion":{"sphinx":66,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1},"filenames":["api.md","index.md"],"indexentries":{"assume() (in module moderndive)":[[0,"moderndive.assume",false]],"assume() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.assume",false]],"available_datasets() (in module moderndive.data)":[[0,"moderndive.data.available_datasets",false]],"calculate() (moderndive.infer.core.hypothesis method)":[[0,"moderndive.infer.core.Hypothesis.calculate",false]],"calculate() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.calculate",false]],"chisq_stat() (in module moderndive)":[[0,"moderndive.chisq_stat",false]],"chisq_test() (in module moderndive)":[[0,"moderndive.chisq_test",false]],"distribution (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Distribution",false]],"fit() (moderndive.infer.core.generatedreplicates method)":[[0,"moderndive.infer.core.GeneratedReplicates.fit",false]],"fit() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.fit",false]],"fitresult (class in moderndive.infer.core)":[[0,"moderndive.infer.core.FitResult",false]],"generatedreplicates (class in moderndive.infer.core)":[[0,"moderndive.infer.core.GeneratedReplicates",false]],"geom_parallel_slopes() (in module moderndive)":[[0,"moderndive.geom_parallel_slopes",false]],"get_confidence_interval() (in module moderndive)":[[0,"moderndive.get_confidence_interval",false]],"get_correlation() (in module moderndive)":[[0,"moderndive.get_correlation",false]],"get_p_value() (in module moderndive)":[[0,"moderndive.get_p_value",false]],"get_p_value() (moderndive.infer.theoretical.theoreticaldistribution method)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution.get_p_value",false]],"get_regression_points() (in module moderndive)":[[0,"moderndive.get_regression_points",false]],"get_regression_summaries() (in module moderndive)":[[0,"moderndive.get_regression_summaries",false]],"get_regression_table() (in module moderndive)":[[0,"moderndive.get_regression_table",false]],"gg_categorical_model() (in module moderndive)":[[0,"moderndive.gg_categorical_model",false]],"gg_parallel_slopes() (in module moderndive)":[[0,"moderndive.gg_parallel_slopes",false]],"hypothesis (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Hypothesis",false]],"load_dataset() (in module moderndive)":[[0,"moderndive.load_dataset",false]],"moderndive.theory":[[0,"module-moderndive.theory",false]],"module":[[0,"module-moderndive.theory",false]],"observe() (in module moderndive)":[[0,"moderndive.observe",false]],"pairplot() (in module moderndive)":[[0,"moderndive.pairplot",false]],"pop_sd() (in module moderndive)":[[0,"moderndive.pop_sd",false]],"prop_test() (in module moderndive)":[[0,"moderndive.prop_test",false]],"prop_test_two_sample() (in module moderndive.theory)":[[0,"moderndive.theory.prop_test_two_sample",false]],"rep_sample_n() (in module moderndive)":[[0,"moderndive.rep_sample_n",false]],"rep_slice_sample() (in module moderndive)":[[0,"moderndive.rep_slice_sample",false]],"shade_confidence_interval() (in module moderndive)":[[0,"moderndive.shade_confidence_interval",false]],"shade_p_value() (in module moderndive)":[[0,"moderndive.shade_p_value",false]],"specification (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Specification",false]],"specify() (in module moderndive)":[[0,"moderndive.specify",false]],"t_confidence_interval() (in module moderndive.theory)":[[0,"moderndive.theory.t_confidence_interval",false]],"t_stat() (in module moderndive)":[[0,"moderndive.t_stat",false]],"t_test() (in module moderndive)":[[0,"moderndive.t_test",false]],"t_test_one_sample() (in module moderndive.theory)":[[0,"moderndive.theory.t_test_one_sample",false]],"t_test_two_sample() (in module moderndive.theory)":[[0,"moderndive.theory.t_test_two_sample",false]],"theoreticaldistribution (class in moderndive.infer.theoretical)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution",false]],"tidy_summary() (in module moderndive)":[[0,"moderndive.tidy_summary",false]],"visualize() (in module moderndive)":[[0,"moderndive.visualize",false]],"visualize() (moderndive.infer.theoretical.theoreticaldistribution method)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution.visualize",false]]},"objects":{"moderndive":[[0,0,1,"","assume"],[0,0,1,"","chisq_stat"],[0,0,1,"","chisq_test"],[0,0,1,"","geom_parallel_slopes"],[0,0,1,"","get_confidence_interval"],[0,0,1,"","get_correlation"],[0,0,1,"","get_p_value"],[0,0,1,"","get_regression_points"],[0,0,1,"","get_regression_summaries"],[0,0,1,"","get_regression_table"],[0,0,1,"","gg_categorical_model"],[0,0,1,"","gg_parallel_slopes"],[0,0,1,"","load_dataset"],[0,0,1,"","observe"],[0,0,1,"","pairplot"],[0,0,1,"","pop_sd"],[0,0,1,"","prop_test"],[0,0,1,"","rep_sample_n"],[0,0,1,"","rep_slice_sample"],[0,0,1,"","shade_confidence_interval"],[0,0,1,"","shade_p_value"],[0,0,1,"","specify"],[0,0,1,"","t_stat"],[0,0,1,"","t_test"],[0,3,0,"-","theory"],[0,0,1,"","tidy_summary"],[0,0,1,"","visualize"]],"moderndive.data":[[0,0,1,"","available_datasets"]],"moderndive.infer.core":[[0,1,1,"","Distribution"],[0,1,1,"","FitResult"],[0,1,1,"","GeneratedReplicates"],[0,1,1,"","Hypothesis"],[0,1,1,"","Specification"]],"moderndive.infer.core.GeneratedReplicates":[[0,2,1,"","fit"]],"moderndive.infer.core.Hypothesis":[[0,2,1,"","calculate"]],"moderndive.infer.core.Specification":[[0,2,1,"","assume"],[0,2,1,"","calculate"],[0,2,1,"","fit"]],"moderndive.infer.theoretical":[[0,1,1,"","TheoreticalDistribution"]],"moderndive.infer.theoretical.TheoreticalDistribution":[[0,2,1,"","get_p_value"],[0,2,1,"","visualize"]],"moderndive.theory":[[0,0,1,"","prop_test_two_sample"],[0,0,1,"","t_confidence_interval"],[0,0,1,"","t_test_one_sample"],[0,0,1,"","t_test_two_sample"]]},"objnames":{"0":["py","function","Python function"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","module","Python module"]},"objtypes":{"0":"py:function","1":"py:class","2":"py:method","3":"py:module"},"terms":{"1f77b4":[],"A":0,"All":0,"Each":0,"For":0,"The":[0,1],"These":0,"_hat":0,"accept":0,"across":0,"add":0,"adj_r_squar":0,"alia":0,"also":0,"altern":0,"analog":0,"ani":0,"api":1,"approxim":0,"argument":0,"array":0,"assum":0,"augment":0,"available_dataset":0,"b":0,"back":0,"backend":0,"base":1,"befor":0,"belong":0,"bin":0,"book":0,"bool":0,"bootstrap":0,"broom":0,"c":0,"calcul":[0,1],"call":0,"can":0,"cap":0,"categor":0,"categori":0,"chapter":0,"chi":0,"chisq":0,"chisq_stat":0,"chisq_test":0,"chosen":0,"ci":0,"cis":0,"class":0,"coeffici":0,"color":0,"column":0,"common":0,"companion":[0,1],"comparison":0,"compos":0,"comput":0,"conf_level":0,"confid":0,"conveni":0,"convent":0,"cor":0,"core":0,"correl":0,"curv":0,"data":[0,1],"datafram":0,"dataset":1,"deep":1,"default":0,"degre":0,"deliber":0,"denomin":0,"densiti":0,"deviat":0,"df":0,"df1":0,"df2":0,"diagon":[],"dict":0,"diff":1,"differ":0,"digit":0,"direct":[0,1],"display":[],"distribut":0,"divid":0,"draw":0,"drawn":0,"drop":0,"e":0,"either":0,"endpoint":0,"engin":0,"equal":0,"equal_var":0,"equival":0,"error":0,"estim":0,"explanatori":0,"express":0,"f":0,"facet":0,"faith":1,"fals":0,"field":0,"figur":0,"first":0,"fit":0,"fitresult":0,"five":0,"float":0,"form":0,"formula":[0,1],"frame":0,"freedom":0,"full":[0,1],"func":0,"function":0,"g":0,"generat":1,"generatedrepl":0,"geom_categorical_model":0,"geom_parallel_slop":0,"get":0,"get_confidence_interv":0,"get_correl":0,"get_p_valu":[0,1],"get_regression_point":0,"get_regression_summari":0,"get_regression_t":0,"getter":1,"gg_categorical_model":0,"gg_parallel_slop":0,"ggalli":0,"ggpair":0,"ggplot":0,"go":0,"grammar":1,"greater":0,"group":0,"h0":0,"helper":1,"histogram":0,"hold":0,"horizont":0,"hous":1,"hue":0,"hyp_mu":0,"hyp_p":0,"hyp_sigma":0,"hypothes":[0,1],"hypothesi":0,"id":0,"identifi":0,"import":1,"independ":[0,1],"indic":0,"infer":1,"inferplot":0,"int":0,"intercept":0,"interval":0,"jitter":0,"key":0,"keyword":0,"kwarg":0,"layer":0,"layout":0,"lead":0,"least":0,"left":0,"less":0,"level":0,"line":0,"list":0,"load":0,"load_":0,"load_dataset":0,"load_spotify_metal_deephous":1,"loadabl":0,"loader":0,"long":0,"lower":0,"lower_ci":0,"mark":[],"marker":0,"match":0,"materi":0,"matplotlib":0,"matrix":0,"max":0,"may":[],"md":1,"mean":0,"median":0,"metal":1,"method":0,"min":0,"mirror":0,"model":0,"modern":1,"modernd":0,"mse":0,"mu":0,"multi":0,"n":0,"name":0,"nan":0,"ndarray":0,"need":0,"nob":0,"non":0,"none":0,"normal":0,"notebook":[],"null":[0,1],"number":0,"numer":0,"numpi":0,"ob":1,"object":0,"obs_stat":[0,1],"observ":0,"observedstatist":0,"ol":0,"older":0,"one":0,"onli":0,"option":0,"order":[0,1],"ordinari":0,"output":0,"overal":0,"overlaid":0,"p":0,"p_valu":0,"packag":[0,1],"pair":0,"pairgrid":[],"pairplot":0,"pairwis":[],"parallel":0,"paramet":0,"pass":0,"pearson":0,"per":0,"percentil":0,"permut":[0,1],"pip":1,"plan":0,"plot":1,"plotnin":[0,1],"point":0,"point_estim":0,"polar":[0,1],"pop_sd":0,"popul":0,"popular":[0,1],"popular_or_not":[0,1],"port":1,"posit":0,"predictor":0,"prop":1,"prop_test":0,"prop_test_two_sampl":0,"proport":0,"provid":0,"q1":0,"q3":0,"quantil":0,"quarto":[],"r":[0,1],"r_squar":0,"refer":1,"regress":1,"rep":[0,1],"rep_sample_n":0,"rep_slice_sampl":0,"replac":0,"replic":0,"report":0,"reproduc":0,"requir":0,"resampl":0,"residu":0,"respons":0,"result":0,"return":0,"right":[0,1],"rmse":0,"row":0,"s":0,"sampl":1,"scalar":0,"scatter_matrix":0,"scatterplot":0,"scienc":1,"scipi":0,"sd":0,"se":0,"seaborn":0,"see":[0,1],"seed":[0,1],"select":0,"separ":0,"sequenc":0,"seri":0,"set":0,"shade":0,"shade_ci":0,"shade_confidence_interv":0,"shade_p_valu":[0,1],"shade_pvalu":0,"shadespec":0,"shifted_respons":0,"shortcut":0,"shuffl":0,"side":0,"sigma":0,"simul":0,"sinc":0,"singl":0,"size":0,"slope":0,"small":0,"smaller":0,"sort":0,"sourc":0,"spec":0,"specif":0,"specifi":[0,1],"splom":0,"spotifi":1,"sqrt":0,"squar":0,"stack":1,"standard":0,"stat":[0,1],"statist":[0,1],"statsmodel":[0,1],"std_error":0,"str":0,"string":0,"style":0,"success":[0,1],"summari":0,"support":0,"t":0,"t_confidence_interv":0,"t_stat":0,"t_test":0,"t_test_one_sampl":0,"t_test_two_sampl":0,"tabl":0,"tail":0,"take":0,"teach":0,"term":0,"test":1,"theoret":0,"theoreticaldistribut":0,"theori":1,"tidi":0,"tidy_summari":0,"tie":0,"total":0,"track_genr":[0,1],"tradit":0,"true":0,"tupl":0,"twice":0,"two":0,"type":[0,1],"unit":0,"unus":0,"upper":0,"upper_ci":0,"use":0,"valu":0,"variabl":0,"version":0,"via":[0,1],"visual":1,"visualize_fit":0,"vs":0,"weight":0,"welch":0,"wrapper":0,"x":0,"y":0,"z":0},"titles":["API reference","moderndive (Python)"],"titleterms":{"api":0,"base":0,"content":1,"dataset":0,"getter":0,"grammar":0,"helper":0,"infer":0,"instal":1,"modernd":1,"plot":0,"python":1,"quick":1,"refer":0,"regress":0,"sampl":0,"start":1,"test":0,"theori":0,"visual":0}})
\ No newline at end of file
+Search.setIndex({"alltitles":{"30-second example":[[10,"second-example"]],"A bootstrap distribution for a mean":[[4,"a-bootstrap-distribution-for-a-mean"]],"A confidence interval for a difference":[[4,"a-confidence-interval-for-a-difference"]],"A confidence interval for a proportion":[[4,"a-confidence-interval-for-a-proportion"]],"A first summary":[[3,"a-first-summary"]],"API reference":[[0,null]],"Available statistics":[[5,"available-statistics"]],"Bootstrapping & confidence intervals":[[4,null]],"By topic":[[2,"by-topic"]],"Coefficient table (with confidence intervals)":[[7,"coefficient-table-with-confidence-intervals"]],"Coming from R":[[1,null]],"Confidence intervals \u2014 three methods":[[4,"confidence-intervals-three-methods"]],"Correlation":[[7,"correlation"]],"Custom test statistics":[[5,"custom-test-statistics"]],"Datasets":[[0,"datasets"],[2,null]],"Faceted regression-coefficient plots":[[6,"faceted-regression-coefficient-plots"]],"Fitted values & residuals":[[7,"fitted-values-residuals"]],"Get started":[[10,null]],"Getters and visualization":[[0,"getters-and-visualization"]],"Getting started":[[3,null]],"Guides":[[10,null]],"Hypothesis testing":[[5,null]],"Inference for regression coefficients":[[7,"inference-for-regression-coefficients"]],"Inference grammar":[[0,"inference-grammar"]],"Install":[[3,"install"]],"Installation":[[10,"installation"]],"Keyword form":[[6,"keyword-form"]],"Load a dataset":[[3,"load-a-dataset"]],"Many samples \u2192 a sampling distribution":[[8,"many-samples-a-sampling-distribution"]],"Model plots":[[6,"model-plots"]],"Model-fit summaries":[[7,"model-fit-summaries"]],"Most names are identical":[[1,"most-names-are-identical"]],"One mean / one proportion (point null)":[[5,"one-mean-one-proportion-point-null"]],"One virtual sample":[[8,"one-virtual-sample"]],"One-line tests":[[9,"one-line-tests"]],"Other things to know":[[1,"other-things-to-know"]],"Overlaying theory on a simulation":[[9,"overlaying-theory-on-a-simulation"]],"Plotting: plotly & plotnine":[[6,null]],"Population standard deviation":[[9,"population-standard-deviation"]],"Reference":[[10,null]],"Regression":[[3,"regression"],[7,null]],"Regression helpers":[[0,"regression-helpers"]],"Same datasets":[[1,"same-datasets"]],"Sampling":[[8,null]],"Sampling and plots":[[0,"sampling-and-plots"]],"Saving figures":[[6,"saving-figures"]],"Shade the p-value":[[5,"shade-the-p-value"]],"Shading p-values":[[6,"shading-p-values"]],"Simulation vs. theory overlays":[[6,"simulation-vs-theory-overlays"]],"Tactile samples":[[8,"tactile-samples"]],"The bowl":[[8,"the-bowl"]],"The infer pipeline":[[1,"the-infer-pipeline"]],"The inference pipeline":[[3,"the-inference-pipeline"]],"Theoretical distributions with assume()":[[9,"theoretical-distributions-with-assume"]],"Theory-based inference":[[9,null]],"Theory-based tests":[[0,"theory-based-tests"]],"Tips":[[2,"tips"]],"Two groups: a permutation test":[[5,"two-groups-a-permutation-test"]],"Visualize the interval":[[4,"visualize-the-interval"]],"Visualizing models":[[7,"visualizing-models"]],"Visualizing \u2014 choose your engine":[[3,"visualizing-choose-your-engine"]],"What\u2019s actually different":[[1,"what-s-actually-different"]],"Where to next":[[10,"where-to-next"]],"Why moderndive?":[[10,"why-moderndive"]],"With vs. without replacement":[[8,"with-vs-without-replacement"]],"moderndive (Python)":[[10,null]],"visualize() returns an InferPlot":[[6,"visualize-returns-an-inferplot"]]},"docnames":["api","coming-from-r","datasets","getting-started","guides/confidence-intervals","guides/hypothesis-testing","guides/plotting","guides/regression","guides/sampling","guides/theory-based","index"],"envversion":{"sphinx":66,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1},"filenames":["api.md","coming-from-r.md","datasets.md","getting-started.md","guides/confidence-intervals.md","guides/hypothesis-testing.md","guides/plotting.md","guides/regression.md","guides/sampling.md","guides/theory-based.md","index.md"],"indexentries":{"assume() (in module moderndive)":[[0,"moderndive.assume",false]],"assume() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.assume",false]],"available_datasets() (in module moderndive.data)":[[0,"moderndive.data.available_datasets",false]],"calculate() (moderndive.infer.core.hypothesis method)":[[0,"moderndive.infer.core.Hypothesis.calculate",false]],"calculate() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.calculate",false]],"chisq_stat() (in module moderndive)":[[0,"moderndive.chisq_stat",false]],"chisq_test() (in module moderndive)":[[0,"moderndive.chisq_test",false]],"distribution (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Distribution",false]],"fit() (moderndive.infer.core.generatedreplicates method)":[[0,"moderndive.infer.core.GeneratedReplicates.fit",false]],"fit() (moderndive.infer.core.specification method)":[[0,"moderndive.infer.core.Specification.fit",false]],"fitresult (class in moderndive.infer.core)":[[0,"moderndive.infer.core.FitResult",false]],"generatedreplicates (class in moderndive.infer.core)":[[0,"moderndive.infer.core.GeneratedReplicates",false]],"geom_parallel_slopes() (in module moderndive)":[[0,"moderndive.geom_parallel_slopes",false]],"get_confidence_interval() (in module moderndive)":[[0,"moderndive.get_confidence_interval",false]],"get_correlation() (in module moderndive)":[[0,"moderndive.get_correlation",false]],"get_p_value() (in module moderndive)":[[0,"moderndive.get_p_value",false]],"get_p_value() (moderndive.infer.theoretical.theoreticaldistribution method)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution.get_p_value",false]],"get_regression_points() (in module moderndive)":[[0,"moderndive.get_regression_points",false]],"get_regression_summaries() (in module moderndive)":[[0,"moderndive.get_regression_summaries",false]],"get_regression_table() (in module moderndive)":[[0,"moderndive.get_regression_table",false]],"gg_categorical_model() (in module moderndive)":[[0,"moderndive.gg_categorical_model",false]],"gg_parallel_slopes() (in module moderndive)":[[0,"moderndive.gg_parallel_slopes",false]],"hypothesis (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Hypothesis",false]],"load_dataset() (in module moderndive)":[[0,"moderndive.load_dataset",false]],"moderndive.theory":[[0,"module-moderndive.theory",false]],"module":[[0,"module-moderndive.theory",false]],"observe() (in module moderndive)":[[0,"moderndive.observe",false]],"pairplot() (in module moderndive)":[[0,"moderndive.pairplot",false]],"pop_sd() (in module moderndive)":[[0,"moderndive.pop_sd",false]],"prop_test() (in module moderndive)":[[0,"moderndive.prop_test",false]],"prop_test_two_sample() (in module moderndive.theory)":[[0,"moderndive.theory.prop_test_two_sample",false]],"rep_sample_n() (in module moderndive)":[[0,"moderndive.rep_sample_n",false]],"rep_slice_sample() (in module moderndive)":[[0,"moderndive.rep_slice_sample",false]],"shade_confidence_interval() (in module moderndive)":[[0,"moderndive.shade_confidence_interval",false]],"shade_p_value() (in module moderndive)":[[0,"moderndive.shade_p_value",false]],"specification (class in moderndive.infer.core)":[[0,"moderndive.infer.core.Specification",false]],"specify() (in module moderndive)":[[0,"moderndive.specify",false]],"t_confidence_interval() (in module moderndive.theory)":[[0,"moderndive.theory.t_confidence_interval",false]],"t_stat() (in module moderndive)":[[0,"moderndive.t_stat",false]],"t_test() (in module moderndive)":[[0,"moderndive.t_test",false]],"t_test_one_sample() (in module moderndive.theory)":[[0,"moderndive.theory.t_test_one_sample",false]],"t_test_two_sample() (in module moderndive.theory)":[[0,"moderndive.theory.t_test_two_sample",false]],"theoreticaldistribution (class in moderndive.infer.theoretical)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution",false]],"tidy_summary() (in module moderndive)":[[0,"moderndive.tidy_summary",false]],"visualize() (in module moderndive)":[[0,"moderndive.visualize",false]],"visualize() (moderndive.infer.theoretical.theoreticaldistribution method)":[[0,"moderndive.infer.theoretical.TheoreticalDistribution.visualize",false]]},"objects":{"moderndive":[[0,0,1,"","assume"],[0,0,1,"","chisq_stat"],[0,0,1,"","chisq_test"],[0,0,1,"","geom_parallel_slopes"],[0,0,1,"","get_confidence_interval"],[0,0,1,"","get_correlation"],[0,0,1,"","get_p_value"],[0,0,1,"","get_regression_points"],[0,0,1,"","get_regression_summaries"],[0,0,1,"","get_regression_table"],[0,0,1,"","gg_categorical_model"],[0,0,1,"","gg_parallel_slopes"],[0,0,1,"","load_dataset"],[0,0,1,"","observe"],[0,0,1,"","pairplot"],[0,0,1,"","pop_sd"],[0,0,1,"","prop_test"],[0,0,1,"","rep_sample_n"],[0,0,1,"","rep_slice_sample"],[0,0,1,"","shade_confidence_interval"],[0,0,1,"","shade_p_value"],[0,0,1,"","specify"],[0,0,1,"","t_stat"],[0,0,1,"","t_test"],[0,3,0,"-","theory"],[0,0,1,"","tidy_summary"],[0,0,1,"","visualize"]],"moderndive.data":[[0,0,1,"","available_datasets"]],"moderndive.infer.core":[[0,1,1,"","Distribution"],[0,1,1,"","FitResult"],[0,1,1,"","GeneratedReplicates"],[0,1,1,"","Hypothesis"],[0,1,1,"","Specification"]],"moderndive.infer.core.GeneratedReplicates":[[0,2,1,"","fit"]],"moderndive.infer.core.Hypothesis":[[0,2,1,"","calculate"]],"moderndive.infer.core.Specification":[[0,2,1,"","assume"],[0,2,1,"","calculate"],[0,2,1,"","fit"]],"moderndive.infer.theoretical":[[0,1,1,"","TheoreticalDistribution"]],"moderndive.infer.theoretical.TheoreticalDistribution":[[0,2,1,"","get_p_value"],[0,2,1,"","visualize"]],"moderndive.theory":[[0,0,1,"","prop_test_two_sample"],[0,0,1,"","t_confidence_interval"],[0,0,1,"","t_test_one_sample"],[0,0,1,"","t_test_two_sample"]]},"objnames":{"0":["py","function","Python function"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","module","Python module"]},"objtypes":{"0":"py:function","1":"py:class","2":"py:method","3":"py:module"},"terms":{"100null":3,"5071e950071":7,"50_000":8,"A":[0,9,10],"All":[0,3],"Are":[5,10],"Both":8,"Each":[0,2,3],"For":[0,4,5,7],"Here":5,"If":[1,6,10],"In":6,"Other":2,"Same":3,"That":8,"The":[0,5,6,7,10],"These":0,"They":1,"This":3,"When":10,"You":3,"_hat":0,"accept":[0,3,5,7],"across":[0,6],"action":9,"activ":8,"add":[0,4,5,10],"adj_r_squar":[0,7],"age":[5,6,7,9],"age_at_marriag":2,"agg":8,"airlin":2,"airline_safeti":2,"airport":2,"alaska_flight":2,"alia":[0,5,6,8],"alias":1,"almond":[4,5],"almonds_bowl":2,"almonds_sampl":2,"almonds_sample_100":2,"alongsid":9,"also":[0,3,4,5,7,10],"altern":[0,9],"amazon_book":2,"analog":[0,7,8],"analysi":[3,6],"ani":[0,5,8],"anywher":1,"api":[1,3,7,8,10],"applic":1,"approxim":[0,6,9],"argument":[0,6],"aroma":6,"array":[0,5],"assum":[0,1],"augment":0,"avail":3,"available_dataset":[0,2,3],"avocado":2,"b":0,"babi":2,"back":[0,6],"backend":[0,1],"ball":8,"ball_idcolori64str1":8,"base":[4,5,10],"bedroom":[3,6,7],"befor":0,"belong":0,"beyond":5,"bias":4,"bin":0,"book":[0,10],"bool":0,"boot":[4,6,9],"boot_diff":4,"boot_fit":[6,7],"boot_iqr":5,"boot_prop":4,"bootstrap":[0,1,3,5,6,7,8,9,10],"bowl":2,"bowl_sampl":2,"bowl_sample_1":2,"british":1,"broom":0,"brows":10,"build":[3,4,5,8,10],"built":5,"bundl":[1,2,8,10],"c":0,"calcul":[0,1,3,4,5,6,9,10],"call":[0,1,2,4],"can":[0,5,6,7,9],"cap":0,"carolin":8,"categor":[0,1,3,7],"categori":0,"chain":1,"chang":[6,7],"chapter":0,"chi":[0,9],"chisq":[0,5,9],"chisq_df":9,"chisq_stat":[0,1,9],"chisq_test":[0,1,5,9],"choic":10,"chosen":0,"ci":[0,4,6],"cis":[0,2,7],"clark":8,"class":0,"classic":[5,9],"cle_sac":2,"code":[3,10],"coeffici":0,"coffee_qu":2,"coffee_r":2,"coin":5,"col":8,"collect":8,"color":[0,8],"column":[0,2,3,6,7,8],"columnngrouptypeminq1meanmedianq3maxsdstri64strstrf64f64f64f64f64f64f64":3,"come":10,"common":[0,7],"companion":[0,10],"compar":[4,5],"comparison":0,"complet":3,"compos":[0,1,6],"composit":[3,6],"comput":[0,8,10],"conf_level":[0,7],"confid":[0,3,5,8,10],"control":[3,4,9],"conveni":0,"convent":0,"cor":0,"core":[0,3],"corf640":7,"correct":4,"correl":[0,5],"count":[3,5],"counterpart":8,"credit":2,"curv":[0,6,9],"d":6,"damani":8,"data":[0,1,2,3,4,7,10],"datafram":[0,1,2,3,5,10],"dataset":10,"datetim":2,"dd_vs_sb":2,"deal":8,"deck":8,"deep":[5,6,10],"def":5,"default":[0,1,3,4,6,8,9,10],"defin":[5,9],"degre":[0,9],"deliber":0,"dem_scor":2,"denomin":0,"densiti":0,"dep":6,"depth":3,"deriv":2,"detail":3,"deviat":0,"df":[0,1,7,9],"df1":[0,9],"df2":[0,9],"dict":0,"diff":[3,4,5,6,10],"differ":[0,5,10],"digit":0,"direct":[0,3,5,6,7,9,10],"dist":6,"distribut":[0,3,7,10],"divid":[0,9],"doc":6,"document":[3,8,10],"doesn":[2,10],"downstream":1,"dpi":6,"draw":[0,5,9],"drawn":0,"drink":2,"drop":[0,7],"dual":[1,7,10],"e":[0,2,7],"early_january_2023_weath":2,"early_january_weath":2,"either":0,"end":3,"endpoint":0,"engin":[0,1,4,6,7,9,10],"envoy_flight":2,"equal":0,"equal_var":0,"equival":0,"error":[0,4],"estim":[0,4,7,9],"etc":1,"ev_charg":2,"eval":[2,6,7],"everi":[2,3,6,7,10],"everyth":3,"exampl":2,"exist":2,"expect":2,"explanatori":[0,4,5,6,7],"expos":4,"express":0,"extra":[6,10],"f":[0,1,5,7,9],"facet":[0,7],"faith":10,"fals":0,"field":0,"figur":[0,3,10],"first":[0,10],"fit":[0,1,3,6],"fitresult":[0,7],"five":[0,3],"flavor":6,"flight":2,"flip":5,"float":[0,4,5],"focus":3,"follow":5,"form":[0,1,4],"formula":[0,1,3,4,5,6,7,9,10],"frame":0,"franci":8,"frank":8,"freedom":[0,9],"full":[0,3,5],"func":0,"function":[0,1,2,3,5,6,10],"g":[0,2,6,7],"gapmind":2,"gapminder_2007":2,"gender":[6,7],"generat":[1,2,3,4,5,6,7,9,10],"generatedrepl":0,"genr":[5,9,10],"geom_":1,"geom_categorical_model":[0,1],"geom_parallel_slop":[0,1,7],"get":0,"get_ci":1,"get_confidence_interv":[0,1,4,5,6,7],"get_correl":[0,1,7,10],"get_p_valu":[0,1,3,5,7,9,10],"get_pvalu":1,"get_regression_point":[0,1,7,10],"get_regression_summari":[0,1,7,10],"get_regression_t":[0,1,3,7,10],"getter":[4,10],"gg":6,"gg_categorical_model":[0,6,7],"gg_parallel_slop":[0,6,7],"ggalli":[0,6],"ggpair":[0,6],"ggplot":[0,1,6,7,9],"ggplot2":1,"give":[3,7,10],"go":0,"grammar":[1,3,5,6,9,10],"graph_object":6,"graphic":[3,6,10],"greater":[0,5],"group":[0,3,4,7,8,9],"group_bi":8,"groupreplicatered_ballsprop_redstri64i64f64":8,"gss":2,"guid":3,"h0":0,"hailin":8,"hand":8,"handi":6,"head":[3,5,7,8],"height":6,"hellip":[2,8],"help":2,"helper":[7,9,10],"histogram":[0,6,9],"hold":0,"horizont":0,"hous":[3,5,6,7,10],"house_pric":2,"hover":[6,10],"html":6,"hue":0,"hyp_mu":0,"hyp_p":0,"hyp_sigma":0,"hypothes":[0,1,3,5,6,7,10],"hypothesi":[0,2,3,10],"hypothesis":1,"id":[0,7],"ident":[3,6],"identifi":0,"idpriceliving_areabedroomsprice_hatresiduali64i64i64i64f64f64114221219823184531":7,"ilya":8,"imag":[3,6,10],"import":[2,3,4,5,6,7,8,9,10],"includ":1,"independ":[0,3,5,6,7,9,10],"indic":0,"infer":[2,4,5,6,8,10],"inferplot":0,"inlin":6,"input":3,"instal":6,"instead":[1,8],"int":0,"interact":[1,3,4,6,10],"intercept":[0,3,7],"interfac":1,"interquartil":5,"interval":[0,3,5,8,10],"intuit":8,"ipf_lift":2,"iqr":5,"isn":5,"jitter":0,"juli":8,"jump":10,"just":[1,9],"kaleido":10,"karina":8,"kati":8,"keep":1,"key":[0,7],"keyword":[0,4],"kwarg":0,"label":[5,10],"layer":[0,1],"layout":0,"lead":0,"learn":10,"least":0,"left":[0,5],"less":[0,5],"level":[0,1,4,5,6,7],"like":[1,3,5,8,10],"line":[0,5,7],"list":[0,2,3],"living_area":[3,6,7],"lm":1,"load":[0,2],"load_":[0,2,3,10],"load_age_at_marriag":[5,9],"load_almonds_sample_100":[3,4,5,6],"load_bowl":8,"load_coffee_qu":6,"load_dataset":[0,2],"load_ev":[6,7],"load_gss":1,"load_movies_sampl":9,"load_mythbusters_yawn":[1,3,4,9],"load_penni":[1,2],"load_saratoga_hous":[3,6,7],"load_spotify_metal_deephous":[5,6,10],"load_tactile_prop_r":8,"loadabl":0,"loader":[0,2,10],"long":0,"lower":0,"lower_ci":[0,4,9],"lower_ciupper_cif64f64":4,"lower_ciupper_cif64f640":[4,5],"lower_ciupper_cif64f643":[4,6],"ma_school":2,"ma_traffic_2020_vs_2019":2,"main":1,"major":1,"mallori":8,"map":[1,10],"mario_kart_auct":2,"mark":1,"marker":0,"martin":8,"mass_traffic_2020":2,"match":0,"materi":0,"matplotlib":[0,6],"matrix":[0,6],"matter":10,"max":0,"md":[1,2,3,4,5,6,7,8,9,10],"mean":[0,1,6,8,9],"median":[0,5],"melissa":8,"metal":[5,6,10],"method":[0,1,6,9],"min":0,"mirror":[0,3,5,9,10],"model":[0,1,3],"modern":10,"modernd":[0,1,2,3,4,5,6,7,8,9],"morgan":8,"movi":9,"movies_sampl":2,"mse":[0,7],"mu":[0,1,5,9],"multi":0,"must":5,"mythbust":4,"mythbusters_yawn":2,"n":[0,8,9],"name":[0,2,3,8],"nan":0,"ndarray":0,"need":[0,1,4,6,9],"new":10,"nob":[0,7],"non":0,"none":[0,5],"normal":[0,6,9],"notebook":6,"np":5,"null":[0,1,3,6,7,10],"null_fit":7,"null_p":5,"null_t":5,"number":[0,3,5],"numer":[0,3],"numpi":[0,5],"nycflights23":2,"ob":[3,5,6,10],"object":[0,1,4],"obs_fit":7,"obs_stat":[0,3,5,6,7,10],"obs_t":5,"observ":[0,1,3,5,6,7,10],"observedstatist":[0,10],"odd":5,"offshor":2,"ol":[0,1,3,7],"old_faithful_2024":2,"older":[0,8],"one":[0,4,6,7],"onli":0,"onto":7,"oper":1,"option":[0,10],"order":[0,3,4,5,6,9,10],"ordinari":0,"orig_pennies_sampl":2,"output":[0,1,3,9,10],"overal":0,"overlaid":[0,6],"overlay":3,"overwhelm":1,"p":[0,7,9,10],"p_valu":[0,7,9],"p_valuef640":[3,5,10],"packag":[0,1,3,10],"page":[1,3,6],"pair":[0,7],"pairplot":[0,6],"pan":[6,10],"panda":[1,2,3,10],"panel":6,"parallel":[0,7],"paramet":0,"pass":[0,1,3,6,8,9],"pearson":0,"penni":[1,2],"pennies_resampl":2,"pennies_sampl":2,"peopl":3,"per":[0,3,6,7],"percentil":[0,4,5,6],"permut":[0,3,6,7,10],"pip":[3,6,10],"pipe":1,"pipelin":8,"pl":[4,5,8],"plan":0,"plane":2,"plot":[1,3,4,7,9,10],"plotnin":[0,1,3,4,7,9,10],"plus":[2,10],"png":[6,10],"point":[0,1,3,4],"point_estim":[0,4],"polar":[0,1,2,3,4,5,7,8,10],"pop_sd":[0,1,9],"popul":0,"popular":[0,5,6,10],"popular_or_not":[0,5,6,10],"port":[7,10],"posit":0,"predictor":[0,7],"prefer":[5,6],"price":[3,6,7],"price_hat":7,"produc":[6,10],"prop":[3,4,5,6,10],"prop_r":8,"prop_redf640":8,"prop_test":[0,1,5,9],"prop_test_two_sampl":0,"proport":[0,8,9,10],"provid":0,"python":1,"q1":0,"q3":0,"quantil":0,"quot":[3,7,8],"r":[0,2,3,7,8,9,10],"r_squar":[0,7],"r_squaredadj_r_squaredmsermsesigmastatisticp_valuedfnobsf64f64f64f64f64f64f64i64i640":7,"rais":2,"rang":5,"rank":[6,7],"rate":[5,9,10],"rather":6,"ratio":5,"raw":6,"re":1,"read":[3,4,5,10],"receiv":5,"red":8,"refer":8,"regress":[1,2,10],"render":[6,10],"rep":[0,1,3,4,5,6,7,8,9,10],"rep_sample_n":[0,1,8],"rep_slice_sampl":[0,1,8],"repeat":8,"replac":[0,4],"replic":[0,7,8],"replicateball_idcolori64i64str11136":8,"replicateprop_redi64f6410":8,"report":0,"reproduc":[0,1],"requir":0,"resampl":[0,4,5,8],"residu":0,"respons":[0,1,4,5,6,7,9],"result":0,"return":[0,1,2,3,5,9,10],"riddhi":8,"right":[0,3,5,6,9,10],"rmse":[0,7],"romanc":9,"row":[0,7],"run":[3,7,10],"s":[0,3,7,9,10],"sampl":[2,3,9,10],"saratoga_hous":2,"save":10,"scalar":[0,5],"scatter_matrix":0,"scatterplot":[0,6],"scienc":10,"scipi":0,"score":[6,7],"script":6,"sd":[0,5],"se":[0,4],"seaborn":[0,6],"see":[0,1,3,4,5,8,10],"seed":[0,1,3,4,5,6,7,8,9,10],"select":[0,8],"sentenc":[3,10],"separ":[0,7],"sequenc":0,"seri":0,"set":[0,1],"shade":[0,3,7],"shade_ci":[0,1,4,6],"shade_confidence_interv":[0,1,4,6,7],"shade_p_valu":[0,1,3,5,6,7,10],"shade_pvalu":[0,1],"shadespec":0,"shape":[2,3,4,5,6,7,8,9,10],"shifted_respons":0,"ship":[3,9],"short":1,"shortcut":0,"show":[6,9],"shown":3,"shuffl":[0,10],"side":[0,5,7,9],"sigma":[0,7],"simul":[0,2,5,10],"sinc":0,"singl":[0,5,7],"size":[0,8],"slope":[0,5,7],"small":[0,6,9],"smaller":0,"smf":[1,3,7],"sort":[0,2],"sourc":0,"spec":0,"specif":0,"specifi":[0,1,3,4,5,6,7,9,10],"spell":1,"splom":0,"spotifi":[5,6,10],"spotify_52_origin":2,"spotify_52_shuffl":2,"spotify_by_genr":2,"spotify_metal_deephous":2,"spread":8,"sqrt":0,"squar":[0,9],"stack":[8,10],"standard":[0,4],"stat":[0,1,3,4,5,6,9,10],"static":[3,6,10],"statist":[0,3,7,9,10],"statisticchisq_dfp_valuef64i64f640":9,"statsmodel":[0,1,2,3,7,10],"std_error":0,"step":5,"steves_episod":2,"store":2,"str":0,"string":[0,1,2,5],"style":[0,1,8],"subjgroupyawni64strstr1":3,"success":[0,1,3,4,5,6,9,10],"sum":5,"summar":3,"summari":0,"suppli":5,"support":[0,5,9],"svg":10,"switch":6,"syntax":[3,6],"t":[0,2,4,5,9,10],"t_confidence_interv":0,"t_df":9,"t_dist":9,"t_stat":[0,1,9],"t_test":[0,1,5,9],"t_test_one_sampl":0,"t_test_two_sampl":0,"tabl":[0,2,10],"tactile_prop_r":2,"tail":[0,5],"take":[0,5,6,8,10],"task":[3,10],"teach":[0,10],"term":[0,6,7],"termestimatestd_errorstatisticp_valuelower_ciupper_cistrf64f64f64f64f64f64":[3,7],"terranc":8,"test":[2,3,10],"themat":3,"theoret":[0,3,6],"theoreticaldistribut":0,"theori":[4,5,10],"thoma":8,"throughout":10,"tidi":[0,5,7,9,10],"tidy_summari":[0,1,3],"tie":0,"time":10,"time_hour":2,"to_panda":[1,2,3,7],"tool":1,"total":0,"total_cup_point":6,"tour":3,"track":[5,10],"track_genr":[0,5,6,10],"tradit":0,"true":[0,8],"tupl":0,"turn":7,"twice":0,"two":[0,4,7,9],"type":[0,1,3,4,5,6,7,9,10],"un_member_states_2024":2,"underlying":6,"unit":0,"unus":0,"upper":0,"upper_ci":[0,4,9],"us_births_1994_2003":2,"use":[0,1,5,6,9],"utc":2,"valid":2,"valu":[0,9,10],"valueerror":2,"variabl":[0,3,4,5],"variat":8,"verb":[1,3],"version":0,"via":[0,2,6,10],"vignesh":8,"visual":[1,5,8,9,10],"visualis":1,"visualize_fit":[0,6,7],"viz":[6,7],"vocabulari":5,"vs":0,"walk":3,"way":[8,9,10],"weather":2,"weight":[0,3,4,5,6],"welch":[0,9],"whi":1,"white":8,"whole":6,"width":6,"without":9,"work":[1,7,10],"world":5,"wrapper":[0,5,6,9],"x":[0,1,7],"y":[0,1,7],"yawn":[3,4,9],"year":1,"yearage_in_2011i64i6419862519961519941720083199912":2,"yes":[3,4,9],"yield":3,"yohan":8,"z":[0,5,9],"zinc_tidi":2,"zoom":[6,10]},"titles":["API reference","Coming from R","Datasets","Getting started","Bootstrapping & confidence intervals","Hypothesis testing","Plotting: plotly & plotnine","Regression","Sampling","Theory-based inference","moderndive (Python)"],"titleterms":{"A":[3,4],"By":2,"Most":1,"Other":1,"Same":1,"The":[1,3,8],"What":1,"Where":10,"With":8,"actual":1,"api":0,"assum":9,"avail":5,"base":[0,9],"bootstrap":4,"bowl":8,"choos":3,"coeffici":[6,7],"come":1,"confid":[4,7],"correl":7,"custom":5,"dataset":[0,1,2,3],"deviat":9,"differ":[1,4],"distribut":[4,8,9],"engin":3,"exampl":10,"facet":6,"figur":6,"first":3,"fit":7,"form":6,"get":[3,10],"getter":0,"grammar":0,"group":5,"guid":10,"helper":0,"hypothesi":5,"ident":1,"infer":[0,1,3,7,9],"inferplot":6,"instal":[3,10],"interval":[4,7],"keyword":6,"know":1,"line":9,"load":3,"mani":8,"mean":[4,5],"method":4,"model":[6,7],"modernd":10,"name":1,"next":10,"null":5,"one":[5,8,9],"overlay":[6,9],"p":[5,6],"permut":5,"pipelin":[1,3],"plot":[0,6],"plotnin":6,"point":5,"popul":9,"proport":[4,5],"python":10,"r":1,"refer":[0,10],"regress":[0,3,6,7],"replac":8,"residu":7,"return":6,"s":1,"sampl":[0,8],"save":6,"second":10,"shade":[5,6],"simul":[6,9],"standard":9,"start":[3,10],"statist":5,"summari":[3,7],"tabl":7,"tactil":8,"test":[0,5,9],"theoret":9,"theori":[0,6,9],"thing":1,"three":4,"tip":2,"topic":2,"two":5,"valu":[5,6,7],"virtual":8,"visual":[0,3,4,6,7],"vs":[6,8],"whi":10,"without":8}})
\ No newline at end of file
diff --git a/doc/_build/jupyter_execute/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png b/doc/_build/jupyter_execute/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png
new file mode 100644
index 0000000..5604621
Binary files /dev/null and b/doc/_build/jupyter_execute/0cbf7366b5b2086def6aceec9bf8e8320703e5fcdb1857544f8d601b5ef8edd9.png differ
diff --git a/doc/_build/jupyter_execute/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png b/doc/_build/jupyter_execute/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png
new file mode 100644
index 0000000..1dac2fc
Binary files /dev/null and b/doc/_build/jupyter_execute/146f21e1e2cfebef569cb551e24b0c5826d3fe84072e2197538258975eba8070.png differ
diff --git a/doc/_build/jupyter_execute/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png b/doc/_build/jupyter_execute/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png
new file mode 100644
index 0000000..a6f6500
Binary files /dev/null and b/doc/_build/jupyter_execute/1d823747e0f1ecebe3da106ec64b1ad73d4d55547d8814ff4c011efafc6354bc.png differ
diff --git a/doc/_build/jupyter_execute/446856f7a7a4b3ae8beb128934fc4936f3afde3e478c71e657c8305dcee97764.png b/doc/_build/jupyter_execute/446856f7a7a4b3ae8beb128934fc4936f3afde3e478c71e657c8305dcee97764.png
new file mode 100644
index 0000000..ca77963
Binary files /dev/null and b/doc/_build/jupyter_execute/446856f7a7a4b3ae8beb128934fc4936f3afde3e478c71e657c8305dcee97764.png differ
diff --git a/doc/_build/jupyter_execute/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png b/doc/_build/jupyter_execute/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png
new file mode 100644
index 0000000..020fa18
Binary files /dev/null and b/doc/_build/jupyter_execute/4f6137e2efe6c6b33540a969fb71e0dc9370f9392a068c674921b84116e9ca18.png differ
diff --git a/doc/_build/jupyter_execute/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png b/doc/_build/jupyter_execute/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png
new file mode 100644
index 0000000..aa8f2c6
Binary files /dev/null and b/doc/_build/jupyter_execute/57bcfc0de676a5294afac27836489f257436cfdc208aba5a2907c8b2aa95d9f8.png differ
diff --git a/doc/_build/jupyter_execute/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png b/doc/_build/jupyter_execute/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png
new file mode 100644
index 0000000..acf5425
Binary files /dev/null and b/doc/_build/jupyter_execute/65edcbd2c398320bee92dd5442e64f14d1af22f756a002ca29e0d49a56241eaa.png differ
diff --git a/doc/_build/jupyter_execute/679346fce431777e0d221fb96d0d46c94c46266531703754ae8cf2b7aea89916.png b/doc/_build/jupyter_execute/679346fce431777e0d221fb96d0d46c94c46266531703754ae8cf2b7aea89916.png
new file mode 100644
index 0000000..2b3b45d
Binary files /dev/null and b/doc/_build/jupyter_execute/679346fce431777e0d221fb96d0d46c94c46266531703754ae8cf2b7aea89916.png differ
diff --git a/doc/_build/jupyter_execute/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png b/doc/_build/jupyter_execute/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png
new file mode 100644
index 0000000..3ee44e6
Binary files /dev/null and b/doc/_build/jupyter_execute/a1ca833e74d2d2988b8271748b2439c6db0fb6d52aa565c9c0cf8dfd523736eb.png differ
diff --git a/doc/_build/jupyter_execute/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png b/doc/_build/jupyter_execute/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png
new file mode 100644
index 0000000..b9976d4
Binary files /dev/null and b/doc/_build/jupyter_execute/a716ffc5702927ebba6a9176ddba190577d8d13ed180fbd9a689d9d06129dac6.png differ
diff --git a/doc/_build/jupyter_execute/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png b/doc/_build/jupyter_execute/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png
new file mode 100644
index 0000000..4b468dc
Binary files /dev/null and b/doc/_build/jupyter_execute/ac66f688faad576ec00fb6dfa22ab9d34977edb8a0a5ff3cadb158ce22be94fd.png differ
diff --git a/doc/_build/jupyter_execute/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png b/doc/_build/jupyter_execute/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png
new file mode 100644
index 0000000..1dbbadc
Binary files /dev/null and b/doc/_build/jupyter_execute/ac9c0dd7643fbf405d9039110a0f70c17f154b4de622875f4f1404927f71b3a3.png differ
diff --git a/doc/_build/jupyter_execute/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png b/doc/_build/jupyter_execute/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png
new file mode 100644
index 0000000..a272160
Binary files /dev/null and b/doc/_build/jupyter_execute/b356fae18e59a76c6630e1f9a522d1b99306e56b3817f2c09a7547d10157d1df.png differ
diff --git a/doc/_build/jupyter_execute/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png b/doc/_build/jupyter_execute/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png
new file mode 100644
index 0000000..115fd4e
Binary files /dev/null and b/doc/_build/jupyter_execute/b366a9ba76d2135e3480197df1efa63a52fcc6c3aade26c457542b5eae9607b8.png differ
diff --git a/doc/_build/jupyter_execute/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png b/doc/_build/jupyter_execute/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png
new file mode 100644
index 0000000..8bd188b
Binary files /dev/null and b/doc/_build/jupyter_execute/c095fdc806a901609764f3a83013d31798e7b884fd7e4d4c51f4edb0142b30cf.png differ
diff --git a/doc/_build/jupyter_execute/datasets.ipynb b/doc/_build/jupyter_execute/datasets.ipynb
new file mode 100644
index 0000000..1bc9291
--- /dev/null
+++ b/doc/_build/jupyter_execute/datasets.ipynb
@@ -0,0 +1,157 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "2483e0f4",
+ "metadata": {
+ "tags": [
+ "remove-input"
+ ]
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib\n",
+ "matplotlib.use(\"Agg\")\n",
+ "import plotly.io as pio\n",
+ "pio.renderers.default = \"png\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "3a64ee65",
+ "metadata": {},
+ "source": [
+ "# Datasets\n",
+ "\n",
+ "`moderndive` bundles 58 datasets (the R `moderndive` + `infer` data, plus a few\n",
+ "derived tables). Each loads with `load_()` and returns a polars DataFrame."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "97a618b4",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "