0% found this document useful (0 votes)
25 views2 pages

2P1 Practical 1

Uploaded by

animagicminds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

2P1 Practical 1

Uploaded by

animagicminds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

St.

Joseph’s University, Bangalore


Department of Statistics
B.Sc. II Semester, Statistics Practical: ST 2P1
Practical: 1 Date: ___/___/2024
Graphical representation of data using R
1. Get the result for the following
a. 4678 + 96458 f. loge256
b. 93456 – 8723 g. e45
c. 428 X 89 382 +𝑒 3
h. √(56−log 3
d. 562 / 78 𝑒 45)

e. log10592 i. log121728 x log96561


2. Create an object, x, that is equal to 314. Create another object, y, that is the square root of x.
Create another object, z, that is the absolute difference of x and y
3. For the following vectors: a = c (2,4,9,8,6,1); b= c(1,5,8,0,2,4), write the resulting vectors for
a+b, a-b, b/a and b*a.
4. Create the following vectors in R.
a. 1, 1.5, 2, 2.5, ..., 12 d. 1, 0, 3, 0, 5, 0, 7 ..., 0, 49
b. 1, 8, 27, 64, ..., 1000. e. 1, 3, 6, 10, 15...,210
c. 1, − 2, 3, − 4, ..., −100. f. 1, 2, 2, 3, 3, 3, 4, ..., 9, 10..., 10.
5. You are interested in how citizens of the US feel about the president. You asked 15 people to
rate the president on a 10-point scale. Describe how the country feels about the president -
be sure to report summary and the standard deviation. 3, 1, 2, 9, 2, 5, 9, 1, 5, 6, 2, 9, 5, 10, 7.
6. The total number of scoops of vanilla ice cream sold in the different months of a year are
given below:
Month Mar Apr May Jun Jul
No of scoops sold 240 400 440 320 200
For the above data, draw a bar graph.
7. The number of hours spent by a working woman on various activities on a working day is
given below. Using the angle measurement, draw a pie chart.
Activity Household Sleep Cooking Office TV Other
No of hours 3 7 2 9 1 2
8. Frank's Farm Stand kept track of the number of pounds of vegetables sold over a three-day
period. The results are listed on the table below. Create a multiple bar graph to display the
data.
Types of Pounds Sold:
Vegetables Day One Day Two Day Three
Squash 32 lbs. 36 lbs. 36 lbs.
Zucchini 40 lbs. 33 lbs. 37 lbs.
Corn 56 lbs. 65 lbs. 67 lbs.
Carrots 28 lbs. 25 lbs. 23 lbs.
Romaine Lettuce 27 lbs. 31 lbs. 34 lbs.
Tomatoes 44 lbs. 54 lbs. 58 lbs.
9. Load data women from base package of R.
a. Extract the variable height and assign it to a variable named H. Obtain the Stem and
Leaf plot of the same.
b. Extract the variable weight and assign it to a variable named W. Obtain the boxplot of
the same.
c. Plot the scatter plot and comment on the relation between height and weight.
10. Load data ChickWeight from base package of R. Extract the variable weight and assign it to a
variable named CW. Obtain the histogram of the same.
Homework questions:

1. The daily wages of 95 workers are given below.


Salary (in ₹) 60 80 100 120 150 175 200
No of workers 14 27 19 12 10 8 5
Construct a pie chart for the same.

2. The table below shows the favourite colour of 200 kids in a class.
Favourite colours Red Green Blue Yellow Orange
No of students 45 17 50 48 40
a. Using the information provided, create a bar graph.
b. Which colour is the most preferred and which colour is the least preferred?
c. How many kids chose red as their favourite colour?
3. In one month, the number of absentees in Class X was reported. Make a suitable
graph with this information.
Day Mon Tue Wed Thu Fri Sat
Section A 19 13 10 20 11 18
Section B 10 16 19 15 18 12
Section C 16 12 19 18 14 15
Section D 14 10 17 20 19 13
Section E 12 19 18 13 16 20

You might also like