MATLAB Questions and Answers – Statistics

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Statistics”.

1. To exhibit time-series or spatial-series data, what kind of diagrams are suitable?
a) Pie-bar
b) Pie-chart
c) Ratio-chart
d) Bar-diagram
View Answer

Answer: d
Explanation: Time-series or spatial-series data would comprise of quantitative characters. So they can be represented as a Bar diagram, the height of the bar would demonstrate the quantity of a category.

2. What is the output of the following line of code?

Pie([1,2],[0,1,1])

a) Error
b) Sliced pie chart
c) Pie-chart
d) Labelled Pie chart
View Answer

Answer: a
Explanation: Following the syntax of the pre-defined function pie in MATLAB, we find the length of the two arguments passed into pie(arg1,arg2) must be the same. Here, the size of arg1 is 2 while that of arg2 is 3. Hence, MATLAB will generate an error.
advertisement
advertisement

3. What is the difference between primary and secondary data in statistics?
a) No difference
b) The former is collected from the field of the investigation while the latter is collected from a separate entity
c) The first set of data received is Primary data while the next set is secondary data
d) The important data is primary data while the lesser important data is secondary data
View Answer

Answer: b
Explanation: Data collected directly from the field of purposeful investigation is primary data because it is directly used by the one who collects it. If the data, gathered by an agency or a person, is used by a different agency or person for some purpose- there is no direct link between the data and the person requiring it. Thus this is secondary data.

4. The nature of data while using pie plots is ___________ data.
a) Discrete
b) Continuous
c) Polar
d) Time-series
View Answer

Answer: b
Explanation: Pie plots show the percentage, a category occupies, amongst a dataset containing several categories. Now, if this dataset is not discrete- it is preferable to use pie plot since the height of bar plots might be very close to each other to show significant changes. Hence, pie plots represent continuous data mainly.

5. What would you use to show comparisons of profit of 3 industries over 3 quarters?
a) Histogram plot
b) Bar plot
c) Bode plot
d) Frequency plot
View Answer

Answer: b
Explanation: The data contains 3 parameters- profit, industry, quarter. We can use the histogram plot if the profits are strikingly different but usually it is not so. So, we should use Bar plot to draw 3 bars for 3 industries showing 3 separate profits over 3 separate quarters.
advertisement

6. What is the difference between stem plot and histogram plot?
a) No difference
b) Histogram does not have negative values while stem may have negative values
c) Histogram cannot relate 3 variable while stem can
d) Histogram cannot be created in MATLAB
View Answer

Answer: b
Explanation: Histograms are used to see the frequency distribution of a variable to show the frequency of a class over any interval. So, naturally, a variable cannot repeat with a negative frequency. Stem plot only relates the two arguments it gets in terms of their projected values. So stem() can have negative values.

7. To display the partnership of 3 batsman with one batsman, one uses _________
a) Bar-graph
b) Histogram
c) Pie plot
d) Cannot be displayed
View Answer

Answer: b
Explanation: A bar graph is used to show the contribution of 3 batsmen with one batsman in a partnership. Thus it can be inferred who has contributed highest to the partnership among the three.
advertisement

8. To display the runs scored by a batsman towards different directions in a field, one uses
a) Bar graph
b) Angle histogram
c) Histogram
d) No graph is suitable
View Answer

Answer: a
Explanation: The angle histogram graph plots a histogram circularly. So, viewing the field as a circle, one can easily find the area in the field where the batsman has scored the most runs.

9. A cubic system can be represented using the function ____
a) plot3
b) stem()
c) display
d) legend
View Answer

Answer: a
Explanation: The function ‘plot3()’ is used to plot a 3d graph. The axes of the system can be mentioned as x,y,z so the plot which will be returned will be for a cube if the length cut off from each axis are equal.

10. To specify different curves in an angle histogram plot, we use the _________ function.
a) legend
b) display
c) gtext()
d) mtext
View Answer

Answer: a
Explanation: The legend function is pre-defined in MATLAB. It is used to print the names of the curves present in a plot. The function is the same for both 2d and 3d plots.

Sanfoundry Global Education & Learning Series – MATLAB.

To practice all areas of MATLAB, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.