/// <summary></summary>
        protected static void UpdateDiscreteDistribution( ref ChartControl chart, ProbabilityDistribution dist, List<string> titles, DistributionFunction function )
        {
            string xTitle = "x";
              string yTitle;

              int xmin = (int)Math.Floor( dist.InverseCDF( 0.0001 ) );
              int xmax = (int)Math.Ceiling( dist.InverseCDF( 0.9999 ) );
              DoubleVector x = new DoubleVector( xmax - xmin + 1, xmin, 1 );
              DoubleVector y;

              if( function == DistributionFunction.PDF )
              {
            yTitle = "Probability Mass Function";
            y = x.Apply( new Func<double, double>( dist.PDF ) );
              }
              else
              {
            yTitle = "Cumulative Distribution Function";
            y = x.Apply( new Func<double, double>( dist.CDF ) );
              }

              ChartSeries series = BindXY( x, y, ChartSeriesType.Column, ChartSymbolShape.None );

              Update( ref chart, series, titles, xTitle, yTitle );
        }
        /// <summary></summary>
        protected static void UpdateContinuousDistribution( ref ChartControl chart, ProbabilityDistribution dist, List<string> titles, DistributionFunction function, int numInterpolatedValues )
        {
            string xTitle = "x";
              string yTitle;

              double xmin = dist.InverseCDF( 0.0001 );
              double xmax = dist.InverseCDF( 0.9999 );

              OneVariableFunction f;

              if( function == DistributionFunction.PDF )
              {
            yTitle = "Probability Density Function";
            f = new OneVariableFunction( new Func<double, double> ( delegate( double x ) { return dist.PDF( x ); } ) );
              }
              else
              {
            yTitle = "Cumulative Distribution Function";
            f = new OneVariableFunction( new Func<double, double> ( delegate( double x ) { return dist.CDF( x ); } ) );
              }

              ChartSeries series = BindXY( f, xmin, xmax, numInterpolatedValues, ChartSeriesType.Line, ChartSymbolShape.None );

              Update( ref chart, series, titles, xTitle, yTitle );
        }