To find and print the regression coefficient.
The Twilight Saga: New Moon (Two-Disc Special Edition)
Write a program in C to input 25 pair of x & y and calculate and print the regression coefficient (b).
Write a program in C to input 25 pair of x & y and calculate and print the regression coefficient (b).
#include< #include< #include< #define N 25 void main( ) { int i, x, y; float sx=0, sy=0, sxy=0, syy=0, a, b, c; clrscr( ); for(i=1; i<=N; i++) { printf("Input values of x & y pairwise\n"); scanf("%d %d", &x, &y); sx = sx + x; sy = sy + y; sxy = sxy + x * y; syy = syy + y * y; } a = N*sxy - sx*sy; c = N*syy - sy*sy; b = a/c; printf("\n The regression coefficient is %f\n", b); } |
---|
Related Posts by Categories
Program
- Input total marks and display grade. Grade is calculated as follows.
- Input Basic Salary. Find and display Income Tax. Income Tax is calculated as follows:
- Input sales. Find and print commission. Commission is calculated as follows:
- To input an integer and print whether it is a prime number or not.
- To find and print the standard deviation.
- To find and print Karl pearson's correlation coefficient.
- To find and print Correlation of coefficient.
- To find and print mean and mean deviation.
- To find and print mean
- To find and print mean and standard deviation.
- Find highest, median and lowest number from the given set of 17 numbers.
- Find the highest and lowest number from the given set of 13 numbers.
- Input 10 numbers. Find the lowest number from the given set of 10 numbers.
- Input 25 numbers. Find the largest number from the given set of 25 numbers.
- Input 15 numbers. Arrange the numbers in ascending order and display the median of the same.
- Input 20 numbers. Arrange the numbers in ascending order and display ascending order as well as descending order list.
- Input 20 numbers. Arrange the numbers in descending order and display descending order. (Sorting of an array)
- Input 10 numbers. Arrange the numbers in ascending order and display ascending order. (Sorting of an array)
- Calculation of depreciation , by using Written Down Value ( WDV ) as well as Straight Line Method ( SLM ).
- Calculation of depreciation by using straight Line method ( SLM )
- Calculation of depreciation by using WDV method
- Calculation of depreciation , by using WDV method & scrap value at the end
- Find the GCD of two positive integer.
- Write a program in c ( WAPIC ) to input salesman name and his total sales and print his name, his commission and the additional commission.
C programming
- Input total marks and display grade. Grade is calculated as follows.
- Input Basic Salary. Find and display Income Tax. Income Tax is calculated as follows:
- Input sales. Find and print commission. Commission is calculated as follows:
- To input an integer and print whether it is a prime number or not.
- To find and print the standard deviation.
- To find and print Karl pearson's correlation coefficient.
- To find and print Correlation of coefficient.
- To find and print mean and mean deviation.
- To find and print mean
- To find and print mean and standard deviation.
- Find highest, median and lowest number from the given set of 17 numbers.
- Find the highest and lowest number from the given set of 13 numbers.
- Input 10 numbers. Find the lowest number from the given set of 10 numbers.
- Input 25 numbers. Find the largest number from the given set of 25 numbers.
- Input 15 numbers. Arrange the numbers in ascending order and display the median of the same.
- Input 20 numbers. Arrange the numbers in ascending order and display ascending order as well as descending order list.
- Input 20 numbers. Arrange the numbers in descending order and display descending order. (Sorting of an array)
- Input 10 numbers. Arrange the numbers in ascending order and display ascending order. (Sorting of an array)
- Calculation of depreciation , by using Written Down Value ( WDV ) as well as Straight Line Method ( SLM ).
- Calculation of depreciation by using straight Line method ( SLM )
- Calculation of depreciation by using WDV method
- Calculation of depreciation , by using WDV method & scrap value at the end
- Find the GCD of two positive integer.
- Write a program in c ( WAPIC ) to input salesman name and his total sales and print his name, his commission and the additional commission.
Mathematical program
- To input an integer and print whether it is a prime number or not.
- To find and print the standard deviation.
- To find and print Karl pearson's correlation coefficient.
- To find and print Correlation of coefficient.
- To find and print mean and mean deviation.
- To find and print mean
- To find and print mean and standard deviation.
- Write a program in 'C' to test whether the given integer is even or odd and to print message accordingly.(Using if...........else statement.)
Labels:
C programming,
Mathematical program,
Program
0 comments:
Post a Comment