getPValue: Calculate P-Value from a Sorted Distribution
Description
Computes the P-value for a given numeric value `x` based on its position within a sorted distribution.
This function utilizes a binary search approach for efficient computation.
Usage
getPValue(x, sorted_Distri)
Value
A numeric value indicating the P-value, representing the proportion of values in `sorted_Distri`
that are greater than or equal to `x`.
Arguments
x
A numeric value for which the P-value is to be calculated.
sorted_Distri
A numeric vector representing a sorted distribution. This distribution must be sorted in ascending order.