Question

I'm not too sure what the question is asking for when calculating for S, we need to use MatLab for writing the script. If anybody could be of some assistance, I need the script, and the sample output to match

8. Let n be the number of elements in a data set and let x denote an individual element, for i 1,2,. .. , n. The mean /u and

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

clc

clear all

close all

format long

fMin=input("Enter minimum number: ");

fMax=input("Enter maximum number: ");

fSum1=0;

fSum2=0;

for i=1:5

x=rand*(fMax-fMin)+fMin;

fSum1=fSum1+x;

fSum2=fSum2+x^2;

fprintf("Random number %d is %.2f, Sum of xi so far is %.2f, Sum of xi^2 so far is %.2f\n",i,x,fSum1,fSum2);

end

fMean=fSum1/5;

fStdDev=sqrt((5*fSum2-fSum1^2)/(5*4));

fprintf("The mean is %.2f\nThe standard deviation is %.2f\n",fMean,fStdDev);

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
I'm not too sure what the question is asking for when calculating for S, we need...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1 (1 point) When operationalizing your dependent and independent variables, it is important to know...

    Question 1 (1 point) When operationalizing your dependent and independent variables, it is important to know the scale of measurement for each. Question 1 options: True False Question 2 (1 point) When running descriptive statistics, those you are most interested in are __________________. Question 2 options: Mean, standard deviation, minimum, maximum, N, and N missing Mean, median, mode, variance and standard deviation Mean, standard error of the mean, and coefficient of variation Range, Skewness, First quartile. Question 3 (1 point)...

  • (Q2) Calculating the Distribution of Values 10 marks For a set of n real numbers {xi,...,...

    (Q2) Calculating the Distribution of Values 10 marks For a set of n real numbers {xi,..., x.J, here are a number of basic statistics we would like to know about the distribution of these numbers: ·The minimum value m = min(x 1, . .., Xn The maximum value Mmax{xi,..., x,J The average value a -^ 1x The standard deviation sx,-a)2. Write a program stats.c that calculates these values for a sequence of values it reads from stdin. The input is...

  • I really need help with this python programming assignment Program Requirements For part 2, i need...

    I really need help with this python programming assignment Program Requirements For part 2, i need the following functions • get floats(): It take a single integer argument and returns a list of floats. where it was something like this def get_floats(n):   lst = []   for i in range(1,n+1):     val = float(input('Enter float '+str(i)+': '))     lst.append(val)   return lst • summer(): This non-void function takes a single list argument, and returns the sum of the list. However, it does not use...

  • 1.Engineers must consider the breadths of male heads when designing helmets. The company researchers have determined...

    1.Engineers must consider the breadths of male heads when designing helmets. The company researchers have determined that the population of potential clientele have head breadths that are normally distributed with a mean of 7-in and a standard deviation of 1.2-in. Due to financial constraints, the helmets will be designed to fit all men except those with head breadths that are in the smallest 1.2% or largest 1.2%. What is the minimum head breadth that will fit the clientele? min =...

  • I need help making this work correctly. I'm trying to do an array but it is...

    I need help making this work correctly. I'm trying to do an array but it is drawing from a safeInput class that I am supposed to use from a previous lab. The safeInput class is located at the bottom of this question I'm stuck and it is not printing the output correctly. The three parts I think I am having most trouble with are in Bold below. Thanks in advance. Here are the parameters: Create a netbeans project called ArrayStuff...

  • I need help filling out the “Q-Test Determination” as well as the “Post-Lab Questions” The directions are in the first three pictures, and the questions I need answered are in the last two pictures....

    I need help filling out the “Q-Test Determination” as well as the “Post-Lab Questions” The directions are in the first three pictures, and the questions I need answered are in the last two pictures. Thanks. O-Test Datum Rejection We may be in a situation where one data value apparently has a strong influence on the mean of a set of data Assume we have 6 data points to analyze to be sure that each point is a viable part of...

  • Question 19 (8 points) Determine in each of the following situations whether the Central Limit Theorem...

    Question 19 (8 points) Determine in each of the following situations whether the Central Limit Theorem applies in order to conclude that sampling distribution of the sample mean, that X-NI 7-N (M, ) For each distribution, determine whether CLT applies. If it does not, then enter NA as your answer in the blank number that corresponds to the distribution number. If it does, then enter the shape of the sample means as your first item in a list, the mean...

  • 1.) In the previous question (the one about the multiple-choice quiz), the random variable X is...

    1.) In the previous question (the one about the multiple-choice quiz), the random variable X is binomial with parameters: n = 1/5, p = 15 n = 15, p = 1/2 n = 15, p = 1/5 n = 15, p = 0 2.) Assume that a procedure yields a binomial distribution with a trial repeated n=5n=5 times. Use technology to find the probability distribution given the probability p=0.164p=0.164 of success on a single trial. (Report answers accurate to 4...

  • Could anyone help add to my python code? I now need to calculate the mean and...

    Could anyone help add to my python code? I now need to calculate the mean and median. In this programming assignment you are to extend the program you wrote for Number Stats to determine the median and mode of the numbers read from the file. You are to create a program called numstat2.py that reads a series of integer numbers from a file and determines and displays the following: The name of the file. The sum of the numbers. The...

  • Use the C programming language to complete #include <stdio.h> #include <stdlib.h> #include <float.h> // Declare Global...

    Use the C programming language to complete #include <stdio.h> #include <stdlib.h> #include <float.h> // Declare Global variables here. void array_stats() { // Insert your solution here. } #include <stdlib.h> #include <time.h> int main() { // Simulate the test setup process. srand( time( NULL ) ); for ( int i = 0; i < 32; i++ ) { val[i] = rand(); } val_count = rand(); val_mean = rand(); val_min = rand(); val_max = rand(); // Call submitted code. array_stats(); // Display...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT