Git Product home page Git Product logo

cet-mca-s1-r_lab's Introduction

CET-MCA-S1-R_lab

This repository contains the programs I developed during my 1st semester in R language. The lab questions were divided into 2 cycles.

Cycle-1

  1. The file ’smoker.csv’ contains results of a survey conducted on 356 per-sons in a city. Each record contains the ID of the person, smoking habit(current-current smoker, former-former smoker, never-never a smoker)and his economic status(Low,middle,high). Write an R program toread the data and construct a two-way table of smoking status versuseconomic status. Also calculate the proportion of people belonging toeach category. You may use the functiontable()to accomplish this.Write the output to a text file.
  2. Simulate the outcome of tossing a fair die 10000 times and create theprobability distribution of the outcomes. You may use the built-infunctionsample()to do the simulation. Plot the probability functionand check whether the die is fair.
  3. write an R program to find the sum of the firstnterms of the Fourier series.
  4. File ’sales.txt’ contains data of price, discount factors and sales volume(number of units sold) of 3 items in three different Indian States. Readthe data and compute the total sales bill of each item in each state.write the output with details in an output file
  5. Simulate a random list of 1000 patients, each belonging to one of theage groups 40-45,45-0,50-55,50-55,55-60, and each having BP level oneof ”low”,”med”, or ”high” using the data prepare a table indicating thepercentage of people in each category.
  6. The data file ”price.txt” contains the price (in Rs.) of 3 items for 100consecutive days. Read the data into a data frame.
  7. Draw a scatter plot of month verses sales
  8. lm()function
  9. Construct a multiple regression mode

Note: To refer the complete questions, refer the pdf document in cycle 1.

Cycle-2

  1. The file ’bulbs.dat’ contains life in years of a sample of 1000 bulbs ran-domly chosen from a total of 100000 bulbs produced by a company.Find an approximate probability distribution of the life of bulbs pro-duced by the company. Draw a density plot of the distribution. Checkyour model with a quantile-quantile plot. What percentage of bulbsproduced by the company will have life more than one year ?
  2. The file pois.dat contains data of no. of accidents in a city for 365 days.Fit a Poisson distribution and calculate the theoretical frequencies.Also compare the theoretical and computed frequencies using a barplot.
  3. Central limit theorem
  4. If U1 and U2 are two independent random variables uniformly dis-tributed between 0 and 1 find the density function of U1+U2 using simulation.
  5. binomial distribution

Note: To refer the complete questions, refer the pdf document in cycle 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.