Tuesday, March 29, 2022

What is coefficient of linear expansion?

When a solid is heated, it increases in volume. It increases in length, breadth, and thickness. The increase in length of any side of a solid will depend on the original length l0, the rise in temperature t, and the coefficient of linear expansion α.


The coefficient of linear expansion may be defined as the increase in length per unit length when the temperature is raised 1°C. Thus if the temperature of a rod of length l0 is raised from 0°C to t°C, the new length, lt, will be given by


(21.1)

The value of the coefficient of expansion varies from substance to substance. The coefficients of linear expansion of some common materials are given in Table 21.1.


references:

https://www.sciencedirect.com/topics/engineering/linear-coefficient-of-expansion#:~:text=The%20coefficient%20of%20linear%20expansion%20may%20be%20defined%20as%20the,is%20raised%201%C2%B0C.

Monday, March 14, 2022

What is multiplication rule of probability?

According to the multiplication rule of probability, the probability of occurrence of both the events A and B is equal to the product of the probability of B occurring and the conditional probability that event A occurring given that event B occurs.

If A and B are dependent events, then the probability of both events occurring simultaneously is given by:

P(A ∩ B) = P(B) . P(A|B)

If A and B are two independent events in an experiment, then the probability of both events occurring simultaneously is given by:

P(A ∩ B) = P(A) . P(B)

 references:

https://byjus.com/maths/multiplication-rule-probability/#:~:text=What%20is%20the%20Multiplication%20Rule,given%20that%20event%20B%20occurs.

Saturday, March 12, 2022

What is Shiny App


Shiny is an open source R package that provides an elegant and powerful web framework for building web applications using R. Shiny helps you turn your analyses into interactive web applications without requiring HTML, CSS, or JavaScript knowledge.


Shiny is an R package that makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in R Markdown documents or build dashboards. You can also extend your Shiny apps with CSS themes, htmlwidgets, and JavaScript actions.


install.packages("shiny")


Structure of a Shiny App

Shiny apps are contained in a single script called app.R. The script app.R lives in a directory (for example, newdir/) and the app can be run with runApp("newdir").


app.R has three components:


a user interface object


a server function


a call to the shinyApp function


The user interface (ui) object controls the layout and appearance of your app. The server function contains the instructions that your computer needs to build your app. Finally the shinyApp function creates Shiny app objects from an explicit UI/server pair.


Note: Prior to version 0.10.2, Shiny did not support single-file apps and the ui object and server function needed to be contained in separate scripts called ui.R and server.R, respectively. This functionality is still supported in Shiny, however the tutorial and much of the supporting documentation focus on single-file apps.


One nice feature about single-file apps is that you can copy and paste the entire app into the R console, which makes it easy to quickly share code for others to experiment with. For example, if you copy and paste the code above into the R command line, it will start a Shiny app.


ui

Here is the ui object for the Hello Shiny example.

References:

https://www.rstudio.com/products/shiny/#:~:text=Shiny%20is%20an%20open%20source,%2C%20CSS%2C%20or%20JavaScript%20knowledge.

https://shiny.rstudio.com/gallery/