/// <summary> /// This function return the cummulative distribution function (CDF) /// for Student's t distribution less than t and number degree of /// freedom k. /// </summary> /// <param name="t">double. t</param> /// <param name="k">int. k is number degree of freedom</param> /// <returns> /// The value of cummulative distribution function (CDF) /// for Student's t distribution less than t and number degree of /// freedom k. /// </returns> public static double CDF(double t, int k) { // number degree of freedom must be mor than 0 if (k <= 0) { return(double.NaN); } if (t == 0) { return(0.5); } StudentFunction function = new StudentFunction(k); if (t < 0) { return(0.5 - Integrator.GaussLegendre(function, t, 0, 1.0e-6)); } else { return(0.5 + Integrator.GaussLegendre(function, 0, t, 1.0e-6)); } }
public IEnumerable <StudentDTO> GetStudentsList() { return(StudentFunction.GetStudentsList()); }
public int GetBalance(int id) { return(StudentFunction.GetBalance(id)); }
public StudentDTO GetStudentDetailsByStudentId(int id) { return(StudentFunction.GetStudentDetailsByStudentId(id)); }
public IEnumerable <StudentDTO> GetStudentsListByDetails([FromBody] StudentDTO student) { return(StudentFunction.GetStudentsListByDetails(student)); }
public IHttpActionResult AddStudent([FromBody] StudentDTO student) { return(Ok(StudentFunction.AddStudent(student))); }
public IHttpActionResult Post([FromBody] StudentDTO student) { return(Ok(StudentFunction.EditStudent(student))); }
public IEnumerable <StudentDTO> GetStudentsListByKind(string studentKind) { return(StudentFunction.GetStudentsListByKind(studentKind)); }
/// <summary> /// This function return the probability density function (PDF) /// for Student's t distribution with T=t and number degree /// of freedom k. /// </summary> /// <param name="t">double. t</param> /// <param name="k">int. k is number degree of freedom</param> /// <returns> /// The value of probability density function (PDF) /// for Student's t distribution with T=t and number degree /// of freedom k. /// </returns> private static double PDF(double t, int k) { StudentFunction function = new StudentFunction(k); return(function.Value(t)); }