Close Menu
    Trending
    • Implementing IBCS rules in Power BI
    • What comes next for AI copyright lawsuits?
    • Why PDF Extraction Still Feels LikeHack
    • GenAI Will Fuel People’s Jobs, Not Replace Them. Here’s Why
    • Millions of websites to get ‘game-changing’ AI bot blocker
    • I Worked Through Labor, My Wedding and Burnout — For What?
    • Cloudflare will now block AI bots from crawling its clients’ websites by default
    • 🚗 Predicting Car Purchase Amounts with Neural Networks in Keras (with Code & Dataset) | by Smruti Ranjan Nayak | Jul, 2025
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Artificial Intelligence»Applications of Density Estimation to Legal Theory
    Artificial Intelligence

    Applications of Density Estimation to Legal Theory

    Team_AIBS NewsBy Team_AIBS NewsJune 10, 2025No Comments16 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    , I wrote an article in regards to the idea (and a few purposes!) of density estimation, and the way it’s a highly effective device for a wide range of strategies in statistical evaluation. By overwhelmingly common demand, I assumed it could be attention-grabbing to make use of density estimation to derive some perception on some attention-grabbing knowledge — on this case, knowledge associated to authorized idea.

    Constructive criticism

    Though it’s nice to dive deep into the mathematical particulars behind the statistical strategies to kind a strong understanding behind the algorithm, on the finish of the day we wish to use these instruments to derive cool insights from knowledge!

    On this article, we’ll use density estimation to research some knowledge concerning the affect of a two-verdict vs. a three-verdict system on the juror’s perceived confidence of their ultimate verdict.

    Contents


    Background & Dataset

    Our authorized system within the US makes use of a two-option verdict system (responsible/not responsible) in prison trials. Nonetheless, another international locations, particularly Scotland, use a three-verdict system (responsible/not responsible/not confirmed) to find out the destiny of a defendant. On this three-verdict system, jurors have the extra selection to decide on a verdict of “not confirmed”, which implies that the prosecution has delivered inadequate proof to find out whether or not the defendant is responsible or harmless.

    Legally, the “not confirmed” and “not responsible” verdicts are equal, because the defendant is acquitted beneath both consequence. Nonetheless, the 2 verdicts carry completely different semantic meanings, as “not confirmed” is meant to be chosen by jurors when they don’t seem to be satisfied that the defendant is culpable for or harmless from the crime at hand. 

    Scotland has recently abolished this third verdict on account of its complicated nature. Certainly, when studying about this myself, I stumbled on conflicting definitions for this verdict — some sources outlined it as the choice to pick out when the juror believes that the defendant is culpable, however the prosecution has did not ship ample proof to convict them. This will give a defendant who has been acquitted by the “not confirmed” consequence an identical stigma as a defendant who was discovered responsible within the eyes of the general public. In distinction, other sources outlined the decision as the center floor between responsible and innocence (complicated!).

    On this article, we’ll analyze knowledge containing the perceived confidence of verdicts from mock jurors beneath the two-option and three-option verdict system. The information additionally incorporates info concerning whether or not there was conflicting proof current within the testimony. These options will permit us to research whether or not the perceived confidence ranges of jurors of their ultimate verdicts differ relying on the decision system and/or the presence of conflicting proof.

    For extra details about the info, try the doc.


    Density Estimation for Exploratory Evaluation

    With out additional ado, let’s dive into the info!

    mock <- learn.csv("knowledge/MockJurors.csv")
    abstract(mock)
    Knowledge Abstract

    Our knowledge consists of 104 observations and three variables of curiosity. Every remark corresponds to a mock juror’s verdict. The three variables we’re eager about are described under:

    • verdict: whether or not the juror’s determination was made beneath the two-option or three-option verdict system.
    • battle: whether or not conflicting testimonial proof was current within the trial.
    • confidence: the juror’s diploma of confidence of their verdict on a scale from 0 to 1, the place 0/1 corresponds to low/excessive confidence, respectively.

    Let’s take a short have a look at every of those particular person options.

    # barplot of verdict
    ggplot(mock, aes(x = verdict, fill = verdict)) + 
            geom_bar() +
          geom_text(stat = "depend", aes(label = after_stat(depend)), vjust = -0.5) +
          labs(title = "Rely of Verdicts") +
          theme(plot.title = element_text(hjust = 0.5))
    
    # barplot of battle
    ggplot(mock, aes(x = battle, fill = battle)) + 
             geom_bar() +
          geom_text(stat = "depend", aes(label = after_stat(depend)), vjust = -0.5) +
          labs(title = "Rely of Battle Ranges") +
          theme(plot.title = element_text(hjust = 0.5))
    
    # crosstab: verdict & battle
    # i.e. distribution of conflicting proof throughout verdict ranges
    ggplot(mock, aes(x = verdict, fill = battle)) +
      geom_bar(place = "dodge") +
      geom_text(
        stat = "depend",
        aes(label = after_stat(depend)),
        place = position_dodge(width = 0.9),
        vjust = -0.5
      ) +
      labs(title = "Verdict and Battle") +
      theme(plot.title = element_text(hjust = 0.5))
    Barplot of Verdict
    Barplot of Battle
    Barplot of Verdict stratified by Battle

    The observations are evenly cut up among the many verdict ranges (52/52) and almost evenly cut up throughout the battle issue (53 no, 51 sure). Moreover, the distribution of battle seems to be evenly cut up throughout each ranges of verdict i.e. there are roughly an equal variety of verdicts made beneath conflicting/no conflicting proof recorded for each verdict techniques. Thus, we will proceed to match the distribution of confidence ranges throughout these teams with out worrying about imbalanced knowledge affecting the standard of our distribution estimates.

    Let’s have a look at the distribution of juror confidence ranges.

    We are able to visualize the distribution of confidence ranges utilizing density estimates. Density estimates, can present a transparent, intuitive show of a variable’s distribution, particularly when working with massive quantities of information. Nonetheless, the estimate could fluctuate significantly with respect to a couple parameters. For example, let’s have a look at the density estimates produced by varied bandwidth selection methods.

    bws <- record("SJ", "ucv", "nrd", "nrd0")
    
    # Arrange a 2x2 grid for plotting
    par(mfrow = c(2, 2))  # 2 rows, 2 columns
    
    for (bw in bws) {
      pdf_est <- density(mock$confidence, bw = bw, from = 0, to = 1) 
      
      # Plot PDF
      plot(pdf_est,
           important = paste("Density Estimate: Confidence (", bw, ")" ),
           xlab = "Confidence",
           ylab = "Density",
           col = "blue",
           lwd = 2)
      rug(mock$confidence)
      # polygon(pdf_est, col = rgb(0, 0, 1, 0.2), border = NA)
      grid()
    }
    
    # Reset plotting format again to default (non-compulsory)
    par(mfrow = c(1, 1))
    Density estimates of Confidence throughout varied bandwidths 

    The density estimates produced by the Sheather-Jones, unbiased cross-validation, and regular reference distribution strategies are pictured above.

    Clearly, the selection of bandwidth can provide us a really completely different image of the arrogance degree distribution.

    • Utilizing unbiased cross-validation gives the look that the distribution of confidence may be very sparse, which isn’t shocking contemplating how small our dataset is (104 observations).
    • The density estimates produced by the opposite bandwidths are pretty comparable. The estimates produced by the traditional reference distribution strategies seem like barely smoother than that produced by Sheather-Jones, because the regular reference distribution strategies use the Gaussian kernel of their computation. Total, confidence ranges seem like extremely concentrated round values of 0.6 or higher, and its distribution seems to have a heavy left tail.

    Now, let’s get into the attention-grabbing half and look at how juror confidence ranges could change relying on the presence of conflicting proof and the decision system.

    # plot distribution of Confidence by Battle
    # use Sheather-Jones bandwidth for density estimate
    ggplot(mock, aes(x = confidence, fill = battle)) +
      geom_density(alpha = 0.5, bw = bw.SJ(mock$confidence)) + 
      labs(title = paste("Density: Confidence by Battle")) + 
      xlab("Confidence") + 
      ylab("Density") +
      theme(plot.title = element_text(hjust = 0.5))
    Density of Confidence by Battle

    It seems that juror confidence ranges don’t differ a lot within the presence of conflicting proof, as proven by the big overlap within the confidence density estimates above. Maybe within the presence of no conflicting proof, jurors could also be barely extra assured of their verdicts, because the confidence density estimate beneath no battle seems to point out larger focus of confidence values higher than 0.8 relative to the density estimate beneath the presence of conflicting proof. Nonetheless, the distributions seem almost the identical.

    Let’s look at whether or not juror confidence ranges fluctuate throughout two-option vs. three-option verdict techniques.

    # plot distribution of Confidence by Verdict
    # use Sheather-Jones bandwidth for density estimate
    ggplot(mock, aes(x = confidence, fill = verdict)) +
      geom_density(alpha = 0.5, bw = bw.SJ(mock$confidence)) + 
      labs(title = paste("Density: Confidence by Verdict")) + 
      xlab("Confidence") + 
      ylab("Density") +
      theme(plot.title = element_text(hjust = 0.5))
    Density of Confidence by Verdict

    This visible offers extra compelling proof to counsel that confidence ranges will not be identically distributed throughout the 2 verdict techniques. It seems that jurors could also be barely much less assured of their verdicts beneath the two-option verdict system relative to the three-option system. That is supported by the truth that the distribution of confidence beneath the two-option and three-option verdict techniques seem to peak round 0.625 and 0.875, respectively. Nonetheless, there may be nonetheless important overlap within the confidence distributions for each verdict techniques, so we would want to formally take a look at our declare to conclude whether or not confidence ranges differ considerably throughout these verdict techniques.

    Let’s look at whether or not the distribution of confidence differs throughout joint ranges of verdict and battle.

    # plot distribution of Confidence by Battle & Verdict
    # use Sheather-Jones bandwidth for density estimate
    ggplot(mock, aes(x = confidence, fill = battle)) +
      geom_density(alpha = 0.5, bw = bw.SJ(mock$confidence)) +
      facet_wrap(~ verdict) +
      labs(title = paste("Density: Confidence by Battle & Verdict")) +
      xlab("Confidence") +
      ylab("Density") +
      theme(plot.title = element_text(hjust = 0.5))
    Density of Confidence by Battle & Verdict

    Analyzing the distribution of confidence stratified by battle and verdict provides us some attention-grabbing insights.

    • Beneath the two-verdict system, confidence ranges of verdicts made beneath conflicting proof/no conflicting proof seem like very comparable. That’s, jurors appear to be equally assured of their verdicts within the face of conflicting proof when working beneath the standard responsible/not responsible judgement paradigm.
    • In distinction, beneath the three-option verdict, jurors appear to be extra assured of their verdicts beneath no conflicting proof relative to when conflicting proof is current. Their corresponding density plots present that verdicts with no conflicting proof present a lot larger focus at excessive confidence ranges (confidence > 0.75) in comparison with verdicts made with conflicting proof. Moreover, there are almost no verdicts made beneath the absence of conflicting proof the place the jurors reported confidence ranges lower than 0.2. In distinction, within the presence of conflicting proof, there’s a a lot bigger focus of verdicts that had low confidence ranges (confidence < 0.25).

    Formally Testing Distributional Variations

    Our exploratory knowledge evaluation confirmed that juror confidence ranges could differ relying on the decision system and whether or not there was conflicting proof. Let’s formally take a look at this by evaluating the confidence densities stratified by these elements.

    We are going to perform exams to match the distribution of confidence within the following settings (as we did above in a qualitative method):

    • Distribution of confidence throughout ranges of battle.
    • Distribution of confidence throughout ranges of verdict.
    • Distribution of confidence throughout ranges of battle and verdict.

    First, let’s evaluate the distribution of confidence within the presence of conflicting/no conflicting proof. We are able to evaluate these confidence distributions throughout these battle ranges utilizing the sm.density.compare() operate that’s supplied as a part of the sm bundle. To hold out this take a look at, we will specify the next key parameters:

    • x: vector of information whose density we wish to mannequin. For our functions, this will likely be confidence.
    • group: the issue over which to match the density of x. For this instance, this will likely be battle.
    • mannequin: setting this to equal will conduct a speculation take a look at figuring out whether or not the distribution of confidence differs throughout ranges of battle.

    Moreover, we are going to set up a typical bandwidth for the density estimates of confidence throughout the degrees of battle. We’ll do that by computing the Sheather-Jones bandwidth for the confidence ranges for every battle subgroup, then computing the harmonic imply of those bandwidths, after which set that to the bandwidth for our density comparability.

    For all of our speculation exams under, we will likely be utilizing the usual α = 0.05 standards for statistical significance.

    set.seed(123)
    
    # outline subsets for battle
    no_conflict <- subset(mock, battle=="no")
    yes_conflict <- subset(mock, battle=="sure")
    
    # compute Sheather-Jones bandwidth for subsets
    bw_n <- bw.SJ(no_conflict$confidence)
    bw_y <- bw.SJ(yes_conflict$confidence)
    bw_h <- 2/((1/bw_n) + (1/bw_y)) # harmonic imply
    
    # evaluate densities
    sm.density.evaluate(x=mock$confidence, 
                       group=mock$battle, 
                       mannequin="equal", 
                       bw=bw_h, 
                       nboot=10000)
    Density comparability take a look at of Confidence by Battle

    The output of our name to sm.density.evaluate() produces the p-value of the speculation take a look at talked about above, in addition to a graphical show overlaying the density curves of confidence throughout each ranges of battle. The massive p-value (p=0.691) means that now we have inadequate proof to reject the null speculation that the densities of confidence for battle/no-conflict are equal. In different phrases, this means that jurors in our dataset are inclined to have comparable confidence of their verdicts, no matter whether or not there was conflicting proof within the testimony.

    Now, we’ll conduct an identical evaluation to formally evaluate juror confidence ranges throughout each verdict techniques.

    set.seed(123)
    
    # outline subsets for battle
    two_verdict <- subset(mock, verdict=="two-option")
    three_verdict <- subset(mock, verdict=="three-option")
    
    # compute Sheather-Jones bandwidth for subsets
    bw_2 <- bw.SJ(two_verdict$confidence)
    bw_3 <- bw.SJ(three_verdict$confidence)
    bw_h <- 2/((1/bw_2) + (1/bw_3)) # harmonic imply
    
    # evaluate densities
    sm.density.evaluate(mock$confidence, group=mock$verdict, mannequin="equal", 
                       bw=bw_h, nboot=10000)
    Density comparability take a look at of Confidence by Verdict

    We see that the p-value related to the comparability of confidence throughout the two-verdict vs. three-verdict system is way smaller (p=0.069). Though we nonetheless fail to reject the null speculation, a p-value of 0.069 on this context implies that if the true distribution of confidence ranges was similar for two-verdict and three-verdict techniques, then there may be an roughly 7% likelihood that we come throughout empirical knowledge the place the distribution of confidence throughout each verdict techniques differs at the very least as a lot as what we see right here. In different phrases, our empirical knowledge is pretty unlikely to happen if jurors have been equally assured of their verdicts throughout each verdict techniques.

    This conclusion aligns with what we noticed in our qualitative evaluation above, the place it appeared that the arrogance ranges for verdicts beneath the two-verdict vs. three-verdict system have been completely different — particularly, verdicts beneath the three-verdict system gave the impression to be made with larger confidence than verdicts made beneath two-verdict techniques. 

    Now, for the needs of future investigation, it might be nice to increase the info to incorporate the ultimate verdict determination (i.e. responsible/not responsible/not confirmed). Maybe, this extra knowledge might assist make clear how jurors really see the “not confirmed” verdict.

    • If we see larger confidence ranges within the “responsible”/“not responsible” verdicts beneath the three-verdict system relative to the two-verdict system, this may occasionally counsel that the “not-proven” verdict is successfully capturing the uncertainty behind the choice making of the jurors, and having it as a 3rd verdict offers fascinating flexibility that two-option verdict system lacks.
    • If the arrogance ranges within the “responsible”/“not responsible” verdicts are roughly equal throughout each verdict techniques, and the arrogance ranges of all three verdicts are roughly equal within the three-verdict system, then this may occasionally counsel that the “not confirmed” verdict is serving as a real third possibility unbiased of the everyday binary verdicts. That’s, jurors are opting to decide on “not confirmed” primarily for causes apart from their uncertainty behind classifying the defendant as responsible/not responsible. Maybe, jurors view “not confirmed” as the decision to decide on when the prosecution has did not ship convincing proof, even when the juror has a touch of the true culpability of the defendant.

    Lastly, let’s take a look at whether or not there are any variations within the distribution of confidence throughout completely different ranges of battle and verdict.

    To check for variations within the distribution of confidence throughout these subgroups, we will run a Kruskal-Wallis test. The Kruskal-Wallis take a look at is a non-parametric statistical methodology to check for variations within the distribution of a variable of curiosity throughout teams. It’s acceptable if you wish to keep away from making assumptions in regards to the variable’s distribution (i.e. non-parametric), the variable is ordinal in nature, and the subgroups beneath comparability are unbiased of one another. Primarily, you could consider it because the non-parametric, multi-group model of a one-way ANOVA.

    R makes this simple for us through the kruskal.test() API. We are able to specify the next parameters to hold out our take a look at:

    • x: vector of information whose distribution we wish to evaluate throughout teams. For our functions, this will likely be confidence.
    • g: issue figuring out the teams over which we wish to evaluate the distribution of x. We are going to set this to group_combo, which incorporates the subgroups of verdict and battle.
    kruskal.take a look at(x=mock$confidence, 
                 g=mock$group_combo) # group_combo: subgroups outlined by verdict, battle
    Kruskal-Wallis take a look at of Confidence by Battle & Verdict

    The output of the Kruskal-Wallis take a look at (p=0.189) means that we lack ample proof to say that juror confidence ranges differ throughout ranges of verdict and battle.

    That is considerably sudden, as our qualitative evaluation appeared to counsel that partitioning every verdict group by battle segmented the confidence values in a significant means. It’s worthy to notice that there was a small quantity of information in every of those subgroups (25-27 observations), so accumulating extra knowledge may very well be a subsequent step to research this additional.


    Future Investigation & Wrap-up

    Let’s briefly recap the outcomes of our evaluation: 

    • Our exploratory knowledge evaluation appeared to point that juror confidence ranges differed throughout verdict techniques. Moreover, the presence of conflicting proof appeared to have an effect on juror confidence ranges within the three verdict system, however have little have an effect on within the two-verdict system. Nonetheless, none of our statistical exams supplied important proof to assist these conclusions. 
    • Though our statistical exams weren’t supportive, we shouldn’t be so fast to dismiss our qualitative evaluation. Subsequent steps for this investigation might embody getting extra knowledge, as we have been working with solely 104 observations. Moreover, extending our knowledge to incorporate the decision selections of the jurors (responsible/not responsible/not confirmed) might allow additional investigation into when jurors choose to decide on the “not confirmed” verdict.

    Thanks for studying! When you have any further ideas about how you’ll’ve carried out this evaluation, I’d love to listen to it within the feedback. I’m actually no area professional on authorized idea, so making use of statistical strategies on authorized knowledge was an awesome studying expertise for me, and I’d love to listen to about different attention-grabbing issues on the intersection of the 2 fields. In case you’re eager about studying additional, I extremely suggest testing the sources under!

    The writer has created all photos on this article.


    Sources

    Knowledge:

    Authorized idea:

    Statistics:



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleFine-Tuning LLMs in 2025: RLHF PPO DPO and TRL for ML Engineers
    Next Article How My Old Job Secretly Prepared Me to Build a Thriving Business
    Team_AIBS News
    • Website

    Related Posts

    Artificial Intelligence

    Implementing IBCS rules in Power BI

    July 1, 2025
    Artificial Intelligence

    Become a Better Data Scientist with These Prompt Engineering Tips and Tricks

    July 1, 2025
    Artificial Intelligence

    Lessons Learned After 6.5 Years Of Machine Learning

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Implementing IBCS rules in Power BI

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    The Silent Swarm: How Military Micro Drones Will Revolutionize Warfare | by Aniket | Jun, 2025

    June 15, 2025

    Time Is What You Experience When Something Changes | by Moriba Jah | May, 2025

    May 26, 2025

    AI and Automation: The Perfect Pairing for Smart Businesses

    May 29, 2025
    Our Picks

    Implementing IBCS rules in Power BI

    July 1, 2025

    What comes next for AI copyright lawsuits?

    July 1, 2025

    Why PDF Extraction Still Feels LikeHack

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.