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

Incorrect standard error #203

Closed
fzakaria opened this issue Sep 15, 2024 · 5 comments
Closed

Incorrect standard error #203

fzakaria opened this issue Sep 15, 2024 · 5 comments

Comments

@fzakaria
Copy link

stdev = bench.stdev()

The docs link to https://en.wikipedia.org/wiki/Standard_error which claim it's: standard deviation / square-root(n).

pyperf seems to be only reporting the standard deviation?

Not sure how to use this information along with the t-score to get my confidence intervals.

@vstinner
Copy link
Member

Did you try the https://pyperf.readthedocs.io/en/latest/cli.html#stats-cmd command?

The https://pyperf.readthedocs.io/en/latest/cli.html#compare-to-cmd command computes also the t-test:

pyperf determines whether two samples differ significantly using a Student’s two-sample, two-tailed t-test with alpha equals to 0.95.

@fzakaria
Copy link
Author

I tried those commands; they do show the t-test value.
My issue I opened was because the documentation claims that the stdev shown is the "Standard Error" (it even links to the wiki page for Standard Error) but is in fact the sampled stdev.

image

Showing it as +- is a bit incorrect I felt. It probably needs to then be used with the t-score for a 95% confidence interval?
Anyways; if i'm wrong since i'm also poor at statistics that also makes sense.
I was using pyperformance to benchmark some stuff and wanted to highlight something I found confusing.

@vstinner
Copy link
Member

Oh, stdev() is the standard deviation: https://docs.python.org/dev/library/statistics.html#statistics.stdev

@fzakaria
Copy link
Author

Right and that's being reported as the Standard Error on the API was my read.

Screenshot 2024-09-16 at 1 49 07 PM

@vstinner
Copy link
Member

I think that there is a mistake in the link: I wrote #204 to fix the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants