https://github.com/bergio13/confsets.jl
Compute confidence Intervals (CLT, Chebyshev, Hoeffding) and Confidence Sequences (in a sequential setting if needed) in Julia
https://github.com/bergio13/confsets.jl
confidence-intervals confidence-sequences confidence-sets sequential statistics
Last synced: 9 months ago
JSON representation
Compute confidence Intervals (CLT, Chebyshev, Hoeffding) and Confidence Sequences (in a sequential setting if needed) in Julia
- Host: GitHub
- URL: https://github.com/bergio13/confsets.jl
- Owner: bergio13
- License: mit
- Created: 2024-02-08T19:13:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T11:53:28.000Z (almost 2 years ago)
- Last Synced: 2025-03-19T16:21:19.844Z (9 months ago)
- Topics: confidence-intervals, confidence-sequences, confidence-sets, sequential, statistics
- Language: Julia
- Homepage:
- Size: 39.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://app.travis-ci.com/bergio13/ConfSets.jl.svg?branch=main)
[](https://codecov.io/gh/bergio13/ConfSets.jl)
# ConfSets.jl
ConfSets.jl is a Julia library for computing confidence intervals using various statistical methods including the Central Limit Theorem (CLT), Hoeffding's Inequality, and Chebyshev's Inequality and confidence sequences. In particular, if you are in a sequential setting, it is advisable to use confidence sequences as over time the confidence intervals will miscover the true mean in multiple instances. On the other hand, the confidence sequences are designed to simultaneously capture the true mean uniformly over time and asymptotically.
## Installation
You can install ConfSets.jl using the Julia package manager. From the Julia REPL, enter the package manager mode by pressing `]`, and then run:
```
add ConfSets
```
## Usage
Once installed, you can use the library to compute confidence intervals and confidence sequences using the methods shown below. Notice that if you want to compute sequential confidence sets, you can set the `sequential` parameter to `true`, otherwise set it to `false`.
```julia
using ConfSets
data = [10.2, 12.3, 9.8, 11.5, 10.9]
alpha = 0.05
# Compute confidence interval using CLT
clt_interval = confint(data, alpha, "clt", sequential=true)
# Compute confidence interval using Hoeffding's Inequality
# The argument'rang'is the range of the data (e.g. if the distribution is in the range 9-13 --> set rang=4)
hoeffding_interval = confint(data, alpha, "hoeffding", rang=4, sequential=false)
# Compute confidence interval using Chebyshev's Inequality
chebyshev_interval = confint(data, alpha, "chebyshev", sequential=true)
# Compute Asymptotic Confidence Sequence
asymptotic_sequence = confseq(data, alpha, "asymptotic", sequential=true)
```
## Contributing
Contributions are welcome! If you encounter any issues, have suggestions for improvements, or would like to add new features, feel free to open an issue or submit a pull request on GitHub.
## License
The code is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).