\n\n\n\nConfidenceLevel\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n\n
\n
jhpro.stat
\n

## Class ConfidenceLevel

\n
\n
\n
\n
\n
\n
• \n
\n
\n
`public class ConfidenceLevel\nextends Object`
\n
Confidence level calculations.\n

\n For discoveries, 1-CLb indicates the probability that the background\n fluctuates to produce a distribution of candidates at least\n as signal-like as those observed in the data. For discovery, \n 1-CLb is required to be no more than 2.87x10-7, or twice that, \n depending on how one interprets what is meant by \xe2\x80\x9cfive sigma,\xe2\x80\x9d including just one side of a \n Gaussian tail or both. A \xe2\x80\x9cthree sigma\xe2\x80\x9d excess is defined to be 1-CLb = 1.3x10-3 or twice that. \n But forming discovery p-values, we must compute 1-CLb values of the order\n of 10-7. This computation involves generating of the order of 10^8 \n pseudoexperiments, just to be on the safe side.\n

\n Read Reference: HEP-EX/9902006. see: Tom Junk,NIM A434, p. 435-443,

\n
• \n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Constructor Summary

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Constructors
Constructor and Description
`ConfidenceLevel()`\n
Default constructor.
\n
`ConfidenceLevel(int mc)`\n
Construct ConfLevel
\n
`ConfidenceLevel(int mc,\n boolean onesided)`\n
Build confidence level.
\n
\n
• \n
\n\n
\n
• \n\n\n

### Method Summary

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Methods
Modifier and TypeMethod and Description
`void``doc()`\n
Show online documentation.
\n
`double``get3sProbability()`\n
Get 3s probability.
\n
`double``get5sProbability()`\n
Get 5s probability.
\n
`double``getAverageCLs()`\n
Get average CLs.
\n
`double``getAverageCLsb()`\n
Get average CLsb.
\n
`double``getCLb()`\n
Get the Confidence Level for the background only.
\n
`double``getCLb(boolean use_sMC)`\n
Get the Confidence Level for the background only.
\n
`double``getCLs()`\n
Get the Confidence Level defined by CLs = CLsb/CLb.
\n
`double``getCLs(boolean use_sMC)`\n
Get the Confidence Level defined by CLs = CLsb/CLb.
\n
`double``getCLsb()`\n
Get the Confidence Level for the signal plus background hypothesis\n The confidence level for excluding the possibility of simultaneous presence\n of new particle production and background (the s + b hypothesis)
\n
`double``getCLsb(boolean use_sMC)`\n
Get the Confidence Level for the signal plus background hypothesis
\n
`double``getExpectedCLb_b()`\n
Get the expected Confidence Level for the background only if there is\n only background.These are indications of how well an experiment would\n do on average in excluding a signal if the signal truly is not present, and are\n the important figures of merit when optimizing an analysis for exclusion.
\n
`double``getExpectedCLb_b(int sigma)`\n
Get the expected Confidence Level for the background only if there is\n only background.
\n
`double``getExpectedCLb_sb()`\n
Get the expected Confidence Level for the background only if there is\n signal and background.
\n
`double``getExpectedCLb_sb(int sigma)`\n
Get the expected Confidence Level for the background only if there is\n signal and background.
\n
`double``getExpectedCLs_b()`\n
Get getExpectedCLsb_b/getExpectedCLb_b.
\n
`double``getExpectedCLs_b(int sigma)`\n
Get getExpectedCLsb_b/getExpectedCLb_b
\n
`double``getExpectedCLsb_b()`\n
Get the expected Confidence Level for the signal plus background\n hypothesis if there is only background.
\n
`double``getExpectedCLsb_b(int sigma)`\n
Get the expected Confidence Level for the signal plus background\n hypothesis if there is only background.
\n
`double``getExpectedStatistic_b()`
`double``getExpectedStatistic_b(int sigma)`\n
Get the expected statistic value in the background only hypothesis
\n
`double``getExpectedStatistic_sb(int sigma)`\n
Get the expected statistic value in the signal plus background hypothesis
\n
`H1D``getLNQb(int bins,\n double min,\n double max)`\n
Get a histogram of a canonical -2lnQ plot for \n background hypothesis (full)
\n
`H1D``getLNQsb(int bins,\n double min,\n double max)`\n
Get a histogram of a canonical -2lnQ plot for \n for signal and background hypothesis
\n
`ArrayList<H1D>``getResults(String Option)`\n
Display sort of a "canonical" -2lnQ plot.
\n
`double``getStatistic()`
`void``setBtot(double in)`
`void``setDtot(int in)`
`void``setLRB(double[] in)`
`void``setLRS(double[] in)`
`void``setStot(double in)`
`void``setTSB(double[] in)`
`void``setTSD(double in)`
`void``setTSS(double[] in)`
\n
\n
• \n\n\n

### Methods inherited from class java.lang.Object

\n`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• \n
\n
• \n
\n
• \n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Constructor Detail

\n\n\n\n
\n
• \n

#### ConfidenceLevel

\n
`public ConfidenceLevel()`
\n
Default constructor.
\n
• \n
\n\n\n\n
\n
• \n

#### ConfidenceLevel

\n
`public ConfidenceLevel(int mc)`
\n
Construct ConfLevel
\n
Parameters:
`mc` - number of MonteCarlo experiments
\n
• \n
\n\n\n\n
\n
• \n

#### ConfidenceLevel

\n
`public ConfidenceLevel(int mc,\n               boolean onesided)`
\n
Build confidence level.
\n
Parameters:
`mc` - is the number of Monte Carlo experiments
`onesided` - specifies if the intervals are one-sided or not.
\n
• \n
\n
• \n
\n\n
\n
• \n\n\n

### Method Detail

\n\n\n\n
\n
• \n

#### getExpectedStatistic_b

\n
`public double getExpectedStatistic_b(int sigma)`
\n
Get the expected statistic value in the background only hypothesis
\n
Parameters:
`sigma` - between -2 and 2
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedStatistic_sb

\n
`public double getExpectedStatistic_sb(int sigma)`
\n
Get the expected statistic value in the signal plus background hypothesis
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getCLb

\n
`public double getCLb()`
\n
Get the Confidence Level for the background only.\n This confidence level quantifies the confidence of a potential\n discovery, as it expresses the probability that background processes would\n give fewer than or equal to the number of candidates observed.\n 1-CLb is the probability that the null hypothesis will give an outcome \n that looks at least as signal-like as the one observed. For discovery, \n 1-CLb is required to be no more than 2.87x10-7, or twice that, \n depending on how one interprets what is meant by \xe2\x80\x9cfive sigma,\xe2\x80\x9d including just one side of a \n Gaussian tail or both. A \xe2\x80\x9cthree sigma\xe2\x80\x9d excess is defined to be 1-CLb=1.3x10-3 or twice that.\n But forming discovery p-values, we must compute 1-CLb values of the order\n of 10-7. This computation involves generating of the order of 10^8 pseudoexperiments,\n just to be on the safe side.
\n
Returns:
Confidence Level for the background only.
\n
• \n
\n\n\n\n
\n
• \n

#### getCLb

\n
`public double getCLb(boolean use_sMC)`
\n
Get the Confidence Level for the background only.\n This confidence level quantifies the confidence of a potential\n discovery, as it expresses the probability that background processes would\n give fewer than or equal to the number of candidates observed.\n 1-CLb is the probability that the null hypothesis will give an outcome \n that looks at least as signal-like as the one observed. For discovery, \n 1-CLb is required to be no more than 2.87*10-7, or twice that, \n depending on how one interprets what is meant by \xe2\x80\x9cfive sigma,\xe2\x80\x9d including just one side of a \n Gaussian tail or both. A \xe2\x80\x9cthree sigma\xe2\x80\x9d excess is defined to be 1-CLb = 1.3*10^-3 or twice that.\n

\n But forming discovery p-values, we must compute 1-CLb values of the order\n of 10-7. This computation involves generating of the order of 10^8 pseudoexperiments,\n just to be on the safe side.

\n
Parameters:
`use_sMC` -
\n
Returns:
Confidence Level for the background only.
\n
• \n
\n\n\n\n
\n
• \n

#### getCLsb

\n
`public double getCLsb()`
\n
Get the Confidence Level for the signal plus background hypothesis\n The confidence level for excluding the possibility of simultaneous presence\n of new particle production and background (the s + b hypothesis)
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getCLsb

\n
`public double getCLsb(boolean use_sMC)`
\n
Get the Confidence Level for the signal plus background hypothesis
\n
Parameters:
`use_sMC` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getCLs

\n
`public double getCLs()`
\n
Get the Confidence Level defined by CLs = CLsb/CLb. \n This quantity is\n stable w.r.t. background fluctuations.\n

\n This hypothesis is excluded at the 95% CL if CLs = 0.05, \n and at more than the 95% CL if CLs < 0.05, assuming that signal is present.

\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getCLs

\n
`public double getCLs(boolean use_sMC)`
\n
Get the Confidence Level defined by CLs = CLsb/CLb. This quantity is\n stable w.r.t. background fluctuations.

\n This hypothesis is excluded at the 95% CL if CLs = 0.05, \n and at more than the 95% CL if CLs < 0.05, assuming that signal is present.

\n
Parameters:
`use_sMC` - use or not MC.
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLsb_b

\n
`public double getExpectedCLsb_b(int sigma)`
\n
Get the expected Confidence Level for the signal plus background\n hypothesis if there is only background.
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLb_sb

\n
`public double getExpectedCLb_sb(int sigma)`
\n
Get the expected Confidence Level for the background only if there is\n signal and background.
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLb_b

\n
`public double getExpectedCLb_b(int sigma)`
\n
Get the expected Confidence Level for the background only if there is\n only background.
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getAverageCLsb

\n
`public double getAverageCLsb()`
\n
Get average CLsb.
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getAverageCLs

\n
`public double getAverageCLs()`
\n
Get average CLs.
\n
• \n
\n\n\n\n
\n
• \n

#### get3sProbability

\n
`public double get3sProbability()`
\n
Get 3s probability.
\n
• \n
\n\n\n\n
\n
• \n

#### get5sProbability

\n
`public double get5sProbability()`
\n
Get 5s probability.
\n
• \n
\n\n\n\n
\n
• \n

#### getResults

\n
`public ArrayList<H1D> getResults(String Option)`
\n
Display sort of a "canonical" -2lnQ plot. This results in a plot with 2\n elements: // - The histogram of -2lnQ for background hypothesis (full) -\n The histogram of -2lnQ for signal and background hypothesis (dashed) The\n 2 histograms are respectively named b_hist and sb_hist.
\n
Parameters:
`Option` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### setTSD

\n
`public void setTSD(double in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setLRS

\n
`public void setLRS(double[] in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setLRB

\n
`public void setLRB(double[] in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setBtot

\n
`public void setBtot(double in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setStot

\n
`public void setStot(double in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setDtot

\n
`public void setDtot(int in)`
\n
• \n
\n\n\n\n
\n
• \n

#### getStatistic

\n
`public double getStatistic()`
\n
• \n
\n\n\n\n
\n
• \n

#### setTSB

\n
`public void setTSB(double[] in)`
\n
• \n
\n\n\n\n
\n
• \n

#### setTSS

\n
`public void setTSS(double[] in)`
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedStatistic_b

\n
`public double getExpectedStatistic_b()`
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLb_sb

\n
`public double getExpectedCLb_sb()`
\n
Get the expected Confidence Level for the background only if there is\n signal and background.
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLs_b

\n
`public double getExpectedCLs_b(int sigma)`
\n
Get getExpectedCLsb_b/getExpectedCLb_b
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLs_b

\n
`public double getExpectedCLs_b()`
\n
Get getExpectedCLsb_b/getExpectedCLb_b.\n These are indications of how well an experiment would\n do on average in excluding a signal if the signal truly is not present, and are\n the important figures of merit when optimizing an analysis for exclusion.
\n
Parameters:
`sigma` -
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLb_b

\n
`public double getExpectedCLb_b()`
\n
Get the expected Confidence Level for the background only if there is\n only background.These are indications of how well an experiment would\n do on average in excluding a signal if the signal truly is not present, and are\n the important figures of merit when optimizing an analysis for exclusion.
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getExpectedCLsb_b

\n
`public double getExpectedCLsb_b()`
\n
Get the expected Confidence Level for the signal plus background\n hypothesis if there is only background.
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getLNQb

\n
`public H1D getLNQb(int bins,\n          double min,\n          double max)`
\n
Get a histogram of a canonical -2lnQ plot for \n background hypothesis (full)
\n
Parameters:
`bins` - number of bins
`min` - min value
`max` - max value
\n
Returns:
histogram for -2lnQ plot for background
\n
• \n
\n\n\n\n
\n
• \n

#### getLNQsb

\n
`public H1D getLNQsb(int bins,\n           double min,\n           double max)`
\n
Get a histogram of a canonical -2lnQ plot for \n for signal and background hypothesis
\n
Parameters:
`bins` - number of bins
`min` - min value
`max` - max value
\n
Returns:
histogram for -2lnQ plot for signal and background hypothesis
\n
• \n
\n\n\n\n
\n
• \n

#### doc

\n
`public void doc()`
\n
Show online documentation.
\n
• \n
\n
• \n
\n
• \n
\n
\n
\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n