Académique Documents
Professionnel Documents
Culture Documents
Submitted by
2. COMMANDS DESCRIPTION 5
3. COMMANDS EXECUTED 6
CERTIFICATE
Certified that Mr KARTHIK HEBBAR P bearing USN 1BM16IS044 of Fourth semester belonging to the
Department of Information Science and Engineering had successfully completed alternative assessment of
using modern tools and technology as a part of the course Probability Statistics and Queuing for Engineers
[ 15IS4DCPSQ ].
Faculty Incharge
MAMATHA K R
4
Evaluation Form
Commands executed:
Unsatisfactory Satisfactory
Criteria Good (3) Excellent (4)
(1) (2)
Delivery
Documentation
Runtime
Sample data
Use of Modern
tools
Evaluator comments
Teacher’s Signature
Marks Obtained : /20 Final Marks: /05 with Date
5
COMMANDS DESCRIPTION
• Binomial Distribution:
In probability theory and statistics, the binomial distribution with parameters n and p is the
discrete probability distribution of the number of successes in a sequence of n independent experiment.
• Point Estimation:
In statistics, point estimation involves the use of sample data to calculate a single value
(known as a statistic) which is to serve as a "best guess" or "best estimate" of an unknown
population parameter.
• Probability Distribution:
The method of least squares is a standard approach in regression analysis to approximate the
solution of overdetermined systems, the sets of equations in which there are more equations than
unknowns. "Least squares" means that the overall solution minimizes the sum of the squares of the
residuals made in the results of every single equation.
COMMANDS EXECUTION
• Binomial Distribution:
• Point Estimation
#include<iostream> mean=(double)sumFX/sumF;
#include<stdlib.h> int a=(int)(0+n)/2;
#include<math.h> for(int i=0;i<n;i++)
using namespace std; u[i]=i-a;
class estimate double sumFU=0,sumFU2=0;
{ for(int i=0;i<n;i++)
int n; {
int lower[10],upper[10],u[10]; sumFU+=f[i]*u[i];
double mean,var,sd,c,sumF,sumFX; sumFU2+=f[i]*u[i]*u[i];
double x[10],f[10]; }
public: c=x[1]-x[0];
estimate(int n)
{ cout<<sumFU2<<"\t"<<sumFU<<"\t"<<sumFX<<en
this->n=n; dl;
sumF=0; var=(double)pow(c,2)*((sumFU2/sumF)-
} pow((sumFU/sumF),2));
void getValue() sd=(double)sqrt(var);
{ cout<<"\nMean::"<<mean<<endl;
#include<iostream> for(i=0;i<n;i++)
using namespace std; {
int main() if(y[i]<0)
{ {
float a,b,c; cout<<"The function cannot
int n; serve as Probability Distribution function!!";
cout<<"Enter the value of a,b,c for the exit(0);
function in the form ax^2+bx+c \n"; }
cout<<"Value of a: "; }
cin>>a; float sum=0;
cout<<"Value of b: "; for(i=0;i<n;i++)
cin>>b; {
cout<<"value of c: "; sum=sum+y[i];
cin>>c; }
cout<<"Enter the number of x values: ";
cin>>n; if(sum==1)
float x[n]; {
int i,j; cout<<"The function serves as
cout<<"Enter the values of x: \n"; Probability distribution function!!";
for(i=0;i<n;i++) }
{ else
cin>>x[i]; {
} cout<<"sum of all function is not
float y[n]; equal to 1"<<"---- i.e The sum is "<<sum<<endl;
for(i=0;i<n;i++) cout<<"The function cannot serve
{ as Probability Distribution function!!";
y[i]=(a*x[i]*x[i])+(b*x[i])+c; }
if(y[i]<0) return 0;
{ }
cout<<"f("<<x[i]<<")"<<" is
negative"<<endl;
}
}
9
#include<iostream> Sxx=x2-(((sumx)*(sumx))/n);
using namespace std; Sxy=xy-((sumx*sumy)/n);
Syy=y2-(((sumy)*(sumy))/n);
int main()
{ cout<<endl<<endl;
float x,y,z; cout<<"---------------------------------------";
int n,i; cout<<endl;
cout<<"Enter the value of n: "; cout<<"Sxx : "<<Sxx<<endl;
cin>>n; cout<<"Syy : "<<Syy<<endl;
float air[n],eva[n]; cout<<"Sxy : "<<Sxy<<endl;
cout<<endl; cout<<"---------------------------------------";
cout<<"Enter the values for Air cout<<endl;
Velocity: \n"; cout<<"Least Square Estimates are: ";
for(i=0;i<n;i++) float a,b;
{ b=Sxy/Sxx;
cin>>air[i]; a=(sumy/n)-(b*(sumx/n));
} cout<<"a="<<a<<endl;
cout<<endl; cout<<"b="<<b<<endl;
cout<<"Enter the values for cout<<"---------------------------------------";
Evaporation Co efficient: \n"; cout<<endl;
for(i=0;i<n;i++)
{ cout<<"Estimated Regression line: ";
cin>>eva[i]; cout<<"y^="<<a<<"+"<<b<<"x";
} cout<<endl;
cout<<"---------------------------------------";
float Syy=0,Sxx=0,Sxy=0; cout<<endl;
#include<iostream> switch(x)
#include<math.h> {
#include<stdlib.h> case 1:
#define pi 3.1415926535 cout<<"Enter Z\n";
using namespace std; cin>>z1;
double cnd(double x) cout<<"F(Z)::"<<cnd(z1)<<endl;
{ break;
double l,k,w; case 2:
double const a1=0.31938153,a2=- cout<<"Enter Z\n";
0.3565633782,a3=1.781477937,a4=- cin>>z1;
1.821255978,a5=1.330274429; cout<<"F(Z)::"<<1-cnd(z1)<<endl;
l=fabs(x); break;
k=1.0/(1.0+0.2316419*l); case 3:
w=1.0-1.0/sqrt(2*pi)*exp(- cout<<"Enter Z1,Z2\n";
l*l/2)*(a1*k+a2*k*k+a3*pow(k,3) cin>>z1>>z2;
+a4*pow(k,4)+a5*pow(k,5)); if(z1>z2)
if(x<0) {
{ double temp=z1;
w=1.0-w; z1=z2;
} z2=temp;
return w; }
} cout<<"F(Z)::"<<cnd(z2)-cnd(z1)<<endl;
int main() break;
{ }
double z1,z2; }
cout<<"1:less than\n2:greater than\n3:between
the point\n";
int x;
cin>>x;
11
• Binomial Distribution:
• Point Estimation :
12
**********