(Sample Mean and Sample Standard Deviation) Suppose we are given sample data x of size N drawn from a large population. The sample mean and (corrected) sample standard deviation are given by I = N E(Ii – 1)². s = mean_std_dev Function: Input variables: • a vector of data Output variables: • a scalar representing the sample mean of the data a scalar representing the sample standard deviation of the data A possible sample case is: » [mean, std_dev] = mean_std_dev([1 2 3]) mean 2 %3D std_dev 1 %3D » [mean, std_dev] mean_std_dev(randn(10000,1)) mean = 0.00057124 std_dev 1.0016
(Sample Mean and Sample Standard Deviation) Suppose we are given sample data x of size N drawn from a large population. The sample mean and (corrected) sample standard deviation are given by I = N E(Ii – 1)². s = mean_std_dev Function: Input variables: • a vector of data Output variables: • a scalar representing the sample mean of the data a scalar representing the sample standard deviation of the data A possible sample case is: » [mean, std_dev] = mean_std_dev([1 2 3]) mean 2 %3D std_dev 1 %3D » [mean, std_dev] mean_std_dev(randn(10000,1)) mean = 0.00057124 std_dev 1.0016
Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
Related questions
Question
make mathlab code
![**Sample Mean and Sample Standard Deviation**
Suppose we are given sample data \( x \) of size \( N \) drawn from a large population. The sample mean and (corrected) sample standard deviation are given by:
\[
\bar{x} = \frac{1}{N} \sum_{i=1}^{N} x_i
\]
\[
s = \sqrt{\frac{1}{N-1} \sum_{i=1}^{N} (x_i - \bar{x})^2}
\]
**mean_std_dev Function:**
**Input variables:**
- A vector of data
**Output variables:**
- A scalar representing the sample mean of the data
- A scalar representing the sample standard deviation of the data
A possible sample case is:
```
>> [mean, std_dev] = mean_std_dev([1 2 3])
mean = 2
std_dev = 1
>> [mean, std_dev] = mean_std_dev(randn(10000,1))
mean = 0.00057124
std_dev = 1.0016
```
In this function, the sample case demonstrates calculating the mean and standard deviation for a given vector of data. The first example uses a simple data vector `[1 2 3]`, and the second example generates random data with `randn`.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F93507587-8486-4bd1-9be9-7c1c5dc70b2a%2F3e546096-5fac-46eb-bacc-e21bee58d04d%2F55xio_processed.png&w=3840&q=75)
Transcribed Image Text:**Sample Mean and Sample Standard Deviation**
Suppose we are given sample data \( x \) of size \( N \) drawn from a large population. The sample mean and (corrected) sample standard deviation are given by:
\[
\bar{x} = \frac{1}{N} \sum_{i=1}^{N} x_i
\]
\[
s = \sqrt{\frac{1}{N-1} \sum_{i=1}^{N} (x_i - \bar{x})^2}
\]
**mean_std_dev Function:**
**Input variables:**
- A vector of data
**Output variables:**
- A scalar representing the sample mean of the data
- A scalar representing the sample standard deviation of the data
A possible sample case is:
```
>> [mean, std_dev] = mean_std_dev([1 2 3])
mean = 2
std_dev = 1
>> [mean, std_dev] = mean_std_dev(randn(10000,1))
mean = 0.00057124
std_dev = 1.0016
```
In this function, the sample case demonstrates calculating the mean and standard deviation for a given vector of data. The first example uses a simple data vector `[1 2 3]`, and the second example generates random data with `randn`.
Expert Solution

Mathlab code
Step by step
Solved in 2 steps with 2 images

Recommended textbooks for you

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education

Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated

Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education

Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY

Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,

