# Using BootStrap package to obtain the distribution of mean/sd

**URL:** <https://discourse.julialang.org/t/using-bootstrap-package-to-obtain-the-distribution-of-mean-sd/84164>\
**Category:** General Usage\
**Tags:** statistics\
**Created:** [July 13, 2022, 11:38am UTC](https://discourse.julialang.org/t/using-bootstrap-package-to-obtain-the-distribution-of-mean-sd/84164 "2022-07-13T11:38:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnshPatel7](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@AnshPatel7](https://discourse.julialang.org/u/AnshPatel7)\
**Post date:** [July 13, 2022, 11:38am UTC](https://discourse.julialang.org/t/using-bootstrap-package-to-obtain-the-distribution-of-mean-sd/84164/1 "2022-07-13T11:38:23Z")

</div>

Hi,  
I’m trying to use the bootstrap function to find the mean and sd of a dataset that I have generated. As an example, the following code gives me the mean, error and bias:  
A = randn(10)  
m = bootstrap(mean,A, BasicSampling(1000))

Output:  
Bootstrap Sampling  
Estimates:  
Var │ Estimate Bias StdError  
│ Float64 Float64 Float64  
─────┼─────────────────────────────────  
1 │ -0.295697 0.00130826 0.293785  
Sampling: BasicSampling  
Samples: 1000  
Data: Vector{Float64}: { 10 }

But I need the distribution of mean values of the 1000 bootstrap samples. Is there any way to get that on Julia?

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [July 13, 2022, 12:38pm UTC](https://discourse.julialang.org/t/using-bootstrap-package-to-obtain-the-distribution-of-mean-sd/84164/2 "2022-07-13T12:38:01Z")

</div>

You are looking for the unfortunately undocumented `Bootstrap.straps` function.

See [Feature to retrieve all sampled results so that a histogram can be obtained · Issue #86 · juliangehring/Bootstrap.jl · GitHub](https://github.com/juliangehring/Bootstrap.jl/issues/86)

---

<div class="post-metadata">

**Author:** ![AnshPatel7](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@AnshPatel7](https://discourse.julialang.org/u/AnshPatel7)\
**Post date:** [July 13, 2022, 1:57pm UTC](https://discourse.julialang.org/t/using-bootstrap-package-to-obtain-the-distribution-of-mean-sd/84164/3 "2022-07-13T13:57:30Z")

</div>

Perfect!  
Thanks a lot.
