This repository contains solutions for the Business Statistics lab exercises using R. Each lab focuses on different statistical concepts and their application using R programming.
- Topics Covered:
- Data Types in R
- Frequency Distributions
- Bar Graphs, Pie Charts
- Histograms, Box Plots, and Stem-and-Leaf Plots
- Summary Statistics
- Key Exercises:
- Create bar and pie charts for qualitative variables.
- Generate histograms and boxplots for quantitative data.
- Perform summary statistics and interpret distributions.
- Topics Covered:
- Understanding Normal Distribution
- Using R's built-in functions for normal distribution (dnorm, pnorm, qnorm, rnorm)
- Visualization of normal distribution
- Key Exercises:
- Generate normal distribution curves and add them to histograms.
- Calculate probabilities using the cumulative distribution function.
- Find percentiles and generate random numbers from normal distributions.
- Create and interpret histograms of normally distributed data.
- Topics Covered:
- Scatter Plot Creation and Interpretation
- Correlation Analysis
- Simple Linear Regression
- Residual Analysis and Prediction
- Key Exercises:
- Analyze relationships between variables using scatter plots and correlation.
- Fit and interpret linear regression models.
- Test goodness-of-fit and make predictions using regression models.
- Topics Covered:
- Creating Two-Way Frequency Tables
- Marginal Distributions
- Joint and Conditional Probabilities
- Bar Plots and Proportions
- Key Exercises:
- Perform univariate and bivariate analyses using two-way tables.
- Create stacked and multiple bar plots to visualize categorical data relationships.
- Answer specific questions related to the dataset using proportions and graphical methods.
- Topics Covered:
- Introduction to ggplot2 package
- Creating various types of plots using ggplot2
- Customizing plots with themes and labels
- Key Exercises:
- Create bar graphs, histograms, and density plots using ggplot2.
- Generate scatter plots and add smooth curves.
- Customize plots with titles, themes, and color palettes.
- Analyze factors associated with low birth weight using the birthweight dataset.
- Topics Covered:
- Confidence Intervals
- Hypothesis Testing (Z-test and t-test)
- Interpreting p-values
- Key Exercises:
- Construct confidence intervals for population means.
- Perform one-sample Z-tests and t-tests.
- Interpret test results and p-values.
- Analyze rock samples data to test hypotheses about pore space area.
Each lab exercise uses specific datasets such as mtcars, Class, airquality, iris, cats, and custom datasets provided in the lab instructions.
- Install R: Make sure R is installed on your machine. You can download it from CRAN.
- Run the Scripts: Use RStudio or any R environment to execute the scripts provided for each lab exercise.
- View Outputs: The outputs include various charts, tables, and statistical analyses that answer the lab questions.