Csm Exp 8.docx

  • Uploaded by: anoop singh
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Csm Exp 8.docx as PDF for free.

More details

  • Words: 91
  • Pages: 4
Program: #include #include<stdio.h> #include<stdlib.h> #include<math.h> void main() { int run=0,i,n1=0,n2=0; float a[20]; char b[20]; float m, z0,sb,sb2,n=20.0; clrscr(); for(i=0;i<20;i++) { a[i]=(rand()%100*0.01); printf("\t %f",a[i]); } printf("\n"); printf("\n"); printf("\n"); printf("\n"); for(i=0;i<20;i++) { if(a[i]<0.459) { b[i]='-';

n2++; } else { b[i]='+'; n1++; } printf("\t%c",b[i]); } printf("\n"); printf("\n"); for(i=0;i<20;i++) { if(b[i]!=b[i+1]) { run++; }} printf("\nrun(b)=%d",run); printf("\n"); printf("\n No.OF+VE SIGN=%d",n1); printf("\n"); printf("\n No.OF-VE SIGN=%d",n2); printf("\n"); m=((2*n1*n2)/n)+(0.5); printf("\nm=%f",m); printf("\n"); sb2=((2*n1*n2)*((2*n1*n2)-n))/((n*n)*(n-1));

printf("\n variance=%f",sb2); printf("\n"); sb=sqrt(sb2); printf("\n"); z0=(run-m)/sb; printf("\nz0=%f",z0); printf("\n"); printf("\n"); if(z0<1.96) { printf("\n HYPOTHENSIS IS ACCEPTED"); } else { printf("\n HYPOTHENSIS IS NOT ACCEPTED"); } getch(); }

Output:

Related Documents

Csm Exp 8.docx
November 2019 13
Csm Exp 8.docx
November 2019 9
Csm
April 2020 8
Csm Trial
July 2020 10
Exp
November 2019 29
Exp
May 2020 27

More Documents from "Jonel Pagalilauan"

2.docx
November 2019 17
Csm Exp 8.docx
November 2019 13
Csm Exp 8.docx
November 2019 9
Resume 1.docx
October 2019 20
Linux Admin1
April 2020 15