@@ -147,16 +147,6 @@ def greater_than?(other, alpha: 0.05)
147147 t_stat > critical_value
148148 end
149149
150- # Alias for greater_than?
151- def >( other , alpha : 0.05 )
152- greater_than? ( other , alpha : alpha )
153- end
154-
155- # Alias for less_than?
156- def <( other , alpha : 0.05 )
157- less_than? ( other , alpha : alpha )
158- end
159-
160150 # Tests if this collection's mean is significantly less than another collection's mean
161151 # using a one-tailed Student's t-test. Returns true if the test indicates statistical
162152 # significance at the specified alpha level.
@@ -177,6 +167,32 @@ def less_than?(other, alpha: 0.05)
177167 t_stat < -critical_value
178168 end
179169
170+ # Operator alias for greater_than? - tests if this collection's mean is significantly greater
171+ #
172+ # @param other [Enumerable] Another collection to compare against
173+ # @param alpha [Float] The significance level (default: 0.05 for 95% confidence)
174+ # @return [Boolean] true if this collection's mean is significantly greater
175+ # @example
176+ # baseline = [100, 110, 105, 115, 95]
177+ # optimized = [85, 95, 90, 100, 80]
178+ # baseline > optimized # => true (baseline is significantly greater)
179+ def >( other , alpha : 0.05 )
180+ greater_than? ( other , alpha : alpha )
181+ end
182+
183+ # Operator alias for less_than? - tests if this collection's mean is significantly less
184+ #
185+ # @param other [Enumerable] Another collection to compare against
186+ # @param alpha [Float] The significance level (default: 0.05 for 95% confidence)
187+ # @return [Boolean] true if this collection's mean is significantly less
188+ # @example
189+ # optimized = [85, 95, 90, 100, 80]
190+ # baseline = [100, 110, 105, 115, 95]
191+ # optimized < baseline # => true (optimized is significantly less)
192+ def <( other , alpha : 0.05 )
193+ less_than? ( other , alpha : alpha )
194+ end
195+
180196 # Calculates the arithmetic mean (average) of the collection
181197 #
182198 # @return [Float] The arithmetic mean of all numeric values
0 commit comments