Skip to content

ExperimentPairedBinaryComparisonEvidence

NexusLabs.Foundry.Evaluation

NexusLabs.Foundry.Evaluation.Experiments

ExperimentPairedBinaryComparisonEvidence Class

Describes paired binary X-minus-Y comparison evidence and its paired uncertainty summary.

public sealed record ExperimentPairedBinaryComparisonEvidence : System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentPairedBinaryComparisonEvidence>

Inheritance System.Object 🡒 ExperimentPairedBinaryComparisonEvidence

Implements System.IEquatable<ExperimentPairedBinaryComparisonEvidence>

Properties

ExperimentPairedBinaryComparisonEvidence.ACount Property

Gets the concordant success count where both X and Y succeeded in the paired 2×2 table.

public int ACount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.BCount Property

Gets the discordant count where X succeeded and Y failed in the paired 2×2 table.

public int BCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.Cases Property

Gets a defensive snapshot of the analyzed paired case outcomes.

public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentPairedBinaryCaseOutcome> Cases { get; }

Property Value

System.Collections.Generic.IReadOnlyList<ExperimentPairedBinaryCaseOutcome>

ExperimentPairedBinaryComparisonEvidence.CCount Property

Gets the discordant count where X failed and Y succeeded in the paired 2×2 table.

public int CCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.ConfidenceLevel Property

Gets the two-sided interval confidence level.

public double ConfidenceLevel { get; }

Property Value

System.Double

ExperimentPairedBinaryComparisonEvidence.DCount Property

Gets the concordant failure count where both X and Y failed in the paired 2×2 table.

public int DCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.Delta Property

Gets the observed X-minus-Y paired success difference (b - c) / n, when at least one comparable pair was analyzed.

public System.Nullable<double> Delta { get; }

Property Value

System.Nullable<System.Double>

ExperimentPairedBinaryComparisonEvidence.DiscordantCount Property

Gets the total discordant count b + c.

public int DiscordantCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.ExactTwoSidedMcNemarProbability Property

Gets the exact two-sided McNemar/binomial discordance probability, when at least one comparable pair was analyzed.

public System.Nullable<double> ExactTwoSidedMcNemarProbability { get; }

Property Value

System.Nullable<System.Double>

ExperimentPairedBinaryComparisonEvidence.ExcludedCaseCount Property

Gets the number of comparable case pairs excluded because the configured treatment was Inconclusive and one or both arms were unscorable.

public int ExcludedCaseCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.IsUnderpowered Property

Gets whether the discordant sample is underpowered under the protocol's discordant < 25 rule.

public bool IsUnderpowered { get; }

Property Value

System.Boolean

ExperimentPairedBinaryComparisonEvidence.LowerBound Property

Gets the lower bound of the paired Newcombe/MOVER-Wilson interval when at least one comparable pair was analyzed.

public System.Nullable<double> LowerBound { get; }

Property Value

System.Nullable<System.Double>

ExperimentPairedBinaryComparisonEvidence.NonComparableCaseCount Property

Gets the number of case pairs excluded because the metric was non-comparable.

public int NonComparableCaseCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.TotalCaseCount Property

Gets the total number of supplied case pairs before exclusions.

public int TotalCaseCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.UnknownSampleTreatment Property

Gets the configured treatment for comparable but unscorable case pairs.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentUnknownSampleTreatment UnknownSampleTreatment { get; }

Property Value

ExperimentUnknownSampleTreatment

ExperimentPairedBinaryComparisonEvidence.UpperBound Property

Gets the upper bound of the paired Newcombe/MOVER-Wilson interval when at least one comparable pair was analyzed.

public System.Nullable<double> UpperBound { get; }

Property Value

System.Nullable<System.Double>

ExperimentPairedBinaryComparisonEvidence.ValidPairCount Property

Gets the number of comparable case pairs included in the paired X-minus-Y analysis.

public int ValidPairCount { get; }

Property Value

System.Int32

ExperimentPairedBinaryComparisonEvidence.XLabel Property

Gets the stable label for arm X.

public string XLabel { get; }

Property Value

System.String

ExperimentPairedBinaryComparisonEvidence.YLabel Property

Gets the stable label for arm Y.

public string YLabel { get; }

Property Value

System.String

Methods

ExperimentPairedBinaryComparisonEvidence.Create(string, string, IReadOnlyList<ExperimentPairedBinaryCaseOutcome>, ExperimentUnknownSampleTreatment, double) Method

Creates validated paired binary X-minus-Y evidence.

public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentPairedBinaryComparisonEvidence Create(string xLabel, string yLabel, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentPairedBinaryCaseOutcome> cases, NexusLabs.Foundry.Evaluation.Experiments.ExperimentUnknownSampleTreatment unknownSampleTreatment, double confidenceLevel);

Parameters

xLabel System.String

The stable label for arm X.

yLabel System.String

The stable label for arm Y.

cases System.Collections.Generic.IReadOnlyList<ExperimentPairedBinaryCaseOutcome>

The paired case outcomes to analyze.

unknownSampleTreatment ExperimentUnknownSampleTreatment

The treatment for comparable case pairs whose binary outcome is unscorable for one or both arms.

confidenceLevel System.Double

The two-sided interval confidence level.

Returns

ExperimentPairedBinaryComparisonEvidence
Validated paired binary comparison evidence.

Exceptions

System.ArgumentNullException
cases or one of its elements is null.

System.ArgumentException
xLabel or yLabel is blank, both labels are equal, or the paired case IDs are not unique.

System.ArgumentOutOfRangeException
confidenceLevel is not finite and strictly between zero and one, or unknownSampleTreatment is not defined.