Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bucketing and min-max bounds on plots #44

Open
Fasjul opened this issue Aug 2, 2022 · 2 comments
Open

Bucketing and min-max bounds on plots #44

Fasjul opened this issue Aug 2, 2022 · 2 comments
Assignees
Labels
bug Something isn't working GlowingBear p:ti4health

Comments

@Fasjul
Copy link

Fasjul commented Aug 2, 2022

Histogram bounds and step are 0-100 and 1, fixed. This should be dynamic as it makes few sense for anayltes that can go over 100 or which require a higher precision to be meaningful (ex pH in blood).

168625283-6981abda-1a27-433e-90a6-53549c2ef425

Additionally: The x-axis of histogram should either span the range
min(data) <--> max(data) or lowerBound(Confidence interval of lower RI bound) <--> upperBound(Confidence interval of upper RI bound), depending which is bigger.

@jimmydjabali jimmydjabali self-assigned this Aug 25, 2022
@jimmydjabali jimmydjabali added the bug Something isn't working label Aug 25, 2022
@jimmydjabali jimmydjabali removed their assignment Sep 6, 2022
@T-Blatter
Copy link

T-Blatter commented Sep 12, 2022

Number of bins and width

There are two common ways, that bin widths (and total number of bins) of a histogram are automatically calculated:

  1. Sturge’s formula: ${\displaystyle k=\lceil \log _{2}n\rceil +1, }$ (used in EXCEL) see also
  2. Freedman–Diaconis' formula: ${\displaystyle h=2{\frac {\operatorname {IQR} (x)}{\sqrt[{3}]{n}}},}$ (used in Minitab / SPSS) see also

$n$ = sample size, $k$ = number of bins, $h$ = bin width, $IQR$ = Interquantile range of data $x$

The 1. requires the knowledge of the overall sample size ($n$) and to calculate the bin width it requires the min / max of the data. The 2. only requires the knowledge of the quantiles ( $Q_1$ and $Q_3$ ) to calculate the bin width.

@f-marino
Copy link

@Fasjul how can we reproduce the issue? the pH analyte does not give the screenshotted plot with the data we have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GlowingBear p:ti4health
Projects
None yet
Development

No branches or pull requests

5 participants