Class: NormalDistribution::ConfidenceInterval

Inherits:
Object
  • Object
show all
Defined in:
lib/normal_distribution/confidence_interval.rb,
ext/normal_distribution/confidence_interval.c

Overview

Confidence interval of normal distribution

Since:

  • 0.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lower_bound, upper_bound) ⇒ ConfidenceInterval

Initializes confidence interval

Parameters:

  • lower_bound (Numeric)

    lower bound of confidence interval

  • upper_bound (Numeric)

    upper bound of confidence interval

Since:

  • 0.2.0



11
12
13
# File 'lib/normal_distribution/confidence_interval.rb', line 11

def initialize(lower_bound, upper_bound)
   # This is stub used for indexing
end

Instance Attribute Details

#lower_boundFloat (readonly)

Returns lower bound of confidence interval.

Returns:

  • (Float)

    lower bound of confidence interval

Since:

  • 0.2.0



2
3
4
# File 'lib/normal_distribution/confidence_interval.rb', line 2

def lower_bound
  @lower_bound
end

#upper_boundFloat (readonly)

Returns upper bound of confidence interval.

Returns:

  • (Float)

    upper bound of confidence interval

Since:

  • 0.2.0



5
6
7
# File 'lib/normal_distribution/confidence_interval.rb', line 5

def upper_bound
  @upper_bound
end

Instance Method Details

#include?(value) ⇒ Boolean

Decides, whether value is from the interval

Parameters:

  • value (Numeric)

    value to be compared with interval bounds

Returns:

  • (Boolean)

    true if value is from the interval. Otherwise returns false.

Since:

  • 0.2.0



19
20
21
# File 'lib/normal_distribution/confidence_interval.rb', line 19

def include?(value)
   # This is stub used for indexing
end