@@ -619,6 +619,41 @@ choice is
619619Therefore, a gamma distribution with @racket[shape = 0 ] behaves like @racket[(delta-dist 0 )].
620620}
621621
622+ @subsection{Weibull Distributions}
623+
624+ @margin-note{Wikipedia:
625+ @hyperlink["http://wikipedia.org/wiki/Weibull_distribution " ]{Weibull Distribution}.}
626+ @deftogether[(@defidform[Weibull-Dist]
627+ @defproc[(weibull-dist [shape Positive-Real] [location Real 0 ] [scale Real 1 ]) Weibull-Dist]
628+ @defproc[(weibull-dist-shape [k Weibull-Dist]) Positive-Flonum]
629+ @defproc[(weibull-dist-location [d Weibull-Dist]) Real]
630+ @defproc[(weibull-dist-scale [d Weibull-Dist]) Real])]{
631+ Represents the Weibull distribution family parameterized by shape, location and scale.
632+
633+ @examples[#:eval untyped-eval
634+ (plot (for/list ([k (in-list '(1/2 1 1 5 ))]
635+ [d (in-list '(0 0 3/2 0 ))]
636+ [s (in-list '(1 1 2 1 ))]
637+ [i (in-naturals)])
638+ (function (distribution-pdf (weibull-dist k d s))
639+ #:color i #:label (if (and (= d 0 ) (= s 1 ))
640+ (format "Weibull(~a) " k)
641+ (format "Weibull(~a,~a,~a) " k d s))))
642+ #:x-min 0 #:x-max 6 #:y-label "density "
643+ #:legend-anchor 'top-right )
644+
645+ (plot (for/list ([k (in-list '(1/2 1 1 5 ))]
646+ [d (in-list '(0 0 3/2 0 ))]
647+ [s (in-list '(1 1 2 1 ))]
648+ [i (in-naturals)])
649+ (function (ordered-dist-cdf (weibull-dist k d s))
650+ #:color i #:label (if (and (= d 0 ) (= s 1 ))
651+ (format "Weibull(~a) " k)
652+ (format "Weibull(~a,~a,~a) " k d s))))
653+ #:x-min 0 #:x-max 10 #:y-label "probability "
654+ #:legend-anchor 'bottom-right )]
655+ }
656+
622657@subsection{Logistic Distributions}
623658
624659@margin-note{Wikipedia:
0 commit comments