Error Bounds for Trapezoid Type Quadrature Rules with Applications for the Mean and Variance