PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 10, 2022

[FIXED] How to return decimal result in Binomial Test in Python

 August 10, 2022     decimal, python     No comments   

Issue

I am running a binomial test in python, since the P-value result is too close to 0 so it return 0 directly, but I want to return the exact P value instead of 0, how could I do that?

The code is below

from scipy import stats

p=stats.binom_test(4953,850421,0.002691, alternative='greater')

Solution

The tolerance of this library is e^-16. Thus, I think it is not possible to get a p-value in this case. In statistics, p-value is the probability of success under conditions of null hypothesis. We require to compare it with 0.01, 0.05, and 0.1 under different alpha-value. Thus, it is useless to use any other value like 0.005. It indicates that assuming null hypothesis is true is misleading. If we use a infinitesimal small probability of making type-I error then the probability of making type-II error will be significantly high.



Answered By - Aaditya Bhardwaj
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing